How to call the Django-Admin style of providing much with less code How to call the Django-Admin style of providing much with less code django django

How to call the Django-Admin style of providing much with less code


In my opinion it's just good OOP design combined with a good meta-programming design.

First, a Model defines what is possible and how one should achieve that. Having this structured way of thinking about models enables one to create a set of base classes to represent common actions on said objects.

Combined with another set of good base classes in the form of Django viewsets allows one to translate all this to HTTP.

Please note the admin matured on the course of almost (over?) a decade now. In 2009 there was a lot more of boilerplate needed. It was "just" a process of removing it.


Please note the Django Rest Framework takes this idea and expands it so good that all of CRUD API design can be called "coding by configuration".


Something that you see so rarely, it doesn't have a generic term?

I'd call it extreme general-purpose coding. Something that tries to be as generally useful as possible, so a thousand users with a thousand disparate applications don't have to write a thousand different codes. Instead, they just declare what they want.

Every programmer sooner or later learns that you never do price = list_price * 0.9, you do price = list_price * (( 100.0 - DISCOUNT_PERCENT) / 100.0 ), and that at a later date you'll be querying DISCOUNT_PERCENT out of the database based on the customer ... Django-admin is that approach taken to the N'th degree.

[Edit]

Can't think how you get to a generic noun phrase from here, but Django's own slogan is worth mentioning in this context.

Django -- the web framework for perfectionists with deadlines.

[Edit 2]

"Metaprogramming done right "?