my dog learned polymorphism*
The moose likes Distributed Java and the fly likes Remoting strategies....where to put the business logic? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Remoting strategies....where to put the business logic?" Watch "Remoting strategies....where to put the business logic?" New topic
Author

Remoting strategies....where to put the business logic?

Alan McA
Greenhorn

Joined: Oct 27, 2004
Posts: 2
Hi folks...Im presently working on a swing rich client talking to a back end.

We will be taking the route of remoting, and we hope to try hessian/burlap/anything that comes with spring framework etc...

However, from a rich client perspective, the objects received from the server side are "dumb", basically a graph of objects for the client to navigate, containing "data".

I would like to layer business logic on these objects and im searching for some options here...basically I wish to create a "domain model" on top of the dumb model receved from the server..

There is a concern that by pushing all the business logic in to the objects from the back end would bloat their sice for transport across the wire. And this client side business logic is of no interest to the server side...

The other option would be to "wrap" the dumb objects on reception in "smart" business objects that contained related processing. This would likely mean implementing a business interface on the client and delegating any necessary calls straight to the received "dumb" objects. So, on reception of, say 100 dumb objects....id have to generate 100 "smart" objects that delegated to the dumb objects.

Has anyone any good experience of elegant strategies to use here?

Many thanks in advance.

Alan
Dave Clark
Ranch Hand

Joined: Feb 16, 2005
Posts: 52
one option that you might want to look at is JDO 2 - JPOX is a good open source implementation, and Versant and others produce commercial implementations.

with JDO 2 you can use disconnected object graphs, and pass these to your client. So effectively, you can pass an entire graph of domain objects between your client and server, and these can have all of the validation logic that you might want on your client side, plus any other business logic needed inside these domain model objects.

of course you don't need JDO to pass graphs of domain model objects between a client and server - the advantage with JDO is that it also provides a solution for persiting the objects to and from a database.

And I've never used Spring, but I understand that it has pretty good support for plugging in a JDO provider...

cheers,

Dave.


Dave Clark<br />Senior WebSphere Architect<br /><a href="http://www.versant.com" target="_blank" rel="nofollow">Versant Open Access - JDO2 & EJB3</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Remoting strategies....where to put the business logic?
 
Similar Threads
Newbie - web service design assistance needed
Separate Web Tier and Business Logic tier.
Where put Business Logic? on client or server part
Newbie to JSF. Tryin to understand JSF Lifecycle
Complete locking schema or how to avoid 44/80 on locking.