Lots of reading and reading ... How about trying some coding ?? Huhh !!! Coding in drupal 8. Frightened ?? Me too :) But what I exactly feel here is that this is just the fear of the unknown. And everything we want is on the other side of fear. I replace my fear of the unknown with curiosity. Give it a shot, who knows if this works out for you too :) Let's start together with a simple stuff like "Printing a Drupal 8 welcome message" by creating a small module. Taking a deeep breath, let's dive in. As we must have seen or read that Drupal 8 follows a very strict directory structure, so let's start with looking for the directory structure followed by custom modules in Drupal 8. 1 . Directory structure : It is advised to keep our custom modules by creating a folder 'custom' under 'modules' folder in the root directory of our site. So, our custom module 'first_d8_module' will have directory structure something like this
Here ? So, I am assuming we have some idea of Symfony2 and it's components used in Drupal 8 by now. Great, let's move ahead. Every web interaction as we know starts with a request and ends with a response, same goes here with Drupal 8. We send a request and receive some response from Drupal but what goes internally ? Let's dive in and find out. Of all the important components of Symfony2 being used in Drupal 8, HTTPKernel and HTTPFoundation plays an important role in handling a page request but this time the proces uses an object oriented way. Ohh.. big names :) Let's know something more about these. HTTPKernel : This component consists of an HTTPKernelInterface which provides a method, handle(). This method accepts $request object as parameter and returns $response object. HTTPFoundation : This component is responsible for creating and managing the $request and $response objects. We can say that, it's an object oriented replacement of sup