Subject: | similar applications for several clients |
Hello Randal,
i agree with you that CGI::Application is cumbersome and doing not straightforward program logic you end up adapting the problem to the solution.
So I took one of our C::A applications to C::P::H. I liked it very much. The error checking code was straight forward and the templates and "runmodes" came our ordered cleanly. I agree with you that with less code and less library you get a better and cleaner app.
On the other hand this application of ours is used by a lot of different web sites with slight modifications and different branding.
Right now the class structure of the rewritten app looks like this:
Tourism::Advanced::Shop::Agency1::Home
Tourism::Advanced::Shop::Agency1::Destination
Tourism::Advanced::Shop::Agency1::Quote
Tourism::Advanced::Shop::Agency1::PaxData
Tourism::Advanced::Shop::Agency1::Confirmation
Tourism::Advanced::Shop::Agency1::CheckStatus
if i would like to have a slightly modified application for another client i would have to repeat all Page object methods for the new agency.
Tourism::Advanced::Shop::Agency2::Home
Tourism::Advanced::Shop::Agency2::Destination
Tourism::Advanced::Shop::Agency2::Quote
Tourism::Advanced::Shop::Agency2::PaxData
Tourism::Advanced::Shop::Agency2::Confirmation
Tourism::Advanced::Shop::Agency2::CheckStatus
Then if i modify a method in a page specific class say Tourism::Advanced::Shop::Agency2::Quote i have to cut and paste it for all the other agencies.
This problem was already pointed out in
http://www.perlmonks.org/index.pl?node_id=411760
So i would suggest a module like CGI::Prototype::Hidden where
a page request is dealt with by a method not by a class or is there
any other way to solve this problem?
Thanks and best regards, Jochen