Question

I have intended to have an app. where I want to have different things having relations with each other and want to know that whether I should have them as just different models or as differnt apps. Obviously if this is student, teacher in LMS then they are necessary component of LMS while if this is Job, Professional and Company then there can be different things associated with a job , a professional can have his full profile with different features, company can have different directory listing e.t.c. like features.

So Company and professionals who are users also should be as diff. apps. and job as different app.? Will this way be fine? as Jobs app. don't always everywhere need to have professional data or employer all data other than just name. So it seems like it is more convenient to have them as diff. apps, so that it can be used somewhere else.So is that right way?

Or

As I also want this project to be flexible so will the above make it more complex? And should I just treat them as diff. models instead of diff. apps. as Company and Professional are users , for which django gives Profile features also. So is this right way?

Which way is better one?

thanks in advance.

Was it helpful?

Solution

There is no exact answer here, so it's my opinion.

It is always good to have several apps rather than one big app. Reasons:

  • apps becomes smaller and it's easier to maintain small pieces of code;
  • project structure becomes more clear, I just need to look at the file manager to see main parts of the project;
  • interaction between apps become explicit: easy to test and prevent unnecessary coupling.

Not every Django app should be pluggable. It's ok to have two apps that depend on each other (if you aren't going to distribute them seperately). It's like having two dependent functions: nothing is wrong with it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top