Ross, I am not a fan of ActiveRecord pattern, I prefer to keep domain model as free from persistance logic as possible. So the experiment with Pocketchangeapp was to show this approach using mongo-scala-driver.
On 18 фев, 04:01, Ross Mellgren <[email protected]> wrote: > There is a persistence-layer-agnostic layer that provides the form > generation support, field validation logic, and common modelling > called Record. It's fairly similar to Mapper except for the lack of a > SQL backend. > > I wrote a driver and record integration for CouchDB which I think is > somewhat similar to MongoDB though I haven't used it myself. > > Maybe you could check it out and see if it fits your needs? > > -Ross > > On Feb 17, 2010, at 2:19 PM, Alexander Azarov <[email protected]> wrote: > > > I am the author of mongo-scala-driver, it's the library to access > > MongoDB, document-oriented database. It is a part of a larger project > > which is using Lift, so I've quickly come to the idea to build a > > little demo application using mongo-scala-driver and Lift. And finally > > I decided to migrate Lift book's Pocketchangeapp demo to MongoDB -- I > > think it makes much more sense to compare persistance techniques using > > the same app. > > > I saw two alternatives: > > - Use pure scala objects (POSOs) for domain objects. Thus it would be > > necessary to provide some equivivalents to the Mapper's methods like > > toForm, etc. and the whole ProtoUser stuff > > - Create a Mapper replacement on top of mongo-scala-driver > > > No doubts the second way gives much more in terms of a library and in > > the best case this would make it possible to easily migrate existing > > Mapper models to MongoDB backend. But my personal goals were much > > closer to the first alternative, so it was done this way (however few > > methods of MetaMapper moved to the port) > > > Features: > > - Domain objects are more or less clean from persistance stuff, they > > more like ordinary Scala classes > > - All the functionality has been retained > > - I did my best to make the port straightforward -- it will be easier > > to compare both branches > > - File upload is done using GridFS, MongoDB's API for storing large > > binary objects > > - BigDecimal support is done using custom data type to mongo-scala- > > driver (it's not supported by MongoDB out of the box) > > > Links: > > *http://www.mongodb.org/MongoDB > > *http://github.com/alaz/mongo-scala-drivermongo-scala-driver > > *http://www.theliftbook.com/ Pocketchangeapp -- Lift book demo app > > *http://github.com/alaz/pocketchangeappPocketchangeapp backed by > > mongo-scala-driver and MongoDB > > > -- > > You received this message because you are subscribed to the Google > > Groups "Lift" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected] > > . > > For more options, visit this group > > athttp://groups.google.com/group/liftweb?hl=en > > . -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
