Hi Abhaya, I believe you are on the right track. While I am not a big fan of singletons (you could use pass the object to each function explicitly), the rest of the design seems sound. You could model your architecture as model classes in Django in a straightforward way.
In my opinion, the major aspect that you are not considering is - multi-tenancy. While SaaS might sound like a buzzword, it addresses some very important pain points. Does your application guarantee that the client confidential information of one client is completely isolated from another client in the case of a breach? Does your application allow client specific schema changes in the future? If you think these questions are relevant to you then you might want to check out Django tenant schemas <https://django-tenant-schemas.readthedocs.org/en/latest/>. Good luck! Regards, Arun On Wed, Mar 25, 2015 at 7:02 PM, Abhaya Agarwal <[email protected]> wrote: > Hi, > > I need to model four entities that share some attributes and behaviors and > also have some unique attributes and behaviors. I need to be able to refer > to them from other entities. And these entities are Singletons. > > Ex: online marketplaces. They share common attributes like website, contact > person, commission rates which are best stored in DB. But they differ in > how you upload data to them - one of them supports FTP, other Dropbox - > best modeled as implementation of an interface. There may be unique data > associated with these behaviors. FTP credentials, Dropbox credentials. > > Also a product may need to refer to these marketplaces (Ex: where all is it > going to be listed), so they need to be enumerable. > > I have considered class hierarchy + a central registry + on disk config > files. But since this is a part of a larger Django project, implementing it > like this kind of sticks out and integrating it with admin etc requires lot > more work. What are the other options to model something like this? I feel > like I'm missing something obvious. > > Thanks a lot! > > Regards, > Abhaya > > -- > ------------------------------------------------- > blog: http://abhaga.blogspot.com > Twitter: http://twitter.com/abhaga > ------------------------------------------------- > _______________________________________________ > BangPypers mailing list > [email protected] > https://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ BangPypers mailing list [email protected] https://mail.python.org/mailman/listinfo/bangpypers
