On Thu, 23 May 2002, Cory Trese wrote:

> Are those run modes or operations leading up to the run-mode?

They are real run modes.

> Is this something you can handle by passing it off to your error handler
> instead of trying this run-mode magic?  Changing (or redirecting) to a run
> mode to handle this event was my first attempt as well, but I found using
> die( ) and exceptions a much cleaner way.

How do you manage this?

> You do not provide any type of 'login' or 'authorization' before setting up
> your sessions?

Only when needed. And use environment variable given by Apache with AuthBasic.

> You can use 'super-classes' to provided shared features (functionality
> layers) but they do not provide 'shared run mode' support.

Why not? Why not extend C::A subclass to provide something that you
use over and over? Run modes are only methods, right? May be I'm missing
something here, is it a design issue? or what else?

>  My thoughts
> (after a while in C:A) is that reuse and maintainability are highest when we
> do not build monolithic C:A, but instead break our functionality into
> separate, reusable web objects.  Thus, I have
> CGI::Application::WebService::Login, CGI::Application::WebService::Logout,
> CGI::Application::WebService::SimpleIndex, CGI::Application::Notes::Editor,
> ect.

Oh yes, of course :) I also have something very similar, I just wanted to
group common run modes along with appcgi_init etc etc. I don't want one
large C:A. I have App::Base, App::Registration, App::Directory and so on,
but all these need to be aware of sessions and be able to handle absence of
session without an external dedicated App::Something.
Of course my approach would be wrong if I needed to manage also authentication,
because I would need a login app, that should be separated. Am i right?

> Now, this might seem the best way for me, due to project requirements, since
> what I'm building is more of an application server than a CGI script,
> however, I feel the lessons I'm learning are applied to your problem as
> well.

Thank you for your hints! At the moment I can't figure out how you intercept
die() and redirect to a login app. ErrorDocument directive? Can you give me
some more details please?

> Since you are not using Apache::Session (or I guess CGI::Session) are you
> rolling your own (like me) session manager module?

I don't know yet, I have some more hours to study and decide what to do.
But I can say that I don't like the eval method in CGI::Session and prefer
using Storable (another wonderful magic module :) )

Thanks a lot, Valerio


 Valerio Paolini, <http://130.136.3.200/~paolini>
--------------------------------------------------
 what is open-source about? Learn, and then give back



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.vm.com/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to