Zend Framework

Whilst Sam and Ian have been blogging about the the project itself, I guess it’s time I wrote something about the technical side of CRIATE…


As you may know, we are using the Zend Framework (ZF) to build the system. The modular nature of ZF makes it quite easy to start in a simple way and extend functionality as the project progresses.

ZF uses a Model-view-controller (MVC) architecture which separates out the business logic and data (model) from the user interface (view) and the controller provides the link between these two. E.g. the user presses a button (view) which gets (controller) a table of data (model) from the database.

The database structure in CRIATE is quite normalised and flexible, in practice this means that rather than one or two large tables with hard coded fields there are numerous smaller ones with flexible options and lookup lists. This structure allows templates to be created with customisable fields. So if we need to add new fields say for the KIS data, an administrator could do this without the developer having to amend the database structure.

In ZF each database table has a corresponding model and mapper. If as we’re developing we need to add extra fields to a database table, it is easy to update the models and mappers too, without affecting the rest of the code.

Some of the mappers include calls to ‘parent’ and child’ tables too, which are related tables (for example a programme is related to a yearly programme description, via a common programmeId in both tables). Aside from the benefits of this structure there will be challenges too with tables with many thousands of rows, and the need to not attempt to fetch them all at one time!

ZF has inbuilt functionality for forms although this has somewhat of a reputation of having quite a steep learning curve, especially with getting the forms to display as you wish, and with valid HTML. However, once you have cracked this, forms are quite powerful and not that hard to use. I would be happy to help anyone else who is struggling with this.

ZF’s modular nature also helps when two (or more) developers need to work on same project simultaneously, as we can each work on different parts of the system. We are also using Subversion, which is the University’s version control system, to help us avoid overwriting each other’s work!

For more information on ZF, please visit the official website http://framework.zend.com/

Skip to toolbar