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?

  • 3
    There are two kinds of "big". Having many features and having many users. For sites with many users, performance often trumps development effort. Nov 24, 2013 at 20:39
  • 1
    There are many big sites written with frameworks. They are so widespread nowadays that your assumption they could be "unprofessional" just majes no nsense at all. Nov 24, 2013 at 20:48
  • 5
    What's “unprofessional” is doing work yourself when someone else has done a better job and allowed you to (re)use it… Nov 24, 2013 at 21:14
  • 5
    We use the MVC framework on Stack Overflow (and of course the rest of the Stack Exchange network) - does that count?
    – Oded
    Nov 24, 2013 at 21:52
  • 3
    @CodeCrack CodeIgniter is pure horse crap. If you compare all of the crappy PHP frameworks to a garbage bag, CodeIgniter is the liquid that's dripping from the bottom. Oct 25, 2014 at 22:32

6 Answers 6


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


When projects scale to a certain size, a framework is inevitable. You can explicitly choose a framework, or you can implicitly accrete it. If you do not explicitly choose to design / adopt a framework or architecture, you will still have one, it will just be a very badly designed one, and it will be much harder to add new functionality without introducing bugs (as you have already experienced). If you do not yet have the skill to design your own framework, it is better to choose a well-known framework, as it will save you time in the long run.

Specifically about your examples:

Youtube uses python for its front-end, but it spends most of its time in back-end services. In large sites you typically find this architecture where everything that takes up considerable time is moved out of the front-end servers and into a back-end service layer which can be scaled independently from the front-end. From what I can find they seem to have rolled their own framework. For more info, see http://highscalability.com/youtube-architecture

Facebook uses PHP for its front-end, and they also spend a lot of time dispatching to back-end services. Again their framework is home-grown, but they have even gone so far as to build their own PHP engine and development tools. They've open-sourced some of their framework code as well.

  • Facebook and Google are good examples of companies creating their own frameworks. The question if it makes sense for you is mostly a function of what you need, and whether that can be achieved with existing Tools (highly recommendable) or whether you absolutely need to improve things beyond the existing, because no combination of the available tools does fit your needs. But that's a hard way to go, because of necessary upfront investments, maintenance and further development, so I would really recommend to follow Joeri's recommendation and start with existing frameworks.
    – JensG
    Nov 26, 2013 at 19:17
  • Wait what, they use Python for front-end? I fail to see why would they opt for that, the only thing it can do (AFAIK) is spit out HTML via a templating engine of some sort. WebAssembly is not yet really used, let alone 5 years ago when the answer was written.. Aug 28, 2018 at 7:46
  • I think I meant "the front-end application", meaning the part that generates the HTML on the server, as compared to "the back-end services", the things that are running one layer deeper in the network architecture. Sep 3, 2018 at 10:55

There are different kind of Framework:

  1. Data frameworks (ORM) which provide basic functionalities to manage data : eg. Doctrime2
  2. Kernel frameworks which provide basic functionalities to manage components : eg. cuteflow
  3. Application frameworks provide user functionalities: eg. eZ Comps

using framework is a big choice, because they solve common problems and help the developer to make more readable and self-documented code, but they require a lot of time and experience to be dominated.

For java developer it's a little bit different because Oracle defines standard (JSR) and different framework's producer adapt their framework and it's (relatively) easy to jump from a frameowrk to another.

In PHP framework is like a diamond ... it is forever (+ or -)


It is wise to carefully think about the consequences of choosing a framework will have.

But the most important thing is to understand the business problems before you choose a specific technology to implement the solution to those problems (or requirements).

You should always consider that the business logic code or let's say the code that will implement the solution to your requirements is your most precious good.

So there are ways to implement the important (business) logic code in a way that is free from framework code and thus free of dependencies other than your programming language.

If you keep that in mind and always separate your business logic you will be able to switch to another framework in case that you encounter limitations at some point. Going this way also comes with other benefits such as better testability, readabilty and maintainability. For instance, if you keep your business logic code free of ORM or Active Record dependencies you will be able to change the components for database communication without affecting your business logic code.

Looking into Clean Architecture or Domain-driven Design can help you achieving this goal.

Note: implementing strict abstractions between business logic and interface concerns of course also adds additional effort and might not make sense for "small" and short-lived projects without complex business logic. But in such cases choosing the wrong framework and not having the mentioned abstractions will not have the same bad implications as for big and long-lived projects with complex business logic.


I don't think that using a framework is a problem. In fact, it brings a lot of useful features and benefits, such as unit testing, good practices, or stability of your code. Zend and Symphony are good examples of frameworks that enhance your coding abilities.

However, using a framework does not make your code more performant. There are many other factors which need to be considered in order to make your application run fast.

Answering your question: yes, frameworks are used in big websites.

  • 1
    I find your post almost impossible to parse; is there anyone nearby that could help you with your English? I'd edit this but have no idea what you are trying to say. Feb 8, 2014 at 1:01

Even if you don't use a framework you end up with your own anyway.

You're going to have standards in your company, libraries which you use, conventions. And at some point your own small or big project will basically have its' own custom framework. (although you probably won't call it that.)