Tuesday, December 24, 2013

Re: Django ORM & DB backend coupling

Good points. The case at hand takes place when thinking about developing a django application on top of a service-oriented backend system that provides you with CRUD operations for data and abstracting the DB engine or storage mechanism that this backend is using. It does make sense to integrate this with the ORM to me but i find it quite strange that django is that coupled to mostly relational database engine reflected by it's architecture.

On Tuesday, December 24, 2013 5:30:10 PM UTC+2, Andrew Farrell wrote:
This seems like it would be a reasonable idea if the API represented a data model that was fundamentally relational in character. However, many are not. An API should be designed such that it is the best way to interact with its data model, so trying to shoehorn it into an ORM's API seems like it would make it less usable.

For what reasons would one want to use a REST API through the functions exposed by the ORM and not through the python API itself?


On Tue, Dec 24, 2013 at 10:15 AM, Rakan Alhneiti <rakan.a...@gmail.com> wrote:
Hello all,

I was discussing the topic with a couple of my friends that Django's ORM is / is not tightly coupled with databases in general. My point of view was that django is not tightly coupled because you can write custom DB backends to deal with other sources of data such as a Restful API service while still taking advantage of the ORM.
However, looking at the current architecture & implementation, i guess i can say that it is coupled because writing a custom backend would require you to write database-specific classes such as the DatabaseWrapper, Operations, Features .. etc.

Is wiring Django's ORM with a Restful API service rather than MySQL or Postgresql a good idea? or the better one would be writing ORMs from scratch that are API-based rather than database-driven? 

Please share with me your thoughts on this topic.

Regards,
Rakan

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0f0d7924-3554-4052-bfb0-5c447282845f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c3561b4b-9a85-4f51-90e5-a58cc6736b44%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment