2014년 12월 24일 수요일

[casbah] casbah spray support

I would like to announce domain-mdb library. Basically it brings support of spray JsonFormats to casbah.
It solves two problems (i) first it allows to work seamlessly with domain objects from casbah (i.e. to use mongo collection as an iterable of a specified domain-type, not DBObject) and (ii) second it reuses conversions from domain objects to JSON objects (defined in terms of spray-json JsonFormat) to convert domain objects to DBObjects.
The library makes it very simple to maintain a chains like JSON api <-> spray <-> mongodb (casbah). Only few lines of code are required to build up fully configurable JSON and BSON formats (see samples in test code, `DomainMongoCollectionTest` "accept....json format"). 

saw they have something like this lib for reactive-mongo but not for casbah. 

You could find sources, installation instructions and samples in my github, http://github.com/nkdhny/domain-mdb

Hope, this library will be interesting for casbah spray users.



Great stuff Alexey!


댓글 없음:

댓글 쓰기