I was writing the text below as a comment, but it ended up getting a little long.
Something I don’t like in the term 3 camadas
, is that I never know if you’re referring to 3-layer
or 3-tier
, our Igua ends up creating a confusion between these two architectures.
Anyway, I hope you don’t confuse MVC
with 3-layer
, although it is possible to make a relationship between Model -> Presentation
, Controller -> Business
and Model -> Data Access
.
The pattern MVC
is a Design Pattern
used to make a logical separation of the user interface, while the 3-layer
is an Architecture.
for example, we may have an application made in MVC
with only 2 layers, where we build our Apresentação
and Regras de Negocio
within the MVC
, in this scenario Apresentação
and Regras de Negocio
end up behaving like a single layer, but the Data Access layer is still isolated (Banco de Dados
).
on the other hand, we can remove the Regras de Negocio
of Controller
and implement them elsewhere, for example in a WebService
, in this case we have three layers.
If you prefer you can move your Apresentação
for the customer, for example using SPA
for example, and keep your Regras de Negocio
in a API RESTful
And finally we can create more layers, for example other layers of Apresentação
... Desktop
, Aplicação Mobile
, Web
, etc... divide the Regras de Negocios
, for example Financeiro
, Contabil
, Operacional
, etc... and even the layer of Acesso a Dados
... NoSQL
(e. g: MongoDB
) and SQL (e. g: SqlServer
).
In any case, not always MVC is the best for the project. in some projects 2-layers
is more than enough, in others it may be necessary to use n-layers
, the same goes for the tiers (2, 3 ou n)
, after all the system being scalable is not always the most important.
I don’t know what it is, but it looks like you just answered yourself.
– user28595
No guy type in web development we have files and a different structure in the project, and this I want to know , thinking that I could not express very well rs.
– stringnome
I don’t know if I understood it very well, but in the Web model we have the same layers, the difference is the presentation layer, which will be web (html, for example). So much so that you can (I don’t say you should or shouldn’t, but you can) use the business layer and the Data Access layer you use on your Winforms system.
– Randrade
I would say that this question is too broad, not least because the architectural model that the answers need to be based on is not defined, so the division of layers can be on top of anything. It would be nice to limit the question further.
– Leonel Sanches da Silva
@Ciganomorrisonmendez I’m working on this I intend to reformulate the question , I’m giving a read on the concepts before , but I do not think I could express right not ><.
– stringnome