views:

178

answers:

4

Do we really need a server side architecture to create a RIA application?

My idea is the following:

  • Create a complete RIA application using only Html pages, JQuery and a full client side UI set of components (choose your poison between the large number of different components available open source and not)
  • Server side I have just one or more REST like web services that returns and accepts Json serialized objects

No more dependency on the latest trend on server side architecture (Struts, Java faces, Asp.Net, MVC or any other model that was trendy sometime ago or is trendy now), web server side will be just an interface between trasnsport (Json) and the business logic layer, with very few logic in it.

Client side we'll have a huge JavaScript application, but with modern browsers and PCs (for speed) and modern development environment for ease of maintenance (VS2008 and other tools debug JavaScript very well) I see less a problem in code maintenance for this layer than finding the developer that know the correct server layer architecture...

Do you have comment on this scenario?

Ciao Massimo

+1  A: 

You could as easily have asked about implementing a first-class backend getting the server side right, while avoiding the latest trendy client-side fad. And I think it would be a legitimate goal in either case. You don't mention whether this is an existing application, but if it is, then I'd say, first memeorize the Fowler Refactoring book, and then go for it.

A lot of the churn in software is useful if you know how to properly apply what you'll need to know to accomplish your client side goals, because the same concepts (SOC, coupling-vs-cohesion, DRY, YAGNI, etc.) apply to both ends, and we increasingly have at hand useful tools for applying them (which can be accomplished more or less easily with a lot of technologies.)

le dorfier
New application, we're in the middle of design right now so it's the time to think if staying on the same old road or take a new one.
massimogentilini
Then I think what you suggest will work as well as any other project design. You should in any case try to decouple the architectures, and focus on good contracts and interfaces.
le dorfier
If you do, then what you know about refactoring will put you in a good place later.
le dorfier
A: 

Or don't even bother with the REST / Json part and use something like DWR to talk directly from your client side code to your server POJOs.

A: 

Most RIA apps do not require an MVC or component-based framework since the C, V and most of the M reside on the client. However you are still going to need some kind of services layer for the client to talk to and a persistence layer to work with the database.

cliff.meyers
A: 

Just don't put security logic on the client side... ;-)

Chris Nava
And dont put data validation on the client side either !
Guillaume