You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2004/06/14 22:50:32 UTC

Visit, Engine, and Global clarification

I'm trying to get the differences between these three classes as it relates
to Tapestry. After reading through documentation and the mailing lists, I've
come up with the following:

Global is global application data. Most directly correlates to an Servlet
Application Context. It is used by an application to access global
resources, such as pools of shared objects.

Engine is a Http Servlet Session based object. It is used by Tapestry to
store framework required persistent values.

Visit is a Http Servlet Session based object. It is used by an Application
to store application persistent values.

The difference between Engine and Visit was the most confusing for me at the
start, could somebody validate that I've gotten it?

>From what I can read, I would only really have a need to implement a Global
class and a Visit class.

In what use case would I implement an Engine class?

Richard Hensley


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Visit, Engine, and Global clarification

Posted by Robert Zeigler <rd...@u.arizona.edu>.
Hensley, Richard wrote:

>I'm trying to get the differences between these three classes as it relates
>to Tapestry. After reading through documentation and the mailing lists, I've
>come up with the following:
>
>Global is global application data. Most directly correlates to an Servlet
>Application Context. It is used by an application to access global
>resources, such as pools of shared objects.
>
>Engine is a Http Servlet Session based object. It is used by Tapestry to
>store framework required persistent values.
>
>Visit is a Http Servlet Session based object. It is used by an Application
>to store application persistent values.
>
>The difference between Engine and Visit was the most confusing for me at the
>start, could somebody validate that I've gotten it?
>
>>From what I can read, I would only really have a need to implement a Global
>class and a Visit class.
>
>In what use case would I implement an Engine class?
>
>Richard Hensley
>
>  
>

The visit class is essentially a POJO. It's stored in the session, and 
is used to store user-specific information.
(eg: a user object could be stored in the visit; any single-user 
specific stateful information).
The engine is a tapestry object that handles a lot in the way that 
tapestry works. You usually do not need to override the engine at all.
Times when you might want to is for things like custom error handling, 
etc. (eg: I have an engine class that extends the base engine
and overrides the handleStaleLinkException and 
handleStaleSessionException methods). Basically, if you just want to 
store user info, create a visit
class and define it in your .application file.  If you're looking to 
change how tapestry does things, the engine is a pretty good place to 
start tinkering.

Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Visit, Engine, and Global clarification

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jun 14, 2004, at 4:50 PM, Hensley, Richard wrote:
> Engine is a Http Servlet Session based object. It is used by Tapestry 
> to
> store framework required persistent values.

Further on this.... IEngine is not necessarily session based.  If the 
user is running stateless, the engine is pooled.  Only when the user 
goes stateful does the engine persist in session.

	Erik



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Visit, Engine, and Global clarification

Posted by Jamie Orchard-Hays <ja...@dang.com>.
Yup, Visit == session. You can store session related data here.


----- Original Message ----- 
From: "Hensley, Richard" <Ri...@McKesson.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Monday, June 14, 2004 4:50 PM
Subject: Visit, Engine, and Global clarification


> I'm trying to get the differences between these three classes as it
relates
> to Tapestry. After reading through documentation and the mailing lists,
I've
> come up with the following:
>
> Global is global application data. Most directly correlates to an Servlet
> Application Context. It is used by an application to access global
> resources, such as pools of shared objects.
>
> Engine is a Http Servlet Session based object. It is used by Tapestry to
> store framework required persistent values.
>
> Visit is a Http Servlet Session based object. It is used by an Application
> to store application persistent values.
>
> The difference between Engine and Visit was the most confusing for me at
the
> start, could somebody validate that I've gotten it?
>
> From what I can read, I would only really have a need to implement a
Global
> class and a Visit class.
>
> In what use case would I implement an Engine class?
>
> Richard Hensley
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Visit, Engine, and Global clarification

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
That is what is going to happen in v3.1.

> -----Original Message-----
> From: femto [mailto:femtowin@hotmail.com]
> Sent: Tuesday, June 15, 2004 12:17 PM
> To: Tapestry users
> Subject: Re: Visit, Engine, and Global clarification
> 
> Could Tapestry not be bound to HiveMind? because I'm using Spring now.
> ----- Original Message -----
> From: "Howard M. Lewis Ship" <hl...@comcast.net>
> To: "'Tapestry users'" <ta...@jakarta.apache.org>
> Sent: Tuesday, June 15, 2004 6:33 AM
> Subject: RE: Visit, Engine, and Global clarification
> 
> 
[...]
> 
> In Tapestry 3.1, you will be able to do the same thing using HiveMind to
> replace or augment the
> default set of services.
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> http://howardlewisship.com 




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Visit, Engine, and Global clarification

Posted by femto <fe...@hotmail.com>.
Could Tapestry not be bound to HiveMind? because I'm using Spring now.
----- Original Message ----- 
From: "Howard M. Lewis Ship" <hl...@comcast.net>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Tuesday, June 15, 2004 6:33 AM
Subject: RE: Visit, Engine, and Global clarification


The Engine has a couple of purposes, including maintaining server side state.

It is also used to locate various subsystems within Tapestry, such as the PageSource,
TemplateSource, etc.

In Tapestry 3.0, you can subclass BaseEngine to override these subsystems in an application-specific
way.

In Tapestry 3.1, you will be able to do the same thing using HiveMind to replace or augment the
default set of services.

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com


> -----Original Message-----
> From: Hensley, Richard [mailto:Richard.Hensley@McKesson.com] 
> Sent: Monday, June 14, 2004 4:51 PM
> To: 'Tapestry users'
> Subject: Visit, Engine, and Global clarification
> 
> 
> I'm trying to get the differences between these three classes 
> as it relates
> to Tapestry. After reading through documentation and the 
> mailing lists, I've
> come up with the following:
> 
> Global is global application data. Most directly correlates 
> to an Servlet
> Application Context. It is used by an application to access global
> resources, such as pools of shared objects.
> 
> Engine is a Http Servlet Session based object. It is used by 
> Tapestry to
> store framework required persistent values.
> 
> Visit is a Http Servlet Session based object. It is used by 
> an Application
> to store application persistent values.
> 
> The difference between Engine and Visit was the most 
> confusing for me at the
> start, could somebody validate that I've gotten it?
> 
> From what I can read, I would only really have a need to 
> implement a Global
> class and a Visit class.
> 
> In what use case would I implement an Engine class?
> 
> Richard Hensley
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org



RE: Visit, Engine, and Global clarification

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
The Engine has a couple of purposes, including maintaining server side state.

It is also used to locate various subsystems within Tapestry, such as the PageSource,
TemplateSource, etc.

In Tapestry 3.0, you can subclass BaseEngine to override these subsystems in an application-specific
way.

In Tapestry 3.1, you will be able to do the same thing using HiveMind to replace or augment the
default set of services.

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com


> -----Original Message-----
> From: Hensley, Richard [mailto:Richard.Hensley@McKesson.com] 
> Sent: Monday, June 14, 2004 4:51 PM
> To: 'Tapestry users'
> Subject: Visit, Engine, and Global clarification
> 
> 
> I'm trying to get the differences between these three classes 
> as it relates
> to Tapestry. After reading through documentation and the 
> mailing lists, I've
> come up with the following:
> 
> Global is global application data. Most directly correlates 
> to an Servlet
> Application Context. It is used by an application to access global
> resources, such as pools of shared objects.
> 
> Engine is a Http Servlet Session based object. It is used by 
> Tapestry to
> store framework required persistent values.
> 
> Visit is a Http Servlet Session based object. It is used by 
> an Application
> to store application persistent values.
> 
> The difference between Engine and Visit was the most 
> confusing for me at the
> start, could somebody validate that I've gotten it?
> 
> From what I can read, I would only really have a need to 
> implement a Global
> class and a Visit class.
> 
> In what use case would I implement an Engine class?
> 
> Richard Hensley
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org