 Thank you all for being here last session of the day and Yeah, so here's a sentence. I never thought I'd say I am Petia and I'm here today to talk to you about the WordPress REST API Yeah, so why I never thought I'd say that well it's because the only people I've ever heard talk about the REST API are developers and I've never in my life been only one thing but you know I've always been more than one thing like a project manager and an event manager and an organizer and community lead and things like that But developer has never been one of the things I've been So why would I talk about the REST API? Well Because at some point I decided that I have to understand it and then I decided that maybe I have to share it I'm a part of this amazing WordPress agency called Human Made and Human Made does WordPress center-price work and a lot of work with the REST API and a lot of my big part of my job is to Talk to clients about what human human made does so understanding the REST API was one of the things We also organize these events around the REST API because we have a lot of internal knowledge About it. They're called the day of REST and you're not gonna hear any REST puns today during this talk. I promise no Yeah, but This is these are conferences that I'm involved in organizing and you know, it only made sense to understand What the technology around them is and then You know, I'm gonna tell you a little bit about my Of my backstory just because it's kind of relevant to why I'm talking to you today as well I Was pulled into the web development world from publishing and marketing and PR. I'm one of those people and I worked for a traditional publisher in Bulgaria I got there from the marketing department and I worked with the development department for almost five years Working with a team of developers building digital platforms for traditional media and my project management job Consisted of telling developers what to do without Any idea of how they do it Zero idea of how they do it In fact, when I joined that web development team, I didn't even know what a CMS was You know programming languages Front-end and all that jazz Not even gonna mention that Yeah, so for years my involvement was just telling people what to do without knowing how they do it And then all of a sudden in 2011 that changed because because along in my life came work press and all of a sudden I Could be everything for myself, you know, I could build a website on my own I could tweak menus and you know make front-end changes I learned a little bit of HTML and CSS and felt like a like like a god You know wordpress made me feel like anything was possible. I did not need developers anymore. That was so amazing Everything was possible right and wordpress makes a lot of people feel like that like You know 27% of the web It's growing. It's growing and amazing at an amazing rate And how how did it even get here from a blogging platform in 2003 when it started, you know It's like it was just for people to like share their stories and then custom post types it was all you know all of a sudden the CMS and then an admin redesign and like a big media and a library thing and Publishers started liking it and it became like a publishing platform And then the business ecosystem grew and people started like building larger and larger projects And it started being slow and people started being plugins to make it faster and then SEO optimization and all that huge Ecosystem around it and then in 2000, you know at some point people started talking about it being an application framework until today When all types of projects are built with wordpress from cooking blogs to like Media websites that have like thousands and thousands of impressions per day and The question is what's next? Where to from here and how how is it going to grow from here and Can we have can there be a software that can power both my grandmask cooking blog and you know the super intense Complex websites of the Sun with like hundreds of thousands of posts and a sophisticated flexible editorial management system on the background So and this talk I'll try to look into how the rest API is kind of the next thing that will allow wordpress to outgrow the current state and You know as the rest API is considered and actually getting merged into core We'll see how this technology will impact the project and how it can impact all of our businesses and Why on earth would know like people not stop talking about this rest API thing So I Think the reason the reason why people would not stop talking about it This exactly this because it is the next thing for wordpress next big thing for wordpress It's the next phase and it will allow wordpress to be considered as a key element of a larger more complex stack and that will happen by Providing it providing a clear path to the wordpress content for different other different technologies And this is important because if you think about it If we look at wordpress, let's try and imagine wordpress as a like a living Breathing creature, you know like this one for example You know and we have to if you if we think about it We have to admit like it has kind of a lot of responsibilities, right? it's you know, it's very friendly so it has like these millions of friends and It needs to pay attention to everyone all the time and it needs to be but it needs to be modern and hype and Tries tries to fit in with like all the other cool kids It needs to be really badass though and all powerful and strong and sophisticated and also very easy going and friendly to everyone That would like to just drop by and say hi and then go and you know if it hosted a party it had to take care of everything and It would have a very very hard time delegating It would you know have to prepare all the foods and like all different styles of food for like international guests as well, right and also deliver it very very fast and otherwise Now the crowd would get like mad and go eat somewhere else or it will all of a sudden You know it had to do like maintenance and the back end and just technical support and Clean up after everyone as well and security. It's important we don't want like bad actors at the party And then it also has to look gorgeous, right? It has to be very presentable and modern in front of its guests and like it has to speak a hundred languages and You know be everyone's personal guide to the party and even though these days. It's kind of it has a PhD For some people there are still the expectation that it has to behave like it did when it was in kindergarten, right? right So If it was a living breeding creature It will be on the verge of a little break down As an event organizer I can tell you I would and You know everyone would if people expected it Expected them to kind of take care of everything and do everything so so perfectly It'll be on the urge of break down Can we say that the WordPress is maybe starting to burn out a little Maybe Nikki if you think about it this moment is the moment not too far away from you know It's not too far away from a very knowledgeable very experienced gifted person like let's not say control freak. Let's say person You know at this moment when they start to realize that maybe they'd have to offload some of it Maybe somebody else can do some of the jobs better Right, there are probably people out there that will be better at this one thing. I'm trying to fit within everything else So the rest API is for WordPress that thing that will teach it to let go of certain things But maybe someone somehow can do better Rest API will teach WordPress to delegate and It will help WordPress Focus on what it does best Provide a brilliant amazing space for authors and editors to create content and The rest API will help WordPress to finally stop worrying about the front end and let the cool kids the developers love to play with take care of the front end and It can focus back on what it does best This is a non-violent thing We're not like beheading Wapoo or anything else don't worry about it. That's it's safe The headless CMS is a concept wherein the WordPress front like the front end to the back end are the couple the theming system is something separate from the admin that you know and love and The kind of one of the strongest things about WordPress. It's it's back end It's easy to grab comprehensive full-featured Publishing back end that is also extendable and customizable through plugins and authors really love it Authors really love publishing with WordPress. They like the visual editor You know and like all types of tiny things that have been created for them distraction free mode everything that makes you know small significant Significant gems that make that streamline content creation WordPress is great for that So the rest API will allow companies to develop products using WordPress just for its back end Separating it from the theming system, which nowadays powers the design the front end And it will allow developers to start using WordPress as a headless CMS This is the main difference, you know in a traditional CMS data collection deliver display You see it on the on the chart A headless CMS removes the theming system instead allows you to use any technology at the front end It's really really neat if you think about it So it creates a lot of opportunities Because developers are no longer limited by the technology on the front end of WordPress to create what their clients need And the content can be used for multiple purposes. You can for example power multiple multiple front ends you can use Using the API developers can actually power from one CMS from one back end You can power a mobile app an Apple Watch app a desktop application Or like just a desktop version of a website or just something entirely different Separating the back end from the front end helps create better products and allows new technologies to take care of the front Authors and editors can keep the back end that they love The interface they love on the back end And developers can use WordPress as a part of a bigger technology stack This is just this is just one example of a system where WordPress is used as just one part of a bigger system and it displays like a print CMS being used as the core source and data being driven from there to the WordPress install where the content is being translated and sent to multiple front ends like mobile apps and different different other types Okay You want to see some examples There are even though it hasn't been merged into core people have been using it in production for a long time so Let's see an example where Using the rest API a project was built with an alternative to the front end This is the website of us two who developed my favorite iOS game monument valley you guys heard of monument valley Yeah, it's amazing So us two wanted to use WordPress for the back end because they really loved it They loved how they could count that it will be developed Over the years and they wanted to build their own front end and do like all these interesting stuff So how like the colors just go from one color to another so They did they wanted to website with front with press back end and the front end built with react And that's that's their install basically they have a single page app with react front end and like a node js Which enables server side rendering And then if we look at another example with Like replacing the back end This is uh wired, which you probably all know So wired also uses the rest api for their live blogs where I serve A billion page views in 2015. So it's pretty impressive. They uh, they have this really Really interesting as those i'm going to read all of this because I get terribly confused when I talk about it Land developer. Hello So what they do is Um, their live blog uses data delivered from wordpress with react js front end And text and images are posted via a third party mobile platform saved to wordpress post meta And then made available using a custom wordpress rest api endpoint And then react js displays subsets of live blogs with a dynamic scrollable area Allowing visitors to easily and quickly read through The content and sit back it kind of updates automatically for them You don't have to refresh the page and it also allows developers to not worry about a really heavy Really heavy pages with like more than 300 posts for example And this is another example of wordpress as an app platform nomad base. This is a product that we built internally at human made that tracks Uh nomad base is like a digital nomad tool that helps you track your trips and connect With other digital nomads around you nomad base uses apis together geodata from facebook swarm twitter instagram and trip it Uh, we actually don't use it like wordpress is not used On the back end or the front end. It's only used as a database And um, the the data is stored in custom tables In the database and data is then sent over the wordpress rest api to a react front end And display it in the browser using uh mad box, which is a really Really cool platform Those were like some of the opportunities and kind of examples But there are a lot of challenges that come With the rest api especially for non developers and here A couple of them The first thing is uh, you have to remember this only counts if you were if you're talking about the WordPress project built with the rest api Don't freak out loss of core functionality is one of the things Um with the decoupling of the front end in the back end a lot of people that are non developers don't actually Make the difference between what is front end and what is back end with wordpress specifically when You know you have back end features on the front end like of the ability to Access the back end from the front end for example So, um, you know, there's some there are some things that get lost when uh, you're using the rest api And you have to specifically rebuild them to have them Um, like the whole kind of appearance settings, uh menus background the editor a customizer You know Which in a sense disempowers the so-called Website builders, you know all these people that are not developers but building projects with wordpress How many of you are that person Is everybody else a developer? What are you guys doing in this session? Oh my god, okay, i'm gonna start being a lot less friendly Uh Cool, so um, all right this this next bit is going to be a lesson for all of you. That's cool. Not just for uh, my boss joe um, all right, so, um The disempowering of wordpress site builders may lead to a lot of confusion and uh, what you may not Understand to realize is that those wordpress site builders can also be your clients So these are people that you should consider when building projects with the rest api And uh, here's the story I'm going to tell you a story. It's curious for two reasons First it illustrates what happens when you don't prepare your non developer team for a rest api project And second and poor important You know Because I haven't found a better way to give feedback To the team that's built the feeling restful.com sign Uh, you know, and this is the perfect opportunity to give them feedback, you know in front of thousands of people publicly Kind of you know in an event. That's also a live streamed actually, right? Oh, that's that that's right Okay, yeah, this is the right way to give feedback if you didn't know it's like especially if the developers are also like people That are in kind of your boss Um, yeah, so back to back to Side builders, uh, I am it were like a wordpress site builder And so is my colleague shivan who I really like and we both of us kind of work in the events department human mean Which is in charge of throwing these rest api events that I told you about a while back So when when we started when we decided to do to throw the first one We had to figure out how to put up the website Right and we had to do it fast because we wanted to announce the event But ha surprise, you know, human mate is super busy and there was no developer available developer available to build the website So shivan and I got to talking after like waiting a week two weeks for somebody to kind of you know, free to uh To throw a simple, you know five pages website for us We were like, okay, so We should use the team and build it ourselves, right? I mean in a way We can use everything that the wordpress ecosystem has to offer and we did With core and a premium theme dedicated to events and like our own kind of uh limited abilities We created a site in two days All the content was in there. Everything was great Except it wasn't really that great and people started like Mocking us on twitter that you know, we are throwing a rest api events with like a site built with a wordpress theme and they were speaking about like jacks and rendering and stuff that I didn't really understand But it bugged the developers so So it bugged them enough that they found two days to rebuild the site And um Uh And yeah, um You know, this was this was how the the the website uh looked before and then in two days joe Who is also a part of the rest api team? and uh, no who is our kind of uh Design person like a partner in uh human made in two days They had like an alternative that was built with uh The rest api and like a react power theme All the content was like thrown in there and everything was great And you know joe built this little widget on the bottom showing like the rest api requests and they open sourced it and And you know, everything was so so great And and for me that was amazing, you know, uh, you know, it was totally justified um That would mean people on twitter were shut up and I can go back to market my event And then joe posted because we're super transparent joe posted like uh about the theme and how he built it and why he built it and and also what Is missing from like a standard kind of wordpress uh install and uh, you know, what is not there And how it would impact like the publishing processes and the content creating processes And that is how shavon and I found out what we will be missing from the new website I mean just a few setbacks, you know, we couldn't edit menus We couldn't use previews on posts We couldn't impact the front end in any way. We couldn't change a simple link We couldn't even manipulate images if they weren't in the modular page builder that was used on the background we use and we couldn't upload our sponsor logos because the template for that wasn't built yet and um, you know, something as simple as adding a link to the page became a problem and Yeah, I I mean For years I had been able to figure something out with wordpress, you know Something always, you know, I'd upload a plugin and like change this here or hide something there Or like edit the code a little or like edit the css a little and and you know things would I could do something Not this time my hands were tight and for the first time since 2007 I was in the story miserable state where any changes on my website required a developer Shavon, you know, I mean I was it's hard to be mad at people that are so busy You know, so I was I was like that most of the time shavon was a little bit more blunt so in a In a wordpress development company where we were the three percent of non developers We had become like involuntary victims of the miscommunication of You know, what that cool new theme would not be able to do Would be taken away from us. So yeah back to those like wordpress site builders Just the biggest takeaway from the story is your clients might come to you Wanting a rest api project not knowing what that would be taken away from them So make sure that all the people on your team your project managers your developers see your clients are aware Of what functionality should be in their specifications are more important than ever in this case Yeah, so after this funny story let's get back to the boring lists So the necessity for structured portable data is one of the other challenges If you want to send your data like your content multiple front ends it has to be clear of CSS and tags and html and all the stuff that you know We are used to using on the back end to kind of format and create layouts and format pages So this is one of the other challenges that this is going to have to That's going to have to be dealt with And progressive enhancement is another one and do you remember how I told you that I thought that when we Launched that cool new react theme we would get twitter off our back Uh, yeah, so when we launched it It turned out that when a usable javascript the turn the page turns black on the new website So twitter did not shut up Um, and um It's not that uh A rest api powered website cannot work without javascript. It's that there have to be um Specific uh, and there has to be a specific effort put into making it work with uh without javascript So this is something that you have to figure out and know about And then there's the knowledge deficit in an ecosystem where like most developers are php developers and so many people are self-taught You know learning javascript and learning all these cool new technologies can be um a little bit of a challenge So this is something that the wordpress ecosystem doesn't have right now And it's going to have to acquire to be able to produce really really good Uh projects with the wordpress rest api So what will change What will change? Let's just sum up Wordpress will be a part of a larger stack Wordpress stopped being a web development tool used in isolation It will become one module that is available in a web development toolkit Imagine all these web development agencies that are not working with wordpress They could start using it just for its back end and use all kinds of cool front end technologies to build with it and um You will need a developer to build a rest api website true Wordpress developers will become maybe will become back end specialists. We are Specializing in just wordpress and we've been hired to do only back end and it's been super cool Really nice to work into those really big projects where we're just one part of the work And this is maybe a path for a lot of the other wordpress companies Wordpress will be adopted outside of php communities. Maybe they will stop hating on us so much Who knows maybe they will start appreciating wordpress for the great things that it has so uh, let's hope for that and then um There will be so many new role-based admin interfaces Like this is uh happy tables, which is a restaurant website builder and on the back end It only has what a website owner um the restaurant website owner needs to build a website So all the clutter all that's you know, wordpress is good for everything But like where is everything on the back end? It's going to disappear And you can create and easily create a more customized customized back end experience And then the enhancement of the in-built functionality the opportunities that you have to and to like just extend the back end They're more advanced and more performance When using the rest api and there are more than what can be achieved with php At least that's what's promised And actually the good thing is nothing has to change Unless you want it to you don't have to use the rest api if you want to build you if you want to build like A very very small four page website If that makes you happy it's fast enough and if it makes your clients happy you can keep doing that What will not change is Themes and team shops will continue to function as before There will be business for absolutely everyone And uh wordpress will still be used for blogging because it's great for writing content and small sites and do it yourself sites And backwards compatibility will never suffer because of this And ultimately wordpress will the press's mission will remain the same to democratize publishing So nothing really has to change Even though the rest api is a game changer Because it opens new exciting opportunities So I guess there is only one question left As the rest api getting merged in core It is Okay, let's rephrase It is Yeah Come on people get excited. It's the end of the day, but there's beer after. Yeah Okay, yeah, so 4.4 got the infrastructure merged and then In a few days 4.7 will include the endpoints for posts And comments and users meta and settings and before you start asking me what this is You probably want because you're all developers, but still I want to give you a few resources on the rest api This is a amazing White paper that my colleagues wrote. Uh, it's cold talking to 25 percent of the web because it was Written in the beginning of the year and who knew that it will grow in two percent in a year um It's it has a a lot of the examples that I already gave In it and is a really good read for for you to send to clients that are interested in being in building rest api project Um, and this is where the documentation on the rest apis The team has been really good in keeping documentation. So that's really really great And in january we threw this conference called the arrest london And there are amazing talks from it published on the web on post status.com slash resources So, uh, take a look at how they have like a lot of examples somehow wired Uses the rest api and new york times uses the rest api And a lot a really nice introduction from the rest api team and a lot of great examples Yeah, kanam took the feeling restful site and like completely dumped it in another front end It was really humorous to watch on stage Like just the content of your website with a completely different design just in five and a half minutes Um Yeah, and we're also organizing another conference if you want to learn more uh in boston 2017 In march, it's going to have people Using the rest api in production. So if you need ideas or want to meet likewise Like mind the developers building awesome stuff for the rest api Like to see you all there Thank you And uh, the the amazing burnt out wapoo was designed by uh, scott evans in the uk. Thank you scott And realized that in gift card credit credits So do we have do we have time for questions? Yeah, um, okay. We have time for questions I'm going to direct all the developer questions to like where jorben there he is and like joe. Where are you? So you can ask rest api questions. I have people to answer them I know how to delegate And if you don't you can yeah question. Yeah No, just shout it out. I would read it Of course. Yeah, there you can have like modules powered by the rest api Yeah, you can still have like a theme on the theme on the front end and just several Um, you know several of your kind of plugins being, uh, you know relying on the data coming from somewhere else It's it's pretty easy to Just build a module within your system like a plugin that is powered by the rest api not not the whole front end. Yeah Yeah So i've been looking at the documentation on the rest api. Oh, okay. Sorry Sorry So i've been looking at the documentation on the rest api And what confuses me is that because of the fact that it's getting merged into core Um, is it the same documentation that would still be a valid? After the merge or do we have to read read new documentation because of the merge? Yeah, that is a really good question. So the question. Yeah, you did you hear it? Where's joe? Where is he Is the same Okay, there you go They're migrating it to them to yeah to the main site. Oh adam. Yeah This thing is really bright Okay, um, so, uh, thank you for the talk I know you were kind of baffled by the fact that there was a lot of developers here Um, the reason I came was because I want to explain it to non developers and I wanted to know how And one thing I noticed about The rest api is I know why it's called the rest api and I know why rest is like an important term but I'm wondering why We haven't as a community come up with a more friendly name because We've generally not used technical terms to describe things in wordpress right I think it's the broader community that's it's it's not at fault, but it's like a api is like a broader term I mean api is just as foreign to me as rest To be honest, you know And then we talk about the twitter api and the facebook api and like all these apis At some point, uh, your non developers, especially your project managers are going to have to learn these terms and the white Why things are called the way they are they just need to be able to explain the technology to clients The term doesn't really I mean it signifies something as as as long as you're Able to give an example that kind of explains to clients What this thing does and why it's important and why you know, it should be this and not the other technology That's that's kind of enough. I think Okay, thank you. Yeah, sure Hi, um So as someone who experienced the shortcomings of uh, working with a custom front end. I'm drama. I'm like over dramatizing, you know Do you do you feel that there is a gap, uh that where There's value for solutions That will work on the front end, but we'll still have the Flexibility that you have in working with word wordpress so that you can still do all the stuff that you do in wordpress And all of that gets carried over without a developer or to a react or a javascript front end I am looking forward to the first, uh, react powered themes that go on the market that are customizable like the other ones that we are using I don't know if this is maybe something that you you meant, but yeah, I think that's we're we're going to be seeing some of them. I know that the The plugin directory actually is open to Accepting those already is just nobody is really submitting them. But yeah, it's um, I think it's It's going to be the next interesting market to to take a look at like react powered teams on the markets All right. Thank you. Sure There was a question up front here That the guy like yeah. Oh, was it you? Okay Cool. All right guys, I don't want to stand between in between you and beer or like any kind of refreshments So thank you so much