>From the design point of view the biggest difference IMHO is that a property plays well with encapsulation. Storing information in Visit objects is unworkable for reusable components. Further, the automatic persistence management allows, as you said, using multiple components of the same type without interfering with each other.
El Lun, 22-08-2005 a las 01:14 -0700, Patrick Casey escribió: > Tapestry persistent properties are linked to a specific page, not to > a session. > > So if you log in on page "Login" and persist "currentUser" it won't > be available on page "welcomeScreen" because it's only persisted to the > Login page. > > An additional limitation is that persistent properties aren't > associated with a specific page instance, but rather with a page/session > combination. Thus if a given session brings up two copies of the same page, > their persistent properties will overwrite one another. > > Generally speaking if you want information to have global scope e.g. > be available on more than one page, stash it in the visit object (which then > goes in the session), or put it in the session yourself. > > --- Pat > > > -----Original Message----- > > From: hari ks [mailto:[EMAIL PROTECTED] > > Sent: Monday, August 22, 2005 12:54 AM > > To: [email protected] > > Subject: Visit object or use persistent="yes" of property-specificaion > > (TIA). Also need tapestry coding standards. > > > > Hi, > > In tapestry in action - hangman application, a > > user's state is stored in Visit object > > (Game/WordSource are inside Visit). Visit acts as > > facade for Game & WordSource. > > Is this always the way we should code our tapestry > > application. > > Or can we also use persistent="yes" directly in > > property-specification of a page to maintain user > > state for a session. > > > > What would be the drawbacks of using persistent="yes" > > for lots of properties in a page. > > > > Also I presume eliminating instance variables is not > > completely possible in tapestry page because > > components like Foreach,ListEdit etc.. would need > > them. But new developer starts using instance > > variables to store user state between request causing > > possible security breach because of caching. Is there > > any coding standards defined for Tapestry anywhere? > > Want to implement the tapestry coding standards in our > > project. > > > > Thanks, > > Hari > > > > > > > > ____________________________________________________ > > Start your day with Yahoo! - make it your home page > > http://www.yahoo.com/r/hs > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
