What are the tradeoffs between Function-Based Views and Class-Based Views? In what scenario is an FBV actually more maintainable than a CBV?

Last updated 17 June 2026

  • Function-Based Views (FBVs) are plain functions with explicit, top-to-bottom flow. Reusing logic across them means copy-paste or helper functions.

  • Class-Based Views (CBVs) reuse CRUD boilerplate via generics like ListView and mixins. Their behavior is spread across the inheritance chain (MRO), so debugging means knowing which hook (get_queryset(), dispatch()) to override.

  • An FBV is more maintainable for branching, custom logic that doesn't fit a generic pattern, or for a simple one-off endpoint where a CBV adds ceremony without saving code.

  • https://python.plainenglish.io/function-vs-class-based-views-in-django-making-the-right-choice-e2d3af276041
  • https://cynthiakiser.com/blog/2026/01/19/django-views.html
All Django interview questions