Comparing Transfer and Reactor
March 21, 2007 ·
Following up on Matt Newby's comment on my recent post about Transfer, here's a bullet point comparison of Transfer and Reactor that I hope will help people who are looking at ORMs and trying to decide which one to use:
- Reactor implements the Active Record pattern, with objects knowing how to handle their own persistence.
- Reactor provides a rich OO-style query expression mechanism (you construct queries as OO data structures, then have Reactor execute them).
- Reactor can deduce the basic structure of your database tables for you - you only need XML to describe relationships or to alias columns and tables.
- Reactor generates "record" objects, gateways and metadata.
- To customize a Reactor object, you extend the generated object (and Reactor does not overwrite it).
- Reactor does not provide caching.
- Transfer focuses on business objects and provides a data access layer - you ask Transfer to load an object, you ask Transfer to save an object.
- Transfer provides a SQL-like abstraction, called TQL (Transfer Query Language), that makes handling queries of related objects really easy.
- Transfer does not introspect the database - you need to specify all of the table structure and relationships in XML, but you can also organize those object mappings into packages and have plenty of control over how the relationships are represented in the object model.
- Transfer builds your business objects on the fly, rather than laying down CFCs for you.
- To customize a Transfer object, you can either write CFML functions directly in the XML (and Transfer will include those when it generates the business objects on the fly) or you can write a "decorator" object to wrap any Transfer-managed business object.
- Transfer provides a sophisticated caching layer.
Tags: coldfusion · orm