Django and Neo4j without Neo4Django -
i'm build django app neo4j (along postgres), found django integration called neo4django, wondering if it's possible utilize neo4restclient only, like, disadvantages of not using neo4django? using neo4-rest-client only, give me more flexibility? when creating models neo4django, seemed there no difference between modeling graph db , relational db. missing anything?
thanks!
you can absolutely go ahead neo4j-rest-client or py2neo, without using neo4django. in same way, can utilize other database driver you'd time using django, rest client, etc.
what'll lose? model dsl, built-in querying (eg, person.objects.filter(name="mohamed")
), built-in indexing, , lucene, gremlin , cypher behind that. things much easier- setting arbitrary property on node- you'll need larn more how neo4j works.
you'll lose of shortcuts django provides work neo4django, get_object_or_404()
, of class-based views work querysets.
what'll gain? absolute powerfulness on db, , easier time tweaking db performance. though neo4django isn't lib traditional orms in python sphere, trade-off of powerfulness vs provided ease similar.
that said, 2 can work together- can drop downwards neo4django underlying rest client nodes , relationships anytime. utilize model_instance.node
underlying neo4j-rest-client node object model, , from neo4django.db import connection
wrapped neo4j-rest-client graphdatabase
.
on whether you're missing something: neo4django written re-use powerful developer interface- django orm- should sense similar writing models postgres. i've written bit odd feeling in past. think part of problem might lib doesn't highlight graph terminology new graph-interested devs expect- traversals , pattern matching- , instead dresses techniques in django query clothing.
i'd love thoughts, or know you'd library isn't doing :) luck!
django django-models neo4j neo4django
No comments:
Post a Comment