O'Reilly logo

Magento 2 Developer's Guide by Branko Ajzele

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding standards

Coding standards are a result of conventions designed to produce high-quality code. Adopting certain standards yields better code quality, reduces the time taken to develop, and minimizes maintenance cost. Following coding standards requires knowing the standards in question and meticulously applying it to every aspect of the code that we write.

There are several coding standards that Magento abides by, such as the following ones:

  • The code demarcation standard
  • The PHP coding standard
  • The JavaScript coding standard
  • The jQuery widget coding standard
  • The DocBlock standard
  • JavaScript DocBlock standard
  • The LESS coding standard

The code demarcation standard speaks of decoupling HTML, CSS, and JS from PHP classes. By doing so, the backend-related ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required