2 ms·
I agree with the author about 99% of what's written here. Except for the preference for thin views (i.e. thin controllers and fat models). It seems to be me tha
by whakim 3y ago
I agree with the author about 99% of what's written here. Except for the preference for thin views (i.e. thin controllers and fat models). It seems to be me that the author goes to great lengths to decry the abstractions inherent in CBVs (and other patterns) which hide logic from the user and make code harder to read all in the name of "DRY". Except that pre-emptively moving your queryset methods into another model does exactly that! Sure, if you're repeatedly doing some super-complicated joining and filtering - by all means move your logic elsewhere. But my experience with this pattern (mostly in Rails codebases which seem to love it) has been tons of extra functions scattered around models that don't actually get used every time and often themselves become out-of-date.