8 Apr 2020
Hello! In this article I'm going to present learning plan for Magento 2.
Recently I had a task to prepare several PHP-developers to work with this system. While I was working on it, I created such learning plan. Learning process should take about 2-3 months. In case of luck of time, some action points can be reduced or skipped.
Previously I was permanently working with Magento about one and half year, while I was working in 220 Volt. Then I was quite tired on it and decided to switch to some other activity. So, last year I was mainly working with Symfony. And spent on Magento not so much time.
But time after time I still have to answer questions about Magento from my colleagues, and even make some estimates for Magento projects. So, all this year I was not so far from Magento world. Beside this, I was thinking, why a lot of people so much love and interested in this quite sophisticated and clumsy system.
From my side, there are main advantages of Magento:
Magento 2 is box CMS. There are a lot of features out of box
A lot of extensions and themes. Large developers community. Some standards - similar things would be done similar way.
Quite good architecture. It's quite possible to customize.
There is free of charge Community Edition available
Magento is quite complicated. It's quite difficult to learn and to work with it.
Magento is quite heavy and might have some performance issues even on good hardware
Magento is box CMS. It might be not good for some specific untypical projects
Main use cases:
If you just need to create store. There is no specific requirements. But you need clear and understandable solution, maintainable by other developers. Probably you also need some specific features that may be covered by 3rd party extensions, or custom modules
If you already have some IT system, and need to integrate e-commerce functional. And you are still fine with Magento 2 features, and not going to change it significantly
There is one or more developers, who need to learn Magento 2. They know PHP on quite good level - middle or higher. They have experience working with frameworks like Symfony, Laravel, Yii or whatever.
While learning Magento, it's important to write some custom documentation. Magento has official documentation, but it isn't always full. And sometimes it is confusing and hard to find what you really need.
Then for each topic there would be some custom documentation page. It might be worklog, tutorial with pictures, steps and console commands etc. It also might be useful because some actions can be done via Admin panel, then it would be hard to reproduce without tutorial.
There are few tools needed for learning Magento:
VPS with Linux
Magento Connect account https://account.magento.com/
Github/Gitlab/Bitbucket/Whatever account and several git repositories.
Documentation tool like Notepad, Confluence, Evernote or Whatever.
Firstly need to prepare infrastructure for Magento development:
Setup local development environment - Linux + Nginx + PHP 7.3 + Mysql 5.7.
Install Magento locally via console or web installer
Enable developer mode
Create git repository, configure .gitignore, add project files to repository. Create README.md file
Configure VPS as a dev/staging server. Setup magento on server from created repository.
Try to load Magento Sample Data
Configure Docker development environment(optional)
Configure Varnish Cache for better performance. I would recommend to do it on VPS.
Configure automatic deploy to VPS. Prepare script for automate routine operations(clear cache etc.)
Now we are going to create simple shop on Magento 2 with minimal development efforts. Then we will have very simple, but ready to use shop, adopted for specific client. Basically, it will be shop MVP. Then we need to do following steps:
Prepare content. Shop name, logo, address, working hours etc. And most important - categories, products and images for them.
Prepare CSV file for import products and categories. CSV file should be generated automatically based on content.
Import data from CSV file to Magento 2. Ensure that all data loaded and store works correctly. Create first order.
Configure standard Luma theme. Change logo, header, footer, store name, address etc.
Configure static content. Update "Privacy" page, create "About us" page etc. Also need t configure main page.
Configure email templates - update logo and shop data.
Configure email sending via SMTP.
Beside that need to research how Magento features work
Investigate product types
Investigate orders processing workflow
Investigate CSV import process
Investigate email templates processing
Investigate static content customization
If there are several participants in learning process, then it would be good to divide tasks between them. After all task are done it might be useful to do laboratory work, when each developer need to do all task using prepared tutorials.
Now we are going to improve store from previous module. Add functional that would be needed for real store. Then we have full featured Magento 2 shop.
Implement payment via credit card(using Paypal testing mode)
Configure shipping methods
Configure customer account area
Configure product recommendations, related products etc.
Configure advanced pricing and discounts
Configure SEO parameters, human readable url, robots.txt, sitemap etc.
Configure multiple stores
Install 3rd party theme(free)
These tasks also can be divided between developers. And then it would be good to make laboratory work, the same as for previous module.
After that we are going to check in more details, how Magento works under hood. Implement custom theme based on provided design and HTML template. And learn how to develop custom modules and create several modules with different functional.
Then we will have store with custom design and advanced custom functional.
Firstly we are going to investigate Magento internal structure:
Investigate module structure.
Investigate how to work with REST API.
Investigate Magento 2 MVC(Model View Controller) pattern implementation.
Investigate UI components
Investigate DI and configs structure
Investigate EAV attributes structure
Investigate plugins, observers etc.
Investigate how to work with Zend models, collections etc.
After that we would create several custom modules with different functional:
Implement custom functional for store. Implement module from scratch
Implement custom functional for admin area. It would be some CRUD for custom entity.
Implement custom REST API methods
Implement external requests(for example: webhooks) handler
Implement custom service modules(for example: SMTP).
Creating functional and unit tests for custom modules
After those steps developer is ready to create custom modules for specific project needs.
There would be some untypical tasks for Magento development.
Implement custom module for import and export data to different formats
Use Magento in headless mode. Implement custom frontend on React/Vue/Angular
Implement advanced custom search based on elastic search
Implement advanced custom module with not trivial logic, store and admin area customization
If you need such changes then probably you should consider to use some framework, like Symfony or Laravel instead of Magento.
Finally we have a learning program, that will help to learn different aspects of Magento development. Beside that we will have pet-project based on Magento. Some parts of it can be used in future in real projects.
In future posts I'm going to describe each module in more details. And add some implementations examples, if it would make sense.
That's all for today. Thank you for your attention!