 I think we'll probably get started so we don't take too long today. We've got quite a bit to get through in this session. Welcome to Drupal 8 Ready. My name's Christopher Skeen and my colleague Boris Gordon is sitting over there in the comfy chairs, which would be quite good for him for most of this talk. Today's session is about helping you prepare for Drupal 8. And what we're going to do is reduce Drupal 8's really long change list down to a number of kind of useful, actionable things that you can do to get you ready for Drupal 8 when it launches, hopefully early next year. And if you saw the keynote, as I'm sure most of you did, you've already got a bit of prep for this session. We're going to talk about some of the same things in a bit of a different way. There are over 500 Drupal 8 change records. Some of these are relatively minor. They might be a signature change for a function or something else that you can probably pick up later on. But others are quite significant, such as a new API or a new way of doing an old thing. There's a lot of stuff to look through here, and it's very difficult for the average developer to go through all of these and work out what all the changes are. Depending on how you count them, there's also 24-odd new APIs or changed APIs. It depends what you call an API, really. But there's quite a high number. And some of those are quite important. Some of them are not so important, so we're going to filter out some of those today as well. The subject of this presentation is to distill those changes down for you so you can prepare for Drupal 8. So what are we going to cover? We're going to look at changes and additions in Drupal 8. We're going to break them down by role and by technology group. Then we're going to give you some learning resources for each thing in case you need to go away and actually find out what it is or how it works. And finally, we're going to give you some pointers to relevant Drupal concessions that are on for the next couple of days. We can't provide the level of detail that's needed to really get into any of these, but they can. It's also worth noting that the Drupal 8 API is still in flux. It's still changing not in a major way, but just in a minor way. Details are changing. So what we talk about here today might shift a little bit before it releases, but that's all right. In preparing this session we've tried to work out what skills are actually important. What do you need to know? What do you not need to know? We've put together this skills matrix which I know you can't read. We looked at the skills required for three groups, site builders, themas and developers. We looked at how these skills started if you came on at Drupal 6. What skills you needed there. How that might have changed in Drupal 7 and what you might have needed for Drupal 8. This diagram is available on our website. If you want to dig into it it includes some extra stuff that we're not going to cover today. I'll give you a link for that in a second. It's also slightly out of date. This was made probably a month ago and I reckon there's a few things we'd remove and a couple of things we might add now. But the bigger picture is still correct. If you started with Drupal 6 you actually had quite a lot to learn. This is tribal knowledge as Dries mentioned in the previous presentation. When you transitioned to Drupal 7 you actually still had quite a lot to learn again. Drupal 7 had a really steep learning curve which is something a lot of us forget. If you started with Drupal 7 you wouldn't have even come across that. I guess in our opinion despite some of the rumors to the contrary it doesn't introduce a significantly large number of Drupal API changes. It introduces a few big ones but it's not an unusual number for a new Drupal release. However, for the first time it does introduce a significant number of new programming paradigms for developers and that's where some of the issues are coming in currently. For most of the categories that we've looked at the relative number of changes has been fairly small. So just roughly if you started with Drupal 6 you had to learn maybe seven new skills for a site builder. Drupal 7 only introduced a few. Drupal 8's got a few more. Again for themas this one's pretty static. The major one in Drupal 8 is that Twig has changed but in Drupal 7 you kind of had to learn render arrays and frankly that's harder. It's not as stable as well over those three versions. Drupal 8's introducing more but it's not a lot. What is different is perhaps the number of other skills that you'll need to learn and we're going to focus on some of those today. So these skills are mostly related to object oriented programming and kind of modern PHP programming practices as well as some expertise in other libraries and tools. It's this part which that certainly causes some of the fud around Drupal and perhaps leads to forks potentially. The good news is that these are not really Drupal skills. They're actually really good programming skills. So if you've got them already you'll find it relatively easy to move into Drupal 8 and if you don't have them then learning them's going to make you a better developer a better member of your team and probably make you happier as well. So today from today's session if you haven't learned something new you know where to find it and as you go through if you like you may wish to jot down just keep a tally of the skills that we list, see how you go one point per slide and then at the end you can compare your scores and see how you're going. We've also got an awful lot of resources in this presentation so we've made sure they're all available on our website previousnext.com.au I'm listing all the things we're going to talk about so you don't feel you need to have to copy down everything crazily. You can jump through there. So let's go. The first of our three sections site builders, what's new for site builders? Well it's point and click but not as we know it. There are seven significant areas for site builders that site builders are going to need to learn for Drupal 8. Now if you're a theme or if you're a developer you kind of need to learn these as well these sort of stack up on top of each other if you're a site builder and you don't want to hang around after this section by all means that's fine. The first one and I think this is really significant is the use of schema.org Instead of using RDF mappings from a range of vocabularies Dublin core fof, semantically interconnected online communities etc etc Drupal uses content mappings purely from schema.org For example where we previously had a title we now just use the schema name. Nobody really understands RDF or RDFA or RDFA light or any of these other technologies we've been using previously and despite the fact that they're really great they're really hard to use and that's kind of how schema.org came about. So Dris has already shown you some SEO examples which is good that's the benefit that you get from it. However as a site builder you're going to want to understand how schema.org structures content your content is going to come out with schema.org markup pretty much by default. You're going to want to know when you're adding new fields how to relate those to that structure how to add properties and how to maximize your opportunities there. There's not a whole lot of resources you need for that but it's good just to go on schema.org and have a little look. The second one is REST for web services so using the new REST and serialization APIs you can output data as JSON and HTML A great deal of what we do online is coming through apps and other services so this is a great new tool actually for site builders as well as developers to think about how they structure their content and how it ends up coming out the other side. There's a good, if you don't know what REST is because it can be a bit confusing if you're new to it there's a good example there what is REST explained using Starbucks which I recommend you check out and Lynn Clark and Clousey have a session Wednesday one o'clock and we'll talk about serialization in Drupal which is good. Blocks in Drupal 8 finally getting some love, blocks have been around since Drupal 1 pretty much they have hardly changed at all they're finally getting fields and revisions they're kind of, they're entities effectively so they'll act a bit more like nodes and that's great, really makes it much easier to build interesting sites not all of the tools that are needed for blocks will probably go in I don't think the REST API for revisions will make it in and it will probably end up in contrib but it's all coming and there's a good session blocks from drop.org to Drupal 8 and beyond Wednesday 1045 if you're interested in the Drupal API that's also a really good one for you because it kind of talks about that it's a bit more developer-y having CK editor in core is just one of the several editing improvements and Drees has covered these a lot so I'm not going to talk about it too much but I'm going to talk about it in a moment and Bohem Wednesday at one o'clock I think most people can probably work these out for themselves but we do think it's really important and significant one that you might need a bit of help with however is tour API because this is kind of a site builder tool if you like this is a tour API gives you the ability to add contextual tours to individual pages you can stick in little pop-ups for people when they come along tour API was added by members of our team at previous Next and there's a little bit of stuff on our website about creating a tour actually really easy you can create tours just by writing a bit of a YAML file so it's not too hard and a skill that most people I think can learn only a couple more things for site builders really that we think are important the first one is configuration, import and export if you've used features before you know what this is and you know how it works the way it's working in Drupal 8 it's a bit simpler actually it's kind of your entire site gets dumped to config but it's something to consider and something to look up on and make sure that when you're building a site you're aware of how this is going to work there's an article managing configuration in Drupal 8 on the website there and configuration management and features by Andrea Piscetti is also a really good resource finally the other big change that we think is important for site builders is the move away from node IDs and other identifiers to UUID UUIDs are basically universally unique identifiers if you haven't come across them before and they're going to start turning up all over the place so just knowing what they are and how they work is quite useful there's some other that's the wrong slide, that's the theming slide let's move on if you're a site builder and you don't want to hang around for themers you actually might want to run into the Panorama Hall right now and see Drupal 8 for site builders with Swintel the display suite author I won't be offended if you leave all right, themers what's new for themers again about 7 things for themers one of these is fairly important and it's the top one on this list and it's twig it's important but I don't believe it's particularly difficult twig is a templating language written for PHP it replaces PHP template for template files as Strease has already outlined and it has a number of improvements it's much simpler it doesn't contain that crazy render function that appeared in Drupal 7 and it's generally pretty easy to use so that's a big plus that we've got that in there now and hopefully that will lead to a bit more adoption twig is available from Censio Labs and there's good documentation there and the Drupal 8 theme guide has already been updated which is awesome if you want to go and see more sessions on twig however there's loads twig and the new theme layer in Drupal 8 5 o'clock today twig a templating system for designers tomorrow 10.45 and twig it's ship it which is a lab so that's a good 2 hours of twig practice for you tomorrow at 1 perhaps more complex is Backbone.js if you're a front-ended designer a themeer and you're looking at creating interesting javascript powered web apps then Backbone.js is your new best friend Backbone is a javascript library which essentially provides a model view design paradigm for single page web applications and it keeps your Drupal data kind of front and centre for you so that's what it's there for well documented on Backbone.js.org the Drupal stuff is not particularly well documented but you can check out the current implementation of the Backbone module which has a good good stuff there and there's a presentation with deal answer 445 Drupal 8 has a good deal of responsive design in it and we've put this one and even though it's not really a Drupal thing because we kind of feel it's important Drupal 8 is responsive out of the box and if you're not able to design and build responsive sites then over the top of it then you're at a bit of a loss you're at a bit of a competitive disadvantage so we think responsive designers practices are a really important thing that needs to be learnt for Drupal 8 and also just using some of the built-in features like the picture element the breakpoints module just to produce better quality sites Dries also mentioned the JavaScript accessibility features which is really good one of the things that Drupal's been working towards for a number of years now is kind of back to front accessibility I don't know what you call it in Europe but in America it's section 508 in Australia we use WCAG you may use WCAG here as well I hope you do there's a couple of new JavaScript tools that allow you to produce more accessible websites Previous Next recently did work for Disability Care Australia which is Australia's national disability insurance scheme and we had to make sure that was well really accessible and this kind of tool would have been very very useful in that project so the two accessibility features are Drupal.announce and Drupal.tabbingmanager if you're looking for them Drupal 7 I think uses jQuery 1.4 does that sound right yep someone says yep good so Drupal 8 is going to use what is effectively jQuery 1.9 however without support for IE 6, 7 and 8 that may be significant if you work with government or other clients that actually have these legacy browsers because you'll actually have to find a way to get 1.9 back in there the latter part is intended to be provided by Contrib however currently I don't see anything that that's fine that may happen they're more or less the same 1.9 and 2.0 except that 2.0 just doesn't have that compatibility layer there's a few more things that themers are going to want to watch out for in Drupal 8 the first is that there are new CSS coding standards now most of the time coding standards generally apply to core however if you're writing a module or you're working on a patch for a module coding standards really help you to create a solid base for your work and make sure that people aren't updating your patches purely on formatting grounds Drupal 8 CSS standards are in there they're really useful and they're a good resource and I encourage you to use them finally and perhaps somewhat controversially we believe that themers are going to need to learn a little bit about PHP class and namespace usage there's a lot of new object oriented code in Drupal and you don't really need to know how it works but you need to know what a namespace is you kind of need to know how to call a static method on a class because you may find yourself doing this while in a theme template.theme file or similar if you're writing preprocessed functions or doing any of that kind of work some of the functions that you've called previously just as functions are now going to be static methods on objects so having a little bit of an understanding about how these work is going to help you immensely to work your way through there you don't need to know how to write object oriented code but you do need to know a little bit about how to read it some of the fun changes as well some of the functions that you've used previously as a theme have gone CSS and JS are now added using an attached property on the render array Drupal set title is gone and there's a new breadcrumb API in there as well if you need to do breadcrumbs most themers however I suspect will probably just use a module for that so I'm going to pass over now to Boris who's going to do the bulk of this talk for developers so how many developers here and how many have left learning Drupal 8 up until this week and are kind of hoping to really get a grip on it and the rest of you know Drupal 8 already okay good so there's quite a few changes and we just tried to compile sort of the must knows and some of them are quite big but really not that hard and the main one is really this object oriented in general so I'm actually quite curious who here is primarily a Drupal programmer and only does OO in like Drupal 7 doesn't have much of a background, nobody one, two there must be more, come on well it's a lot of Drupal 8 it's going to be really getting everyone up to speed with where PHP is today so that basically means 5.3 and above and more than that best practices and patterns that makes easier and as Chris said the beauty of learning this stuff is it's not hard and if you have hiring problems for instance I think you might find that I know that when I engage with the PHP community we're more likely to have discussions that involve things like factory methods and dependency injection than when we engage in the Drupal community so the beauty of this is that we're really opening up and finding joining the rest of the PHP world so that's really the big takeaway and this is a great if you haven't learnt this stuff this is the perfect week to really dive in I'm going to recommend a bunch of sessions to go to sort of some of the top things and then of course the code sprint which is the best way to learn so if you're, it sounds like most people think they're pretty comfortable with object-oriented PHP but if you have only done OO in PHP in the old days and aren't used to some of these patterns it's more than just the syntax so I'm sure everyone's comfortable with the syntax but it's more important to kind of understand some of these patterns and paradigms and so here's some good resources there's a great book there at the bottom which really covers a lot of this stuff and this website PHP the right way is probably the first place to go and it'll take you through everything that's best practice in PHP world and that's an updated resource as well and it's very much in line with where Drupal 8 development is heading so as for sessions on this topic there's a great general object-oriented session which I heard went over quite well in DrupalCon Poland and and probably the one that might seem a little bit strange there is I've recommended Drupal development using PHP storm because again if you're coming into this new you may have I'm assuming that people haven't really played with core here because it's a beginner session but one thing that might throw you off is if you're used to using a text editor in this case tooling matters if you're used to using a text editor that doesn't help you out we've got lots of files, lots of directories and having some interesting tooling that can help you navigate that really take some of the friction out so I recommend going to that and just seeing if you haven't really seen an idea like that are used to using something a bit simpler and then going away getting your tools a bit sharper maybe upgrading your text editor etc so the big one that everyone's aware of is Symphony 2 so the beauty of of having Symphony 2 components really at the core of Drupal 8 is actually documentation so there's been a bit of fun around complexity and how difficult it is to learn but actually these bits of Drupal Core have never been better documented and easier to learn so they're just in different places so I think it's important just to make sure we all understand that we're not talking about the full stack framework apart from the learning exercise you don't really want to go to the Symphony 2 site and download the full stack documentation and go through it there's useful stuff in there but even better is the component documentation and it's every bit you could literally take a class from that we're pulling in from Symphony and go to the Symphony site and get a really detailed explanation of how to use it and it's all applicable it's a big step up in understanding some of this core stuff so there's some resources and some great sessions of course Alex Pot about this approach of pulling in these external libraries so I have more to say about that and if you're interested in the Symphony project and sort of their approach to componentising and standardising and all those sorts of things I've saw PSI0 and the real reasons why we're doing this if you want to understand that go to the Fabian Potentier Talk so this is not an API per se or any kind of change at that level but this is a tool that you really need to start to get familiar with this is the Composer if you don't know Composer you may know something like DrushMate for instance so this is a tool that will pull in external dependencies or any dependencies really and many versions and do all sorts of wonderful things and we're using that to pull in the external code not just the symphony components but things like all was mentioned before and ZenFeeds and some other things now this is actually it's quite a fun tool to use I recommend having a look and we started to use it on our projects in general so we use it to manage even Drupal 7 projects you can use it today and it really makes managing external dependencies a lot easier and there's a core conversation about CCC so you're covered there so this is a bit of a simple one but it's another external dependency it's another chunk of code that we've pushed out and I'm not sure you need to really understand the component but you just need to know how to read YAML and I think that's the sort of it is that we now have effectively from an info file world I think that may end up disappearing altogether and not having to manage our own metadata and configuration we now can use things like YAML and JSON and get all the security attention and not have to maintain it ourselves so that's focus on Drupal so if you're totally new to YAML probably quicker just to open up a simple core code and have a look all right so this is a big one and this is really the reason why looking forward why we're going a lot of this effort with the re-architecting so simple test as it stands in Drupal 8 simple test is still there and it's recommended for the web test but unit tests are now recommended that we slowly start implementing them in a new testing framework and the goal is a couple of things one is PHP unit is a better supported project so that's again along this track of reusing a lot of the PHP world's tools but more important than that it's going to encourage us to actually have a unit testable code so in Drupal 8 you'll notice when you go through the files everything's split up so instead of functions we have things in classes the classes are much smaller and there's many files all the way through but each of those the goal is to test them independent of the other pieces and that's why we're pushing for dependency injection if you've heard this word I'm not sure kind of know what it is but you don't know why we're really pushing for it it's so that moving forward we can build this more robust unit tested and isolated code and so it's good to see that the ball is rolling we'll have a mixed approach for Drupal 8 it's looking like a lot of core components already have converted the unit tests to PHP unit and you can use that today in your modules and there's two wonderful sessions so highly recommended one from the author of PHP unit and one from Amsterdam Bomb how to actually write unit testable code in Drupal 8 so once you see it in action it makes more sense to be able to run a test that takes a fraction of a second rather than simple tests that we're all used to where we do a full install every time we want to run a test I'm hoping that the fan on my laptop will stop blowing up every time I want to run tests so we have a few extra libraries that are probably good to look into the main one is Gazel really you know it's very common to have to have to fetch out and we've used Drupal HTTP request that's totally gone now so we've put in an external library to do this it's more robust it's well supported, it's well tested we've already started using it on Drupal 7 projects it's really a good set forward the API is very easy to use not much else needs to be said EZRDF is along with similar lines these other ones are mainly used in core but they're there for you to use but Gazel you will most likely use so I recommend adding that to your Drupal 8 packing list so now we're kind of into a quick overview of some of the some of the external changes that you'll want to look so that's some more background once you've got your sort of basic OO have a quick look at dependency injection in some of the resources listed before then you can look at some of the Drupal specifics so these are these build on top of the object-oriented best practices and we can start with plugins this is a great one this effectively replaces info hooks so hook, block, info etc is a good example and it lets us have these kind of one module extend another module and override and do it all in a nice clean way and this is actually a bit of an innovation in Drupal 8 it's very much inspired by CTool's plugins in its purpose but it's a totally modern implementation using some ideas from symphony and probably the only controversial part about that is the use of annotations so the metadata is added in comments and this is actually very nice, it's very cool and it keeps the plugin totally modular and if you come to Codesprint you'll see some of this stuff in action Entity API so this is basically Entity Entity module in core with a lot of cleanup and there's a lot of action around this in the translation space I know of but the big pieces we have some simpler access to what we're getting this stuff is definitely in flux but you can read through the documentation or actually the best way to learn this would again come to the Codesprint there's a lot of action in this area to see it so Chris already mentioned the configuration management system so probably the thing to realise is that it's very basic it's going to be very straightforward for you to take what you're doing on the variable table submitting forms, saving them in the database and now have that not mixed in with your content so obviously a big win for managing sites and deployments and actually pretty easy to use so there's some resources there a great article from Lee Rowlands and a great article from actually on Chris's slide I recommend the article from Nuval about sort of looking at it from a different perspective but it's a feature's mindset if you've been working with features a long time this can be a slight paradigm shift but it's simpler in some ways and still get and set type API very straightforward okay now for your module developers this is a huge win for the new system and the routing system are now split up and the routing system has been kind of really brought up to date so it's a lot more sophisticated but we still have access control and we still have hook menu for adding things to the menu system but by replacing the routing system with the symphony 2 routing component again we get this great documentation you can go and read all about symphony routes today it's all applicable and it really gives us all sorts of advantages in terms of not having a route that can respond to different types etc and this is really enabled by a lot of other modules in the system the rest system and it kind of touches everything but at its core it's actually very simple I've noticed some great Hello World blog posts have been popping up lately I can recommend if you want to really nail down it's really fresh and you just want to see a practical example see dependency injection new routing system we're going together there's a blog post there using DripLate's new route controller and the second one so that's like two pages and you can get a great introduction or you can go really deep and go see Tim's session on Thursday okay I think this is probably the last big one related to related to dependency injection we've moved a lot of these global DripL functions into a service container not too much to say you don't really need to understand it except how to use them and there's lots of examples around and again the symphony documentation is good but if you want to really get into some nitty gritty this is some pretty cool stuff in DripL Core okay and then probably a brief mention of forms we've got a little bit of an object-oriented wrapper around these things but at its basics if you know form API and you know OOO you can extend it in a face and you've got a few methods to override or implement including a builder form, a validator and submitter, sort of like how we've done before but instead of magically named functions one object but this is quite intuitive the guts of it are going to make sense not as radical a change and obviously there's a lot more there's plenty of APIs and some of these are likely to be changing I think entity translations in settings and storages is interesting that's related to CMI around overriding sort of things you might do in settings.php up till now to override variables in different environments so we have a new API for that which is wonderful and lots more so plenty to dig into now to wrap it all up put it all together there's some great sessions hands on the upgrading your module to Drupal 8 one is very cool that was given in some form in Sydney and then another one there a lab session so lots of time to sit down with a sit down with a laptop and actually see it work which is of course the best way to learn these things so hopefully that's enough enough of a grab bag I think that's plenty to look out for this week I just want to don't have a slide here I just want to say one more time there is sprinting going on all over the place and all week as well but particularly on Friday so if you've never been before there is no better way to really dig into this stuff ask stupid questions ask smart questions I'm more confused about where to go or who to talk to please grab me and I'll make sure you find the right spot but this is the best week to really get some Drupal 8 under your belt Thank you Boris how did you go, did you keep track of what you scored just going through the list I think if you're a site builder and you got over 5 you would probably do an okay pretty well if you've got 10 fantastic work and if you're a developer and if you know 20 of those items that we covered then you're well on your way it doesn't matter though if you don't know that many and that's the purpose of this session so lots to look into alright so we're going to wrap up now this is the bit at the end what did you think just find the session on the website and tell us what you thought yes got a little bit of housekeeping at the end we just want to thank some of the people who've helped us out with this session from previous next, Tim Eisenhooth Lee Rowlands and Kim Pepper have contributed a lot to this session in our understanding of Drupal and I also want to thank everyone who's written a really good Drupal 8 change log because they are I have discovered the best way of working out often how something works they are currently the best documentation we have for some issues which is why they're in there and finally I've been on holiday for the last week and I've spent almost the entire time writing this so I just want to thank my wife and son for not killing me previous next is Australia's leading Drupal service provider we work with government and not-for-profit clients mostly but also in the private sector Lee Rowlands was mentioned in Driesa's talk which is a core for us and so does Kim and others and we develop a public sector distribution called AGUB which is very similar to open public so finally that was him and this is me and thank you for listening to us the link is in the bottom there and please get in touch if you have any questions thank you