Re-learning everything.

Posted in Projects

A few weeks ago I started coding on a project for a client. While it is true that I've been doing web development off and on for the past ten or so years, there's one thing I've actively avoided; Javascript.

To tell you the truth, most of my work has been backend code. I've more or less ignored the entire frontend side of programming, regardless of environment. The user interface has always been secondary to me. That changed a few years ago, when I was reading about UI first software development.

In particular it was these words:

"When writing end-user software, UI design should really come first.
To the end user, the UI is the application."

This of course, made a whole lot of sense. The user doesn't give half a rats arse how pristine the backend is, or how flexible and modular the code is. If your UI is slow and ugly, your whole program is slow and ugly.

So what do you do when you need to make a snappy feeling web based application? Javascript. As a long time defender of the plain HTML, suddenly realising the need for Javascript is uncomfortable to say the least.

In Javascript's defence though, Javascript has come a long way in ten years. Javascript processing in browsers has increased by orders of magnitude. And with shiny frameworks such as JQuery, it's almost easy to use (if you don't need to do something advanced).

The project I'm currently working on however, required more than just standard JQuery. It called for a SPA architecture, which unfortunately means that it have to be built almost entirely with client side code, i.e. Javascript and CSS. Fortunate for me there are a lot of good frameworks on the market for client side development. So far I've gone for following:

Truth be told I'm feeling slightly overwhelmed. While I've used Bootstrap and JQuery in the past, this is really the first proper client side project I've worked on. It's a learning experience, to say the least. Learning to handle a half dozen new libraries at once is a bit of a mess, but the documentation is good. It's just a bit annoying having to spend ten times as much time reading documentation as I do actual programming.

In the end I've gotten most of things to work, next up on the todo list is to integrate Mustache and Knockout. Hopefully this will make it possible for me to split my HTML out in multiple template files. As it is, everything is in a giant file, because I can't figure out how to make Knockout load external template files...

Getting all of this to play together is a bit of a challenge, but who doesn't enjoy a good challenge?

JavaScript KnockoutJS RequireJS Moustache SPA