> Now server type was just 1=production, 2=dev, 3=test. 
> And as such no servertype table was ever made, I just had the cfml convert
the number to name in the cfm pages, like this:
> Server Type: <cfswitch... </cfswitch>
> Is this a bad practice? am wondering if this way of handling
> information is too much "putting business logic into presentation
> layer"

Although some people will disagree, yes I think this is a bad practice.
This isn't really a flex issue.  I don't see this so much as "putting
business logic into the presentation layer" as "putting data in code."

What you've got is a lookup table.  What happens if you add type 4=staging?
How many pieces of code will you need to update?  Much better in my opinion
to keep this information in a database table and join it in.

My experience is that over the development of an application, this kind of
switch-type generally evolves into a database table anyhow, so it's probably
better to make it one from the beginning.

David Chaplin-Loebell
Lead Software Architect
TLA Entertainment Group 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:3641
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to