gravityboy ([info]gravityboy) wrote,
@ 2008-06-07 14:25:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Current mood: optimistic
Current music:Carl Craig - Busted Trees (C's Spacetrumental) - Directions

The Cognitive Load Of Web Development
The most dynamic segment of the software industry that I'm aware of is web programming. Flamewars rage about frameworks and browsers and standards and whatnot, and the openness of the whole thing feels like some of the things that made me fall in love with computing as a whole and Free Software in particular. The problem with all that openness is that it's rather difficult to navigate. Aside from the obvious issues with browser incompatibilities, there's an enormous amount of software solutions on the server side, spanning languages, libraries, and frameworks. Each one is an ecosystem to itself, often being large and complicated.

This makes it rather difficult to do certain aspects of web programming well. You are constantly switching between tools and languages, as well as coding paradigms, in order to build a web app in full. You'll be writing HTML, CSS, and Javascript on the client side, each with its own peculiarities. On the server side you'll probably have settled on one language with its own very different varieties of coding style and patterns. Some, like Ruby on Rails, are their own unique brand of language that makes you work both in the DSL (Rails in this case) and the parent language (Ruby here). Template engines often will do the same thing, such as in the case of Django.

It's pretty obvious that having to juggle all these tools places a fairly large burden on the coder. Much to their credit, it's not difficult to work in any of these languages, but to work in them at a high level becomes more difficult the deeper and wider the software stack reaches. You get this a bit in systems programming, juggling C/C++ with a build system and a scripting language, but that's usually it. You can get that number of moving parts just on the client side of the web with HTML, CSS, and Javascript.

Something interesting that seems to be happening is that people are moving to decrease this cognitive burden. One good example is the Google Web Toolkit which lets you write all your AJAXy client-side stuff in Java, and let it get compiled in to Javascript. That way you cut the languages you have to work in. A similar concept is behind Microsoft allowing Ruby (and Python, if I've heard correctly) in Silverlight. Alternately, you can bring Javascript (back) to the server side, which is the motivation behind Helma and Rhino on Rails (the latter of which I hope sees the light of day).

Personally, I'm rooting for Javascript to not become an assembly language, but to take over the server side again. It's a capable and powerful language (much better than Java in my opinion), and we're collectively leveraging it very poorly. Rhino is interesting and has enormous potential, but it needs library binds in the worst way. Currently it's basically using Javascript to write Java, which is rather atrocious (COBOL in any language, etc) but with some Javascript-style wrappers around the Java classes it could be phenomenal. Alternately, there's Spidermonkey, which could be wrapped in a more capable shell with a good FFI, and we could easily have wrappers to our favorite Free Software libraries. This project seems far along here, but it's currently very windows-centric.

There's a lot of potential here though. Unifying the development language for both web and system apps would benefit the Free Software desktop, and give us the ability to better integrate our stuff with the web. One of the best things about Free Software is that it dropped the barrier to entry in software development. I think we can repeat that success again here.




(4 comments) - (Post a new comment)


[info]dgh
2008-06-10 11:40 am UTC (link)
ParenScript compiles LISP to JavaScript for those writing their web applications in LISP:

http://common-lisp.net/project/parenscript/

One interesting aspect is that it tries to generate readable JavaScript code.

(Reply to this) (Thread)


[info]gravityboy
2008-06-10 07:26 pm UTC (link)
That's pretty cool, I hadn't heard of that. I'll definitely be learning LISP soon because I'm starting to use emacs more and more. Still, I'm not sure I'd use something like this since I actually like Javascript. It seems fairly lispy (or scheme-y at least) already from what little I know about lisp.

(Reply to this) (Parent)

you are not alone
(Anonymous)
2008-07-08 04:18 pm UTC (link)
David,

I think you almost sound like Dan Ingalls and his ``Lively Kernel'' research project at Sun, you might want to check:

http://research.sun.com/projects/lively/

It's about web programming using only Javascript and SVG (and you don't even notice the SVG), tossing every other language or tool and thus bringing a more desktop-like programming experience to web programming. There's also a nice interview of Dan on the ``FLOSS Weekly'' podcast where he goes about introducing this project:

http://www.twit.tv/floss29

Check it out!

(Reply to this) (Thread)

Re: you are not alone
[info]gravityboy
2008-07-08 05:42 pm UTC (link)
I'm actually a big fan of Dan Ingalls because of Smalltalk, and I've read a few papers the Lively Kernel group published. I did try out the system, although it was really far too slow to be used. I've been following the performance improvements in the Javascript engines mainly because I keep hoping the Lively Kernel becomes generally useful sooner rather than later.

I think that part of the reason I like javascript is because, when you whittle it down to just the "good parts" (according to Doug Crockford) you end up with something that is very Scheme-like, and can easily be used in a Smalltalk-like way. I think the Lively group is probably well aware of this, so I imagine that coding for the Lively Kernel would be a very nice experience.

(Reply to this) (Parent)


(4 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…