Transfer….Ohhhhhhh, I get it! HAPPY ME!!!!! ORM!!!! LOVE ORM!!!
ORMI LOVE Reactor, especially when used with MGU to get my prototype, or simple apps up and running quickly.
Then… last night I listened to Mark Mandel's Connect presentation and Woooaahhhhoooaa.
It clicked.
Why did it take so LONG to grok that an Object (e.g. a user who runs a blog) should be thought of as…. Well…, an Object: NOT a bunch of queries that I manipulate to represent or create my "target Object".
Take the user who runs the blog:
SELECT UID, EMAIL, SuperCoolFactor
FROM tbl_users
WHER UID = #UID.1# OR UID = #UID.2# OR UID = #UID.3#
_____________________________________
SELECT COMMENTS
FROM tbl_comments
WHERE UID = #UID.1# OR UID = #UID.2# OR UID = #UID.3#
_____________________________________
SELECT ENTRIES
FROM tbl_entries
WHERE UID = #UID.1# OR UID = #UID.2# OR UID = #UID.3#
_____________________________________
Now write some code to make these queries usable,
Then write some code to give me some flexibility.
Then refractor my caching system to suit this sites needs.
Then more code, more code, more code… (I love CF so I do LOVE coding)
And then:
PRAY I AM NOT MAKING ANY DUMB ASS DESIGN DESICISIONS!!!
That is a lot of hours I am going to have to think: cause I AM NOT A GREAT OO PRGRAMMER, (Not saying my chops aren't getting sharper cause they ARE, but I am a guitar player, political junkie, not a natural borne programmer)
They call Reactor an ORM - object relational mapping tool for db's - it's the coolest thing in the world and helps me get stuff done faster with less bugs.
But what about: Object Relational Modelling?
What if the REAL model, the db got abstracted from me? What if I didn't have to worry about how the db is modeled, which is inherently made for speed and my DBA's happiness and not for dudes trying to rip out applications with changing requirements that have a hard deadline?
What if I got from the model/db, what I want, an object of several users and the important info, say their entries and comments. I could do what I wrote above or….
qUsers = transfer.list("user.User", "#list.of.UID's#");
With Transfer, that's it (PLUS your XML configuration). I get what I want. NOT A LIST OF USERS! But an array of Structs with the Keys UserName=string, UserID=UUID, PostIDs=array of Post ID's the user posted, CommentID's = an array of Comment ID's the user posted.
Woooohhhaaaa, R U SERIOUS!?!!?! I ask for Objects, and I don't build Objects????!?!?!?!
I hate be so late to this game but that just blows my mind.
My DBA and I are going to get along JUST FINE now a days!
I thank that FAST talken Auzzi Mark! You have just made my pee brain a little bigger, will make my applications more fun to program, and make my life: moreGooder.
Jezzzz, Get Objects and not make them, wow, that is sooo cool.






Loading....