3 ms·
Same here. I tried valiantly to do some class based views the other day and my spidey sense started going off. Maybe I'll find time later to get those the way
by crucialfelix 14y ago
Same here. I tried valiantly to do some class based views the other day and my spidey sense started going off. Maybe I'll find time later to get those the way I want them but I suspect they will suck up more time than they will save.
It's a general problem with hierarchies of inheritance. Too many separate places where the actual functionality is, so you have to learn all of them and hold them in your head to understand the few pithy lines of code in front of you.
And that's the issue with the admin and forms. Hard to keep track
- camus 14y ago> It's a general problem with hierarchies of inheritance. And what do you suggest to make it easier for you to read, spaghetti code ? Django makes great use of mixins, mixins you can re-use to make your own views if you dont like the default generic views.
- crucialfelix 14y agoThat's what I was doing, using mixins. In a way it's no different than stacking decorators, but soon enough you get helper methods being called and cooperations between helper methods and you have no memory which class its implemented it. An IDE can help but that's an indicator that the solution has a readability problem.
- freshhawk 14y agoHow about loosely coupled components and code that makes the logical flow explicit? Tightly coupled frameworks with a lot of magic is a poor solution to annoyance at boilerplate/glue code in most professional situtations. That's not saying Django should do this, they want to create an easy to use, well integrated framework. That's saying why it might be a good idea to avoid tightly coupled frameworks when designing an application.