views:

72

answers:

1

Thinking about service orientation, our team are involved on new application designs. We consist in a group of 4 developers and a manager (that knows something about programming and distributed systems). Each one, having own opinion on service design. It consists in a distributed system: a user interface (web app) accessing the services in a dedicated server (inside the firewall), to obtain the business logic operations. So we got 2 main approachs that I list above :

Modular services

Having many modules, each one consisting of a service (WCF). Example: namespaces SystemX.DebtService, SystemX.CreditService, SystemX.SimulatorService

Unique service

All the business logic is centralized in a unique service. Example: SystemX.OperationService. The web app calls the same service for all operations.

In your opinion, whats the best? Or having another approach is better for this scenario?

+1  A: 

A web service is an interface. The invoker doesn't care how a service works, it just needs to know what arguments to supply and what outcomes to expect. So a multitude of simple, discrete servcies is probably better.

Behind their interfaces they can all join up in one great big bundle of business logic. Who cares?

In practice, teach of hese services will share some elements of SystemX functionality and will have some elements which it alone uses. Some may combine elements of SystemX and SystemY. If SystemX and SystemY are legacy apps it may not be possible to change them, so we have to work with them as they are. In other scenarios it is possible to expose impose modularity on them.

APC
thats true.. Interface should be simple. below that interface you can put everything in Business Logic who really cares?
Shoaib Shaikh
By separating the implementations, you can localize and reduce the impact of any future potential changes. i.e. Changes to DebtService would not require regression testing of CreditService because they can be updated individually without affecting one another.
crowne
@APC - That way (joining the business logic), we fall in the problem exposed by @crowne: having to do regression testing in both services exposed. But separating them, its needed to make changes in many places.
Erup
@GustavoPaulillo - my point is that the web services are interfaces, wrappers. The entire point is that the invoker doesn't need to know the dirty details. Design the public signatures as separate services. Plumb the back ends to your Big Ball Of Mud or whatever you have at the moment. You can refactor that later on without breaking the contracts of yor declared services.
APC
We started using a unique service host (WCF) for a service oriented application. This way, we can maintain the IIS instance in one place. Think this approach in a specific scenario - where the app is used as a service - is the best one. Agreed?
Erup