3
3 Comments

Separate django apps?

Thanks to everyone who gave me feedback on my previous questions about picking a framework. I picked django and I'm actually making great progress on my first product (not sure if it'll sell, I don't really care, it's a great learning experience either way). Looking back, it seems ridiculous that I wasted so much time going back and forth on frameworks and languages.

Anyways, so as a general idea, I'm making an application that will have different games involving questions. Right now I'm starting with one game, but as I come up with more I'll add them as separate apps. I'm not sure how to handle questions. I'm thinking I want all games to use them, and for people to be able to add/edit their own. Should questions be its own app as well? I'm still working on understanding the concept of an app in django.

  1. 1

    I've been thinking about it some more. Initially I created the question model within the app for the game, but then I thought, if I want to eventually have other games utilize the same questions, it probably shouldn't be the first game's responsibility for adding, removing, and fetching them. I think I'm going to create a separate app for the questions.

  2. 1

    Well if you are fan of learn by example, go to my open source e-commerce project it is developed as set of apps in first place, now i included project as well to make it ewsy to start. However execution isn't perfect but i tried to break each aspect of e-commerce functions into small apps like accounts, catalog, sales, payments, financial, geo.. If i completely made each apps autonomous or less dependent on each other then all can have separate repos and make them self conscious to be resuable in other projects.

    Right now i am practically copied most apps to other project which defeats the concept of reusable apps.

  3. 1

    I also would like to know when it's appropriate to make a separate Django app, the documentation isn't so clear on that.