[MonoTouch] Catnap: ORM Targeted To MonoTouch

Tim Scott tscott at lunaversesoftware.com
Thu Oct 8 22:04:22 EDT 2009


I have created a rudimentary objection relational mapper (ORM) using sqlite3
with a specific goal of improving the MonoTouch development experience.
It¹s called Catnap.  Find it here:

http://code.google.com/p/catnap-orm/

A few comments.  First, it¹s very basic.  The immediate goal is to escape
the mire of writing data access code and lots of dynamic SQL.  Second, it is
definitely alpha.  I am only dipping my toes into MonoTouch development;
indeed I have only yet deployed to the simulator.  Hence, Catnap has only
been really tested in very basic scenarios.  I would love for folks to try
it in their applications and give feedback or, better yet, contribute to its
development.  It you are willing to roll up your sleeves, I feel like
together we can make it  a very useful tool for MonoTouch development.

Here are some of the features:

* Mapping is done via a fluent interface
* Mapped entities inherit from IEntity interface
* Mapped collections :
> * automatic loading - lazy or eager, specified per collection
> * automatic cascading - saves/updates and/or deletes, specified per collection
> * filtering - criteria specified per collection
* Control connection and transaction boundaries via a basic UnitOfWork
context 
* Repository<T> base class provides basic operations
* IFindSpec<T> provides means to abstract find queries
* DbCommandSpec provides a way to create and execute any parameterized query
(similar to IDbCommand)
* Support for Linq predicates for finding and filtering collections (very
limited at present)
* Database migration utility. Provides automatic deployment of database
changes based on migrations (forward only) that you write
* No dependencies except sqlite3.dll

There is a link to a Google group on the code site.  Please chime in if you
are trying it out.  Let us know how it¹s going, and if you want to
contribute.

Cheers,
Tim Scott

P.S. I should give props to Frank Krueger, who posted sqlite3 code on this
list that got me started.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20091008/aad79151/attachment.html 


More information about the MonoTouch mailing list