Re: CFC for dynamic menu?

2004-07-23 Thread Jeff Small
> If I needed multiple formats, I'd probably make a single CFC that has > three methods, one to pull the raw menu query (probably delegatin gto > a dedicated DAO), one to pull the menu as a structure, and one to pull > the menu as XML.  That's really a single job, so it makes sense to > have it all

Re: CFC for dynamic menu?

2004-07-23 Thread Barney Boisvert
> My approach in this situation would be to create a CFC that queries the > Database, then another CFC to wrap the Query results in XML. Would that be a > proper "MVC" approach? Couldn't you view the WrapInXML() CFC as a proper > "controller" method? If I needed multiple formats, I'd probably make

Re: CFC for dynamic menu?

2004-07-23 Thread Jeff Small
> Depends on what you're looking to do.  Structs are probably going to > be slighly faster, and they'll be more familiar as well (since you use > them all the time).  XML, on the other hand, will let you build the > navigation with XSL, which can be very advantageous in certiain > situations.  In a

Re: CFC for dynamic menu?

2004-07-23 Thread Barney Boisvert
> What's the best method of passing this object back from the CFC?   Should I > create an xml object?  Or a struct containing all the menu data and submenu > data? Does it matter? Depends on what you're looking to do.  Structs are probably going to be slighly faster, and they'll be more famili

Re: CFC for dynamic menu?

2004-07-23 Thread Jeff Small
> What's the best method of passing this object back from the CFC?   Should I > create an xml object?  Or a struct containing all the menu data and submenu > data? Does it matter? I can't speak for everyone here, but I love structs. I pass structs in and out of my CFCs all the freakin' time an

CFC for dynamic menu?

2004-07-23 Thread Michael Kear
I'm building a new site, and wanting to completely separate logic from database access from presentation code, and so I am building a CFC that (amongst other things) builds menus.  (There wont be more than 3 levels of menu)   It'll do all the queries on the database, looping over query objects to g