Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> some of it doesn't fit there, and it doesn't fit in the view or model either.

In Django, which does not have controllers either, you'd do this via a view decorator in the URL dispatcher: the URL dispatcher is essentially the "plugin point" for the framework-provided controller(s)



Hm? Django has controllers, they just call them views. And what Django calls templates are typically called views in other frameworks.


https://docs.djangoproject.com/en/dev/faq/general/#django-ap...

Django styles itself as MTV: Model Template View. The concept of "Controller" within Django I would say gets implemented across a few layers (Urls, middleware, decorators and return HttpResponse objects).

I never cared much for the distinction though as long as everyone knows what your nouns mean for the specific project you could call them RedFish, BlueFish, OneFish frameworks and it would work just as well.


I was always under the impression that in Django despite the fact that they are called "views" they're pretty much controllers. The view is really just the template.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: