views:

305

answers:

1

I keep seeing CakePHP and CodeIgniter referred to as full stack MVC frameworks, whereas Zend Framework is said to be non-full stack. What exactly does this mean?

+6  A: 

Zend Framework is a use-at-will framework, which allows you to use some of its components. You could even use some of these components in an application built using some different framework. In this way, a use-at-will framework is more like a class library.*

A full-stack framework means that using any part of it depends on you using all of it. For instance, you must use the framework's data access library, MVC architecture, code-generating scaffolding, etc. and these components all rely on each other working together to form the complete framework.

Re your comment: Yes, coupling is one way of looking at it. I look at it as a balance between assumptions and flexibility. A full-stack framework assumes you're using the whole framework together, and from that assumption it can make some extra magic happen.

ZF was designed to minimize the assumptions (that is, minimize the coupling). Its components make few assumptions about whether you're using the rest of the components, reducing dependencies but increasing flexibility. But fewer assumptions means less magic.

Both styles of framework have legitimate advantages.


* One key difference between a plain class library and a framework is that a framework is intended to be extensible. You're encouraged to enhance the functionality of a framework through OO mechanisms like subclassing or polymorphism. Whereas a class library may assume you will use its API as-is, without extending its functionality.

Bill Karwin
Oh, I see. So it sounds like full stack is analogous to tightly coupled. That sounds terrible ;)Thanks!
Arms
When you say magic, do you mean that you have to code less, because the framework makes assumptions and handles more for you automatically?
Arms
For example, an MVC controller may look for View scripts and Model classes in a certain directory and using a certain file-naming convention. If the files exist and have the right class names, they're automatically loaded and used. No code required -- as long as you follow the framework's convention. Many conventions are possible besides file-naming conventions, for instance database tables and columns must be named in a certain way. These ideas are related to "convention over configuration" or "opinionated programming."
Bill Karwin