Recently, I joined an event on Drupal in Hungary — the Drupalaton. It is one of the most exciting yearly Drupal events in Europe, organized by the local community. It gathers hundreds of contributors who collaborate on Drupal issues, share knowledge and have fun together :)
I really enjoyed this year’s event since it covered a lot of my favorite topics. (discussed shortly after) Good sessions, pleasant talks with the community, and also — a lot of new things to learn. The event took place at the shore of the biggest warm-water lake in Europe, at Lake Balaton.
Sure enough, sessions were covering important Drupal 8 features. There were several tracks, as well as sprints, where participants were able to collaborate.
It’s a vital initiative for Drupal as a platform for the future. Presently, Drupal is one of the best systems for content modelling, querying, and building websites in general. This means that normal people can make websites with complex information structures with very little or no programming.
The API-first initiative could potentially take Drupal into a place where the content modelling and querying becomes data modelling and querying, enabling non-developers to build complex APIs for the next generation apps.
Apart from these, there were also sessions about Drupal-specific modules being upgraded between Drupal 7 and 8. In overall, I think we’ll see more “good stuff” of Symfony, PHP OOP, design patterns, etc topics during next Drupal events.
This is my humble list of highlighted sessions I focused on.
Well-formed, step-by-step guide, covering all important concepts of having Drupal as both server and/or a client in REST API architectures. If you want to skip the details in this section, check Drupal REST API docs which covers great amount of information around the topic.
The beginning was a general information about what REST actually is. This included status codes, methods, design patterns, etc.
After presenting the basics, the next step was to use Drupal as a client, fetching data from drupal.org REST API and displaying it in a block.
There was also a demo of using the core REST API module, which transforms Drupal into an API server. REST UI module was demonstrated as a site builders’ tool to manage the configurations which are otherwise managed through .yml files. Here, it’s important to note, that the endpoints of the REST API are controllers. Developers have the freedom to choose which format of data to return and via which components. For example, one can use the Symfony’s HttpFoundation and its JsonResponse instance.
In short, there was a lot of good advice, both about REST APIs in general, and Drupal-specific implementations, in combination with third-party tools and components.
Even though I did not attend the workshop, it was still part of the Drupal API-first series of topics. Code of the session.
That was an intermediate-level session. Promises were in the core of all code snippets and demonstrations. Highlight APIs: Fetch API, Cache, Service Workers, and Web APIs in general. The main idea was to demonstrate how modern web APIs can be used to build web apps, having functionalities very similar to native apps.
The repository of the workshop is public, so go and check it for further details in case you’re interested into the interface implementations.
Second was the usage of node.js app with express, express-graphql, graphiql, graphql and other popular modules to transpile ES6 code. In this playground, the building part started. Various types were used: GraphQLSchema, GraphQLObjectType, GraphQLString, GraphQLInt, GraphQLNonNull, GraphQLList, etc. That was my first time to actually write something working out of the learngraphql.com online tutorials.
There was a demo of Relay in-between, as a bonus, to grab a general understanding of the additional features provided on top of the fundamental specification.
The event was awesome, the people were great, and the sessions were truly useful. I feel somehow privileged with the opportunity to attend such a good series of sessions related to API-s in the Drupal community!
There are a lot of new technologies and tools to learn and play with. I hope the summary above is a good starter for anyone enthusiastic about the future of the tools mentioned.
Many thanks to the local Drupal community in Hungary! :)
And even more photos from the organizers: