digitalpro Blog
-
The Virtues of Framework Development
Author: Rian Zietsman, Wed, 11 May 2011 10:02:31 +0200
Categories: Development » Web Development
When I started with web development many years ago, Object Orientated Programming (OOP) had just becomes possible in PHP. We built our sites accordingly and thought that we were cutting edge.
Although OOP did a lot to cut down the number of lines of code in a web application, there was still a lot of redundant, repetitive work to be done to get basic add/edit/delete/view functionality in these objects. For every object, each of these functions had to be physically coded and depending on the object structure, this could be rather labour intensive.Programmers tend to be reluctant to repeat things, so we started looking at rapid development frameworks. The basic premise of such a framework is that the programmer creates 'models' of each of the objects that describe the inter-relationship of each model with the others. There is then a low-level 'master' model, which is part of the generic framework, which figures out what to do for certain instructions. This alleviates the need for repeated functions.
There is a multitude of frameworks out there. Mastering one to its full potential, however, is much like learning how to modify OSCommerce. It's someone else's work that they knew what they were doing, but you won't ever...and the documentation can be shocking.
So we built our own framework, that caters for our development needs. Our framework has borrowed a lot from existing ones, it is true, but I dare say the result is one that is an improvement on most we've seen. And because we wrote it, we know it REALLY well. It even figures out the model's structure by looking at the corresponding table in the database.
Besides the reduced time-to-market that a framework offers, there is the added benefit of fewer bugs in the application. Because things are handled in a generic way, what works for one thing will work for all.
In a next installment, I shall outline the inner workings of the standard Model-View-Controller framework, as well as mention some of the novel features of hours, entitled dpframe.
Cheers!
