This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dev:all:psr [25.05.2015 16:18] – [General rules for Addons] mrbaseman | en:dev:all:psr [28.12.2018 23:37] (current) – [Official Standards] Manuela v.d.Decken | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | FIXME **This page is not fully translated, yet. Please help completing the translation **\\ | ||
- | //(remove this paragraph once the translation is finished)// | ||
- | |||
====== Coding Standards ====== | ====== Coding Standards ====== | ||
===== Official Standards ===== | ===== Official Standards ===== | ||
- | We did not reinvent the most basic standards for Website Baker and arbitrarily define some rules, but we use basically the same set of rules as many other notable projects and large frameworks | + | {{: |
The basic standards for Website Baker are the standards [[http:// | The basic standards for Website Baker are the standards [[http:// | ||
Some might feel uncomfortable with the quite strict wording using the expressions MUST! or MUST NOT! etc. However, these terms are taken exactly as they are from the original PSRs which in turn striclty stick to [[http:// | Some might feel uncomfortable with the quite strict wording using the expressions MUST! or MUST NOT! etc. However, these terms are taken exactly as they are from the original PSRs which in turn striclty stick to [[http:// | ||
Line 15: | Line 12: | ||
|MAY / OPTIONAL |This states an item which is truly optional.| | |MAY / OPTIONAL |This states an item which is truly optional.| | ||
- | * **[[dev: | + | * **[[en:dev: |
- | * **[[dev: | + | * **[[en:dev:all:psr:psr-1|Basic Coding Standard (PSR-1)]]** - This standard helps to achieve the highest possible degree of compatibility of PHP code contributed from different sources. |
- | * **[[dev: | + | * **[[en:dev:all:psr:psr-2|Coding Style Guide (PSR-2)]]** |
- | * **[[dev:all:psr-4en|Improved Autoloading (PSR-4)]]** -A more modern interpretation autoloading, | + | * **[[http:// |
- | * **[[dev: | + | * **[[en:dev: |
===== Basic rules for programming in the WB-environment ===== | ===== Basic rules for programming in the WB-environment ===== | ||
With every subsequent release of WebsiteBaker, | With every subsequent release of WebsiteBaker, | ||
- | At present, i.e. before 2.8.4, compliance with many regulations is still voluntary, in the 2.8.4 much is already deprecated, and later on many of the specifications of 2.8.4 will be mandatory. All this sounds very restrictive to many, but this is gladly accepted, since precisely these limitations will eventually ensure a stable modularity, flexibility and interchangeability for stable, reusability and mainly maintainability of code. | + | At present, i.e. before 2.10.0, compliance with many regulations is still voluntary, in the 2.12.0 much is already deprecated, and later on many of the specifications of 2.12.0 will be mandatory. All this sounds very restrictive to many, but this is gladly accepted, since precisely these limitations will eventually ensure a stable modularity, flexibility and interchangeability for stable, reusability and mainly maintainability of code. |
==== General rules for Addons ==== | ==== General rules for Addons ==== | ||
Line 36: | Line 33: | ||
- ... May only send data to the browser throught the responder of core | - ... May only send data to the browser throught the responder of core | ||
- ... May not define global variables or global constants. | - ... May not define global variables or global constants. | ||
- | for later versions (2.9), further restrictions will come. See the respective sections of this documentation. | + | - ... May never use indirect addressing or allow that! |
+ | |||
+ | for later versions (2.12), further restrictions will come. See the respective sections of this documentation. | ||