公司使用哪些PHP框架? [英] Which PHP frameworks are used by corporations?

查看:90
本文介绍了公司使用哪些PHP框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于PHP框架,有几个问题,但是我很好奇在用PHP开发Web应用程序时在商业世界中使用哪个.在我第一个基于Web的工作中,他们没有用于PHP代码库的框架.在处理PHP时,这很常见吗?如果没有,使用PHP生产产品(提供某种服务的站点或可以购买的基于Web的产品的网站)的公司倾向于使用哪些框架?

There are several questions about PHP frameworks, but I'm curious as to which one(s) are used in the commercial world when developing web applications with PHP. At my first web-based job, they didn't have a framework for the PHP codebase. Is this common when dealing with PHP? If not, what frameworks to companies producing a product (either a site that provides a service of some kind or a web-based product that can be purchased) using PHP tend to use?

推荐答案

在处理PHP时,这很常见吗?

Is this common when dealing with PHP?

不幸的是,是这样.当然,这是一个粗略的概括,但是倾向于将PHP作为其第一门编程语言学习的人并不了解可维护软件开发的要点,并且通常并不真正知道如何编写优质的代码.我认为这是PHP社区的失败,因为在历史上,大多数学习资源都没有强调良好的实践(可能是因为作者对此一无所知!).当然,只要您了解基本的编程原理,就可以使用PHP编写出色的代码.

In my experience, unfortunately it is. This is of course a gross generalization, but people who tend to learn PHP as their first programming language don't learn the essentials of maintainable software development and often don't really know how to write good code. I think this is a failing of the PHP community, where historically most learning resources don't emphasize good practices (probably because the authors didn't know any better!). You can of course write good code with PHP, as long as you understand underlying programming principles.

公司通常会从PHP脚本的笨拙代码库开始,这些脚本会被重复使用并逐渐在项目之间扩展(通常没有源代码控制!).知道自己在做什么并认真对待它的公司会把它发展成为某种内部框架,或者我经常发现他们会在没有PHP历史悠久的情况下转向某些东西,例如Django或Ruby on Rails.

Companies will often start out with a hap-hazzard code base of PHP scripts that get re-used and gradually extended from project to project (often without source control!). The companies that know what they're doing and take it seriously will evolve this into some kind of in-house framework, or I have often found they'll move onto something without the historical crapness of PHP, like Django or Ruby on Rails.

如果您刚入门,那么有几个不错的MVC框架将为所有开发人员学习和使用提供良好的基础.排名不分先后

If you're just starting out, there are several decent MVC frameworks that will form a good base for all your developers to learn and use. In no particular order:

  • CakePHP
  • CodeIgniter
  • Zend Framework

当然还有其他人.

话说回来,一如既往地取决于项目.有时,一个框架要么没有意义,要么会变得过大,有时您最好使用预先构建的产品(例如CMS)并为其构建扩展.

That said, as always it depends on the project. Sometimes a framework either won't make sense or will be overkill, othertimes you're better off using a pre-built product (like a CMS) and building extensions to it.

这篇关于公司使用哪些PHP框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆