- 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.
推薦閱讀
- Painter繪畫實例教程
- 從零開始:AutoCAD 2015中文版機械制圖基礎培訓教程
- 中文版CorelDRAW X7基礎培訓教程(移動學習版)
- AIGC輔助數據分析與挖掘:基于ChatGPT的方法與實踐
- 邊做邊學:Photoshop+CorelDRAW綜合實訓教程
- OpenCV項目開發實戰(原書第2版)
- Photoshop+AE UI動效設計從新手到高手
- ICEfaces 1.8: Next Generation Enterprise Web Development
- Unity 3D游戲開發(第2版)
- 企業虛擬化實戰:VMware篇
- Photoshop CC圖像處理案例教程(第2版)
- 中文版3ds Max 2016/VRay效果圖制作實戰基礎教程(全彩版)
- SketchUP草圖繪制從新手到高手
- UG NX 11中文版基礎教程
- Axure RP8原型設計圖解視頻教程(Web+App)