[thelist] webapp logic

Warden, Matt mwarden at odyssey-design.com
Thu Jul 6 17:16:19 CDT 2000


> of all the features.  The initial page would have a form (or something)
> which would submit to ITSELF, which would process the data and output it.
> All internal to one page or so.

That's how I do all my management-type web apps. Not because it's faster
(it's not), but rather because it's easier to manage. One file. No switching
file tabs on your editor. If you do it right, it's one of the easiest things
to write and for others to follow when they're making additions to your
original app.

> What do ya'll think about that?  Is there an advantage (process
> speed, less connections, etc.) in having just one or two pages for
> something, rather than having a multitude of pages, one for the initial
> page, one for processing featureX, another for featureY, etc.?
> Obviously I'd save myself some trouble (maybe?) in having multiple
> pages - the nested If-Else logic of a one-pager can be mind-boggling.

Encampsulate the code in subroutines. Use if-then logic to call the subs.
The good thing about having all the code in one file is you can move it to
whereever and (if it's written correctly) you only move one file and you
don't have to change any URLs.

--
mattwarden
mattwarden.com





More information about the thelist mailing list