First of all I would like to say that Doug Hughes deserves a long vacation when all this is said and done. He has been churning out code behind Reactor like a madman.
I would like to offer you reason number 237,238,192 to start using Reactor for ColdFusion….
There is still some fine tuning to be accomplished and the API isn’t completely nailed down, but it looks as if the following is about to be committed.
Say I have a user class and have instantiated it as User. Now, let’s say that the user has an Address, and the Address has a property of Street. As is typically done with an object relationship like this, I can access the Street property like this:
Then we can mutate the property Street like this:
User.getAddress().setStreet(“1234 Dirt Road”);
This is nothing new… but what is new is how I would save a change to the Street. Traditionally I would have to do something like this:
With cascading saves I can now do this:
This will now save all child objects (and their children and so on…) of User. BAMN! (it’s a new word) I am currently developing a mortgage loan origination application that I feel is a greate candidate for Reactor. I have very big complex objects to carry around as part of the User facade. For example situations where a User has an Application, which has one to many Borrowers, which each have Properties, which each have Liabilities, and so on and so on many levels and many different trees. The realization that now I can simply do
User.save() has me practically jumping off the walls!
As I mentioned above, API is not locked down yet and there are some things that still need to be defined. For instance, you may not always want to do a cascade delete/save. That said, there are discussions in the works for passing some type of boolean value such as this:
If any of this sounds as exciting to you as it does to me, and you are not already playing with Reactor, go check out www.doughughes.net or join the Reactor email list by sending an email with the subject “subscribe” to email@example.com.