Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I'm not an MVC fanboy. In fact, I've never used it in my life, for anything. But I question the assertion that web applications do not have multiple entry points. An enormous number of the web applications I've written all carry a parameter that basically functions as a selector between a number of different functions. If I understand correctly, this is what CGI::Application was written to simplify, although I've never used that either. In fact, such applications may resemble a traditional GUI app, wit

    --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • That is indeed the part about web apps which is closest to traditional MVC.

      However, once you have dispatched to a particular part of the application based on the parameter (or a path), there is only exactly one part of the application which can affect the model, and there is only exactly one output that is returned as the response.

      And even the dispatching part is much more straightforward with web apps.

      The main value proposition of MVC is that any controller can change the model at any point and the model will propagate this change back up to any of the views listening to it. In web apps, this situation just does not exist: once you return the response to the browser, the “view” sits there dumbly until the user hits a submit button. (AJAX does not fundamentally change that.)

      As Andy says, what you want to achieve is separation of concerns. MVC is just one way of getting there, and not necessarily the best one for web apps, although it’s not bad. There are other options, some of which can make more sense for any particular situation. Read the whole thing – it’s not simply and wholly anti-MVC.

      • I read it, and it was good reading, although I'm sure if I'd actually done any MVC work it'd mean more to me.

        I wasn't trying to identify a fundamental flaw with his comments; just saying that I wasn't entirely sure his appraisal of the situation was correct. But your comments helped clear that up.

        --
        J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers