> 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 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 addition, you can use the XML document like a struct,
though there are extra levels of nastiness in there (like xmlChildren
and xmlAttributes).
One of the neat things about using XSL for your transforms is that you
can let your system's users write the XSL (rather than you the
developer), without fear that they'll be able to hurt the application
or the system it's running on (aside from infinite loops and such).
That's impossible with structs, becuase in order to use structs, you
have to write CF code. Not sure if that's relevant to your situation,
but it's something to keep in mind.
cheers,
barneyb
On Fri, 23 Jul 2004 23:13:16 +1000, Michael Kear <[EMAIL PROTECTED]> wrote:
> 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 gather submenu items etc and creating an object to be passed back for
> sitemap, navigation menus, and some authority access functionality,
> depending on the context.
>
> 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?
>
> Cheers
>
> Mike Kear
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

