Re: AJAX WebObjects Integration
Re: AJAX WebObjects Integration
- Subject: Re: AJAX WebObjects Integration
- From: Chuck Hill <email@hidden>
- Date: Fri, 19 May 2006 11:53:42 -0700
Pierce, thank you. That was superb! One small edit and a note:
On May 19, 2006, at 10:48 AM, Pierce T. Wetter III wrote:
Reality: WebObjects is actually a better framework for use with
WebObjects then Rails because it has a better component system then
Rails.
Think this should read Reality: WebObjects is actually a better
framework for use with AJAX than Rails
[[[However, there's a gotcha there, because component actions
called from javascript count towards your backtracking count. Since
someone might be going down through the page clicking rating after
rating, that could be a problem. If your max backtracking count was
10, and you had 20 postings on a page, they wouldn't be able to
rate the 11th page. ]]]
To avoid problems like this, I have added methods like this to Session:
public void savePage(WOComponent aPage)
{
if (shouldCachePage(aPage))
{
super.savePage(aPage);
}
}
/**
* Returns <code>true</code> if the passed WOComponent is
eligible to be added to the page cache. This is used to keep pages
that do not need to be cached from the page cache. For example,
pages that are generated only from Direct Actions and which do not
contain Component Action URLs do not need to be cached.
*
* @param aPage the WOComponent to check for eligibility
* @return <code>true</code> if the passed WOComponent is
eligible to be added to the page cache
*/
public boolean shouldCachePage(WOComponent aPage)
{
return ! (aPage instanceof PartialPage);
}
Where PartialPage is an interface that components can implement to
indicate that they don't belong in the page cache.
Chuck
--
Coming in late 2006 - an introduction to web applications using
WebObjects and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden