(Updated 11/01/2008) Ubik is no longer actively developed. As much fun as it is to work on,
neither of the original developers is able to find the time.
The mailing lists are still being monitored. Anyone who might like to take this project over is invited
to make themselves known there.
Project Goals and Plans
Object relational mapping has been around for a fairly long time. The most complete and usable ORMs that
exist in the .NET world however are being used mainly in server-side development behind web services and
sites, rather than in rich client applications. This is probably due in part to the fact that most of the
progress in ORM has come from the Java world, where the vast majority of development has been server-side.
.NET's excellent desktop application support needs to be complemented with an ORM that provides higher-level
features for this environment.
The NHibernate project and many others (see 'Links' below) provide ORM facilities in .NET, and generally offer
more flexibility than Ubik in terms of supported platforms, application architectures and mapping transformations.
The goal of Ubik is to provide ORM within a framework that in an intergrated manner solves many of the
design problems still left to the programmer by other frameworks. In terms of application
architecture, Ubik is much more prescriptive in some areas - this allows for features like out-of-the-box
networking and event support - but if you don't need these features, Ubik may not be for you.
Building an ORM that will operate effectively in a client-server application poses some unique challenges:
- Cached and displayed data must be kept up-to-date
- Sessions are long-running
- Roundtrips to the server are slow
- The transactional isolation services of the database cannot be leveraged very well
Ubik foregoes some of the transparency and elegance of other ORMs by addressing these problems - for instance,
the diff-based dirty object checking of NHibernate is not considered feasible when sessions are long-lived
and can accumulate a large portion of the database in the session identity cache. It is intended that over
time the client API will be refined, however the most important issues being addressed by Ubik at the moment
are in the back-end.
The out-of-the-box networking functionality provided by Ubik greatly reduces the amount of time required
to produce desktop (Windows Forms) applications that can stay current through persistence-layer events
rather than by re-querying data. This is due to Ubik's message-based architecture, which distinguishes it from
other ORMs. Object refreshing and persistence events are intrinsic to Ubik and require no additional code
to be written.
Ubik's client-side caching and the fact that cached objects are kept up-to-date with respect to the database
is beneficial when writing efficient applications. Controls and other components can maintain
references to domain objects without these domain object instances having to be replaced or manually
refreshed each time the database changes.
As well as assisting in desktop application development, Ubik aims to provide a rich programming model that makes
highly-abstract object-oriented programming possible. A focus has been made on ensuring that user code can remain
completely unaware of the side-effects of methods with respect to the persistence layer, and that objects
can behave consistently regardless of their persistence state.
Ubik is still in development and there are still puzzles to piece together. While the goal of this project,
and surely of many others, is to create the 'ultimate' ORM within its problem domain, a concerted effort
is being made to keep the system stable and useful at every step of the way.
To see where we are and where we're going, check out the roadmap.
Check out the excellent Grammatica parser generator,
which Ubik leverages in its OPath support.
Many of the concepts implemented in Ubik (and more!) are described in the book Patterns of Enterprise Application
Architecture by Martin Fowler.
If Ubik isn't what you're looking for, you might want to investigate a different style of ORM that also supports
OPath, the Wilson O-R Mapper; or NHibernate,
the .NET port of Hibernate, a popular Java ORM.