Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!

Zohrab Basmajian

Greenhorn
+ Follow
since Oct 27, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Zohrab Basmajian

Where my UI will be based on Swing, and all business logic taking place on the Server, and being invoked with webservices



It's not good idea to place all your business logic on the server. The best practice is to divide your application into layers (presentation, serivce, business, data acess,..) layers and create a modular components to get benefit of loosely-couple.


I'm curious as to what the 'usual' practise is when tackling these type of projects with regard to keeping Objects in Synch... i.e. lets look at a User bean for example, is it normal practise to use the same 'User' bean java file in both my Server app source as well as the Desktop application source?



Yes, you want objects to keep it in Synch most of times and not to create duplicate objects on both client and server side. Best practice is to create value object or data transfer object that encapsulates objects based on your UI needs. Lot of times, you want to merge (comb box objects, model objects, etc..) into one value object and transfer it from servier to client and vice-versa. There are serialization/deserialization techniques you might want to use. However, lot of technologies provide those type of techniques. In fact, there are some annotation that you can place on server-side object and client-object to map them together.

10 years ago
Thanks lot for this wonderful note. Its about time to prepare for SCDJWS
10 years ago