Fat AJAX Applications vs. Smart Native Clients. or the wrong direction of the hype.

Is is hard to build interactive clients going the "ultra thin" approach. "Ultra thin" does mean: the whole business logic remains at the server and has to be accessed by an external client. The problem here: interactive clients need more fine grained communication model, so more round trips are needed to provide the needed functionality. Such applications are harder to develop and maintain with the "thin" approach. There could be also some issues with performance, because of the network latency.

Fat Clients, or more using a more political correct name: Smart Clients, do not have such problems, because the domain objects reside in the same address space as the presentation tier. Fine grained communication isn't really a problem - there is no network in between the UI and the business logic. Validation can be implemented in the domain layer, no redundant implementations are needed. The application is "DRYier", than in the thin client approach, were because of performance client- and serverside validation is needed.
So accessing domain objects directly, with no additional layers of abstractions (factories, interfaces etc.) is much more interactive, faster easier to build and maintain. Of course we have to check first, whether such a client can be deployed easily and cheap to the clients.

In a "Fat" environment, it is even possible to directly decorate domain objects with UI. Such approach is no more possible in thin client-server environment, because all calls has to be routed to a coarse grained facade. It becomes even worse with Fat AJAX applications. In this case JavaScript-UI event has to be translated into a JS domain object, which is serialized using JSON or XML and sent to the server. From the JSON/XML stream a Java Object has to be constructed. This many indirections and layers are not very good for clean and easy design. You have also validate the user input twice: on the client- and server (in two different languages...):

The motivation for this short article comes from the following entries:
Thank God - Java EE Is Not Like Ajax
Different AJAX Philosophies and Architecture Styles or Thin vs. Fat AJAX
The beginning of WEB 3.0 with Java Fat Clients
The Day After AJAX
Return of the Rich Client - .NET 3.0 Meets the NY Times
First Look Times Reader
Especially the comments are very interesting...


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
realworldpatterns.com
...the last 150 posts
...the last 10 comments
License