0

Transfer….Ohhhhhhh, I get it! HAPPY ME!!!!! ORM!!!! LOVE ORM!!!

ORM

I 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.

tags:
ORM
 
Man I love when things click like that. I haven't seen that presentation, but Mark is a sharp guy!

One way that I use to explain Objects to even non programmers is this. Spend some time thinking or writing down every "noun" that exists in your system: Person, User, Role, Company, Department, etc... Typically every noun will be an object. Afterwards, wire them together on paper or white board and see which objects hasOne or hasMany of others. This very simple excercise is a great way to get started on a new system.

I remember the first time that this now seemingly obvious concept really clicked with me and I actually layed there in bed unable to sleep processing it all in my head. It was like "viewing the Matrix". :)
 
posted 1053 days ago
Add Comment Reply to: this comment OR this thread
 
 
Funny thats happened to me this moring when I was in bed!

Noun... verb... yes, yes, yes. It makes WAY better sence today.

Now i can remove some of the "construction" of my Nouns and focus on there orginization (like a good naming convention), the objects "objectness" (struct, array, query), and then have a field day when it comes to thinking about the VERBS! Like doThisTask, as opposed to:

bummer me :(
now i have to go getPerson :|,
then go getPersonsData :|
then make the object :(
then doThisTask :(((... and hope I did it right.

Its only cause of the good, FRIENDLY, and SUPER sharp programmers like you that let someone like me "GET IT".

I LOVE GETTING IT! I WANT MORE!!!!

Are you all using Transfer for InstantSpot? Any other ORM's?

And Thanks mucho for instantSpot!
 
posted 1053 days ago
Add Comment Reply to: this comment OR this thread
 
 
We are using Reactor as our ORM for InstantSpot. Overall, it has been a big benefit to our development, but there are some troublesome performance issues that we have had to work around. So far the benefit of such easy management of object hierarchy and the ease of making changes has overshadowed the performance costs, and we have started caching the heck out of everything. While I am still a strong advocate of Reactor, Aaron and I both want to look at using Transfer for our next project.
 
posted 1053 days ago
Add Comment Reply to: this comment OR this thread
 
 
Me too, I love, love, love Reactor.

I was just FLOORED at what i got Transfer to do this morning in 30 min.

I'm staring into space just thinking of the possibilities that I DON’T know about and the possibilities that I DO!
 
posted 1053 days ago
Add Comment Reply to: this comment OR this thread
 

Search