This section of the standard comprises what should be considered the standard coding elements that are required to ensure a high level of technical interoperability between shared code for Diem Extended.
This document extends Basic Coding Standard and coding standards from Basic Coding Standard MUST be fulfilled if is not stated otherwise.
Although Symfony1 and Doctrine1 are considered as depreciated as of Y2012, they are mature and stabile libraries, with high level of the security, while Diem and Diem Extended are great platforms for the fast development of small to medium web sites and web applications.
Therefore, until Symfony CMF matures - Run Open Code continues the development of the Diem Extended.
The code formatting in Diem Extended is based on Symfony1 rules, not on coding standards provided on this page. However, Run Open Code team constantly works on code reformatting in order to have compliance with provided coding standards.
HTML code in Diem Extended in
VIEW layer is generated via
_open() / _close() HTML helpers.
In such case, the indentation MUST be used in order to provide clean code that reflects the structure of the HTML output.
echo _open('div.class_name'); echo _tag('span', 'Some text'); echo _media($resource)->size(100,100); echo _close('div');
VIEW layer, the combination of PHP and HTML code CAN be used as well, by using provided coding standards.
<div class="some_class"> <?php foreach ($collection as $item): ?> <h2><?php echo $item->getTitle(); ?></h2> <p><?php echo $item->getSynopsis(); ?></p> <?php endforeach; ?> </div>