I have been working on a rather large WebApp for several weeks now. So far I have been working in the same way I used to develop straight CGI applications. Each CGI::Application run_mode is self contained. For example if you want to register for the site you go to mode_001 and it renders the empty form. When you submit it takes you back to mode_001 and the form is validated and the data untainted or taint checked and written to the database. Error handling (duplicate username, invalid password and all that) get taken care of in the same run_mode. So you may in fact call that run_mode a number of times whilst you complete that phase of your interaction.
When you are registered I was going to produce an appropriate navigation panel that said, e.g. "You are now registered, the following options are available to you:" and the nav section would provide the next run_mode.
To my mind this gives the user a degree of flexibility about what he does. But last weekend a friend and sometime colleague was looking at the code and said: "nah, you gotta control the users path. Lead them by the nose or they will get it all wrong!". This would mean a rewrite to allow each run_mode to pass the user directly to one and only one run mode for the next phase.
How do other monks feel? I have spent much of the day agonising over the issue and felt that some other opinions would give me the clues as to how to go about this application. It will be very large, I expect some 200+ run modes by the time I am finished.
One of my questions is this: should run-modes be kept should and simple perhaps handling only a part of a sungle site function? For example, for an administrator to select and view user profiles, should the saearch, select, view and edit each be a separate run_mode or is it, in your opinion, okay to combine them into one run_mode?
In reply to CGI::Application, have I made a big mistake. by jdtoronto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |