私は今日、Neo4j を見てきましたが、非常に興味深いと思います。Neo4J と高度に統合された Web アプリケーション フレームワークがあるのだろうか? 基本的にはNeo4Jで実験を始めたいと思っています.Webフレームワークの明らかな選択肢があるのではないかと思いました.もしあれば、それも試してみたいと思います. 何でも知ってますか?
8 に答える
また、Structr ( https://structr.org ) も参照してください。
(免責事項:私はStructrのプロジェクトイニシエーターです)
Coils は、Neo4j WebApps を構築するために特別に設計されています。
PHP に興味がある場合は、Yii2フレームワークを試すことができます。neo4j の公式サポートはありませんが、Yii2 はキャッシングで素晴らしい仕事をするので、neo4j 用の php ドライバーを使用できます。追加で行う必要があるのは、Yii2 のData Cachingを使用してクエリをキャッシュすることだけです。
独自のActiveRecordクラスを作成することもできるので、neo4j を Yii2 のネイティブ関数で使用して、データのクエリと表示を行うことができます。
過去にこのリポジトリを使用してプロジェクトを作成しましたが、古いバージョンの neo4j 用です。そのため、以前のバージョンの neo4j を使用したい場合を除き、それは避けたほうがよいでしょう。
一般に、選択したフレームワークは、neo4j をネイティブでサポートしていない可能性がありますが、その言語のドライバーの 1 つをいつでも使用できます。直面する唯一の問題はキャッシングであるため、クエリのデータキャッシングを簡単に統合できるフレームワークを選択することをお勧めします。
neo4j をネイティブにサポートするフレームワークを見つけたとしても、最終的には生のクエリを作成することになるため、キャッシングだけが重要であると言っているのです。グラフ データベースは非常に複雑なクエリを実行できるため、すべての機能をフレームワークに実装するのは困難です。
I would definitely check out the neo4j gem (disclaimer: I'm one of the maintainers). It offers a really rich way to access a neo4j database using ActiveNode
and ActiveRel
models. Not only can you do a lot of the basic things that you can do with a library like ActiveRecord
, but you can easily perform deep queries that take advantage of the power of Neo4j like this:
# Find all blog posts written by people who have commented on the blog_post in question
blog_post.comments.author.posts
# Find the number of distinct students that the instructor in question
# has in common with other instructors
instructor.lessons.students(:student).lessons.
instructor(:other_instructor).pluck(:other_instructor, 'count(DISTINCT student)')
Not only is this a really nice way to write cypher statements in Ruby, but you can also make a part of a query and pass it around to be built up in different places in different ways for DRY querying.