30 June 2006

Script block

Reading some of the comments at /. covering GWT. Several posters bring up the opinion that toolkits are wrong because beginners will use them before first learning "the basics." This opinion has come up recently in different contexts--all presented as a grievous flaw that teaches bad habits to those kids (e.g. the Java-doesn't-have-pointers complaint that appeared a few months back). The problem presented with the GWT is that it generates JavaScript from the user's Java code in order to push HTML and JavaScript from the web developer domain to that of the application developer. This is also its benefit: working in one domain can simplify development.

Critics look suspiciously at the process of skipping the pain of hand-coded JavaScript (and HTML for that matter). Such a position stinks of an elitism that's been around long enough to evoke weathered jokes about programming with only zeros or about what language "real programmers" use. I remember interviews for Windows MFC development where I'd be grilled on the Win32 API. The interviewer would invariably mock the ineptitude of those who didn't cut their teeth on Win32. I'd counter that programmers coming from Win32 were inept in their understanding of vtables and templates. Snobbery should always be defused by an even greater snobbery.

And that gets to the core issues and differences. Is it a problem of language or framework? MFC is a C++ framework that wraps the Win32 C API (an addition to the C language). GWT is a Java framework that wraps a subset of the JavaScript language. Both MFC and GWT--as with all frameworks--reorganize a more raw, low-level domain in order to simplify common tasks. Frameworks are, in a way, narrower manifestations of relative language abstraction and whether you're working in a high- or low-level language. Frameworks are intermediate steps that a language can take to make it a higher-level language.

A well-written framework should strive to elide the necessity to use its lower-level components. Ruby programmers don't need to be conversant in the C language that it was written in, although it would help them understand garbage collection, reference management, etc. C programmers don't need to for Assembly (stretching the argument since most are probably written in C), although it would help them understand stack memory or thread management. That knowledge would always help--and many programmers will eventually dig deeper--but its absence doesn't imply ignorance.

[ posted by sstrader on 30 June 2006 at 12:36:21 PM in Programming ]