Switching between run-mode, in the sense that you describe below, is
probably best done by simply including a link on one of the output
pages. It would be like your second example: "create a base class, say
Book::App, which inherits from C::A. Then Book::App::ManageDB und
Book::App::Admin would inherit from this base class."
So your web site architecture might look like this:
admin.cgi would: use Book::App::Admin
thus
http://books.com/admin.cgi?rm=create
http://books.com/admin.cgi?rm=delete
manage.cgi would: use Book::App::ManageDB
http://books.com/manage.cgi?rm=update
http://books.com/manage.cgi?rm=diff
the output pages might have a nav bar with http links (as shown above).
========================================================================
=====
Fred Kleindenst suppressed
Internet Platforms
310.302.3801
-----Original Message-----
From: Bodo Schulze [mailto:suppressed
Sent: Wednesday, February 25, 2004 2:14 PM
To: suppressed
Subject: [cgiapp] Design Problem
Hi all,
after finishing the first part of my first webapp using C::A I'm
stumbling over a design problem pertaining to how to integrate the
second part. The first part allows to manage a book database: entering
new entries, updating old ones and stuff like this (class
Book::ManageDB)
The second part shall include other management functions, such as
incrementally updating the database on my homepage, sending diffs to
other catalogues and the like (class Book::Admin).
Of course, I could put it all in one C::A class, but I'd like to keep it
seperated, since the 2 parts are functionally different.
The first approach I tried was to setup a Book::Admin instance from
within a run mode of Book::ManageDB. But then, when being within this
second webapp, I would have to set up again Book::ManageDB to return to
the first part. While possible, my intuition tells me that this is not
the wright way to do it. Suppose you have 10 modules, hence 10 C::A apps
then you would have to 'use' the other nine modules in each of these
apps to be able to switch around, which IMO isn't really elegant.
The second idea I came up with is to create a base class, say Book::App,
which inherits from C::A. Then Book::App::ManageDB und Book::App::Admin
would inherit from this base classe. The point I can't figure out is how
to organize the run modes to be able to switch beween the 2 parts of the
webapp.
Could anybody please give me hint?
Best regards, Bodo
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.