robert hahn

a darn good web developer

November 23, 2005

JScript and VBScript in ASP: Which to use?

I really need some sleep now, but I couldn’t step away from this computer without mentioning why I would prefer building my pages using JScript over VBScript.

Naturally, being much more familiar with JavaScript would introduce immediate bias in my choice. But there’s more.

The idea of having the same language process your data on both the server and client is also quite nice. Some may even find that compelling. I do. But, there’s more.

The real reason why I prefer JScript over VBScript is because JScript is a much more dynamic language. Case in point: In a recent project, I thought I needed to maintain a list of sidebar links and text in an array (I ended up not doing that, for reasons that have nothing to do with this story.) I wanted to give VBScript a shot, as I hadn’t really picked up on the syntax much, but I got stonewalled rather quickly because VBScript doesn’t easily allow you to dynamically resize an array on the fly, unless you REDIM the array. This was a problem for me because I wanted non-programmers to maintain this list by hand (low budget undertaking, ok?), and that meant if changes had to be done to the sidebar, it’d have to be done in 1 step with no unnecessary chance of errors.

If this is the sort of problem you’ll likely face, then save yourself some time and frustration, especially if you’re already proficient in JavaScript, and use JScript on the back end.

decorative image of trees

Copyright © 2009
Robert Hahn.
All Rights Reserved unless otherwise indicated.