Si hay algún problema en el desarrollo de software, entonces su patrón de diseño es la solución principal para solucionarlo. Son como planos predefinidos que utilizamos para resolver problemas de diseño orientados a objetos en su proyecto. En primer lugar, descubre dónde está el problema y luego lo soluciona y también describe el procedimiento y sus consecuencias. MVC y MVC2 son dos enfoques diferentes para el famoso patrón de arquitectura MVC ( Model View Controller ).
MVC vs MVC2
La principal diferencia entre MVC y MVC2 es que MVC es un modelo de diseño de aplicación compuesto por tres partes interconectadas, mientras que MVC2 es un patrón más complejo donde el desacoplamiento de la aplicación La lógica de control de estado y presentación está hecha. MVC incluye el modelo ( datos ), la vista ( interfaz de usuario ) y la solicitud de procesos del controlador ( ) . Una diferencia importante entre MVC y MVC2 es la complejidad. En aplicaciones web del mundo Java, los dos modelos de diseño comunes ( Modelo 1 y Modelo 2 ) están estrechamente relacionados con MVC y a menudo se denominan erróneamente MVC1 ( o simplemente MVC ) y MVC2.
MVC fue el enfoque de primera generación en aplicaciones web Java donde se usaron páginas JavaServer Page ( JSP ) para la interfaz de usuario junto con JavaBeans que podrían encapsular los múltiples objetos en un objeto único para implementar la arquitectura MVC. Las solicitudes de usuario del navegador se envían a JSP, que contiene la lógica del controlador y vincula el modelo para los datos que actualizarían la vista y enviarían la respuesta al usuario que obtiene mostrado en la interfaz de usuario. Este enfoque combina la funcionalidad Controlador y Vista dentro de una página JSP y, por lo tanto, rompe el paradigma MVC.
MVC2 fue introducido por Sun Microsystem org como un patrón de diseño que no rompe el paradigma MVC, a diferencia de MVC, donde la lógica empresarial se separó de las vistas y todas las solicitudes de los clientes se manejaron en un solo lugar en lugar de en cada archivo JSP en MVC. En el patrón MVC2, JSP se reemplaza por servlets para la lógica del controlador.
Tabla de comparación entre MVC y MVC2
Parámetro de comparación MVC <TAG1, Hay múltiples componentes para recibir solicitudes y enviar respuestas. es decir. Controlador y vista. Navegación En MVC, cada JSP tiene un controlador y una lógica de vista que determina la navegación de la siguiente página de vista que la hace redistribuida En MVC2, el servlet contiene la lógica de navegación de la siguiente página de vista que la hace centralizada Consumo de tiempo Toma más tiempo escribir el código para desarrollar las etiquetas JSP personalizadas para evitar scriptlet tagToma menos tiempo para desarrollarse ya que todo el control de navegación está centralizado. Independencia Lógica comercial y presentación La lógica se combina en JSP, para que los diseñadores web y los desarrolladores web no puedan trabajar simultáneamente, ya que tiene una separación entre la lógica y la vista, es por eso que el diseñador y el desarrollador pueden trabajar juntos. Reutilización Es más difícil de reutilizar y extender debido al acoplamiento estrecho entre lógica y vista Es fácil de reutilizar y extender, lo que es adecuado para aplicaciones más grandes
¿Qué es MVC?
MVC es un patrón de diseño arquitectónico para problemas recurrentes de diseño de software que proporciona un enfoque de descripción de alto nivel para la solución. La arquitectura MVC tiene tres módulos: modelo, vista y controlador.
Modelo: Representa el estado de los datos ( que se muestra al usuario en la página de vista ).
Ver: El módulo de vista es la interfaz de usuario a través de la cual el usuario realiza la acción y se comunica internamente con el servidor.
Controlador: El módulo controlador procesa la solicitud del usuario, la lógica empresarial y con la ayuda de un modelo manipula los datos que se muestran en la interfaz de usuario.
MVC comienza con JSP aceptando la solicitud del cliente que trabaja junto con JavaBeans para la lógica de procesamiento de datos que se envía al cliente. El trabajo se divide entre JavaBeans y JSP, donde JSP invoca los JavaBeans y la lógica empresarial en la que JavaBeans llama internamente a la base de datos para guardar / obtener los datos. Al final, JSP devuelve la respuesta al cliente que actualiza la vista en el navegador.
JavaBeans, que también se conocen como Beans, es responsable de la encapsulación de múltiples objetos en un solo objeto, mientras que el JSP tiene la lógica Controller y View. MVC también se conoce como centrado en la página debido a su acceso directo a otra página de vista que es ideal para aplicaciones más pequeñas.
¿Qué es MVC2?
La mayoría de los ingenieros de software piensan que MVC2 es una versión mejorada de MVC, como la versión 2.0; no lo es. El Modelo 1 y el Modelo 2 se desarrollaron simultáneamente y son dos variantes de cómo se deben hacer las cosas.
MVC2 es un patrón más complejo donde se realiza el desacoplamiento del estado de la aplicación y la lógica de control de presentación. Tiene un controlador en el que se ha escrito la lógica para procesar todas las solicitudes entrantes y las acciones requeridas que deben tomarse, como navegación a una página de vista diferente o actualización del estado del Modelo.
Aquí, en MVC2, el servlet actúa como la capa controladora, que también es una interfaz entre la capa Ver y la capa Modelo en la que recibe la solicitud del cliente o la interfaz de usuario, que no es más que una capa de vista, y los procesa con la validación adecuada si es necesario. JSP tiene una lógica de vista que utiliza internamente los frijoles, por lo que si los servlets actualizan el estado del modelo, se refleja en la página de vista.
A diferencia de MVC, JSP en MVC2 no tiene controladores ni lógica de vista; su única responsabilidad es recuperar el estado actualizado del modelo de ese servlet para mostrar en la página de vista.
Diferencias principales entre MVC y MVC2
A menudo confundimos MVC2 como la versión 2.0 de MVC, sin embargo, no lo son, son los modelos de diseño Java donde la arquitectura MVC2 es más compleja y más adecuada para las aplicaciones más grandes.
El factor distintivo entre MVC y las relaciones MVC2 se puede resumir por los siguientes motivos:
- En MVC, un solo componente es responsable de recibir solicitudes y enviar respuestas, pero en MVC2, hay múltiples componentes para recibir solicitudes y enviar respuestas. es decir. Controlador y amplificador; Ver.
- MVC1 combina estrechamente la lógica de presentación con la lógica de negocios, pero MVC 2 aísla o desacopla la lógica de presentación de la lógica de negocios.
- En MVC La lógica de negocios y la presentación La lógica se combina en JSP, por lo tanto, los diseñadores web y los desarrolladores web no pueden trabajar simultáneamente, pero en MVC2 hay una separación entre la lógica y la vista, por eso el diseñador y el desarrollador pueden trabajar juntos.
- En MVC 1, controlador y modelo, ambos son JSP o podríamos decir escritos en el mismo JSP. Pero en MVC2 el controlador es servlet y el modelo es de clase Java.
- MVC No admite la reutilización de componentes de aplicación, mientras que MVC2 admite la reutilización de componentes que son buenos para aplicaciones más grandes y complejas.
Síntesis
Como vimos la gran diferencia de línea entre MVC y MVC2 a pesar de tener nombres similares, ambos se utilizan como soluciones para problemas recurrentes de diseño del sistema.
MVC2 es más complejo y tiene una separación de preocupaciones que se utiliza para aplicaciones más grandes o experiencia de usuario intuitiva debido a su característica centralizada donde todas las solicitudes son manejadas por un controlador. A diferencia del MVC donde el JSP actual es el que determina la siguiente página de vista para abrir.
MVC2 desacopla las páginas de vista de los controladores, a diferencia del MVC que mantiene la lógica comercial y de visión acoplada en un JSP. Por lo tanto, el MVC2 es más fácil de mantener para múltiples usuarios debido a su reutilización y función de extensión y es capaz de admitir un sistema más complicado en tiempo real, como Facebook, Instagram.
- https://www.scientific.net/AMM.198-199.537
- https://ieeexplore.ieee.org/abstract/document/777091/
- https://academic.oup.com/jpp/article-abstract/64/3/397/6135294
Contenido
Way cool! Some very valid points! I appreciate you
writing this write-up and also the rest of the website is really good.
Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
Very good site you have here but I was wondering if you
knew of any community forums that cover the same topics talked about
in this article? I’d really like to be a part of online
community where I can get opinions from other knowledgeable individuals that share the same interest.
If you have any suggestions, please let me
know. Appreciate it!
Everything is very open with a precise clarification of the challenges.
It was definitely informative. Your site is very useful.
Thank you for sharing!
Hi, constantly i used to check web site posts
here early in the daylight, for the reason that i love to learn more and more.
Hello my friend! I want to say that this article
is awesome, great written and come with almost all vital infos.
I would like to see more posts like this .
Hello! Quick question that’s completely off topic. Do
you know how to make your site mobile friendly?
My website looks weird when browsing from my iphone4.
I’m trying to find a template or plugin that might
be able to correct this issue. If you have any recommendations, please
share. Appreciate it!
Excellent post. Keep posting such kind of info on your site.
Im really impressed by your blog.
Hello there, You have performed a fantastic job. I will definitely digg
it and personally recommend to my friends. I am sure they’ll be benefited from this website.
Hi, its good post regarding media print, we all be aware of media
is a impressive source of facts.
Hmm it appears like your website ate my first comment (it was extremely long) so I guess I’ll just sum it up what I submitted and say,
I’m thoroughly enjoying your blog. I too am an aspiring blog writer but I’m still new to the whole thing.
Do you have any tips and hints for rookie blog writers?
I’d definitely appreciate it.
wonderful publish, very informative. I wonder why the opposite
experts of this sector don’t realize this. You should proceed your writing.
I am sure, you’ve a great readers’ base already!
Ahaa, its fastidious dialogue about this post at this place
at this weblog, I have read all that, so at this time me also
commenting here.
Great weblog here! Additionally your web site
loads up very fast! What host are you the use of?
Can I am getting your associate link on your host?
I wish my website loaded up as fast as yours lol
I loved as much as you’ll receive carried out right here.
The sketch is tasteful, your authored subject matter stylish.
nonetheless, you command get got an impatience over that you wish be delivering the following.
unwell unquestionably come further formerly again as exactly the same
nearly very often inside case you shield this increase.
Attractive section of content. I just stumbled upon your web
site and in accession capital to assert that I acquire in fact
enjoyed account your blog posts. Any way I will be
subscribing to your augment and even I achievement you access
consistently fast.
I’m really enjoying the design and layout of your blog.
It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a designer to create your theme?
Excellent work!
I think this is among the most significant information for
me. And i am glad reading your article. But wanna remark on few general things, The web site style is perfect, the articles is really nice : D.
Good job, cheers
Currently it seems like Movable Type is the best
blogging platform out there right now. (from what I’ve read) Is that
what you are using on your blog?
If you would like to take much from this article then you have to apply such techniques to your won website.
This piece of writing offers clear idea in favor of the new viewers of blogging, that really how to do running a blog.
Hi I am so thrilled I found your website, I really found you by accident, while I was browsing on Google for something else,
Regardless I am here now and would just like to say thanks for a
marvelous post and a all round entertaining blog (I also love the theme/design), I don’t
have time to go through it all at the moment but I have saved it and also included your RSS feeds, so when I have time I will be back
to read a great deal more, Please do keep up the
fantastic b.
It is appropriate time to make some plans for the future and it’s time to
be happy. I’ve read this post and if I could I wish to
suggest you some interesting things or advice. Maybe you can write next
articles referring to this article. I wish to read even more things about it!
Excellent, what a weblog it is! This weblog provides helpful data to us,
keep it up.
I’m extremely inspired together with your writing talents and
also with the layout on your blog. Is that this a paid subject or did you customize it yourself?
Either way keep up the nice quality writing, it is rare to look
a great blog like this one nowadays..
Great goods from you, man. I have understand your stuff previous
to and you are just extremely excellent. I really like what you have acquired here, certainly like what you’re saying and
the way in which you say it. You make it enjoyable and you still care
for to keep it wise. I can’t wait to read far more from you.
This is really a tremendous website.
What a stuff of un-ambiguity and preserveness of valuable know-how about
unpredicted feelings.
We’re a group of volunteers and opening a brand new scheme in our community.
Your website provided us with useful info to work on. You have performed a
formidable task and our whole community shall be thankful to you.
It’s very trouble-free to find out any topic on net as compared to books, as
I found this post at this website.
Terrific article! This is the type of info that are supposed to
be shared across the internet. Shame on the search engines for not positioning this
publish higher! Come on over and seek advice from my web site .
Thanks =)
Greetings! I know this is somewhat off topic but I was wondering which blog platform are
you using for this website? I’m getting sick and tired of WordPress because
I’ve had problems with hackers and I’m looking at alternatives for another platform.
I would be fantastic if you could point me in the direction of a good platform.
When some one searches for his essential thing, thus he/she needs to be available that in detail, therefore that thing is maintained over here.
It’s perfect time to make some plans for the future
and it is time to be happy. I have read this post and if I could I wish to suggest you
some interesting things or tips. Perhaps you could write next articles referring
to this article. I wish to read even more things about it!
When someone writes an paragraph he/she retains the image of a user in his/her mind that how a user can understand it.
Thus that’s why this piece of writing is amazing. Thanks!
If some one wants to be updated with latest technologies afterward he must be visit this web page and be up
to date every day.
I all the time used to study paragraph in news papers but now as I
am a user of internet therefore from now I am using net for articles or reviews,
thanks to web.
Magnificent goods from you, man. I’ve understand your
stuff previous to and you’re just extremely wonderful. I
actually like what you’ve acquired here, really like what you are saying and the way in which you
say it. You make it entertaining and you still care for to keep it sensible.
I can not wait to read much more from you. This is actually a wonderful site.
This is a good tip especially to those new to the blogosphere.
Short but very accurate info… Thanks for sharing this one.
A must read post!
Hey There. I found your blog using msn. This is an extremely smartly written article.
I’ll be sure to bookmark it and come back to learn extra of your useful information.
Thanks for the post. I’ll certainly comeback.
What i do not understood is in truth how you are now
not really a lot more well-appreciated than you might be right now.
You’re very intelligent. You already know therefore considerably relating to this topic, made me
in my view consider it from a lot of varied angles. Its
like women and men don’t seem to be interested unless it is something to do
with Girl gaga! Your own stuffs excellent. All the time care for
it up!
Because the admin of this web site is working, no doubt very shortly it will be renowned, due to its feature contents.
Hey there would you mind sharing which blog platform you’re
working with? I’m planning to start my own blog soon but I’m
having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design seems different
then most blogs and I’m looking for something completely unique.
P.S My apologies for getting off-topic but I had to ask!
Why viewers still make use of to read news papers when in this technological world all is available on net?
I feel that is among the most vital information for me.
And i’m glad studying your article. However want to statement on some
common issues, The web site taste is wonderful, the articles
is in reality excellent : D. Good activity, cheers
It’s great that you are getting thoughts from this paragraph as well as from our discussion made at this time.
If you want to get a good deal from this post then you
have to apply such strategies to your won weblog.
What a material of un-ambiguity and preserveness of precious knowledge regarding
unpredicted emotions.
This is the right blog for anyone who wants to find out about this topic.
You understand so much its almost tough to argue with you (not that I really would want to…HaHa).
You certainly put a brand new spin on a topic which
has been written about for decades. Excellent stuff,
just great!
Wow, superb blog layout! How long have you been blogging for?
you make blogging look easy. The overall look of your web site is great, let alone the content!
Outstanding quest there. What happened after?
Thanks!
These are genuinely fantastic ideas in about blogging.
You have touched some pleasant factors here.
Any way keep up wrinting.
These are really enormous ideas in concerning blogging.
You have touched some fastidious points here. Any way keep up wrinting.
This blog was… how do you say it? Relevant!!
Finally I have found something that helped me.
Cheers!
You could definitely see your enthusiasm within the article you write.
The arena hopes for more passionate writers like
you who are not afraid to mention how they believe. At all
times go after your heart.
I was recommended this website through my cousin. I am not certain whether this submit is written by means of him
as no one else recognize such special about my difficulty.
You’re wonderful! Thanks!
Today, I went to the beach with my children. I found a sea shell and gave it to my
4 year old daughter and said «You can hear the ocean if you put this to your ear.» She put the shell to
her ear and screamed. There was a hermit crab inside and
it pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone!
Good day! I could have sworn I’ve visited this blog before but after going through some of the
articles I realized it’s new to me. Regardless, I’m certainly delighted I stumbled upon it and I’ll
be book-marking it and checking back often!
I all the time used to read paragraph in news
papers but now as I am a user of internet therefore
from now I am using net for content, thanks to web.
Terrific article! This is the kind of info that should be
shared across the internet. Shame on Google for no longer positioning this post higher!
Come on over and consult with my site . Thank you =)
I do not even understand how I ended up here but I assumed this publish used to be great . – hey dudes kids
Wow, marvelous weblog format! How long have you been blogging for?
you make running a blog glance easy. The total glance of your website is excellent,
as smartly as the content! You can see similar here najlepszy sklep
Hey there, You have done an incredible job. I’ll definitely digg it
and personally recommend to my friends. I am sure they’ll be benefited from
this website.
I’m impressed, I have to admit. Rarely do I encounter
a blog that’s both educative and engaging, and without a doubt, you’ve hit the
nail on the head. The issue is something which too few folks are speaking intelligently about.
I am very happy that I found this during my search for something regarding
this.
I could not refrain from commenting. Well written!
I needed to thank you for this great read!! I certainly enjoyed
every bit of it. I have got you book marked to look at new stuff you post…
Good post! We will be linking to this particularly great post on our site.