Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

MVC MVP

chris strigl
7 years ago May 27, 2015 10:45am
Marko Grönroos
7 years ago May 27, 2015 11:35am

I have to confess that I'm yet to see an interpretation of what MVC would mean with Vaadin so that it would be useful, and trying to fit the MVC concepts with Vaadin just gives me headache. A view and its control logic are usually not particularly separated in Vaadin applications, except perhaps when dealing with declarative designs and companion classes in Designer.

If somebody has a more clear interpretation of how MVC would relate to Vaadin, please share your thoughts.

I wouldn't call MVP more "native" – it's just a design pattern that has a more clear meaning and purpose in Vaadin applications than MVC.

Petter Holmström
7 years ago Jun 23, 2015 8:39am

If I remember correctly, MVC comes from a time when software interacted more directly with the hardware. The controller was responsible for getting input from the keyboard, the view was responsible for outputting information on the screen and the model was responsible for data and behavior. Today, you no longer need to interact with the hardware and hence, the need for MVC has declined.

I'd say MVP is an adaption of MVC that is more suitable for today's environment. That said, even MVP is not necessarily the best pattern for a Vaadin application. Please read https://vaadin.com/blog/-/blogs/is-mvp-a-best-practice-.