Monday, December 28, 2009

BusinessScript - COBOL-izing JavaScript?


My friend Scott Francis recently posted some thoughts on Server-Side JavaScript over on his BP3 blog... We're both Lombardi Teamworks affcianados and well aware of the advantages of using the same language on both the Client and the Server.  It's a safe bet that JavaScript is here to stay.

JavaScript was created by Brendan Eich to give Web designers and part time programmers a "glue language" for adding dynamic behavior to HTML coded Web pages.  Brendan succeeded beyond his wildest dreams in making Web pages dynamic... but not so much on his goal of creating a language that was easy to use by amateurs and novices.

My work involves a lot of interaction with business people who aren't frequent programmers... and I often introduce them to JavaScript.  Mostly they "get it"... but usually they get a bit frustrated at the tedium required to do really common things.

Try explaining to a business person turned part-time programmer the JavaScript (and DOM knowledge) needed to add two numbers that were entered on a form and display the result.  It's painful... especially if the business guy already knows how to do the same thing with a spreadsheet.  It only gets worse if they need to deal with currency math and nicely formatted outputs.  Simple things are surprisingly hard to do.

A relatively easy answer to this problem is to guide business folks towards business-focused application development suites - Essentially use a tool to generate forms and spreadsheets and let the tool figure out how to transform the input into a Web-based application.  This is certainly a viable approach - but it's generally a proprietary approach.  Language-based approaches like JavaScript tend to be "open" approaches... the skills that you learn can be applied to products from a number of vendors.  Tool-based approaches tend to be "closed"... the skills that you learn to master one vendor's tool aren't easily transfered if you switch to another vendor's tools.

That's why I'd like to see an Open-Source-Business-Friendly dialect of JavaScript.  Despite the "no coding necessary" promise of many vendor's tools, you almost always have to write a bit of code somewhere... and I'd like to see that code written in a scripting language that is a lot easier for me to teach to business folks who are occasional programmers.

From my own experience, I can state that JavaScript becomes a lot "friendlier" to business folks when you augment it with the "right" function libraries... and there are some tremendously great JavaScript function libraries out there.  I also know that JavaScript becomes a lot "friendlier" to business folks if you don't mention some of its features - If you want to clear the business folks out of a room, just start discussing anonymous functions.  Many of the folks that I teach a bit of JavaScript get off to a pretty good start, but then they start googling for additional answers and get hopelessly lost.

Perhaps we need a brand-new language that is as explicitly focused on developing business applications as COBOL was... Probably something that generates JavaScript (so it will run in every browser) but something that isn't quite JavaScript to keep "occasional programmers" from hanging themselves with some feature or technique (found via Google) that they don't quite understand - let's call it Business Script.

I'm not smart enough to design Business Script - I see people struggle and I can make suggestions, but I don't really know the root causes of confusion.  Professional Programmers are pretty happy with the status quo...  so my bet is that the successful design of Business Script will have a lot more to do with the Psychology of Programming than with Software Engineering.  BusinessScript needs to be more, and less, than JavaScript - but it's not going to be easy to figure out the right mix.
Post a Comment