GSoC’ 16: Week 1 of coding

The Google Summer of Code 2016 (GSoC’ 16) coding period kicked off from last week, May 23rd. Each selected student had a one-month long community bonding period with their respective organisation. I had written my community bonding experience with Drupal in my previous blog post.

I am working on porting search configuration module to Drupal 8 under the mentorship of Naveen Valecha, Neetu Morwani and Karthik Kumar. I learnt the basics of Drupal, implementing Drupal forms and other fundamentals required for my project in the initial phase.

I was really thrilled to get into the coding rounds of GSoc’ 16. I was successful in making a good progress in the initial week. I could start the coding phase effectively by porting some important features. I had regular discussions with my mentors throughout the previous week. They were really helpful in guiding me in the proper way by reviewing the code and sharing their valuable feedback.

Here I would like to share with you some of the changes which I have come across in Drupal 8 from its preceding versions which I have worked out in the previous week for my project.

  • In D8, the .info files are replace by .info.yml files. The .info files contained the basic information regarding the respective module. The .info.yml generally contains the following attributes of the module:
    • name
    • description
    • core
  • The Drupal 7 variables have been converted to the Drupal 8 state system. The previous versions had variable_get and variable_set functions to store variables and their default configurations. They were used to store and retrieve data. They are presently removed in D8.
  • Moreover, we need to store the default configuration of the variables. While developing a new module, it comes in module/config/schema/ will contain the default variable configurations.
    • The default configuration is the default property of the system with its type and the corresponding default value linked to it.
  • Another transformation that has taken place is that the global $user has been substituted by the current_user service.
    • So, the previous definition,
      • global $user;
    • is replaced by
      • $user = \Drupal::currentUser();

These were some of the important concepts that I had to deal with in the previous week for the porting process. It was really a wonderful learning time for me. Hope to enjoy the coming weeks to learning new concepts and implementing it for my porting.

Hope all the selected students had a wonderful start to their coding period. All the best for the coming weeks.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s