Hey guys -

Last month I released a state machine library for Ruby that provides
integrations for the various Ruby ORM libraries, including
DataMapper.  You can find the latest source at 
http://github.com/pluginaweek/state_machine.
I've also written a few articles on the library at http://www.pluginaweek.org.
Since that first official release, I've been working on tightening the
integration with DataMapper and think I have a pretty solid base as of
0.7.2.

An example of a very simple state machine with DM would be:

class Vehicle
  include DataMapper::Resource

  property :id, Serial

  state_machine :initial => :parked do
    event :ignite do
      transition :parked => :idling
    end
  end
end

You can read more about DM-specific functionality at
http://api.pluginaweek.org/state_machine/classes/StateMachine/Integrations/DataMapper.html.

I wanted to take this opportunity to start conversations with some
folks here who either use dm-is-state_machine or have an interest in
using state machines in their DM projects.  Specifically, I would be
interested in:
* Any / all feedback on state_machine and the integration with
DataMapper... e.g. Are there things missing or that can be improved?
Does the integration fit in with DM / Merb conventions?
* Is there interest in migrating dm-is-state_machine's implementation
to internally delegate to state_machine so that you can take advantage
of the additional features?

On the second point of dm-is-state_machine, I've already begun
experimenting with this idea and have created a fork of dm-more which
replaces the internals of dm-is-state_machine with a dependency on
state_machine.  See http://github.com/obrie/dm-more.  The advantage I
see to this is fewer things to maintain in dm-more and progress
towards a common state machine library across projects.

Rather than make this message any longer, I'll leave it at that.  I'm
really eager to hear feedback and hope the project will end up helping
out some folks in the community.

Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to