So you want to know more about frameworks?
Careful! This post is looking a little old and could be inaccurate in many, many ways
So what is a framework?
Essentially a framework is a collection of code contained within a core set of files. By using a pre developed set of code contained within a framework a developer can create more complex websites and reduce the timescales involved.
Why choose a framework?
The purpose of creating a framework is to speed up the development process by pre-coding a lot of the functions a developer may commonly use. The reason for a developer to use a framework really depends on their skill level. For an expert it gives them more time to concentrate on more complex tasks by removing the need to code the more common and simple functions. For beginners it provides the ability to include more complex actions into their work without the need to learn the more advanced aspects of the language. All this allows for better websites and applications to be built for lower costs for clients and better experiences for the user.
Why are we all not using frameworks?
If frameworks have so many benefits then why aren’t all developers using them? For many it’s a case of being content with what they already have. A developer can train for years to become proficient in a coding language, creating fantastic work without a framework so therefore has no need for a framework. In many cases a developer will already have their own framework of common functions they use in most of their projects. In my own case I have a set of functions I commonly use through almost every project I work on, and also have these functions in both ASP and PHP form as I develop with both languages. Having a set of functions I re-use means I have created a framework tailored to my own needs that I can edit and contains everything I think I need.
This highlights two of the disadvantages of frameworks; their editability and their file size. For many developers frameworks represent a mass of unused code that they do not use, adding to the loading time of websites. For others, frameworks are full of code that another developer has created, tailored to their own style. If a developer wishes to alter part of the framework, searching through another developer’s code can be time-consuming and editing code possibly even more difficult.
I must admit for some frameworks it is unlikely there is much need to edit the framework code; however for CSS frameworks I feel this is not true. CSS can be a complicated language to perfect, especially with the differences in browser rendering. In the case of CSS it is very easy for a piece of code to affect the style of different elements on the page, when you introduce a framework into the equation you have a piece of code that you have not created and that could possibly cause conflicts with your own code.
Learning a framework?
Many frameworks are available to help speed up the process of creating websites, but I feel many developers are using frameworks without considering learning the language that the framework aims to simplify. By restricting their learning to only what is available in the framework they are limiting their knowledge and potentially their future prospects. For example, imagine that a developer was changing jobs and had previously only used a single framework to develop; their new company may have strict development guidelines stating what frameworks are to be used, if any at all. This leaves a developer having to learn an alternate framework or having to learn how to hand code the functions previously available to them in the framework. If you are using a framework it’s always best to try and understand what is happening behind the scenes so that you gain a greater understanding of what code is required to get the result you want.
Do I use frameworks?
So are frameworks worth it?
The simple answer is yes. Overall frameworks have given developers the tools to create better websites thus improving the user experience. At the end of the day the user experience of a website is what matters and all the other concerns are down to a developer’s personal views.