I have used a CFC and an xml file to handle links in one or two
applications. This system simply consisted of a getURL([event name],
[query string]) method that returned a static URL. I also used another
method that parsed static URLs into event name and event-args based on
the same xml schema.
A few reasons why I selected this strategy:
1) It was just easier to manage the URLs for the site that were
subject to change due to SEO demands. We were using a 404 trap method
and page caching system where if the .htm file did not exist the IIS
404 handler pointed to the application entry point (index.cfm) passing
in the static URL that was not found. If it could be matched to the
xml data, it was parsed, the request handled and the output cached to
a file with the same path as the URL. Subsequent requests would get
the cached page.
2) Some sites in the application did not want to use the static URL,
so this feature could be switched off and the getURL function would
simply return index.cfm?event=[event name][?query string]. Views never
needed to know whether they were using static or query string URLs.
3) URL parameters, whether from static or query string URLs could be
validated against the xml definitions.
I don't have the xml in front of me right now, but it looked something like
<dir name="somedir" defaultevent="somedefault">
<page eventname="showSomePage" pagename="somepage" mask="*-somepage-%">
<param name="foo" type="numeric" maxlength="" required="true"
position="1" />
<param name="doo" type="numeric" maxlength="4" required="false"
position="3" />
</page>
<dir name="somesubdir"..........
</dir>
-Stuart
On Mon, 14 Mar 2005 09:14:10 +0100, Salvatore Fusto
<[EMAIL PROTECTED]> wrote:
> hi,
> in my apps i use to store menu's, especially those for reserved areas, in
> xml files; those files are read by a recursive function so i can have
> multilevel menu's, and the relative menu's are generated: i can have more
> than 1 menu, 1 for each administrator, with different permissions.
> salvatore
>
> ----- Original Message -----
> From: "Steven Maglio" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Monday, March 14, 2005 1:46 AM
> Subject: Re: [CFCDev] Mach-II: Links Management
>
> > Yes.
> >
> > In Mach-II there doesn't seem to be a built-in way of centralizing link
> > management. So, I was wondering what other people are using with Mach-II
> > to provide this functionality? Or if they are not using anything at all.
> > Be it database, XML, or something all together different.
> >
> > Steven Maglio
> >
> > Phil Cruz wrote:
> >
> >>I'm not sure exactly what you're talking about. Do you mean using
> >>some datastore (i.e database, XML,...) to store urls that would then
> >>be used to dynamically generate (menu) navigation for a website?
> >>
> >>-Phil
> >>
> >
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email to
> > [email protected] with the words 'unsubscribe cfcdev' as the subject of
> > the email.
> >
> > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
> > (www.cfxhosting.com).
> >
> > An archive of the CFCDev list is available at
> > www.mail-archive.com/[email protected]
> >
> >
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the
> email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
> (www.cfxhosting.com).
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]
>
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]