- 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.
推薦閱讀
- 剪映短視頻剪輯零基礎(chǔ)一本通
- Photoshop CC 2018實(shí)用教程
- 突破平面Premiere Pro 2022短視頻與視頻制作
- Flash CS6標(biāo)準(zhǔn)教程(全視頻微課版)
- Inkscape 0.48 Illustrator's Cookbook
- Drools規(guī)則引擎技術(shù)指南
- 中文版CorelDRAW X6基礎(chǔ)培訓(xùn)教程
- 數(shù)字創(chuàng)意大師:Alias二維與三維概念設(shè)計(jì)工作流淺析
- Revit技巧精選應(yīng)用教程
- MATLAB在日常計(jì)算中的應(yīng)用
- Adobe Flash 11 Stage3D (Molehill) Game Programming Beginner's Guide
- After Effects 動(dòng)態(tài)圖形設(shè)計(jì):入門技法與基礎(chǔ)創(chuàng)作
- Mastercam軟件應(yīng)用技術(shù)基礎(chǔ)(X2版)
- Photoshop+PxCook+Cutterman網(wǎng)頁UI設(shè)計(jì)教程
- Adobe Camera Raw完全自學(xué)教程