Showing posts with label tools. Show all posts
Showing posts with label tools. Show all posts

Saturday, 13 February 2010

I Heart YUI

Over the course of my career to date, my work has involved developing browser based UI for several projects. All of which have relied heavily on the use of Javascript and the ubiquitous DIV element. A fantastic and very powerful combination, especially when supported with AJAX, that I have used to make web applications look and feel like desktop applications. The problem is, going from one job to the another means that you leave all the code behind and you start again from scratch.

Even with the advantage of previous experience, recreating the same key building blocks becomes tedious. In the early days, being used to the availability of different code libraries in Java and C++ I did look into what was available for Javascript. Whilst there were some very good libraries available, in comparison to todays libraries they were very basic and I never felt that they warranted the investment, as I could easily reproduce them myself. Therefore bug fixing or enhancements would be easier, which in turn would also save a lot of time in the long run.

I've recently finished the latest release of a product for my employer and we are in the process of determining the UI design template for future products as the company's portfolio grows. As a part of this I have looked at the current batch of Javascript libraries, and after careful consideration chose Yahoo's 'YUI' Javascript library. Now that I have had time to examine it in more detail and develop a prototype UI, I appreciate why hand rolling your own UI library is futile. YUI is a product that has taken a team of people several years to refine. Aided by a large network of testers, the developers who use it.

That's not to say that by using a library such as YUI leaves no room for innovation or further refinement in terms of UI development. Having a toolkit like that is very empowering. I've managed to do some cool things with the YUI tree component. If I had to develop the tree component aswell it would have taken me many times longer to accomplish. With an abundance of rich features in such libraries, to me at least, it feels like Javascript is entering a slightly more grown up realm.

Of course, it does mean that in some ways web apps will become more uniform, as have desktop apps over time. There are UI conventions common to most desktop applications, in terms of controls and layout. Now, as web apps become more complex, these conventions are spilling over into the browser. This shift is reinforced by the intrisic need to use these libraries. The libraries themselves, or at least the good ones, will follow convention. A good thing, but I imagine that web UI design will become less 'arty' and more functional.

So the moral of all this waffle. There's no need to feel lazy when it comes to Javascript development by using libraries such as YUI. Use your Javascript skills to put these tools to good use.