[thelist] CFMX: user-specific menus

Steve Lewis nepolon at worlddomination.net
Thu Apr 28 14:11:04 CDT 2005


Chris wrote:

> I am pondering how best to render the menu.
> 1. Build the entire menu via a DB query at the point of login, and cache 
> entire string in session - maybe 4kb. Then <cfoutput> for every page.
Why store the menu as a string?  You could store it as a struct, which 
is more flexible -> allows you to perform calculations/modificaitons on 
the menu options should the need arise.

> 2. Query DB on _every_ page access and build dynamically with <cfoutput 
> query="..."> and <cfloop>. Would be best if combined with querying the 
Unless you cache the unique user-menu-query (user A's menu is cached 
under a different query name than user B's menu) in the CF Query Cache, 
I would generally lean away from this.

> - Application-scope XML rendered via session-scoped XSLT seems a bit OTT.
Yuck.  XML should not be used for internal representations.  It's 
intended purpose is as a data transport medium.  Greater minds than ours 
have gone down this road and found the limitations.

-- 
Steve Lewis



More information about the thelist mailing list