Index: [Article Count Order] [Thread]

Date:  Wed, 20 Mar 2002 06:35:19 +0900 (JST)
From:  GOTOU Yuuzou <gotoyuzo@notwork.org>
Subject:  [webricken:53] request attributes and handler creation
To:  webricken@notwork.org
Message-Id:  <20020320.063519.103024541.gotoyuzo@kotetsu.does.notwork.org>
In-Reply-To:  <3C967342.6040204@imperitek.com>
References:  <000b01c1ce75$b56fe7f0$85222fc0@sarion.co.jp>	<3C967342.6040204@imperitek.com>
X-Mail-Count: 00053

In message <3C967342.6040204@imperitek.com>,
 `David Corbin <dcorbin@imperitek.com>' wrote:
> b) request attributes - I modeled this on java servlets, but there is 
> probably a more ruby-esque way to do this.  It makes forward much more 
> useful.

It is not clear for me what the name of "attribute"
suggests in HTTP message.
HTTPRequest is a representation of the HTTP request
messages, and I want the user-defined data to be
managed by the user-defined containers.

> c) I modified the "handler creation".  For handlers that don't need 
> instance data, I wanted to be able to instantiate one handler at the 
> beginning, and have it reused- this is both an efficiency issue, and an 
> issue of I want to "build" the handler using new() and other method 
> calls, not by building a giant hash of options.  But you can the old 
> style handlers continue to work just fine.

get_instance() is just a factory method. You can also
make it as an instance method which returns itself.
Have you seen httpservlet/prochandler.rb?

Well, "require_path_info?" might not be necessary ;)

Does anyone have any ideas?
--
gotoyuzo