> I think that patch was just an example of bad abstraction. For instance,
_log_and_response was strange and confusingly named, and seemed to be there
mostly for vanity, to mask the imperative nature of the top level of
control.

Proposed patch author here. Yes, I agree that wasn't a very successful
attempt at the abstraction, and I think that's why I abandoned that effort.

Perhaps the best abstraction isn't a Class Based View at all? I'm sure we
could write classes other than Views, instead of forcing the abstraction to
be a subclass of a View.



On Tue, Nov 22, 2016 at 3:29 PM, Yo-Yo Ma <[email protected]> wrote:

> > I found it much more difficult to follow to the point where I didn't
> feel it was an improvement.
>
> I think that patch was just an example of bad abstraction. For instance,
> _log_and_response was strange and confusingly named, and seemed to be there
> mostly for vanity, to mask the imperative nature of the top level of
> control.
>
> When "properly" abstracted, class-based views, IMHO, are much simpler to
> reason about. And, despite the one extra indentation level of a method (vs
> a module "function"), CBV tend to offer flatter logic and better separation
> of concerns.
>
> Somewhat ironically, I find better examples of functional style code in
> CBV than I do in view functions.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers  (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-developers/6acd4821-d51f-4bf4-9550-
> f3843eb28805%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAKL8yL4J-42Tn%3D_Lhi%2BAvAoY8nbG8-gUE47jAwc7xpZCCCm_Wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to