It’s JavaScript, Who Gives a Crap

June 10th, 2007 by ScottK | | Filed in JavaScript

I’ve had the opportunity to work on client side programming for several different companies over the past few years and I’m a bit upset. In each I’ve heard the call to implement the software in Model-View-Controller, n-Teir, etc architecture. Full testing suite of all code. Code reviews and regretion testing. Yada yada yada.

This is on server side code only! Each opportunity also required web 2.0 interfaces through JavaScript. One application had nearly a thousand js functions and the application wasn’t close to being done when my contract was up. None of the project managers cared to test the JavaScript to make sure it worked. For whatever reason client side programming isn’t within the code management criteria.

I always chuckle silently when I hear people talking about testing and such for server side code. JavaScript is programming as well. Incorrect use of it not only brings down the use of the application and potentially brings down a users external web site that is using your code.

Because I truly believe that many “programmers” and “program managers” completely mis-understand JavaScript and how powerful it can be in educated programmers hands; and that they also don’t realized that testing is available. There seems to be a xUnit tester for every language out there and JavaScript is no exception. JsUnit is an open-source application for JavaScript testing.

It can be run without a web server but have found that file permissions on Windows systems interfer with this. So I run it as a web application just fine. Simply give it the url for the test page and let it run through your tests. Even comes with a stack trace to find out where it bombed at.

So to all who mandate software control without giving consideration to JavaScript I say shame on you. It’s a language, it has design and archetecture. It can bring down your application if not controlled.


Share Your Thoughts