People will still care about DAOs; separating persistence code is
still useful, it's just very different from CRUD style code.  But
you're right, you set up your DSN, point Hibernate at it, and you only
think about objects instead of the DB.  I'd highly recommend everyone
that does OO-ish CF to take a good hard look at Hibernate.  Pick up
some example code and play around with it at least.  It's an amazing
piece of software, and has so many little things to teach developers,
even if they're not going to be using it in "real life".  In
particular, the fact that "you should never build ORM, it's too damn
hard, and there are already existing solutions."  :)

cheers,
barneyb

On Mon, Mar 2, 2009 at 11:21 PM, Alan Livie <[email protected]> wrote:
> I've been playing with Groovy and Hibernate for about a week now and what is
> brilliant about it is when building something from scratch you no longer
> think about the db in the way you do usually.
>
> You just create a database and forget about it. You focus on your domain
> model, adding a few Hibernate annotations along the way and when you call
> save() in your Hibernate session it creates tables, columns and saves all
> the data. Inheritance hierarchies etc not a problem.
>
> If cf9 can work with Hibernate in the same way (maybe annotations in
> cfscript and/or a new attribute on the cffunction tag) then in a year or two
> no one will even care about DAOs and Gateways.
>
> If you want to understand things like Data mapper, Unit Of Work etc to get
> an idea of what Hibernate is doing then read Fowler's Patterns Of Enterprise
> Application Architecture ... then be thankful someone else has done the ORM
> work because it looks like a complete nightmare trying to build an ORM!
>
> Alan

-- 
Barney Boisvert
[email protected]
http://www.barneyb.com/

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

Reply via email to