Re: Global concept

"Howard M. Lewis Ship" <[email protected]> Mon, 30 Dec 2002 06:37:36 -0500
Newsgroups gmane.comp.java.tapestry.contrib
Message-ID <001101c2aff7$da5c4c20$3dc41e42@howardczkz2sl3>
A very good idea, I think.

----- Original Message -----
From: "Malcolm Edgar" <[email protected]>
To: <tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Sent: Monday, December 30, 2002 5:59 AM
Subject: [Tapestry-contrib] Global concept


> After Howards email about Visit object names including Global, I started
> thinking it would be really good to have a shared global object in
Tapestry.
>
> I want to kick off a discussion before putting in a Feature Request.
>
> Regards Malcolm
>
> Global
> ======
>
> Aim
> ---
> Provide a shared global object that can be used for globally accessed data
> or utility methods. Currently it is recommended that the SimpleEngine be
> subclassed to provide a point to hang shared data off, or access global
data
> via the ServletContext accessed from the IRequestCycle.
>
> Conceptually it simpler to have a global object available throughout the
> framework.
>
> Design
> ------
> A global bean object modelled on the access style of the Visit object.
>
> The global object would have an accessor method added to IPage interface:
>
> public Object getGlobal();
>
> This object would be instantiated via a no args condtructor, with the
class
> name specified in the Application.specification as is done with the visit
> object. This object should follow a singleton style design pattern, so
their
> is only ever one instance available.
>
> This object should be stored in the ServletContext under the key
> 'net.sf.tapestry.global' so that it can potentially be shared with other
> Servlet components.
>
> Scope
> -----
> Global object: shared application data
> Visit object: user specific data
> Persistent page properties: user page specific data
>
> Example Usage
> -------------
> Application properties
> Application constants
> Cached data
> Connection DataSources
>
>
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 3 months FREE*.
>
http://join.msn.com/?page=features/virus&xAPID=42&PS=47575&PI=7324&DI=7474&S
U=
>
http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_eliminatevi
ruses_3mf
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Tapestry-contrib mailing list
> Tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/tapestry-contrib
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf