MAYO 2020
Ensayo
MAYO 2020
Ensayo
TABLA DE CONTENIDO
ABSTRACT......................................................................................................................4
PALABRAS CLAVES.....................................................................................................5
INTRODUCCION............................................................................................................6
DESARROLLO................................................................................................................7
CONCLUSIONES..........................................................................................................14
REFERENCIAS.............................................................................................................15
Ensayo
ABSTRACT
cuáles son sus elementos, que tipo de relación si son de solucionadores de problemas o
presente tema se tomará en cuenta porque estos patrones son importantes y necesarios para
sistema.
of the famous patterns or software that offer solutions to problems in software engineering
called patterns archetypes determining specifically which are their elements, what type of
relationship if they are of problem solvers or help to the performance problem, taking into
account their uses and characteristics and in this present topic will be taken into account
because these patterns are important and necessary for engineering and because they are
PALABRAS CLAVES
Arquitectura
Modelo
Vista
Controlador
Presentación
Software
Architecture
Model
View
Driver
Presentation
Software
Ensayo
INTRODUCCION
es MVC, MV-VM, MVP con el que nos da a conocer las diferentes entre las misma y que
se puede llevar a que cualquier persona pueda fácilmente mejorar, actualizar, modificar o
In this essay he refers to software architecture patterns such as MVC, MV-VM, MVP
with which he lets us know the differences between them and which can lead anyone to
easily improve, update, modify or fix any part of the application, in which his history, his
usefulness, pros and cons of the architectures to be dealt with were made known.
Ensayo
DESARROLLO
MVC (Modelo Vista Controlador), porque en este patrón de diseño se separan los datos
distintos. Cuando la lógica de negocio realiza un cambio, es necesario que ella sea la que
actualiza la vista.
los cálculos que tengas que hacer. Entre las numerosas ventajas que te ofrece, la
principal con la que te vas a encontrar es la facilidad de coger tu código dentro de unos
cuantos meses, ver por dónde lo dejaste y hacerlo crecer sin complicarte la vida. Como
cualquier otro patrón de diseño, únicamente es útil si sigues el estilo que debes usar.
Parc en los años 70 y, seguidamente, en los años 80, Jim Althoff y otros implementaron
Model: La capa de datos, responsable de manejar la conexión con la base de datos o una
API.
View: Será nuestra interfaz, la visualización de nuestro model. Tanto botones, campos
de texto y más.
Ensayo
Controller: Tendrá la lógica de negocio, puede tener la lógica qué realizará un botón al
hacerle click, llevarnos a otro vista, actualizar, decirle al modelo que traiga datos o más.
MV-VM (Modelo Vista Vista Modelo), porque en este patrón de diseño se separan los
cambio en ellos, por ejemplo si la vista actualiza un dato que está presentando se
aplicaciones de escritorio más completas y con un aspecto visual mucho más logrado y
se presenta como una variación del patrón MVC ajustado a "WPF" y a su sistema de
enlace a datos, aunque realmente es una adaptación del patrón "presentation model"
MMVM también nos va a permitir, con mucha facilidad, poder hacer test unitarios (Unit
Controlador (MVC), ya que las bases de ambas arquitecturas son muy parecidas. La
diferencia principal entre ambas es que la iteración de MMVVM funciona de otra forma.
Ensayo
View: Sigue siendo responsable de la visualización de los datos. Se une con variables y
necesitados por la vista. También proporciona enlaces a la vista para pasarle eventos al
El uso de esta arquitectura lleva a que cualquier persona pueda fácilmente mejorar,
MVP establece una serie de lineamientos, debemos tener en cuenta que cada proyecto
puede llegar a implementarlo con algunas variaciones, por lo que no es una solución
absoluta.
sucede. Es como un mesero qué se comunicará con el cocinero (modelo) para traer lo
que pide la vista. Debería haber un Presenter por cada Activity o Fragment.
Ensayo
En el MVC, el modelo notifica a la vista cualquier cambio que sufra el estado del
notificación, la vista puede consultar el modelo directamente para obtener los datos
función del presentador es la de mediar entre ambos, enlazando los datos con la vista.
En el modelo MVC, la vista tiende a tener más lógica porque es responsable de manejar
las notificaciones del modelo y de procesar los datos. En el modelo MVP, esa lógica se
En MVC, el modelo tiene lógica extra para interactuar con la vista. En el MVP, esta
MVC (Model View Controller), because this design pattern separates the data of an
application, the user interface, and the business logic into three distinct components. When
the business logic makes a change, it needs to be the one that updates the view.
This is a method that separates the program logic, the application design, and the
calculations you have to do. Among the many advantages it offers, the main one you will
find is the ease of taking your code in a few months, see where you left off and make it
grow without complicating your life. Like any other design pattern, it is only useful if you
It was introduced by Trygve Reenskaug at Smalltalk-76 during his visit to Xerox Parc in
the 1970s, and then in the 1980s, Jim Althoff and others implemented a version of MVC
for the Smalltalk-80 class library. Only later, in 1988, was MVC expressed as a general
Model: The data layer, responsible for handling the connection to the database or an API.
View: It will be our interface, the visualization of our model. Both buttons, text fields and
more.
Controller: You will have the business logic, you can have the logic of what a button will
do when you click it, take us to another view, update, tell the model to bring data or more.
MV-VM (Model View Model View), because in this design pattern the data is separated
from the application, the user interface but instead of manually controlling changes in the
view or the data, the data is updated directly when a change in the data occurs, for example
if the view updates a data being presented the model is updated automatically and vice
versa.
In 2004, a Microsoft development group was working on a project called "Avalon", better
known by its definitive name WPF (Windows Presentation Foundation). The purpose of
this project was to enable the development of more complete desktop applications with a
much more accomplished and complex visual appearance than was possible with Windows
Forms.
Ensayo
The following year John Gossman (member of the "Avalon" development team), in an
article in the MSDN, showed the MVVM pattern to the public. In the article, MVVM is
presented as a variation of the MVC pattern adjusted to "WPF" and its data link system,
MVVM will also allow us, very easily, to be able to do unit tests and to be able to test our
applications better.
If you are familiar with the development, this architecture will remind you of the Model
View Controller (MVC), as the bases of both architectures are very similar. The main
View: Still responsible for the visualization of the data. It joins with variables and actions
in a flexible way.
ViewModel: Is responsible for wrapping the model and preparing the observable data
needed by the view. It also provides links to the view to pass events to the model. Changes
MVP (Model View Presenter) is one of the most common development architecture
patterns used in native Android development. The need to use this pattern arises due to how
complicated the maintenance and scaling of a project can be, as it grows over time and lines
of code. The use of this architecture means that anyone can easily improve, update, modify
or fix any part of the application. Although the MVP pattern establishes a series of
Ensayo
guidelines, we must take into account that each project can implement it with some
View: Now the Activity/Fragment is considered part of the view and we no longer have it
Presenter: It's like the MVC Controller, but it will be orchestrating everything that happens.
It's like a waiter who will communicate with the cook (model) to bring what the view asks
In the MVC, the model notifies the audience of any changes in the model's status. The
information can be passed on in the notification itself, or after the notification, the view can
query the model directly for updated data. In contrast, in MVP, the view knows nothing
about the model and the role of the presenter is to mediate between the two by linking the
In the MVC model, the view tends to be more logical because it is responsible for handling
the model's notifications and processing the data. In the MVP model, that logic is found in
the presenter, making the view "stupid". Its only function is to represent the information
In MVC, the model has extra logic to interact with the view. In MVP, this logic would be
CONCLUSIONES
propuestas en este ensayo se dan por un énfasis específico de los temas tratados que
generan pros y contras para así conocer de una manera más asertiva estas arquitecturas.
this essay are given by a specific emphasis of the topics discussed that generate pros and
REFERENCIAS
Arquitectura de Software
http://theartoftheleftfoot.blogspot.com.es/2010/10/el-patron-modelo-vista-
presentador-mvp.html