>>BTW, I've been using an alternate Page-like servlet structure (which I >>haven't put in CVS or anything -- but maybe I should put it in >>Experimental). Anyway, it makes much more significant use of >>exceptions. I have a feeling it would simplify what you are doing, >>since at any point you could raise a Forbidden exception. In general >>I've found that cleaner than doing security through if statements.
Putting on the software architect hat: Exceptions make life easier, but I personally feel that an 'exception' is a program error. A user trying to access a forbidden page should be trapped by normal code. Exceptions should be reserved for unexpected situations. Putting on the developer hat: It sounds like a much cleaner way to go. Puttin on the Java hat: In java catching an exception is MUCH slower then running an if test. I never tested python though. Overusing exceptions could get ugly long-term and wind up as unmaintainable as PHP. -Aaron ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel