Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC or event-driven component-oriented web frameworks? [closed]

This question intends to be technology-agnostic. Which kind of web framework do you prefer, and when: Pure MVC or event-driven component-oriented?

Just to make the point in "technology-agnosticism", here I name a few MVC vs. component web frameworks, in diverse technologies / languages:

  • Struts vs. Java Server Faces / Tapestry
  • The new ASP.NET MVC vs. "classic" ASP.NET
  • Cake PHP vs. PRADO
like image 456
Pablo Marambio Avatar asked Sep 19 '08 06:09

Pablo Marambio


People also ask

Is MVC framework still used?

Today the MVC pattern is used for modern web applications because it allows the application to be scalable, maintainable, and easy to expand.

Is MVC event driven?

MVC describes large scale structure, EventDrivenProgramming describes how flow is controlled. One can use both simultaneously. Events don't really control the flow, other than requesting actions, such as asking to open a new form window.

Do all frameworks use MVC?

Not all frameworks follow the MVC pattern. You may see some frameworks utilize a variation of the MVC pattern such as MVVM or MVP. If you're unfamiliar with the MVC pattern or the variations used by some frameworks a good idea is to read JavaScript Design Patterns to help your understanding.


2 Answers

I'm a php dev by day; however, I strongly prefer Wicket and/or Lift, especially the latter. The problem with Prado seems to be that the controller is tied to the page, rather than the logical controls on the page, otherwise, it still seems better than most other options in PHP land. I think all boils down to reusability, unless you have components that are backed by controllers, you can't separate the display all that well from the backing control logic.

MVC as implmented by all these 'MVC' frameworks seems to suck, you get a logical page with a tonne of controls and you have to handle all those on page controllers, wow, thanks, now I have MVC / n, where n is the number of controls. Most 'MVC' systems that I've seen so far, have been a mish-mash of brain-dead tag libraries, contorting request response into a single controller that has to be aware of everything on the page.

xhtml templates with js, and css wonderfully separated. Along with a few classes backing those components, and all of a sudden you're not busy wondering how complex pages are going to work, or if you want to take piece x, and drop it somewhere else.

like image 105
Saem Avatar answered Sep 22 '22 19:09

Saem


Right now, the 'new hotness' trend is towards the MVC approach. I personally prefer the conventions of MVC frameworks, as a lot of the scut work that takes up valuable development time is done away with. That being said, the constraints tend to be fairly rigid, and a more traditional component-based approach might be needed in certain situations. All in all, it's a right tool for the job sort of choice.

like image 44
Misplaced Avatar answered Sep 26 '22 19:09

Misplaced