G
Guinness Mann
I guess if you're maintaining your code more often than
running it... if you're having the ASP engine process
1,500 lines of code for every single page in your
application, even the ones that only use 20 lines...
Gosh, I hope that's not what the OP was suggesting. It's certainly not
what I'm proposing.
The way I design my subsytems is to have a central page to which all of
the forms in the subsystem post. This page doesn't do any display work
at all, but functions sort of like a Windows message loop. It looks at
the current state (it took me a while to figure out how to persist state
in this stateless world!) and the user input and decides what page to
serve or what process to invoke. The pages that get served have their
own processing portions and display portions.
That way, for any given trip through the loop, only a small portion of
the code is processed. With respect to code size, I don't see the
difference between that and having the decision logic spread across a
bunch of inter-related pages.
The big difference is that when it comes time to modify the logic it is
all contained in a central place where it can be easily grokked without
having to follow it around a bunch of pages that have processing logic
mixed up with the presentation layer.
Personally, I'd rather see them separated out by functionality,
purpose, etc.
Exactly!
Michael Kersey mentioned:
the approach you use is sometimes called the "fusebox" approach
I'm intrigued. Tell me more. What are the characteristics of
"fusebox" programming?
-- Rick