I shouldn't have given that specific example. My reason for bringing this whole issue up is that people say beginners' code has a lot of CFIF statements. I am using Fusebox now. So it elimates a lot of CFIF statement already, but I still feel that I have too many CFIF in my code. I am just looking for alternative, better, and more efficient methods to handle all of those conditional statements.
Johnny >I'd say that any application that allows file paths to come from the >URL is wrong, no matter the code. Second, any application that allows >mixed relative and absolute paths for the same file is asking for >trouble. And third, make sure you check for a leading "/" as well, or >you code will puke on *nix. > >Now as for the coding style, the former is definitely better, though >the whole block should be in a CFTRY..CFCATCH. In the second example, >you need a CFTRY around the second CFFILE, and having multiple nested >CFTRY..CFCATCH blocks gets too nasty to quick. Chances are good that >if that scenario arises, you'd be better off doing some abstraction >with either includes, UDFs, or a CFC. But again, I think it's >unlikely you would ever be in this scenario with a well designed >application. > >Also, don't use CONTAINS as your operator, use mid(url.dir, 2, 1) and >see if it's a colon. > >cheers, >barneyb > >On Thu, 27 Jan 2005 23:43:25 -0400, Johnny Le <[EMAIL PROTECTED]> wrote: >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192156 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

