views:

757

answers:

9

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?

+1  A: 

In last two places I've worked company had their own (private, built in-house) framework.

porneL
+6  A: 

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:

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.

roryf
+7  A: 

Most frameworks are strongly focused on the presentation layer. Now, "corporate" is of course a rather vague term, but I assume you mean for more typical it-tasks, such as accounting, crm etc. For these tasks, the presentation layer is a much smaller part of the entire application. Not only does this make said frameworks less important - it actually disqualifies them somewhat, since you don't want the restrictions on your model layer, that they impose.

troelskn
Now this answer is the one I really like! This is so true, I've found even Django's (O.K. that is not php but still:P) model layer to be too restrictive for the purposes, outlined in your answer. Most of the time, it is easier to code the model layer yourself from scratch and then bolt on some presentation, rather then try to adjust a framework to your needs.
shylent
Feeling somewhat the same here - custom intranet app.
namespaceform
+1  A: 

I think it gets more and more common to use a framework. A few years back most programmers developed their own framework. But the cost to train a new employee for such a framework gets higher and higher. Therefore many companies are moving now to well known frameworks.

I guess that Zend is currently the most used Framework in the corporate environment. One reason is that it does not give you any restrictions on the model layer.

I can not predict the future but I guess that Flow3 will be used in the future too. It is the new Framework behind Typo3. And many Typo3 developers (web designers) who need to write web applications will probably use Flow3 then.

Raffael Luthiger
A: 

I'm not sure if PHP has gone into the enterprise market in the US yet but when i worked in a corporate office the language what they use is Microsoft .NET. PHP is yet to enter the corporate world IMO. It is popular with the hacker world and maybe micro and small software/web companies.

drikoda
hacker world? hat the hell are you talking about? ;)
DaNieL
What I ment is hacker world == open source community etc..
drikoda
A: 

hi,

recently i talked with a CTO of a company, offering a e-lecture solution and we talked about PHP for a while ... we both agreed, it is not the best language for rock solid solutions, but he pointed out the symfony framework, they used just before moving to java ...

also, flow3 mentioned by raffael is quite powerful ... most interesting thing to me is, it brings AOP into PHP ...

back2dos
A: 

The only enterprise-level framework I can think is Zend Framework. CakePHP, Code Igniter and others are only focused on RAD development.

knoopx
I've never used Zend but I disagree on the others, from my brief encounter with CodeIgniter I saw no reason why it wouldn't be suitable on larger-scale projects. As for "enterprise-level", when I've figured out what that means I'll be a clever man indeed ;-)
roryf
Enterprise means "easy to adopt", "easy to replace", "easy to maintain" and commercially licensed. In framework terms, easy to adopt and replace means you can do it piece by piece, and easy to maintain means predictable behavior across releases, a transparent code organization and a supportive vendor.
Joeri Sebrechts
"commercially licensed" again I disagree - plenty of open source projects (particularly in the Java and .NET world) that would fit your bill of "enterprise-level".
roryf
@Rory Fitzpatrick: large scale-scale projects does not mean enterprise-level projects. How good is, for example, Code Igniter for publishing/consuming web services, or to use your company LDAP server for user authentication?
knoopx
+1 is for the "...clever man indeed..." comment.
namespaceform
A: 

You may want to look at www.flow3.org, it's a pretty comprehensive approach to PHP application frameworking and is rapidly approaching its first mainstream Beta release.

Denyerec
+1  A: 

Having experience with CI , yiiframework and calephp (not much, really) my opinion is that CI is not flexible as ohter 2, so I do not recommend it on larger-scale projects. Anyone who disagree, just can try a demo project with cakephp and Yii and he will see how things are easier with them as crud,form validation etc. Of course all have their disadvantages :)

dimis