Hi, my 2 cents:
surely you can theorically consider the whole domain, i.e. the blog, as a class 
composed by entry etc. but I think this is not real: in a real app you have to 
mediate between canonical oo principles and practice.
in other words, you can model your domain with an entry object, composed with 
his collection of comments: collection of object can be implemented with q 
simple query if you have to display them only, or with another type of 
collection (i.e. an iterator).
regards


-----Messaggio originale-----
Da: [email protected] [mailto:[email protected]] Per conto di Henry
Inviato: sabato 9 maggio 2009 4.07
A: CFCDev
Oggetto: [CFCDEV] Blog in OO?? Really?


I need a simple Blog app done quick, but when I got down into it, I
couldn't justify doing it in an OO way.

Service / Bean / DAO... with the Beans don't have anything smart to do
on themselves...

I came up with the Blog, Entry and Comment beans.  Blog has many Entry
(s); Entry has many Comment(s).

Then I couldn't think much methods that the beans above should have to
make them smart.

Then I thought about loading of blog / entry / comments from DB...
when to lazy load when not to... Array of Entry objects with an array
of Comment objects... Seems complicated, bloated and unnecessary for a
simple blog.

Transfer? Ya, that will help, but I'm not sure if I want to use it for
such a simple blog app...  and every bean will become Transfer's
decorators... What if I decide not to use it later?

CFGroovy + Hibernate? Ya, that sounds sweet, but... when this app
needs to be upgraded to CF9, I might have problem without disabling
CF9's hibernate support.

CFINSERT and CFUPDATE crossed my mind... I must be crazy.

Please help. :)  Should a simple Blog be in OO?

I should study BlogCFC over this weekend. :)


--~--~---------~--~----~------------~-------~--~----~
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