- 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.
推薦閱讀
- Moodle 1.9 for Teaching 7/14 Year Olds: Beginner's Guide
- Microsoft Visual C++ Windows Applications by Example
- Sencha Touch Cookbook, Second Edition
- Adobe Illustrator 2023基礎(chǔ)教材
- 好的PPT會說話:如何打造完美幻燈片
- Creo Parametric 5.0中文版從入門到精通
- 像攝影師一樣調(diào)色
- UG NX 9.0中文版基礎(chǔ)與實例教程
- Photoshop CC從入門到精通(全彩超值版)
- 中文版Photoshop CS6全能修煉圣經(jīng)(移動學(xué)習(xí)版)
- Backbone.js Cookbook
- AI繪畫與攝影實戰(zhàn)108招:ChatGPT+Midjourney+文心一格
- 3ds Max影視動畫角色設(shè)計技法教程
- SPSS統(tǒng)計分析與應(yīng)用
- SolidWorks三維設(shè)計及工程圖速成