Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6966039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:08:22+00:00 2026-05-27T16:08:22+00:00

This is a general architecture question. I read in many places that in an

  • 0

This is a general architecture question. I read in many places that in an MVC framework, (1) models ought to be fat, and controllers ought to be skinny. But I also read that (2) the details depend on the framework you’re developing in. So, what if you’re developing in django?

My experience with django is that a lot of the logic ends up getting put into views and forms. Not the “business logic,” but the details of handling requests, sessions, etc. In terms of lines of code, these details often outweigh the business logic of manipulating model objects. Am I doing something wrong, or is this how django works?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:08:23+00:00Added an answer on May 27, 2026 at 4:08 pm

    MVC is not a universal solution and most of the time it’s done wrong and can’t keep its promises: in practice modifying a model will require modifications in the controller as well, because it’s done wrong. If you really want loose coupling between Model and Controller then – and people usually ignore that – you have to use a service pattern (open as image). Which almost nobody actually does.

    Instead of blindly adhering to the MVC fuss/pseudo-pattern in the PHP world, Django takes a pragmatic approach. Because in the common reality of software development, the developer programs things for the user to see. Then the user (your boss, client, customers …) will "see" your work, and eventually give his opinion about how he wants to "see" it in the end. By using Django, the developer can take a more "view oriented" development pattern and guess what: it makes deadlines easier to respect and users more satisfied. If you think about it, it has its "nosql-ish" idea that the view (general view, not django view) should be the boss of what’s going on behind the scenes.

    I’d like to thank Django for not doing MVC wrong, unlike 99% of the PHP MVC implementations out there.

    On the other hand, Django is the only framework that allows proper isolation between applications. Each application can have:

    • models
    • views
    • templates
    • urls
    • static files
    • tests
    • forms
    • optional addons (admins, filters for ajax-selects, permissions for django-authority, notifications for django-notifications, etc, etc)

    So even if your models/views/templates will be tied, your project can be relevantly divided in small (also reads: easy to maintain) and loosely coupled applications. Only related models/views/templates/stuff are tied together. A big fat models script with a big fat views and urls script is not what you want in Django. For example, you don’t want two model classes like Article and FootballMatch to live together, you want to make an "articles"/"blog" app and a "sport" app which can live independently. Of course sometimes they must be tied, in that case it’s doable at the project level in 90% of the cases (you’d make another app, "blog_sport" if you happened to need to tie in models or templatetags).

    For example, it’s a super common practice to define a get_absolute_url() method in the Model class. Yes, your model class which in theory has to contain only business logic, is now tied with your urls definition. How bad is this in practice ?!! Well actually it’s brilliant because it takes two seconds to add this method and you can then use it anywhere you use a model: be it in views or templates. Also, other applications (e.g. django.contrib.admin) will use it.

    Another slightly more complicated example of Django brilliance is that queries are lazily evaluated. Which means, your view function/class will define a query like blog_list = Blog.objects.all(), but the query will actually be executed in the template if it calls like {% for blog in blog_list %}. So business logic happens in the template in that case, and if something fails before the rendering of the template: you saved a query. But that’s not all, if your template just displays a count {{ blog_list.count }}, the select query will not be spawned at all and just a count query will be executed. The "general view" decides what business logic is needed. That’s far from the promises of MVC but be honest: how practical is that ?

    My point is that you can apply theory the wrong way, do it right (which reduces your choice to like 5 web frameworks all languages included), or just get to the point in an elegant and pragmatic way to get your job done the Zen way in no time: that’s Django’s choice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a general question about MVC as a pattern, but in this case
This is a general question of sorts, but do you think that it's important
This is just a general question irrespective of database architecture. I am maintaining an
This question is by necessity a bit general; it relates to the overall architecture
I know that there are many different architectures exist. In this question I consider
Yesterday I asked this general question about decimals and their internal precisions. Here is
This is a general question, I believe it maybe a math question but it
This is a general question concerning technology decisions for a product development. My aim
This is a general question. And may not be specific to datagrids. How can
This is a general question about character encoding when using MD5 libraries in various

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.