- Symfony 1.3 Web Application Development
- Tim Bowler Wojciech Bancer
- 167字
- 2021-04-01 14:09:05
Coding guidelines
One thing that I have learned in the past is to always establish coding guidelines. Following some of the eXtreme programming principles—namely, pair programming—I have learned that having a set of guidelines helps team integration and code readability.
Symfony-specific guidelines
These are some Symfony-specific guidelines:
- One module is not for one page. The only time where this might be ruled out is if there is a strong possibility of the module being extended.
For instance, if you have general footer pages, these could be a part of the general module. Also, grouping functionality allows code to be refactored into a plugin during development.
- Application-specific settings should always go in the
app.yml
file. - When using a mail plugin for sending out emails, abide by the MVC pattern.
That means use the action and templates rather than storing content inside a variable.
- Keep PHP to an absolute minimum within templates.
- Database table names should be plural and PHP models names should be singular.
推薦閱讀
- Beginning Swift
- After Effects CC影視后期制作實(shí)戰(zhàn)從入門(mén)到精通
- Midjourney AI繪畫(huà)藝術(shù)創(chuàng)作教程:關(guān)鍵詞設(shè)置、藝術(shù)家與風(fēng)格應(yīng)用175例
- 中文版CorelDRAW X7基礎(chǔ)培訓(xùn)教程(移動(dòng)學(xué)習(xí)版)
- Photoshop CS6完全自學(xué)案例教程(微課版)
- 人臉識(shí)別算法與案例分析
- Apache Roller 4.0 – Beginner's Guide
- Word 2010實(shí)戰(zhàn)技巧精粹
- Photoshop影視動(dòng)漫角色繪制技法精解
- SOLIDWORKS中文版實(shí)用教程
- Photoshop+CorelDRAW 字體設(shè)計(jì)與創(chuàng)意:草圖/實(shí)現(xiàn)/包裝(微課版)
- 中文版Photoshop 2023從入門(mén)到精通
- 中文版CorelDRAW X7基礎(chǔ)培訓(xùn)教程
- 平面設(shè)計(jì)師實(shí)戰(zhàn)教程
- 中文版Flash CC實(shí)例教程