Scott, You touched a 'sensitive' subject, so I expect to see several replies here, all saying the same:
- don't pool your pages! A singleton page (i.e. pooled page) is not good for your application. First of all, it will not work in Wicket, as a page instance is coupled to a session and pagemap. Second of all, it is a kind of premature optimalization that we warn against doing in the first place. Did it come up as a hotspot? In general, object pooling is considered an antipattern [1]. Please search the archives for more information on pooling of pages. There is ample material on the list archive on this subject. Martijn [1] http://www.theserverside.com/news/thread.tss?thread_id=37146 On 3/19/07, Weaver, Scott <[EMAIL PROTECTED]> wrote: > > > > > I was curious to what the best practices and approaches for using single > instances of pages? Certain pages in my application never really change in > content or when they need to, are changed via an event mechanism so I see no > need (actually it is a disadvantage) to create a new page every time link to > that page. > > > > So, some questions are: > > - Would it make sense to implement my own version of IPageFactory > which could then check my session for an already existing version of the > page? > > - Instead of holding the cached pages in my session, should I > somehow use the PageMap to access existing pages? > > > > I can see a couple ways of doing things, but I am unsure of what is the > best/standard approach for approaching this. Any suggestions will be > greatly appreciated. > > > > Thanks, > > -scott > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.5 will keep your server alive. Download Wicket now! http://wicketframework.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
