Oh, awesome! I wondered what that configure area was for.  :) I feel
like such a newb again learning how to work in Mach-II, but I can
already see some great benefits! You guys rock!

On a side note, anyone know why I can't post to the group from my
email? Google groups keeps bouncing it back saying "we're writing to
let you know that the group that you tried to contact (mach-ii-for-
coldfusion) either doesn't exist, or you don't have permission to post
to it." The only way I can post is by coming to the website, even
though I'm joined and everything.

--

Summer S. Wilson
Software Engineer II
AgriLife Information Technology, Texas AgriLife
979-458-1458 (p) / 979-845-0829 (f)
2468 TAMU; 110 TAES Annex

On Aug 31, 9:54 am, jlcox <[email protected]> wrote:
> Just another general observation not directly related to the topic at
> hand...you're (re)creating a instance of your DAO and Gateway each
> time you call getCategoryList/getCategoryDetail. It's probably more
> efficient to create those objects in your configure method and then
> just reference the instance, i.e.,
>
> <cffunction name="configure" access="public" output="false"
> returntype="void">
>    // ...assuming DSN is a property in your configuration file.
>     <cfset variables.categoryDAO = createObject("component",
> "model.categoryDAO").init(DSN = getProperty("DSN")) />
>     ....same for categoryGateway
>  </cffunction>
>
>  <!--- Gets detail on a single Category --->
>     <cffunction name="getCategoryDetail" access="public"
> output="false" returntype="category">
>        <cfargument name="event" type="MachII.framework.Event"
> required="true" />
>        <cfset var category = createObject("component",
> "model.category").init( arguments.event.getArg("whichcategory") ) />
>         <cfset variables.categoryDAO.read(Category) />
>         <cfreturn category />
>     </cffunction>
> </cfcomponent>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to Mach-II for CFML list.
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/mach-ii-for-coldfusion?hl=en
SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
Wiki / Documentation / Tickets: 
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
-~----------~----~----~----~------~----~------~--~---

Reply via email to