官术网_书友最值得收藏!

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.
主站蜘蛛池模板: 子洲县| 崇礼县| 绩溪县| 洛扎县| 石门县| 孝感市| 长汀县| 沾化县| 望奎县| 海兴县| 巩留县| 开远市| 武冈市| 定州市| 灵璧县| 古交市| 仁化县| 鄂托克旗| 鲁甸县| 闵行区| 罗江县| 西宁市| 依安县| 沁阳市| 浪卡子县| 白山市| 咸丰县| 忻城县| 大荔县| 谢通门县| 五家渠市| 潼南县| 阿勒泰市| 阜城县| 徐闻县| 西平县| 元谋县| 丹寨县| 祥云县| 汤阴县| 高唐县|