Re: Difference between controllers and views?

2008-06-16 Thread [EMAIL PROTECTED]
On 12 juin, 04:12, "Shannon -jj Behrens" <[EMAIL PROTECTED]> wrote: (snip) > I agree with Ben. Having classes with methods has all sorts of OO > benefits. Consider, you can implement __getattr__ and do all sorts of > cool tricks. It's also nice to share a bunch of code and data via > self. If

Re: Difference between controllers and views?

2008-06-15 Thread iain duncan
> I saw a Java MVC that's totally different. The view knows about the > model and actively puts things into it and takes things out of it. > The controller does not know much about the model (if I remember > right). The database is also distinct from the model; the view talks > to the database

Re: Difference between controllers and views?

2008-06-15 Thread Mike Orr
On Wed, Jun 11, 2008 at 3:14 PM, Ben Bangert <[EMAIL PROTECTED]> wrote: > On Jun 11, 2008, at 1:10 PM, Karlo Lozovina wrote: > >> What's the practical difference between controller based approach and >> views based one? Eg. Django views, and controllers in Pylons? It >> doesn't seem that much diff

Re: Difference between controllers and views?

2008-06-14 Thread Mike Orr
On Thu, Jun 12, 2008 at 8:44 AM, Alberto Valverde <[EMAIL PROTECTED]> wrote: >> What's the practical difference between controller based approach and >> views based one? Eg. Django views, and controllers in Pylons? It >> doesn't seem that much different, so why not make all controller >> actions

Re: Difference between controllers and views?

2008-06-14 Thread Mike Orr
On Fri, Jun 13, 2008 at 6:53 AM, askel <[EMAIL PROTECTED]> wrote: > > -jj, > > Isn't that enforced by Routes that controllers must be classes? I > remember some discussion about possibility of using any other > dispatching library/method in Pylons. It was something about new WSGI > environment key

Re: Difference between controllers and views?

2008-06-14 Thread Krishgy
For me, there are not much differences between view based approach and the controller based approach. Of course, functions are first class objects in Python. MVC is an abstract concept, a pattern for classifying the data, actions and presentation/view. Languages and frameworks(framework developer

Re: Difference between controllers and views?

2008-06-13 Thread Shannon -jj Behrens
Yes. You could hack around that, but it'd probably be painful. What I'm saying is that: a) Using classes is a good idea. b) Pylons doesn't force you to code a certain way within those classes. You can move as much or as little as you want into the models or other libraries. Best Regards, -jj

Re: Difference between controllers and views?

2008-06-13 Thread askel
-jj, Isn't that enforced by Routes that controllers must be classes? I remember some discussion about possibility of using any other dispatching library/method in Pylons. It was something about new WSGI environment key "wsgiorg.routing_args". I might be completely wrong on that though. Cheers Al

Re: Difference between controllers and views?

2008-06-12 Thread Shannon -jj Behrens
On Thu, Jun 12, 2008 at 10:05 AM, rcs_comp <[EMAIL PROTECTED]> wrote: > On Jun 11, 4:10 pm, Karlo Lozovina <[EMAIL PROTECTED]> wrote: >> What's the practical difference between controller based approach and >> views based one? Eg. Django views, and controllers in Pylons? It >> doesn't seem that mu

Re: Difference between controllers and views?

2008-06-12 Thread rcs_comp
On Jun 11, 4:10 pm, Karlo Lozovina <[EMAIL PROTECTED]> wrote: > What's the practical difference between controller based approach and > views based one? Eg. Django views, and controllers in Pylons? It > doesn't seem that much different, so why not make all controller > actions regular functions, i

Re: Difference between controllers and views?

2008-06-12 Thread Alberto Valverde
> > What's the practical difference between controller based approach and > views based one? Eg. Django views, and controllers in Pylons? It > doesn't seem that much different, so why not make all controller > actions regular functions, instead of class methods? What's the gain > in this controll

Re: Difference between controllers and views?

2008-06-11 Thread Ben Bangert
On Jun 11, 2008, at 7:12 PM, Shannon -jj Behrens wrote: MVC is a cargo cult ;) http://jjinux.blogspot.com/2005/04/mvc-cargo-cult.html Regardless of the original meaning in the context of Smalltalk, the terminology does have a fairly easy to understand and very common interpretation (most

Re: Difference between controllers and views?

2008-06-11 Thread Shannon -jj Behrens
On Wed, Jun 11, 2008 at 3:14 PM, Ben Bangert <[EMAIL PROTECTED]> wrote: > On Jun 11, 2008, at 1:10 PM, Karlo Lozovina wrote: > >> What's the practical difference between controller based approach and >> views based one? Eg. Django views, and controllers in Pylons? It >> doesn't seem that much diff

Re: Difference between controllers and views?

2008-06-11 Thread Ben Bangert
On Jun 11, 2008, at 1:10 PM, Karlo Lozovina wrote: What's the practical difference between controller based approach and views based one? Eg. Django views, and controllers in Pylons? It doesn't seem that much different, so why not make all controller actions regular functions, instead of class m