Re: Need some advice for integrating a Cocoa and WO app
Re: Need some advice for integrating a Cocoa and WO app
- Subject: Re: Need some advice for integrating a Cocoa and WO app
- From: David Avendasora <email@hidden>
- Date: Tue, 5 May 2009 07:00:37 -0400
On May 5, 2009, at 6:38 AM, Gustavo Adolfo Pizano wrote:
Hello Andrew:
The project involves a Web app and a cocoa app that both
authenticate over the same LDAP server, and can connect after to a
SQL server(the same one), for different proposes, like showing an
address book, showing, handling financial stuff, Calendars etc, they
hadn't told me much about it but as far as I understand it's
something like that.
So both applications do the the same, over the same servers, just
that one its made for web and the other one to run natively on os X.
What you are describing here means that the Cocoa app and the WO app
know nothing about each other and they can easily change each-others
data in the SQL database and it is going to cause you _lots_ of
headaches. Both apps are going to have caches of data and they _will_
get out of sync.
By making the Cocoa client apps talk to the WebObjects server instead
of the DB, then you can greatly cut down on data synchronization
issues because the WebObjects server application manages all
interaction with the SQL database.
By using JSON RPC (or other WebService technolgy) you are creating two
different _clients_ for your WebObjects _server_.
1) Web
2) Cocoa
By having both clients talk to the WebObjects server, you can
consolidate a lot of your business logic in one place - on the server
in, in WebObjects. If they insist on a Cocoa client talking directly
to the SQL database then there is no common repository of business
logic and it will all have to be written (and debugged!) twice - once
for the Cocoa app and once for the Web App.
The way I usually explain this to customers/clients/employers is that
the amount of work is the square of the number of independent
applications. Having 2 different apps talking independently to the DB
is 4-times as much work as having 1. Having 3 independent apps is 9-
times the amount of work.
Having them both talk to the WO server instead of directly to the DB
eliminates a huge amount of work and risk. It is still complicated,
but much less complicated than both talking directly to the DB.
Dave
cheers.
g.
PS: thanks for your replies, Im really happy I got them :P
On May 5, 2009, at 12:26 PM, Andrew Lindesay wrote:
Hello Gustavo;
Without knowing what you are actually trying to achieve, I would
_generally_ have the Cocoa client application communicate entirely
with a WebObjects application server using WS's over HTTP. I would
_generally_ _not_ have the Cocoa client application communicate
directly with the database server.
cheers.
So summarizing, its good if I publish WS's , (JSON-RPC,SOAP. ..,
or any other way), even if both applications, the desktop app and
web app, do the same over the same database?.
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden