matthiask / 406-comments

Test repository for using https://utteranc.es/ for https://406.ch/
https://406.ch/
0 stars 0 forks source link

writing/composition-over-inheritance-the-case-for-function-based-views/ #6

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Composition over inheritance: The case for function-based views - Matthias Kestenholz

https://406.ch/writing/composition-over-inheritance-the-case-for-function-based-views/?utm_campaign=Django%2BNewsletter&utm_medium=email&utm_source=Django_Newsletter_193

brox commented 1 year ago

Well written! I find that from a maintenance perspective FBVs tend to make life easier. For a codebase that isn't touched every week it is a lot easier to unwrap what a FBV is doing when you don't have to refresh your mental model of the CBV hierarchy at the same time. Also, adding types somehow ends up being less complicated than with FBVs. It's all too easy to dig yourself into a type complexity hole with custom protocols and whatnot when you start embellishing the CBVs with e.g. your own mixins.

matthiask commented 1 year ago

@brox Thanks!