|
Thank Sean,
It seems obvious now that you explained it, and I
feel myself a little stupid for asking.
I have to confess that trying to built a complex
system using design patterns in CFCs is making me feel like I'm back on
school again.
Anyway, let me know now I'm approaching a solution
design for my CMS, and a good understanding of the parts of it:
- the DAO is the persistence mechanism. I can
change my database for others or even WDDX or XML if I want.
- the Bean instantiates the DAO when it needs
to persist the content. It handles the business logic (I'm in doubt about
it).
- the Transfer Object uses the Bean to get me
a "snapshot" of the object, avoiding the business logic to "escape" from the
bean.
- the Gateway help me get collections of
related objects, this should not be managed by the DAO.
- the Facade uses all the other CFCs and is a
wrapper that actually enables the whole subsystem to be called externally,
acting sometimes like the main circuit of a fusebox.
I will eventually wrap the Facade with custom tags,
to have a simpler API for HTML and interface developers
- Am I'm missing something ?
Regards,
Marcantonio
Silva
|
- Re: [CFCDev] Should bean extend DAO ? Marcantonio Silva
- Re: [CFCDev] Should bean extend DAO ? Sean Corfield
