On isomorphic JavaScript

February 22nd, 2015

There has been a lot of talk recently about 'isomorphic JavaScript', that is, code that runs both on the client and on the server.

I think these are great platforms for people looking to start out in the web industry mainly because it reduces the number of languages they need to learn down to one. The tradeoff is that you need a certain level of proficiency across the board; from understanding databases to implementing a layout with HTML and CSS. But for those willing to learn I think it offers a great entry point. It also opens the door to 'traditional' front end developers who have no previous experience with servers and work exclusively client-side.

It's a young paradigm and there are going to be mistakes made. We need maintainers who are receptive to community feedback so that we don't end up with twenty competing open-source projects which are all slight variations of each other.

When we create 'apps' or 'sites' what we're really trying to do is enable people in a certain way and to do this we don't need to think in terms of client and server. We start with an idea, a thought, and we sit down and try to represent that thought as best we can through software. How awesome is it that there's one less barrier to cross. Until more fundamental changes happen we'll still have to do this in a text editor but... yeah. It could be a lot better if more people contributed to making that a reality, including me. I've just got no idea how.

"And we can, right now, today, prepare powerful ways of thinking for these people. We can build the tools that make it possible to think that thing." http://worrydream.com/MediaForThinkingTheUnthinkable/note.html

I think one of the hardest parts of client/server apps is visualising how it all interacts with each other and I'm not aware of any tools which aid this. If someone were to build them they'd be a tremendous asset to debugging and understanding these systems. Currently there is too much in the way of 'magic' which isn't made apparent to the developer.

Is it all just a rehash of ASP.NET Web Forms?

Aspects of isomorphic JS apps strike me as reimplementing some of the ideas, as I understand them, from the widely loathed ASP.NET Web Forms (I say this as a front end developer pov). Web Form page have 'page lifecycle events' which mixed server-side code with client-side code so load and unload events could be listened to by the server. The main downside of this (aside from wrapping the entire page in a

<

form> tag) is that it generates JavaScript which you have no control over, as well as including many dependencies that a server-side developer may not even be aware of.

Meteor includes megabytes worth of JS dependencies which isn't apparent until you inspect and look at the Network tab of a browser. However it does give you more control over what JavaScript is actually run on the page. Again, a better way to visualise and manage these dependencies should alleviate this. Web Forms also have a more defined structure which is currently missing from these isomorphic apps but I imagine as frameworks mature and conventions are found, created, designed then this will be rectified but currently I can't imagine maintaining one of these projects is very fun.

"Any concept, technique, or tool that is specific to software engineering is guaranteed to have a short shelf life"


About Development, JavaScript, and the Web. There are no comments (yet!).