Question

I need to know what types can be merged together like can I merge MVC and layered architecture? so please can someone list what types can be merged together, and an example on how to merge.

Can I even merge software architecture?

I am trying to solve a problem, that is asking me to discuss about merging two software styles. As far as I understand just like someone posted that they are abstract definitions of how a software works. So I don't understand how are they supposed to be merged.

Was it helpful?

Solution

A Software Architecture is the set of (design) decisions that dictate the overall shape of the software. As a software architecture is a set of decisions, it doesn't really make sense to talk about merging two architectures.

However, in making those decisions that form the architecture, you can use multiple architectural styles and/or patterns. I wouldn't really call that merging, but rather that you combine them in an architecture.

And, yes, you can combine the MVC pattern with a layered architectural style in a single architecture. The most common way of combining them is that the Presentation layer contains the MVC Controller and View parts and that the MVC Model part is composed of all the other layers in the architecture.

OTHER TIPS

Layered architecture is MVC. Why? Because the only consistent requirement for MVC is to have three components focused on three responsibilities. If your layered architecture has that it already is MVC.

Layered architecture adds rules that dictate what knows about what that MVC doesn’t have. If your MVC code obeys those rules, or can be made to obey them, then sure you can do both.

Before worrying about any of that though ask yourself why you care. Architecture is mostly about what you don’t do. The things you avoid. Doing that is work. It takes effort. Don’t do it without knowing what you get out of it.

Done well, what you usually get is flexible code that can easily accept change. This is good. But don’t kill yourself for it without seeing the value in it.

Assuming that this is a real problem, not just a discussion...

You do not merge architectures. Architectures are abstract definitions of how the software would be organized.

What you will do, is to merge software. The equation will be:

SW 1 (archi 1) + SW 2 (archi 2) = SW 3 (archi 3)

or simplified for visibility:

SW 1 + SW 2 = SW 3

However, it is almost impossible to have the equation (exceptions may exist):

archi 1 + archi 2 = archi 3

Therefore, if you really want to have a SW 3, then you need to decide a priori what architecture you want to use, and then re-write the software (re-use allowed) using the respective architecture.

Licensed under: CC-BY-SA with attribution
scroll top