Editorials, Encryption/Data Security

JavaScript – Not You’re Fathers Scripting Engine

Featured Article(s)
System Health Session Dashboard – Error Summary Report
In the first post of this series, I had talked about displaying the events reported by the system health session extended session on SQL Server 2008 versions and higher. The next set of reports will show the errors which by the error_reported extended event.

Featured White Paper(s)
Encryption & Key Management for Microsoft SQL Server 2008
Written by Townsend Security

Simplify encryption and key management on … (read more)

JavaScript – Not You’re Fathers Scripting Engine

Perhaps the word Script in the name JavaScript, and the fact that it has been highly promoted in web browsers, has caused me to greatly undervalue the JavaScript language. I wrote a while back that JavaScript is not directly related to Oracle/Sun Java. It is a complete separate language altogether, not a simplified version of Java.

The object oriented design of JavaScript enables sophisticated software patterns such as factories, Strategy, Listeners, Asynchronous calls, Chain of Responsibility, decorator and many others.

I have not seen these capabilities used in code I have reviewed primarily because it has been part of a web site implemented in a browser. This is not to say you couldn’t use the features in a browser…you just typically don’t. Probably the most sophisticated pattern would be AJAX calls in a typical web app.

With the advent of optimized JavaScript I believe we will start seeing JavaScript becoming more popular. JQuery, as Stephen writes, will probably continue to grow in popularity as JavaScript is used in many different browsers. It provides a more common technique for executing the same code with reduced browser specific capability issues.

Rick Writes:
Ben,

Microsoft has Server-side JavaScript for years. I was working a project that we were porting from Netscape Enterprise Server back in 1999 which also used server-side JavaScript. Because of the existing code, using JavaScript instead of Visual Basic was a logical choice. Having JS server and client side along with JS being a dynamic language allowed us to share code between the client and the browser and use "ajax" long before it was an acronym.

When ASP.NET came out, MS continued to support JavaScript server-side but it has never been integrated into Visual Studio or treated like a real language. The current version has not been updated in years and it is not clear how long it will be supported. They did have an unsupported version that they wrote for their dynamic runtime but that project appears to be dead. It’s a real shame given that the rest of the world is finally seeing the benefits of this language while Microsoft has ignored it.

Stephen Writes:
I used JavaScript back in 2000 on a system that is still in use today. During the last decade JavaScript has gotten a bad name around here, with nobody using it. I still have used it and just recently have got into jQuery, which I thought would be mentioned in your article.

Did you just overlook jQuery or does it has something wrong with it?

I hope you have enjoyed this exploration of JavaScript the last couple days. The book I have been reading is JavaScript Patterns written by Stoyan Stefanov.

You can send any comments on this or any other topic to btaylor@sswug.org.

Cheers,

Ben

$$SWYNK$$