1

Based on this book , refering to pages 156 to 159 , it talks about the two different types of software architecture model : MVC & Layered .

There are distributed system architecture patterns such as : Master-Slave , 2 tier client-server , multi-tier client server , P2P

These are my questions :

1) In MVC , there is the Model , View , Controller which is in essence a three layer architecture with View on top , Controller in the middle , Model on the bottom and all three layers are only able to communicate with the layers above and beneath them only which is exactly the same as layered architecture . What is the actual difference between them ??

2) Isnt MVC a form of client server architecture ??

3) Master-Slave seems exactly like 2 tier client-server where the server is the Master and the client is the slave , I dont understand how Master-Slave differs from Client-Server

  • Each architecture pattern/style defines types of elements, relations, and restrictions on them. MVC is not layered. In the layered style, the usage relation is unidirectional across layers. In MVC, as you said your question, the interaction is not unidirectional. Client-server is a master-slave kind of architecture used in distributed systems, but MVC is not a form of client-server. In fact, MVC can be used in stand alone GUI applications. – Paulo Merson Mar 25 '18 at 20:22
1

If you consider any big project or enterprise application mvc is used only in presentation layer. Here model will act merely as view model. Sometimes model is maintained at separate project and shared between all layers i.e BAL, DAL and PL.You can not say it is client server architecture because in tier architecture different layers are hosted in different server.

| improve this answer | |
1

MVC and Tiered applications are very different problems. One is an architectural pattern, and the other is a design pattern.

In reality, there is nothing that keeps MVC and layered architecture as mutually exclusive ideas.

  • Model: You have domain objects which represent the application's logical entities
  • Controller: You have objects/actions which map UI interaction to the domain model.
  • View: You have presentations for the domain objects that interact with controllers and bind to the objects in some way.

Tiered applications may have you arrange the model portion in a "Data Layer", and incorporate the controller logic in an "Application Layer", and finally tie it all together using views in the "Presentation Layer".

More often then not, these layers are often heavy handed, and the entire MVC approach can be applied in one layer, with a database back-end.

| improve this answer | |
0

1) In MVC , there is the Model , View , Controller which is in essence a three layer architecture with View on top , Controller in the middle , Model on the bottom and all three layers are only able to communicate with the layers above and beneath them only which is exactly the same as layered architecture . What is the actual difference between them ??

They are distinct components of the architecture. In theory, each can be swapped without affecting the others.

E.g., the viewer serves two purposes:

  1. Allow the user to view the model.
  2. Allow the user to change/update the model.

Two viewers can differ on:

  1. What they allows the user view and the mechanisms to view them.
  2. What they allow the user to change and the mechanisms provided to change.

If there is a business case for existence of two viewers, there are no technical hurdles to support both.

If there is a business case for replacing the existing viewer with another viewer, there are no technical hurdles to do that either.

The Controller serves as the API layer to construct, query, and update the objects in the model. Speaking from a CAD background, the API layer could provide functions to:

  1. Facet a part for display purposes.
  2. Provide geometric queries, such as the closest point on face given another point.
  3. Compute the intersection of two surfaces to define the shared edge of two faces.
  4. Etc.

The Controller does not concern itself with who is requesting a certain action. If it supports the action, it performs it. Updates and improvements to the controller can be made independent of the Viewer and the Model.

The Model is the pure data of the application. It servers the data to the Controller. It is the least flexible of the lot. It is very easy to break the Controller by making changes to Model that are not backwards compatible or by introducing bugs while changing the Model. Even though it is separate from the Viewer and the Controller, any changes to the Model will have to made carefully so that the Controller and the Viewer are least affected by it.

2) Isn't MVC a form of client server architecture ??

It could be. In pure client server architecture, the client and server tend to be less closely tied than in a MVC architecture. A web browser is is rarely tied to the HTTP server. On the other hand, the GUI of a CAD application is very closed tied to the underlying model. There is no generic GUI interface that can be used to any CAD package.

3) Master-Slave seems exactly like 2 tier client-server where the server is the Master and the client is the slave , I dont understand how Master-Slave differs from Client-Server

It's the opposite. The client is the master and the server is the slave. The server responds to the requests made by the client.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.