What is Magento architecture based
on, and how does Magento architecture affect the Magento 2 application?
• Magento is built on the MVC idea. Model / View / Controller.
• Model is the data. Ultimately, the model concept goes way deeper than this into data storage and retrieval.
• View is how the data is presented. This is the HTML and CSS side.
• Controller is the link between the model (data) and the view. This provides the business logic for what data to show where
Database sharding and varnish caching
• (EE only) Sharding is splitting up a database into multiple “shards” (think of a broken glass).
• This allows for performance gains and scalability in different configurations. The database can be split into different segments: checkout orders and products.
• This also allows data to be backed up, data analysis without affecting the master database, and scalability.
• More information: http://devdocs.magento.com/guides/v2.0/ config-guide/multi-master/multi-master.html
• Varnish caching
• Varnish is a reverse-proxy caching engine.
• It sits in front of the web server (apache or nginx) and if a request is cached, it will return that. This results in a very low latency caching engine. Response times are often sub 200ms.
Templates and layouts in Magento 2: Basic responsibilities and roles when executing Magento code
• Templates contain the HTML; layouts are XML files that contain instructions for what to show, where, and details for how to
show it.
• The layout XML files are merged together to form one set of instructions per page. This gives tremendous capabilities for customizing a website.
• Templates are PHP and HTML. They accept PHP objects and other data and render them as HTML.
Extending Magento 2 functionality with a code change or enabling an extension—basic concepts and process steps
Configuring site design using options found in the admin under Content > Design > Configuration
Installing and enabling/disabling Magento 2 extensions
• It is very important to first review the code (line-by-line) of each extension installed. I’m always amazed at how many security vulnerabilities and sending requests back to the module developer’s servers (phoning home) that I find.
• Installing the module is very easy (instructions for a one-off Magento instance not connected to builds or anything):
• SSH into the server
• Copy the new module files
• bin/magento module:enable ((MODULE NAME)) — omitting this will enable all modules
• bin/magento setup:upgrade
• bin/magento setup:di:compile
• bin/magento setup:static-content:deploy
• bin/magento cache:clean