Recently I have been working on a project where 97% of the business logic resides on the “other side of the wall”. As a result, we do a lot of round-tripping as the user interacts with the interface and in the scenarios where we don’t, we’ve had to do a lot of pre-fetching before we can display anything to the user. All in all, this can appear to the user as a “click and wait” system. Some of the business logic that drove this approach was due to constantly updating and persisting user-state on the server. But looking back and thinking of how we could have refactored the approach brought to my attention the benefits of the thick-client and the different approaches that are available to developers.
One particular technology that has peaked my interest is the widespread adoption of Javascript. Most of this I believe can be attributed to the surge of Ajax implementations in the last few years. People are catching on, realizing the potential of Javascript and clinging to XHR as a silver-bullet. But more importantly to me is the benefits and alternatives that Javascript offers in the web stack to leverage a true thick-client approach, specifically when compared to Adobe Flash.
I’ve sporadically written Javascript over the years, using it where needed. In the last year and a half I’ve enjoyed working with the jQuery library, but I’ve spent most of my time focused on development in Flash (ActionScript) plug-in solutions.In Doing so, I have seen the benefits of implementing a good portion of business logic in the client and in some cases doing everything on the client. I’ve also noticed the downsides, but as I look at the rise of Javascript ( frameworks, libraries, server-side, etc. ) I was wondering what the current shortcomings of choosing either technology would be to implement a thick-client. On one hand you have a native scripting language that the browser can interpret and integrate with and on the other you have a plug-in that runs in the browser, but “seals” the user off from specifics of the browser ( read: rendering engine ). So what are the +/- for each approach?
Here are some of my thoughts, but as always I would appreciate any additional comments:
Downsides for Flash:
- - Not tightly integrated with the browser ( DOM, etc. ). This comes at a cost, but it would be nice to work with the browser’s native features without having to use Javascript as a pass-through.
- - Lives in a sandbox.
- - Heavier – esp. when using the Flex framework. Adobe needs to open-source the VM!
- - Version may be outdated on the client or the plug-in may be missing.
- - Native support for full CSS and HTML rendering sucks.
- - Needs to be compiled.
Downsides for Javascript:
- - Implementation due to vendor differences is not consistent.
- - Comparable visual effects ( ie: vector manipulation, animation, etc. ) need support of newer features (canvas) that only a very limited set of browsers support.
- -
It may be disabled on the client.(**Edit (2/27/2011): Duh, just realized that this is not unique when comparing to Flash)
I’m sure I have missed a lot, so please contribute to the list.
