I think that business logic should exist in a model when using an MVC or MVP design pattern, but should be hidden behind a service in a service-oriented architecture.
Can a software system use the MVC or MVP design pattern within a service-oriented architecture? If so, where does the model sit?
ASP.Net MVC can be part of an SOA architecture, and service frameworks that offer JSON data are often implemented using client-side MVC libraries.
1) When you need to develop as simple as possible, do not use SOA. 2) When you require the operating environment is as simple as possible, do not use SOA. 3) When the net is not reliable or the net speed is slow, do not use SOA. 4) When you process prototype design, do not use SOA.
There are three roles in each of the Service-Oriented Architecture building blocks: service provider; service broker, service registry, service repository; and service requester/consumer.
SOA, or service-oriented architecture, defines a way to make software components reusable and interoperable via service interfaces. Services use common interface standards and an architectural pattern so they can be rapidly incorporated into new applications.
Well they are totally different animals. MVC is all about presentation of data, controlling the navigation of the user dialog and some business logic in building the data model.
SOA is about retrieving data from a service provider.
On the client side, you can use SOA within the Model part of the MVC pattern to build up your model with data from a SOA service.
On the service side, as there is no presentation and no user dialog, most of the MVC pattern becomes redundant. Furthermore, good SOA design should concentrate on providing a useful service regardless of the underlying data store, so the "model" part becomes largely incidental.
It is true that many services are "stateful" (e.g. orders are validated, paid for, dispatched then received), but these states are an integral part of the business logic and don't lend themselves to the session management typical of the MVC pattern.
Good Question. I think MVC and SOA will and must co-exist. MVC is the most sucessful architecture for User to system communication. SOA is an architecture for effective system-system communication. In most organisation, there is a place for both. Therefore I believe they will co-exist.
In terms of how they interact with each other, my personal opinion is - MVC will remain (once the SOA hype is gone) as the core architectural pattern with both model and controller exposing service interfaces where appropriate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With