Hey Chris,

I'd usually opt for the multiple conditionals rather than the duplication.  It
usually works out happier in the long run.  And it's NOT spaghetti, by my
definition.  Spaghetti to me is unstructured code, breaks, gotos, etc.  Good
old CFIFs may be ugly, but they get the job done.  If you really hate them,
you can make your own CustomTag to conditionally display a menu option.  Give
it attributes RequiredAccessLevelList, Text, URL, and away you go.  Should
clean up your code.

Practically, though, you have to set some limits on the amount of conditional
logic in a single fuse.  I think you've been using my SoftwareMetrics tag? 
This is exactly the time when it should be most useful.  Check the complexity
metric.  If it's getting up over 10, you should probably be thinking of
breaking the fuse down further.  Of course, if the complexity is getting up
that high, you might also want to re-consider the design of the interface/menu
- do you really want/need to display ALL of those options on this page?  Or
should there be a further level of nav, etc.

Anyway, duplication is the child of darkness, even worse than complexity. 
Wear garlic around your neck, and sprinkle holy water on it to make it go
away.

Let us know how you go,

Lee Bjork Borkman
Bjork.Net - ColdFusion Tags by Bjork

-----------------

"Chris Lott" <[EMAIL PROTECTED]> wrote:
[...]
My question
wasn't about authenticating the users, but with what comes next. I'm
wondering how other people handle delivering different tools to different
levels of users... do they have a lot of conditional processing on each
page, which turns into spaghetting pretty quickly, or do they have four
different fuseactions, each dedicated to a different type of user (assuming
they have four levels of user), or do they just code a separate section of
the site for each kind of user (which wouldn't allow much code reuse).
[...]

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/fusebox or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to