Which PHP frameworks are used by corporations?

前端 未结 10 1773
迷失自我
迷失自我 2021-02-10 07:33

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

10条回答
  •  半阙折子戏
    2021-02-10 08:05

    Is this common when dealing with 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.

    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.

    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

    There are of course others as well.

    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.

提交回复
热议问题