Java MongoDB-可用于MongoDB的不同ORM工具之间的比较

Java MongoDB-可用于MongoDB的不同ORM工具之间的比较,java,mongodb,orm,Java,Mongodb,Orm,我必须在当前使用MongoDB的项目(基于Java)中集成ORM框架。有谁能让我知道以下可用框架的比较或优点/缺点(如果不是所有框架都可以的话,至少有5个是最好的),这样我就可以决定在我的项目中使用哪一个 1. Morphia. Type-Safe Wrapper with DAO/Datastore abstractions. 2. Spring MongoDB. Provides Spring users with a familiar data access features includ

我必须在当前使用MongoDB的项目(基于Java)中集成ORM框架。有谁能让我知道以下可用框架的比较或优点/缺点(如果不是所有框架都可以的话,至少有5个是最好的),这样我就可以决定在我的项目中使用哪一个

1. Morphia. Type-Safe Wrapper with DAO/Datastore abstractions.
2. Spring MongoDB. Provides Spring users with a familiar data access features including rich POJO mapping.
3. Morphium. Feature-rich POJO Mapper including features like declarative caching, cluster awareness, validation, partial updates supports aggregation framework.
4. Mungbean (w/clojure support).
5. DataNucleus JPA/JDO. JPA/JDO wrapper
6. lib-mongomapper. JavaBean Mapper (No annotations).
7. MongoJack. Uses jackson (annotations) to map to/from POJOs and has a simple wrapper around DBCollection to simply this.
8. Kundera. JPA compliant ORM. Works with multiple datastores.
9. MongoFS. Enhanced file storage library with support for file compression, encryption, and Zip file expansion. Can be used on top of a GridFS-compatible bucket.
9. Jongo. Query in Java as in mongo shell (using strings), unmarshall results into Java objects (using Jackson)
10. MongoLink. Object Document Mapper (ODM.) Uses a plain java DSL for mapping declaration.
11. Hibernate OGM. Provides Java Persistence support for MongoDB.
12. Morphix. Lightweight, easy-to-use POJO mapper, with object caching and lifecycle methods.

这取决于您在应用程序中所做的工作以及您对MongoDB的适应程度

我通常使用轻量级库,直到我看到重量级库被广泛使用


如果您使用的是Spring框架,请使用Spring数据,否则我将使用jongo,它非常强大,能够像MongoShell一样运行查询。它确实是以不太抽象为代价的,并且您的应用程序需要繁重的工作

你有什么要求。积垢操作2。高性能3。便于携带。可测试性这些是非常一般的要求。我很确定所有的api都是围绕这些api构建的。你可以从上面的任何api开始,如果你在文章中添加了更具体的要求。我建议Morphia,因为它在批量操作方面有很好的性能(甚至比Mongo本机驱动程序更好)!可移植性和可测试性不是很好的标准,因为所有这些库在这些方面都很好!