On Sun, Nov 25, 2012 at 1:10 AM, James Pic <james...@gmail.com> wrote:

> Hello everybody,
>
> Thank you for your feedback. And pretty soon I will tackle this problem in
> an external app - or consider joining the party if somebody else has
> started, in this case feel free to let me know.
>
> I can understand most of the points made here, expect just one, please
> bare with me. Several hackers on this list stated that it has "obviously
> not its place in Django".
>

Just in case you didn't know, one of the "several hackers" is a core
developer… (cough cough)


> I don't understand why generic non ajax views would have a their place in
> django, and ootb ajax support would not. But I'm really curious.
>
> It would be great if someone could elaborate on that, because from what I
> understand:
>
> - django has generic views, you are free to use them, you can use your
> own, or you can use those that are provided by external apps,
> - if django had generic views with ajax support, you would be free to use
> the ajax support, or use your own, or use those that are provided by
> external apps.
>
> I just fail to see the difference, it would be great if someone could
> explain that !
>
>
In all honesty, the best explanation isn't a good one -- it's historical.
Django had generic views when it was publicly released (or very soon
afterwards), and they've been part of the tutorial since that time. They're
now embedded in the general consciousness of "what Django is", so it's hard
to pull them out again.

I'll completely grant that this explanation is a little "post hoc, ergo
procter hoc". If Django didn't have generic views today, and someone
proposed adding them, they'd probably get the same response you're getting
on adding AJAX capabilities.

However, if I had to try and justify the existence of generic views, I'd
use a scaffolding argument -- that generic views wrap common pattern of
data access, which can be useful when you're trying to throw up a skeleton
for a site. However, as you need more and more functionality, you swap out
parts of the scaffold for custom built views.

That said, I don't think generic views are a waste of time -- I think
they're the start of a framework unto themselves. The broad patterns
embodied in GCBVs -- show me details of a single object; show me a list of
objects; etc -- are fairly familiar to anyone who builds sites, but modern
sites need to do a whole lot more, like support AJAX, PJAX, web sockets and
so on. I think there's plenty of room for a framework of generics -- I just
question whether that framework needs to be part of Django's core.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to