[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cgiapp] Design Problem


Go ahead and split them into totally separate classes, then set the action field of your <form> tag to point to the other app(s).  If you're using links then you can do the same thing--have the links point to different apps.

For example:

Within Book::ManageDB

<form name="form1" action="book_admin.pl?rm=whatever_rm_you_want">

Make sense?  =)

--TWH

-----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.