[Python-il] [pyweb-il:393] Re: [pyweb-il:389] Re: a question re pluggable apps

benny daon bennydaon at gmail.com
Tue Sep 1 15:38:45 IDT 2009


I take a different approach. While generic keys are the best solution they
are not easy to work with. I like to start with using a foreign key to
whichever model and if the app is successful and I want to make it
pluggable, I'll refactor it to use generic keys.
IMO, It's OK for your project-specific apps to depend on each other. I just
try to keep the dependencies clear, so I don't get spaghetti code and coding
can be distributed.

2009/9/1 Shai Berger <shai at platonix.com>

>
> I think the recommended approach is to avoid coupling applications. This
> means
> you should not change the other app nor do o2o mentioning it explicitly,
> but
> write your extending model so that it's compatible with any model (or,
> perhaps, any model which supplies some interface) and use a generic foreign
> key. This is the approach taken in django.contrib.comments and
> django-tagging,
> if I'm not mistaken.
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pyweb-il at googlegroups.com
To unsubscribe from this group, send email to pyweb-il+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://hamakor.org.il/pipermail/python-il/attachments/20090901/7ef4e4ab/attachment-0001.htm 


More information about the Python-il mailing list