- Magento 2 Development Essentials
- Fernando J. Miguel
- 538字
- 2021-07-16 13:11:05
The revolution of Magento 2.0
Magento Commerce has promoted important changes between its 1.x and 2.0 versions. Some usual problems of the Magento 1.x version were fixed in this new version. The following processes/modules have received improvements in Magento 2.0:
- Performance
- Payment method
- Checkout
- Catalog
- CMS
- Web API
- Framework
- Setup
All good software or systems pass through incremental improvements for evolving according to its production environment; it couldn't be different with a commerce platform that powers over 250,000 online stores worldwide.
Magento 2.0 CE has a flexible architecture and a modular code base; it has a modern theming and an extensive Application Programming Interface (API). To get a better performance, Magento 2.0 compresses JavaScript files and images and gives support to Apache Varnish integration on the server side to enable faster performance.
Security is another subject treated in the Magento 2.0 system. According to its official documentation (http://goo.gl/E7sPm3), Magento 2.0 has had substantial enhancements in its security layer:
- Enhanced password management
- An improved prevention of cross-site scripting (XSS)
- Restricted permissions for file access
- An improved prevention of click jacking exploits
- The use of non-default admin URL
Extensibility and modularity allow Magento to be highly customizable. As an objected-oriented solution, Magento follows good architectural principles and coding standards that provide high cohesion and loose coupling.
The following diagram illustrates Magento's architecture and how the components are integrated:

Magento works with PHP Standards Recommendations (PSR). The PSR establishes the following good programming practices:
- PHP extensions: This allows Magento to work with some PHP extension solutions that are required by Magento, for example, PDO and Memcache.
- PSR-0—Autoloading Standard: This enables class autoloading on the PHP code. It's highly recommended to use PSR-4 instead of PSR-0, but the PSR-0 standard illustrates only the Magento architecture standards.
- PSR-1—Basic Coding Standard: These are some good practices to write the PHP code.
- PSR-2—Coding Style Guide: This extends PSR-1, adding the layout code presentation.
- PSR-3—Logger Interface: This exposes eight methods to write logs to the eight RFC 5424 levels (
debug
,info
,notice
,warning
,error
,critical
,alert
, andemergency
). - PSR-4—Autoloading Standard: This describes a specification for autoloading classes from file paths.
Tip
To know more about this, access http://www.php-fig.org/psr/.
On Magento Framework, we have some libraries and dependencies of this architecture. Zend Framework (ZF) is a very important layer of this architecture; once Magento was written in ZF; as we saw earlier.
Finally, we have Web Users (frontend/backend), Service Consumers (API and endpoints), Service Layers (interfaces/contracts), and Models (resources and database).
On the Web Users layer, we can define Magento's main processes as:

- Products: This manages the configuration of products in Magento, such as catalogs, inventory, categories, and attributes
- Marketing: This manages promotions, communications, and SEO
- Content: This manages the pages content
- Customers: This manages and gets information about customers
- Sales: This manages cart process, checkout, orders, shipping, and payments
- Reports: This generates reports and statics of e-commerce
We will discuss these topics in the coming chapters, but now, I'd like to introduce to you one of the most important processes of any kind of e-commerce: the Sales layer or Magento Order Management. This is one of the most important things to understand the Magento development core.
- 微服務(wù)設(shè)計(jì)(第2版)
- DevOps with Kubernetes
- Visual C++串口通信開(kāi)發(fā)入門與編程實(shí)踐
- C++ 從入門到項(xiàng)目實(shí)踐(超值版)
- Bootstrap 4:Responsive Web Design
- Kali Linux Wireless Penetration Testing Beginner's Guide(Third Edition)
- Drupal 8 Module Development
- Corona SDK Mobile Game Development:Beginner's Guide(Second Edition)
- Java網(wǎng)絡(luò)編程實(shí)戰(zhàn)
- Visual Basic 6.0程序設(shè)計(jì)實(shí)驗(yàn)教程
- ASP.NET求職寶典
- ASP.NET 4.0 Web程序設(shè)計(jì)
- OpenCV Android Programming By Example
- Learning Kotlin by building Android Applications
- C# 7.1 and .NET Core 2.0:Modern Cross-Platform Development(Third Edition)