blogarticle
Web developers and designers dependancy on libraries
Web development seems to rely more and more on frameworks and the underlying source code seems to be getting heavier as a result. Having worked along side website designers for a number of years I have noticed how they use pre-built kits like jQuery more and more and regularly see this listed on their Curriculum Vitae. Is this a good thing or not?
A cold hard lesson
There is no simple answer, but as a software developer of too many years to openly admit I think the reliance on someone else code is floored. I used to use VBXs " the forerunner to ActiveX components " which were designed to decrease development time and therefore cost back in the nineties. At first I embraced these as they certainly reduced the amount of source code I had to write " and as most commercial programmers are always under pressure to churn out code " it certainly helped.
One particular ActiveX component I used was for manipulating raster and vector based files. At the time I was working within the building sector, more specifically within Mechanical & Electrical (M&E) . We had developed a software solution that managed assets and we wanted to hot spot architectural floor plans that would enable facility managers to access maintenance records, O&M manuals and alike. We implemented a user interface that allowed users to import their floor plans and then placed transparent layers over the drawing that contained related information.
The development went well and we shipped out an upgrade to over 200 sites across the UK. Most clients were working on Windows NT or Novelle and at first everything this fine, but then we started getting memory leaks that caused the software to crash and in the worst cases corrupt the underlying data.
Unlike the early days of VBXs the new generation of ActiveX components didn't provide you with the underlying source code (uncompiled). To make matters worse the company was sold to an French business who immediately dropped the project and we had to find a new control and retrofit the new functionality in.
By this time Lead Tools had published an excellent ActiveX component that did exactly what we needed, so all was not lost although my boss at the time didn't think so!
Modern libraries
Modern libraries like jQuery enable web designers and developers to access technologies available within the environment we work in, but are reliant on source code written by other people. Scripting languages like PHP can be extended using classes that provide shrink wrapped functionality without the need to have a thorough understand of it.
Some might argue this is a good thing and for some projects it is; we use WordPress for websites where the budget or requirements don't allow us to build a custom solutions. In these cases per-built code offers a solution and can enable businesses to access functionality not previously accessible on a low / tight budget. We'll also use PHP classes " but only after we have thoroughly tested them " and Java libraries for our Java based web and desktop applications. But, we have found on a number of occasions, even Java libraries can be scarily lacking in fundamental understanding of the language. We used a Java class to extend the behaviour of a data grid a couple of years ago and ended up rewriting it because the class had been written with a very narrow perspective and could not handle a number of common situations.
At least with scripting languages like PHP, JavaScript and others the source code is accessible, so if you have a thorough understand of the underlying language you should be able to fix any glitches. But this is where the argument falls down!
A lack of knowledge
A significant number of web designers and developers do not have an in depth knowledge of scripting languages and some some extent I understand the reasons for this.
Small businesses need multi skilled designers and developers that know their way round a number of graphics packages like Illustrator and PhotoShop as well as being proficient at HTML, CSS and JavaScript. Add on top of that AJAX (a sub set of JavaScript), PHP, MySQL and others and you start to get the picture.
This results in designers and developers using tools that they do not understand, often designers will use JQuery where a small JavaScript file would do the job without carrying a load of excess baggage. I have seen developers and designers make decisions based on what they can get to work without considering what is the best solution. Often this is driven by a lack of underlying knowledge, be it Java or any other language.
We hit a problem last week, when our designer created a design that was difficult (if not impossible) to render within the framework been used, in this case WordPress. She hunted various forums for a solution, before asking me what we should do. Ironically, I found a solution within a couple of minutes on the WordPress Codex site, that gave an example of how to extend the Widgets class in WordPress. It took around an hour or so, but because we had the underlying knowledge and understanding we were able to get around the problem relatively quickly.
So, what appeared to be an impossible problem was quickly worked around and we now have a better understanding of the Widgets class and could use this in future projects for a variety of different solutions.
Scrappy source code
Anyone that has worked with me will tell you are get up tight about messy source code. Well formatted and commented source code makes supporting an application far more cost effective. It takes a little longer, but will always pay you back handsomely!
I always remember someone saying that programmers never write comments when the source code is particularly difficult as they focus on the problem in front of them. I disagree and was taught that your start with pseudo code, which allows you to plan how you tackle a problem. I was writing a fairly complex function this morning and started by subconsciously laying out out the main function (and the associated functions) in pseudo code before starting any programming This allows you to break down larger tasks into simple ones!
The problem with libraries is they tend not to output clean code, in fact some the code within classes is truly terrifying and almost impossible to read, especially when developers mix the server scripting language with HTML and CSS!
Conclusion
It?s all about the money and you have to make your choices. Sometimes using pre-built code will not only produce unexpected results, it can also add costs to a project. The cheapest option doesn't always end up being the quickest and most efficient way to get something done.
So before you (web designers and developers) grab the design template, theme or class make sure you understand the risks and / or learn a bit more about the technology you are using. For clients, you have to decide what your budget is and then make a decision based on the resources available, but as the old saying goes, you get what you pay for!
Date: 04/11/2011