[cgiapp] designing a mixed open/protected application

P Kishor punkish at eidesis.org
Thu Jun 4 13:40:23 EDT 2009


Perhaps a basic question on design and organization, but reading some
of the articles online hasn’t been sufficient for me, so I pose my
query here.

I am developing an app that will have both open and login content. All
my apps until now have had one instance script and one module, but now
I am thinking, could I benefit from having multiple instance scripts
with their own modules?

open.cgi
Open.pm
http://example.com/open/view
http://example.com/open/map
.. and so on

loggedin.cgi
Loggedin.pm
http://example.com/loggedin/login
http://example.com/loggedin/view
.. and so on

Does the above seem reasonable?

Now, re. the authen mechanism. I tried Cees Hek’s
Plugin::Authentication and found it very easy to implement. However, I
am still thinking of rolling my own because I want to extend the
authentication mechanism to store extra values as user preferences,
and Plugin::Authentication seems to have sufficiently complicated
innards to dissuade me from opening it up and trying to understand it.
Nevertheless, I have two questions --

How do I indicate that specific runmodes are protected and require
login? (mixed mode)

How do I set aside an entire module (for example, loggedin) to be
protected? (all or nothing mode)

Any other advice, pointers would also be very welcome. Many thanks in advance.

-- 
Puneet Kishor http://www.punkish.org/
Carbon Model http://carbonmodel.org/
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org/
Science Commons Fellow, Geospatial Data http://sciencecommons.org
Nelson Institute, UW-Madison http://www.nelson.wisc.edu/
-----------------------------------------------------------------------
collaborate, communicate, compete
=======================================================================


More information about the cgiapp mailing list