Pyramid and MVC (split from: Re: Added Python, WSGI to XAMPP)

Discussion in 'Python' started by Gerry Reno, Dec 15, 2010.

  1. Gerry Reno

    Gerry Reno Guest

    On 12/15/2010 05:03 PM, Chris Withers wrote:
    > On 14/12/2010 00:58, Gerry Reno wrote:
    >> What I really don't like right off is that Pyramid is contorting the MVC
    >> model

    >
    > That specific pattern, I'm afraid, is a little antiquated nowadays,
    > particularly when it comes to web apps...
    >
    >> The VIEW is the bits that stream out of the webserver back to the users
    >> browser.

    >
    > Yep, and in Pyramid I guess this would be the template renderer, which
    > is usually a decorator on the view function or class. The view's job
    > is to process a request and turn it into a response dictionary. That
    > sounds a lot like your controller to me ;-)
    >
    >> The CONTROLLER is the code that gathers all the pieces from
    >> the model and constructs the python code

    >
    > Slightly scared as to what "constructed the python code" might mean :-S
    >
    >> that is then fed to the engine
    >> that then creates the view. And just because the controller navigates
    >> the logic to dynamically contruct/render a view, that does not make 'it'
    >> the view.

    >
    > Well, for me, the MVC isn't really what happens anymore, here's my take:
    >
    > - the model nowadays has all the "business logic" in it, rather than
    > just the data. The model is now a collection of objects that can be
    > interacted on through many/any UIs needed, some of which may be web apps.
    >
    > - web apps are *always* a collection of request/response transactions.
    > As such, the "control" layer does just become a "view" that does that.
    >
    > - singleton objects and other stuff that used to live in a "control"
    > are now factored out into utilities and services (of which
    > zope.component provides a pretty good abstraction, and doesn't really
    > have anything to do with Zope, other than the fact that Zope makes use
    > of it).
    >
    > Welcome to the 2nd decade in the new millenium ;-)
    >
    > Chris
    >



    It doesn't matter whether you are building a desktop app or a webapp.
    MVC still applies. And that includes when things like Ajax are added to
    the mix because Ajax just performs a mini-MVC transaction. The problems
    arise when people start rigidly thinking that M only meant database. M
    means model, model means any source that emits data. A database,
    another webapp, whatever, that is M. The view as I said before is just
    the bits streaming out of the webserver back to the client device.
    There should be NOTHING on the server call view-anything. The view only
    exists on the clients. The view is the result of what the
    controllers(servers) in conjunction with renderers emit as their work
    product.

    -Gerry
    Gerry Reno, Dec 15, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mathias K.

    Running Python with XAMPP

    Mathias K., Jul 19, 2007, in forum: Python
    Replies:
    0
    Views:
    409
    Mathias K.
    Jul 19, 2007
  2. Gerry Reno

    Added Python, WSGI to XAMPP

    Gerry Reno, Dec 9, 2010, in forum: Python
    Replies:
    2
    Views:
    1,434
    Gerry Reno
    Dec 14, 2010
  3. Mathew
    Replies:
    0
    Views:
    232
    Mathew
    Aug 23, 2011
  4. somerandomperson
    Replies:
    1
    Views:
    172
    Bob Barrows [MVP]
    Jul 31, 2008
  5. Chris Gunnels

    Link xampp mysql to Ruby's

    Chris Gunnels, Feb 1, 2009, in forum: Ruby
    Replies:
    4
    Views:
    126
    Zac Brown
    Feb 1, 2009
Loading...

Share This Page