Friday, 14 December 2012

AEM Coding standards

Good AEM projects are backed by the coding standards.

A developer must always be worried about the quality of his code. Let us see why the code quality is important?

>    80% of the lifetime cost of a piece of software goes to maintenance.
>    Hardly any software is maintained for its whole life by the original author.
>    Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.
>    If you ship your source code as a product, you need to make sure it is as well packaged and clean as any other product you create.

Code Conventions
Thus, everyone writing software must confirm to the code conventions in any technologies. Recommended way to approach such a challenge would be to:
>    Reuse : The template roughly defines page structure (navigation elements, panels, and so on), which is further fine-tuned by its design (CSS, graphics). So reuse an existing template to create a new type of page.
>    Parsys/iparsys: Use the paragraph system (parsys/iparsys) on the new pages.
>    Authorize: Define access right to the Design mode of the paragraph systems, so that only authorized people (usually the administrator) can change them.
>    Proper definitions: Define the components allowed in the given paragraph system so that editors can then place the required components on the page.
>    Roles based: Editors add and configure the allowed components, on the pages they are responsible for, to deliver the requested functionality (information) to the business.

The developers of AEM/CQ based systems should therefore use:

>    Templates and access control to paragraph system design for uniformity and brand protection
>    Paragraph system including its configuration options for flexibility.

General rules for developers in AEM projects:
>    Minimum count: Keep the number of templates low - as low as the number of fundamentally different page structures on the web sites.
>    Provide flexibility: Provide necessary flexibility and configuration capabilities to your custom components.
>    Use Parsys where ever possible: Maximize use of the power and flexibility of AEM paragraph system - the parsys & iparsys components.

No comments:

Post a comment