To use a framework, or not to: that is the question
When should a programming framework be used?
This takes me back many years to ‘Microprocessors 101’ course in my undergraduate studies. I quite distinctly remember our Professor telling us “Please do not use the Microprocessor to ring the door bell”. This simple and humorous statement carried a profound meaning. For everything there was a purpose. Just because it sounds cool does not mean that you have to use it.
A framework is usually thought of or defined as an underlying structure. You could imagine a wooden structure, sort of a skeleton when a house is being built. This provides a guide, structure and flow to build the house. A programming framework pretty much does the same thing. A programming framework provides for a structured and disciplined programming which results in a more consistent output from a programming team.
For example a PHP framework using the MVC design pattern enforces the MVC paradigm. The high level logical flow is dictated by the framework rather than by the programmer.
Most frameworks also come with a large amount of utility and housekeeping code which allows programmers to concentrate on the core application at hand rather than mundane tasks such as sanitization, database connection and error handling.
If the framework is application specific, for example a web framework, then development time is faster and the end product better as most of the code has been tried and tested.
If the framework is open source and well supported (e.g. CakePHP) by the community then you get the benefit of all the contributions which may include bug fixes and plug-ins. However on the flip side a framework is a software package like any other written by programmers and can have serious hidden bugs. Security vulnerabilities are now open to the public!
However to gain all the advantages of a framework you need to learn it and the learning cycle is steep. Doing the tutorial usually is not enough and you actually have to work on a project or two to learn all the nuances of the framework. If there is a problem you have to be prepared to dig deep into the core libraries to either solve the problem or analyze the functioning.
Like the Shakespearean quote there is no simple answer. Only interpretations and interpretations are born out of experience. So before you plunge into a framework, think and make sure it is not the door bell!