Tell me more ×  So I have completed my OO analysis and design of
a web application that I am building and am now getting into
implementation. Design decisions have been made to implement the
system using Python and the web development framework Django.  I
want to start implementing some of my domain entity classes
which need persistence. It seems that Django would have me
implement these as classes that are inherited from the Django
models class in order to use the Django ORM for persistence.
However, this seems like far too strong coupling between my
class entities and the persistence mechanism. What happens if at
some stage I want to ditch Django and use another web
development framework, or just ditch Django’s ORM for an
alternative? Now I have to re-write my domain entity classes
from scratch.  So it would be better to implement my domain
classes as standalone Python classes, encapsulating all my
business logic in these, and then use some mechanism (design
pattern such as bridge or adapter or ???) to dele