Latest update:  You can check and download my new sample extension at here : Thienphucvx_sample

It includes:
– Work well with latest magento 2 version.
– Setup and install sample data for simple blog database
– Sending a request and create new blog post.
– It also includes cache tags so you need to clear cache to see new post after creating.

Bonus :

Magento 2 debug extension. It will be useful for debug purpose


In this tutorial, we create new module : Inbusiness_Helloworld
So let’s create a module that simply echos “Hello World” in the content.
1/ First we will start with a module.xml file to declare with magento2 about new module :




2/ Create app\code\Inbusiness\Helloworld\etc\frontend\page_types.xml




3/ Create app\code\Inbusiness\Helloworld\etc\frontend\routes.xml



4/ Create app\code\Inbusiness\Helloworld\Controller\Index.php



5/ Create app\code\Inbusiness\Helloworld\Controller\Index\Index.php



6/ Create app\code\Inbusiness\Helloworld\view\frontend\layout\helloworld_index_index.xml



7/ Create app\code\Inbusiness\Helloworld\view\frontend\templates\helloworld.phtml



When you enter : your_site/helloworld, “Hello World” will be displayed.
Happy coding !