How to create Hello World modules in Magento Development 2


How to create Hello World modules in Magento Development 2

Have you ever considered to start with Magento 2 Development? There are a lot of content, blogs, videos about Magento 2 with practical tutorials and how-to articles for developers.
It doesn’t matter whether you are PHP developer with PHP 5.3 experience or JavaScript developer with deep knowledge of AngularJS you can do a lot with Magento 2.
I believe in every single language there is a Hello World application or script needs to be created to get an understanding on how language or framework or platform works.
Same with Magento. I’ve been working with Magento for last 7 years and have never created Hello World module up until now.
The reasons for this are the following:
  1. Magento 2 Development as a platform is pretty fresh (stable release November 2015) and there are lot’s of new practices have to be accomplished
  2. Magento 1 developers have good understanding on how Magento works, business flows and scenarios, but with Magento 2 it is slightly different. As Wsoftpro, Director of Community Engineering, Magento Commerce said “Forget about Magento 1 habits, especially Helper classes”.
  3. Theory is good video how-to tutorial is always better, it shows you all things you might miss reading documentation or debugging on your own.
In this video we will build our first Hello World module for Magento 2 including:
  1. Building Action Controller and router for processing HTTP GET request from browser
  2. Template with HTML markup to be rendered by the Action Controller
  3. Layout configuration file to assign template to the Controller
There is also a GitHub with Magento 2 Hello World module. Feel free to check it out.
What was your Hello World experience with Magento 2? Have you found it complicated?
Let me know in comments.
Never stop learning,

Nhận xét