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

[cgiapp] Re: OO Structure Help


In article <suppressed>, Bill McCormick wrote:
> 
> I'm creating a web app using CGI::Aplication and H::T. My app generally has
> two modes (not to be confused with the rm) of operation: 1) a user mode and
> 2) an administration mode. Each mode has like rm's and some unique rm's, but
> both generally have the same structure and flow.

Bill,

I'd say there are still a number of alternatives. The best solution may
depend on the details of arrangement. You could use an "is a"
relationship and have the modules inherit from a common parent,
overriding or adding methods as needed.

You could also use a "has a" relationship, where both admin and public
modules just "use" a common utiliy module.

Finally, you might be able to use exactly the same run modes, with a
validation check beforehand as to whether your are in "admin mode" or
note.

I've used all three approaches for various things.

If you post a more detailed example, perhaps someone could be of further
help.

	Mark

--
http://mark.stosberg.com/ 


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