There is an amazing array of pre-built PHP (CakePHP, CodeIgniter) and JavaScript (jQuery, Prototype) frameworks out there that are used by many websites, large or small. Each has their own pros and cons. Today, I’ll focus on using a framework for your website versus coding your website or CMS from scratch.

The question that I’ve seen a great many website developers ask: is it better to use one of these pre-built frameworks, or simply develop your own?

Using a pre-built framework is as easy as including a file in your website’s code, and there is no doubt about the time they save. By using public frameworks, you also run the benefit of utilizing their respective communities for support – if you ever have an issue with a function, or want to know how to do this or that, you can consult one of thousands of people for assistance. There are, however, a few quirks that I cannot just get past. Firstly, there is a slight overhead in each website page or PHP script that comes as a result of including them. As frameworks, they are built to offer many different functions. Some frameworks include maybe 5 functions designed to give you a consistent result when dealing with things such as form submission, menu handling and site overlays. However, most frameworks can offer tens or hundreds of functions built for the general development community. This can become quite an overhead (in either server CPU time or website bandwidth, depending on if you’re using a server or client side framework) when using such frameworks for a small website which uses maybe 5-10 of these functions.

The advantage of developing your own framework is that you have complete control of the code in and around your website. I’ve been in the process of developing a browser-based game which uses an in-house MySQL framework I have developed and maintained since 2007. Because of this, I know every byte of code that the web server is processing. This allows me to add and remove certain functions without affecting other areas of the framework. Of course, you don’t get the benefit of community support or letting someone else maintain it – which can make it difficult when developing a very large framework.

I’ve always tried to stick to the KISS (keep it simple, stupid) philosophy when developing and maintaining websites. Using my own framework for small, mission critical areas of my website, along with pre-built frameworks for additional, ease of use functionality seems to be a pretty good balance.

, ,
Trackback

No comments

Add your comment