Plan: ActiveData

February 22, 2006 § Leave a comment

Based on the encouraging responses to my original post on rails-core, I’ve put together
a plan of action. [Read more] for the details,
and stay tuned for the implementation.

[Update: Hat tip to Rubert Barrow for suggesting
ActiveSalesforce as a possible starting
point]

Just to summarize, the best plan
appears to be:

a) Create a plugin
(“activedata”)

http://wiki.rubyonrails.org/rails/pages/HowTosPlugins

b)
Define my own module containing my custom classes
(“ActiveData”)

c) Define a new generic
Query object, and test it for backward-compatibility
(“ActiveData::Query”)

d) Define
subclasses for methods I want to override,
e.g.,

* ActiveData::Base <<
ActiveRecord::Base, for generic
queries/updates

* ActiveData::Adapter
<< ActiveRecord::ConnectionAdapters::AbstractAdapter, to vend Query
object

e) Implement the CoreData
adaptor and query, as a separate subclass
(module?)

f) Write unit tests
validating all the above

And if this
all works, then we can discuss whether it makes sense to refactor parts of ActiveRecord (perhaps for
Rails 2.0) — but right now that would be
premature.

From Nathaniel
Brown
:

Emil Marceta, a local
Ruby guy here in Vancouver wrote this post to the vanruby.com mailing
list.

http://lists.vanruby.com/pipermail/discuss/2006-January/000050.html

It
describes how to use ActiveRecord’s validations against table-less data model
based on Rick Olson’s code here:

http://rails.techno-weenie.net/tip/2005/11/19/validate_your_forms_with_a_table_less_model

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Plan: ActiveData at iHack, therefore iBlog.

meta

%d bloggers like this: