PDA

View Full Version : Client Server Relations


Jobeesh
11-02-2009, 03:47 AM
I am developing a job tracking system for the computer repair shop that I work for. It is my first RIA and I'm having trouble deciding where my logic should reside, the server or the client. As a simple example:

A job contains notes, an account, a contact, and items. All of these things are in different databases on my server. That means, in order to pull up my complete job info I need to pull up related info from each of the databases listed.

As far as I can see, if I put the logic on the client side it is most flexible. If I decided that I want to get shorthand information from the job (not the full data from each of the listed databases) then I can just query that information, but it comes at the cost of several HTTPService.send() calls.

On the other hand, I can locate this logic on the server which will have a whole load of variables passed to it about which data is necessary and it will return everything the application needs in one nice neat XML package. The problem I foresee with this is that it's a much more rigid server-side api that only returns information in a specific way. What if I decided to develop another application that ties into the API or what if I decide to radically change the client side interface? The server side would have to be completely rewritten.

I'm not sure what the best practices are related to these types of issues. Thanks for the help.

Jobeesh
11-03-2009, 03:33 AM
http://www.youtube.com/watch?v=aAb7hSCtvGw around 45:00