Basics of Framework Design in PHP Part 2
Hey, I saw that the first part of this post (Basics of framework design) got a little bit attention I decided to continue that thought. Before you continue reading make sure you read the first part for easier understanding of this post.
In order to use or even build a framework first we need to understand what type of architecture the framework was built upon. We need to understand the design behind it.
So let’s start with framework types generally. In the PHP world the majority of framework are either full stack or glue frameworks.
A full stack framework is essentially a lots of tight coupled components/modules, not necessarily built upon each other, but almost all the time this is the case. For ex. Symfony or Cake PHP are full stack frameworks. Another characteristic of this type is that it enforces the developer to use these components in order to build the web page or web application.
A glue framework is composed by a bunch of loosely coupled components. It is rather a flexible type, you can use these components together, but not necessarily. Zend Framework is an example of glue framework.
In my personal opinion a team with less than 5 or 10 developers should use a glue framework, because it’s much easier and much faster to work with. The developers doesn’t have to learn all the ins and outs of the framework. Larger teams almost always should use full stack frameworks, because with larger teams the most important and frustrating problem is communication. Therefore a project manager who enforces a full stack framework on his team will cut down the development time. The developers will have consistent components to work with and the framework will enforce a consistent coding style and conventions making the project more manageable. (eg. On many of Yahoo’s pages a modified version of Symphony framework is used).
Many of these frameworks are based on the MVC architecture and they’re push based. MVC stands for Model - View - Controller and what essentialy means that the application is separated into model (or data access), controller (or action) and view (or user interface, template) layers. Push based means that the action (or controller) pushes the data gathered from the model (or data access) to the view (or user interface). CodeIgniter, Zend and Symfony are all push based frameworks.


Comments
November 15th, 2008
[...] Basics of Framework Design in PHP Part 2 [...]