logo       

Re: Naming URLs - three questions: msg#00155

Subject: Re: Naming URLs - three questions

On Jan 27, 2005, at 3:41 AM, Avi Bryant wrote:

Q2. The point of creating the subclass of WAMain seems to be to allow a
way pass request information to a session, allowing for bookmarkable
pages. So one might be able to have a url like
http://universe.com/seasideApp?product='spaceship' work with a seaside
app. Now I have to create new class, a subclass of WAMain, and usually
add just one method start: and modify the application settings. This
start: method just creates a new component and passes it information.
Why not just add a hook method to WAComponent that is called when
WAMain creates the component? It would make it easier on the
application developer.

Avi,
Initially I was just thinking of a method like #initializeFromRequest: on component, but realized that at times one might need to send it to all the components in a tree. At that point I had to get ready for class. It seems like sending it to all components would be better, however so far I have only needed it in the top level component.

Excellent question.  I think there will still be some cases where a
subclass of Main is needed - if, for example, you wish to return a
static response for certain URLs (like the RSS feed in SmallBlog).
However, if it's just initialization data, you're right that the
component can probably handle it.  Do you have a suggestion for an
interface for this?  Perhaps #initializeFromRequest: on Component?  Or
#takeValuesFromInitialRequest:?  Should that just be sent to the top
level component, or should we walk the tree (that seems better, since
you could then have an embedded component that wanted info from the
request and the root component would be oblivious to this).

----
Roger Whitney              Department of Computer Science
whitney@xxxxxxxxxxx        San Diego State University
http://www.eli.sdsu.edu/   San Diego, CA 92182-7720
(619) 583-1978
(619) 594-3535 (office)
(619) 594-6746 (fax)


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe