Hacker News new | ask | show | jobs
by the__alchemist 409 days ago
You bet. Still the easiest (IMO) for websites, perhaps of any language.
1 comments

It easy but having separate app spaces by default instead of just one like Laravel makes it slightly harder for just a website case.
You can use a single app, and it is probably the best way to go for the majority of projects - definitely the case for simple ones.
Concur. The multiple app paradigm doesn't fit any site I've built in Django. I make one called main.
Idk if it's best practice, but I usually like to make apps similar to components, where I have an app for accounts which handles user accounts, and a files app which handles all the dimension and fact tables around user uploads, and a social app for social features, etc.

It makes it easy to compartmentalize the business logic in terms of module imports.

This sounds similar to a modular monolith design. But you have to be careful not to directly import things between apps and especially not to make foreign keys between the models of different apps. We ended up doing that and just wishing it was one big app.

Modular monolith is a good idea and if you want to do it in Django then make small apps that just expose services to each other (ie. high-level business functions). Then have a completely separate app just for the UI that uses those services.

Yeah. I was thinking a modular monolith since it's a django project, and I think that's django's sweet spot since it comes with so many things bundled.

For a true modular design I'd probably step away from django to a less comprehensive framework or just write in golang.

Have you tried the monolithic composite approach instead?