 Hola, ¿qué tal a todos? Gracias por estar aquí. Estamos aquí para platicar sobre Drupal Console, una herramienta para Drupal 8 que es ejecuta desde la línea de comandos. Primero, vamos a comenzar con la introducción, ¿pese Eduardo? Hola, soy Jesús Manuel Olivas. Soy un ingeniero de Drupal 8 de la línea de comandos en FFWW, formalmente conocido como Linguereaction y ProPeople. Puedes encontrarme en cualquier social network, como JM o iOS, como Twitter. Así que vamos a comenzar con lo que es el Drupal Console. Bueno, podemos definir Drupal Console como un suelo de herramientas que puedes usar en tu CLI para generar un código boilerplate y interaccionar con una instalación de Drupal 8. Quiero clarificar un punto muy importante. Drupal Console no es un module de Drupal. Drupal Console es una aplicación de symphony. Ok, este proyecto empezó en 2013, pero un poco flores. Es un proyecto de Drupal y Jesús Manuel Olivas, presentado aquí hoy, para los Drupal mexicanos. Pero cuando este proyecto tiene más atracciones, ahora tenemos un montón de desarrolladores, y ahora estamos en un equipo para mantenernos. Jesús, David, Omar, presentado aquí, y yo. Entonces, si tienes alguna idea sobre este proyecto, por ejemplo, estas fases pueden ser... ...puedes proporcionarlas para ti. Ok, ahora vamos a hablar de organizaciones de apoyo. Quiero agradecer a estas agencias que sponsoran el proyecto. Y, como mencioné, FFW, la más grande agencia en el mundo, el Drupal agencia en el mundo, se sponsora a mi para trabajar todo el tiempo en contribución, contribuir a este proyecto en Dava, una web de desarrollador de la agencia de México, se sponsora a David Contribución, Anexes, la más grande agencia de Drupal en Costa Rica, se sponsora a Anses Contribución, y probablemente el único que vive en el mundo es Omar Aguirre, así que, por favor, sienten gratis para invitar a él a mi vía o a mí. ¿O sí? Ok, Drupal es, como sabes, más complejo que otros CMS, y Drupal no es una sección. ¿Cuántos de ustedes han empezado a explorar Drupal? ¿Cuántos de ustedes se sienten afueros sobre eso? ¿Verdad? Ok, muy positivos, me encanta. Entonces, incluso si no estás preparado para Drupal, si no te sientes, no te hagas probar, te puedo decir que hay un nuevo set de conceptos que tienes que aprender en Drupal. Entendido, manejar esta ampliación de crecimiento en Drupal podría ser un objetivo atentido para todos. ¿Estás preparado para eso? Tal vez no, pero la idea es que el Drupal es un tipo de herramientas para trying to help you to manage this complexity. So, as you remember that this, you know, two days before, so for us Drupal console is just an implementation of this fusion, this function to try to get the best-ness experience as Drupal is. So it's our idea, it's our implementation of this idea. Ok, now let's talk about how Drupal console can help you. Ok, first, Drupal console can help you generating all the required files by a Drupal 8 module. So Drupal console provides a set of commands, and for each command you can have this, I mean this little question that, it's asking you question based on that question it generates, can generate code. But also Drupal console can help you to interact with your system from rebuilding cache to working with the configuration management system, you can do like enabling the other modules, so we'll show you. Finally, you can also use Drupal console to learn Drupal 8, which is kind of nice, so you can inspect the generated code while using the dash learning option, so we will also show you a little video about it. So, if you are wondering where you can find this project, because as you say, this is a symphony application, so just go to Drupal console.com and in this website you could find information about the GitHub repository where you get support. Right now we are using GitHub, it's an instant message system, and we are trying to be available most of the time. We also have documentation written in GitHub, so again, it's a little behind, but not too behind, so we are trying to keep up with that. This is also a good starting point to try to get in contact, in this project. Okay, now let's talk about downloading the project. See, we've been talking so much, I want to start showing you some of the features. First, there are different ways to get the project, Drupal console and your local machine, you can use Composer, you can get down on the farm directly, but our recommendation for getting the project in your local machine is by using the installer. Hopefully you can see. In the video, the installer takes care of downloading all of the required files to run Drupal console on your computer. Just by running the installer gets in filing your local machine. It's, yeah, once you finish the installation you can just run like PHP, console.far, the downloaded file, and you will see all of the commands, available commands listed. But if you want to have console globally accessible, you can just move the far file to a globally accessible path so you can run. In this case, we are aliasing, creating an aliasing Drupal. And all we know, Drupal is in heavy, under heavy development. So keep in sync with the latest changes. The easiest and recommended way of updating the project is by using the self-update command. So we provide with a command for you to get the latest version of the project. Okay, so it's too many talks so you want to see something in action, right? So let's see some commands in action. So as I said at the beginning, the Drupal console starts as a ASCAL folding tool to generate code in Drupal A. So we have a set of commands to provide this functionality to generate code by using the basic information. So let's check it out one of them. So I will show you how to generate a module. So if you are, even if you are a previous Drupal developer or not using this command, you can generate a Drupal A module in less than 30 seconds. Let's see a video. So as you can see the videos, in this case the command is using an interactive mode so the idea is the user can provide basic information to generate a module. The name, the package, the Drupal version using this module, any dependency of this module and this module is ready to be working in a Drupal installation. So after we finish, we get a new folder with the proper files necessary to enable this module. As you see some code and of course you can use the UI in the interface to enable this module. So at the beginning, this module is not too functional but we implement a hook for hell just to prove the module is working. Now, let's talk about something more complex. How to generate forms. So what is required to use to create generate a foreign Drupal A you need a road, you need a file road, you need a form definition, you need to fill definitions and also you is required integration with content management. In order to generate the information provided by a user stored in the system. So obviously, here in the video you see we have a wizard. So the idea is you just need to provide basic information about the fields like the name, the type and some basic information and when you finish the command will generate a fully functional form ready to be used the same. So you don't need to be worried about what classes you are writing, what anything you need to do, any jamal stuff. So just use the wizard maybe clear cache and your form will be really accessible in your system. Here is some of code generated in this module. If you go now to the road system this is how the road system is generated so if you are not really familiar with jupelade, this could be as I said before a daunting task so you need to learn too much stuff to try to create that but using the console of course is really simple and from customers perspective when they order something to us as an order, client order I really only need but if you are learning jupelade this simple form could be a week and from the eyes of the client could be a nonsense but using this kind of tool in 5 minutes you can get this simple form in a simple way. Ok, so far we have seen the interactive mode which is a little bit more flashy because you can see user interaction I mean the tool is asking you a question you entering something and looks like really nice but starting from this point I will show you how to execute command passing inline argument which is way, way more faster so this is an example how to generate a plugin just by passing the I mean the arguments and their value so blocks in jupel are plugins pretty much every little thing in jupelade's plugin creating a plugin can be a little tricky because you need to add annotations and in order to I mean in order to this block to be discoverable by the system jupel console take care of adding these annotations now let's go to the structure page then layout and let's assign this block to a little region also these blocks could be be configurable so they have the same form wizard could be used to configure this block yeah you cannot form fields to a block definition while generating the block so as you can see the block is there, it's working we have about generating an entity content so far we show you how to create a block which is like one file, a form two files, a module, all the two files generating an entity is probably one of the most complex tasks you need to create or update about 14 files and those files are classes, forms, router vanishing, manual links so we will run a command we will generate an entity this provided entity is fillable from the UI entities are plugins and required to add annotations same as in the block generation that code is added by the command so actually in this jupel console we have a session about how to create an entity using code so a whole session for do this so you can imagine how important it is and how difficult it is so the idea is again do this as simple as possible the whole idea of the projects make your life easy generate the boring task just by running a command and then focus in adding the functionality which is the important part of your business ok now before to continue remember we just show some couple models about the scal folding but when you check it out the project you will find a lot of commands used to generate a code like we can create a rest integration services and moreover ok now with jupel console we can interact with the jupel installation when we start this project as I said again scal folding code generator but eventually we have we have the need to write some commands to interact with the jupel installation just in order to test the code we were generated so we decided to create the basic the basic commands to interact with the jupel installation so the basic one is interaction with configuration management so using these commands you can explore, edit, list, modify the configuration management system and another set of commands is the book because you can get some information in the system you can get a list of all writing in your system but you can choose a specific road to get specific information about this menu like permission, where is the class any details useful to the book and there are other basic commands to interact with the jupel installation while we were generating services we needed to make sure those services could properly register so we created our command basically most of the commands for interacting with the system are based on commands that exist in the symphony world ok I can imagine some of you are thinking about to use this generated code or to learn jupel by applying the reverse engineer generate the code and then read the code and then I will find out how to build something in jupel which is probably good but my view is not good enough it's a normal approach when you don't have the documentation because the documentation is a code ok but maybe sometimes it's not good enough ok so for that reason we provide you with an option to generate extra information to the generated code using the dash learning option on the generator the general will not only generate code we will also add commands describing the generated code think about this think about this like the codex, the commented codex examples module let's say we make this multilingual we finally found a place to use the multilingual capabilities other than translating text if you change the language here in your configuration file and you run it using the dash learning option the commented code will be also added in the language that you say you can use the advantage of this learning capabilities in different languages the idea is just to explain what logic is behind the code it's useful when you are starting in that so right now about multilingual we have around nine language support the nest will be Turkish so this is information in progress so right now we have French, Romanian, German Spanish, English, Portuguese and tumors I don't remember what Spanish is probably the worst one but Spanish was the last one we need to find out what we speak Spanish we have mentioned how to run individuals command which is like good can help you save time but how about chaining commands if you are looking to automate command execution you can use the change command think about I want to generate a module, right? I want a module I want a controller, I want a couple of forms, probably two entities so we can do something like this this change command reads a configuration file and execute several command based on the sequence defined on that Jammel file and we decide to use a standard Jammel file extension and not go with something like chain extensions because we don't want to add a new Drupal into the project so so far you can see there's no there's no examples module I'm gonna run this configuration file that I just created here if I run a now there's a new directory let's run a tree so we can see how many files we generate so how you can implement this so you can define this in many ways could be a mini distribution, could be a recipe would be something you want to automate in your servers we're working in some commands thinking out of the boss because it's not a simple it's not a simple way to interact with Jupas so the idea is we want to create the really tools people need in real life so we are looking for feedback like someone have an awesome idea and you say you know my life will be really easy if we can do this we want to get this information to try to create an awesome tool you can even mix console command with your own commands you can run, generate a module and then add some features that are already part of the core the Drupal console core but you can add your own commands you can even download execute something copy files so you can do pretty much anything you can mix commands ok now what about if you are a model maintainer and you think Drupal console is an awesome tool so obviously maybe you don't want to share your custom logic because maybe it's a custom model for your client but you still want to get advantage of these Drupal console features so you can create an integration so what is the easy way to write an integration well we have a command to generate a command to be included in your custom model so if you don't want you you don't need to share but at least you have the old boilerplate code to generate your command so when you enable your custom model and you list the commands available in the console your custom model will be available only for you and will be your secret and then you just start including your business logic itself and this is how you execute a specific Drupal command generate command then the new command is here and as you can see this is the code on it in this command it's automatically registered and recognized by console so you don't have to do anything other than you can just run the new command so this is example call on hello so it's available immediately so you don't need to be worried about the magic how these guys include this in the console it's there, it's just to use so now maybe you could what crazy things I can do with this integration let's talk about this awesome project maybe if you are familiar with symphony you know this bar from symphony this profiler is awesome to improve the performance in the website so this guy create a port in the same way we use the console component from symphony to create these tools he use the web profiler component symphony to include in Drupal but these guys created was thinking really beyond us so suddenly we just receive an email to say hey guys I wrote an integration for web profiler with the console show the videos he wrote an a command to enable to run benchmarks and gain Drupal 8 installation just to check it out so users use the Drupal installation and then he get information about this the web profiler is a tool that let you analyze the request response life cycle so anything happening in your system since the user request a page I mean from there until you return something will be stored so you can take advantage of this tool to debug your system so this is an awesome project it's also coming from the symphony world I mean put it to Drupal so let's go ahead and use it I highly recommend you to use this tool it tells you how many queries you executed how many forms a loaded how many blocks are loaded the UI is not your team it's not your cup of tea and then you want to check it out this using the command line and then you get the information for the profile and then you decide okay let's run a benchmark and then how many runs you want he create this and then you get some statistics about that so this is what I say before sky is your limit so you don't need to think about only to modify a value to generate this code so you can generate a really really a specific and a special tool for yourself ok, now that Enzo mentioned it how to create it, I mean talking about integration I really like to talk about contributions ok, anyone can contribute to this project we invite you to contribute to this project you can add new features you can grant integration and your custom module, you can improve translations or help with documentation but first you need to get the code right, so getting the code this project code is easy as follow in 3 steps we have the code in github so you need to forward the project then you need to clone the forward engine local machine and then use composer to get all of the dependencies and we have this project at github we are syncing the project on Drupal.org but we have it in github because when we start the project most of the people helping us with the project were from the symphony world so we don't want them to force them to have a user account to be able to help so we have the project in both places and at the beginning we were accepting pull requests and then patches but we decided to go one way so we can move everything to github ok so this is our version because we are in lay this is our version of Hall of Fame this is without these people we will not be here doing this conference today so please if you recognize your face or your icon please stand up there is also Greg this is not totally updated Greg also help us this is the one so we want to thank you and the last one so maybe if you are wondering where are the front you should check out this map so basically this is a Latin American project and we feel really proud about this because this is a proof in Latin America we can't create technology to be using around the world because usually we are technology consumers and sometimes we don't believe really in ourselves so this is a way to say to you know to peers in Latin America hey guys so be proud about where you know and be brave to try to build something you know really you know it's possible so but of course so if you get your help we can create a better project every day ok and talking about the help we need all the help we can get you know please use the project love it or hate it let us know love yeah that's fine ok talking about helping us how can you you can provide feedback just by using the project you can maybe asking for a new feature maybe you have an idea or something really cool you can just create a new issue and we can discuss about it and take actions and also you can well create issues we acceptable request and you can also help just talking, spreading the word talking about the project tweeting about it and probably showing your group of constant stickers so fingers for stickers we have it here one decision and so we call group prompt ok now let's talk about the roadmap ok we show you some features of the project now we want to talk about what features are planned for future development first we want to really really want to increase code coverage we know we are doing terrible in that section so we are, we'll fix that we know we need to improve the documentation and translation you know Spanish section is a little bad we want to improve the verbose code output remember the learning option we provide you we really want to ask people to tell us which generos you think will be nice to have this feature and we really want to hear from you we are also planning to well this is partially covered so we will talk about it in the next slide we are planning to add dummy content generation something like content station same as importing an export configuration but for content ok ready to the content generation we are planning to use probably faker library it's just an awesome external project or probably using there is already a module like default content module it's in github take a look at it and what else sorry about that well at this point you might be worrying about you know this tool looks like something that I'm used to do a lot remember how this is pretty cool I guess it's thrush you get it so you don't have to worry about so we want to invite Greg Anderson from Pantheon he will explain to you why you don't have to worry about so you know resistance is futile thanks for the welcome everyone I'm not actually here to tell you about all of the solutions I'm just here to tell you about the continuing development a little bit of history about what's going on so as Jesus mentioned there are some people who are confused it's like what's drush and what's Drupal console Drupal console uses the symphony console component does that mean that the drush maintainers don't like symphony console component well actually we've had the desire and an issue in the queue to use the symphony console component since before the Drupal console project even started but drush has a really large responsibility in the community you know we like to work stably across a lot of versions of Drupal and it's heavily used in a lot of different ways so backwards compatibility is really important to us probably even more so than Drupal core which is not so concerned with backwards compatibility most of the time so you know maintaining that backwards compatibility and having the time to do everything that issue just wasn't getting any traction so I think that's one of the best things about the Drupal console project is just by focusing and saying we're going to make a tool space on symphony console and things with Drupal 8 they were able to make a lot of progress that you know we never really could have done by trying to do this in drush first but now you know cases recently demonstrated Drupal console is starting to integrate with Drupal and call into Drupal and now we're getting into some areas of overlap between console and Drupal and one thing we spend a lot of time on in the drush queue is just issues it's like hey Drupal changed bootstrap anymore because bootstrap is no different and so we have to go and fix that and you know when something like that happens and you have multiple pieces of code that are bootstrap in Drupal then that's multiple bits of work that you have to do and it's not desirable so a couple weeks ago Jesus came down to the San Francisco offices of Pantheon and we spent about a day and a half just you know analyzing how console works the Drupal bootstrap code and we put a bunch of code into console to make it bootstrap more like drush and then we did this cool experiment there it is down on the bottom there's a URL we've got a wonderful issue in the drush issue queue and it's the best issue ever because it's issue 1337 it's the elite issue that integrates drush and Drupal console together it's the best issue we just have a little experiment where drush starts to bootstrap Drupal 8 and it says oh hey wait I can find Drupal console here so it doesn't call its own Drupal bootstrap it calls the modified bootstrap we put into console and then it asks console what are all of your commands and it adds them to drush's command list so with this issue applied you can actually use a drush and run a console command on it that's pretty cool that's pretty awesome so that was only a day and a half and although it works it's not really there there's still a lot of decisions we have to make a lot of conversations we have to have this work is going to be continuing in fact tomorrow starting at 9am in room 408 hacker bill just down the hall that way that way we're going to be doing some sprinting on drush and console and see how much more progress we can make and how many more decisions we can make about how this should really work as these things move together because we would really like to see standard symphony components also being at the core of drush which will involve some modernization and changing in drush which happens a little slower but we're working on it and we'll see your smile on faces I just want to thank you thank you Greg for helping us with explanation they and how it's been working together was awesome then I also want to invite you to try or test this PR and or comment on the issue I think we're all done right so but one more thing so before to grow up we would like to talk about some ideas for the future so what about that GUI for CLI because not everybody likes the common line really? I don't know why so this is the kind of people out there I don't know why so the idea is we already bought this this domain supergenerator.com so the idea is we are building this GUI in order to enable users to execute the commands we have in CLI to generate the code we say at the beginning so in that way the user just provide the options and get that seed file with the model or with the rest service of whatever they want it's just another way to help people to get in in Drupalade in an easy way so when will we be ready? when Drupalade is ready no more than that ok that's fine I want to generate a module true controller a couple of entities I want to have two services you can even create services to connect inside the controller and basically give you a file basically this project it will be a silics site basically this is it will be easy to use as you can imagine because we have a lot of stuff in our plate not only for the Drupal consoles also with these tools we are looking support for people to try to get help us with this this tool basically we are planning to make this we want to make this tool our goal is make this tool easy to use if you don't really love the CLI I have no idea why you might be a side builder no, no yet you won't see nothing at this point but probably Barcelona yeah, could be because we all know Drupalade will be ready for Barcelona maybe so maybe in summary you can imagine we are worried about time of implementation of Drupalade so maybe if you are a business owner maybe you are money oriented and you wouldn't need to spend a lot of time to get people involved with Drupalade and money is time so the idea is you help us with this kind of project so it will be a benefit for your company and of course it will be a benefit for the community maybe you just want to learn Drupalade just jump into here, generate a few components enable the learning option and boom, your code has commented all these comments in multilingual, you can have it in Spanish, English just based on many languages that we have and you can use this tool for learning Drupalade so I think that's all we have feel free to stalk us and ping I mean ask us any question or ping us at J-M-O-L-I-V-A-S or Drupal console and I don't have their join ID so you can use this hashtag or you can use the twitter account to provide any feedback recommendations right and we will try to respond to that so as I said we are using many technologies if you are not a Drupalade developer but if you understand tweak you can help us to create templates basically the tool is this tool is taking advantage of symphony console component to the interaction part and using tweak for rendering code so any questions feel free to take the mic muchas gracias you can do the question in Spanish ah but the question must be in Spanish hi the question must be in Spanish ok si puedo ok my question is when you generated the form is able just to take data out of the form is there out of the box integration done with the views no forms store data on the configuration system it's not like not like entity fields like form fields the entity generation it's a fieldable and the entity we generate I mean are I fieldable so you can add fields and you can use it use those entities with views would be possible just to it's a simple form but you want to for a contact list or something that is really quick to put together but then you will want to retrieve the data out of the the current command doesn't support that but as I said before so if you create a sampling code and you think this is something useful you can create a pull request and then we will include a new command to tackle this specific necessity so this is the kind of needs we need some support and feedback so if you have the idea the idea is ok but if you want to go more of that just create a snippet of code submit to us and then we will transform and we will be able to provide this new feature in the next version or why don't we use growing integration to entity form module we can add a command inside entity form module generated there and that module can provide that functionality you are asking for alright thank you the module is ours the project is ours thank you again there is no more questions thank you again for coming there is another one more ok, no, yes no we have stickers here so feel free ah yeah, gracias how do you update core in Drupal console we didn't we don't have a like an update thing not yet I mean just to re-provide that so this is not part of the project you can update the module I mean the console project just by using the self update but not core ok, so remember stickers are here if you want one is the Drupal ok, enjoy, thank you for coming thank you