Php – Are frameworks used for “big” websites

frameworksPHP

I'm kind of new to PHP. I can create basic sites with login/registration, etc., but I always struggle to build complex sites with lots of features, because eventually the code becomes messy and I just run into more and more little bugs, and then fixing those produces another, and so on. I realise that that's partially to do with me simply not writing clean code (I'm working on that!) but I would also probably benefit from using a framework.

But is using ready-made frameworks "unprofessional"? Would a big site such a YouTube or Facebook use a framework like CakePHP or CodeIgniter?

Best Answer

Using a framework is like choosing a library: you get some features for "free", but you also get the limitations of this code (for example, using a data-access library might prevent you to write a five-way join query).

The problem with choosing a framework is that it is harder to revert your choice once you have started using it. The reason is that frameworks usually have lots of responsibilities, and often use shortcuts (e.g. "convention over configuration") to make things easier to write. So your code ends up tightly coupled with the framework, and moving to another framework implies a total rewrite.

So it is not unprofessional to use a framework. I heard some good success stories with symfony. But it is an important choice to make. And it should be a well informed decision (you should build a small/medium project with a given framework before considering to use it for a big business).

Related Topic