[quoted text, click to view] Rashmi wrote:
> Lets say, the current business needs for me requires any external
> system (or 3rd party or any other organization) to just allow read
> operations - no update,add or delete. In this case, I should be
> exposing only the findCustomerByName, findCustomerById,
> findCustomersWithinZipCode methods as Webservices. [The
> add/delete/update opertions will not be exposed as Web Services
> methods]
>
> This is what I understand - that we should use WebServices carefully on
> a case by case ("depends on..." factor) basis. Please let me know if I
> am offtrack.
>
> Thanks once again,
> Regards,
> Rashmi
>
Hi Rashmi
You're on track :-)
but only, if your business workflows, do not need the CUD services.
Mostly, you actually want these services (methods) as part of your
service, but again, it depends solely on the needs of your business.
For the datalayer thingy one common way of doing it is this:
Request:
Client->UI logic->Service->DataLayer->Database
Response:
Database->DataLayer->Service->UI logic->Client
That way separation of concerns are enforced.
You could even split the UI logic in UI view logic and UI controller
logic for enforcing the MVC pattern style client.
The role of the datalayer is to provide *data* services to your
(web)services. So this layer concerns how to get the right data needed
(by using parameterized SQL, a stored procedure, read from a local file,
read from a cache, etc...).
Actually the (web)service doesn't care *how* the datalayer gets the
right data, it just uses them to pass on to client )or actually the UI
logic that resides on the client).
So you could say that:
- The UI logic is a service consumer of your (web)services, which acts
as service providers
- The (web)service is a service consumer of your data layer services,
which acts as serivce providers.
Just my thoughts. Does it make sense?
Regards