douyun6399 2010-05-14 19:53
浏览 27
已采纳

使用PHP在工作场所使用的设计模式的频率

I read a book awhile back called PHP Design Patterns and Practice, and ever since then I have been using design patterns whenever I think they are needed. However it just occurred to me that maybe most companies do not use design patterns very often for PHP, or at all. What I was wondering is, do most companies use design patterns to help improve code flexibility? And if so, what are the best design patterns to learn for PHP?

Thanks for any help on this, Metropolis

Thanks for all of your great answers on this!
The conclusion I can take from this is: Patterns are used in almost all work places with PHP, and the most common ones need to be understood and memorized. Also, the MVC architectural pattern is very important and everyone will expect you to know it.

  • 写回答

5条回答 默认 最新

  • douliang2087 2010-05-14 20:08
    关注

    In my experience, the answer is: very often. Almost every place I've worked at uses design (and architectural) patterns. These are larger projects and it helps in implementation, maintenance and analysis to use known solutions to common problems.

    You'll want to learn all the biggies (because you'll both use and run into them) starting with: Factory, Singleton, Observer, Strategy.

    MVC is an architectural pattern that you should know well.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥88 实在没有想法,需要个思路
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)