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条)

报告相同问题?

悬赏问题

  • ¥15 网络科学导论,网络控制
  • ¥100 安卓tv程序连接SQLSERVER2008问题
  • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd