Archive for February, 2010

Pass that Interview 1: Mimic a Class in Javascript

February 10th, 2010

Javascript, unlike most object-oriented programming languages, does not have the concept of Classes. Instead, Javascript uses a model in which objects are created, cloned, and enhanced by creating copies of the objects (it's loosely based on the Prototype pattern). There is a lot of power in this Prototypal system and people like Douglas Crockford have shown how Prototypal inheritance can be implemented in Javascript. This type of work is really cool; unfortunately it's not generally well-known or well-understood and many developers wish to use Javascript to simulate the more familiar Classes & objects as seen in languages like Ruby and Java.

Due to this simulation being common practice, the following has become a fairly common interview question:

How do you create a class in Javascript?

The answer is a bit wonky; but pretty simple to follow:

» Read more: Pass that Interview 1: Mimic a Class in Javascript

My Impressions of Google Web Toolkit (GWT)

February 8th, 2010

Recently I've been asked several times for my opinion on the Google Web Toolkit (GWT)  and I've given much the same response each time. Now, it's easier to consolidate my thoughts and share them with everyone via my blog.  I want to preface this post by stating, as I always do, that I have not taken a "deep-dive" look at GWT and, due to my stance below, I haven't seen a reason to do such research.  I also want to state up-front that I don't believe there's any inherent flaw in GWT that prevents me from using it; nor do I think it's "bad technology." Finally, I've done my best to not allow my general distaste for Java influence my opinion of GWT.

I do not believe that GWT offers a unique value proposition as a platform that establishes any advantage over other Web development platforms such as traditional HTML and CSS or Adobe Flex. Additionally, there are some clear areas in which GWT lags behind these counterparts. » Read more: My Impressions of Google Web Toolkit (GWT)