Re: Rename Partial

2010-07-24 Thread Malcolm Edgar
+1 ActionResult or ActionResponse

On Wed, Jul 21, 2010 at 5:15 PM, Bob Schellink  wrote:
> On 20/07/2010 02:53, Andrei Ionescu wrote:
>> "Resource" sounds good to me.
>
> The name Resource is fine from the client/browser perspective. In REST URLs 
> are seen as a
> "Resources". How that is implemented on the server side is of no concern.
>
> However when looking at a Click Page you are looking at it from the server 
> perspective, so returning
> a Resource isn't right. Technically we are returning the "body" of an HTTP 
> response. The headers are
> manipulated through the HttpServletResponse object. So Payload is a better 
> term but not well known.
>
> Prefixing the name with "Action" might help to place context around the 
> result. Something like:
>
> ActionContent
> ActionBody
> ActionResult
>
> ...Ponder
>
> Bob
>
>


Re: Rename Partial

2010-07-21 Thread Bob Schellink
On 20/07/2010 02:53, Andrei Ionescu wrote:
> "Resource" sounds good to me.

The name Resource is fine from the client/browser perspective. In REST URLs are 
seen as a
"Resources". How that is implemented on the server side is of no concern.

However when looking at a Click Page you are looking at it from the server 
perspective, so returning
a Resource isn't right. Technically we are returning the "body" of an HTTP 
response. The headers are
manipulated through the HttpServletResponse object. So Payload is a better term 
but not well known.

Prefixing the name with "Action" might help to place context around the result. 
Something like:

ActionContent
ActionBody
ActionResult

...Ponder

Bob



Re: Rename Partial

2010-07-19 Thread Andrei Ionescu

Any suggestions?

Fragment, (Snippet, Slice, Brick, Pagelet, Partlet, Slicelet) ?

The "binary" content returned, it's indeed "complete", not "partial",
but maybe the problem (and user confusion) is not with the naming, but
the fact that "Partial" renders non-Ajax binary content too? For those
binary resources, a much better name could be e.g. "Resource", so

E.g. Something like
public class Partial extends/implements Resource {
...
}
thus for "complete" binary responses to return a Resource, not a Partial?

"Resource" sounds good to me.

Click already has "ResourceElement":
http://click.apache.org/docs/click-api/org/apache/click/element/ResourceElement.html


regards,
Andrei.



Re: Rename Partial

2010-07-18 Thread Bob Schellink
On 18/07/2010 18:07, Adrian A. wrote:
> The Servlet API is using only "HttpServletResponse" not simply "Response".
> 

Its still a Response object. Both mean and do the same thing. Where would you 
set response headers?
On the Response object or HttpServletResponse? Same for the response status? We 
don't isolate users
from the Servlet API, we encourage its use. When users think of a response they 
should immediately
think of HttpServletResponse.

Bob


Re: Rename Partial

2010-07-18 Thread Adrian A.

Fragment, (Snippet, Slice, Brick, Pagelet, Partlet, Slicelet) ?



How about Payload? It is abstract enough and easy to document for both Ajax and 
non Ajax requests.
Payload describes precisely, but: for most no-native English speakers, 
the first that comes into their mind hearing "Payload" is something 
related to "payment" :).


The response might be described as "Content", but that's waaay too 
general :(.



I'm trying hard not to use the word "Response" which is already taken by 
HttpServletResponse.

The Servlet API is using only "HttpServletResponse" not simply "Response".

SimpleWeb (the high performance async Java web server)
http://sourceforge.net/projects/simpleweb/
seems to use "Response" too, so maybe it's not that bad.

Adrian.



Re: Rename Partial

2010-07-18 Thread Adrian A.

Fragment, (Snippet, Slice, Brick, Pagelet, Partlet, Slicelet) ?

The "binary" content returned, it's indeed "complete", not "partial",
but maybe the problem (and user confusion) is not with the naming, but
the fact that "Partial" renders non-Ajax binary content too? For those
binary resources, a much better name could be e.g. "Resource", so

E.g. Something like
public class Partial extends/implements Resource {
  ...
}
thus for "complete" binary responses to return a Resource, not a Partial?

Could this be an approach?



Not sure that Resource is the proper name though. It might be binary
content that is generated on the fly.
"Resource would be the "Browser"/"User" view on that generated content - 
being static or dynamic. The same way a HTML Page is the same from the 
Browser/User perspective even if it's dynamically created or not.


The same wording seem to be used by REST and RESTful web services (what 
comes back is a "resource")



Both JSF and Wicket have settled on Behaviors so I think we should leverage it 
as well.
That was the first issue mentioned to me by some users: it's just too 
Wicket like :).



Callbacks
might be more familiar to programmers but not as a means to handle Ajax 
requests. Callbacks are
normally used for inter object invocations not handling browser requests.
Something familiar to most Windows users (but present in many 
programming languages) might be "Handle" or "AjaxHandle".


Adrian.




Re: Rename Partial

2010-07-17 Thread Bob Schellink
On 17/07/2010 21:34, Bob Schellink wrote:
> On 17/07/2010 21:11, Adrian A. wrote:
>> Fragment, (Snippet, Slice, Brick, Pagelet, Partlet, Slicelet) ?


How about Payload? It is abstract enough and easy to document for both Ajax and 
non Ajax requests.

"A Payload encapsulates the content to send back to the browser"

I'm trying hard not to use the word "Response" which is already taken by 
HttpServletResponse.

Bob


Re: Rename Partial

2010-07-17 Thread Bob Schellink
On 17/07/2010 21:11, Adrian A. wrote:
> Fragment, (Snippet, Slice, Brick, Pagelet, Partlet, Slicelet) ?
> 
> The "binary" content returned, it's indeed "complete", not "partial",
> but maybe the problem (and user confusion) is not with the naming, but
> the fact that "Partial" renders non-Ajax binary content too? For those
> binary resources, a much better name could be e.g. "Resource", so
> 
> E.g. Something like
> public class Partial extends/implements Resource {
>  ...
> }
> thus for "complete" binary responses to return a Resource, not a Partial?
> 
> Could this be an approach?


This is my thinking as well. Not sure that Resource is the proper name though. 
It might be binary
content that is generated on the fly. So it's more a case of encapsulating a 
response. I'm hoping we
can find a single concept for both use cases: Behaviors and Page Actions.


> Adrian.
> P.S. IMHO the naming "Behavior" is more confusing than "Callback", since
> the "Callback" concept is quite known to most programmers.


Both JSF and Wicket have settled on Behaviors so I think we should leverage it 
as well. Callbacks
might be more familiar to programmers but not as a means to handle Ajax 
requests. Callbacks are
normally used for inter object invocations not handling browser requests.

Bob


Re: Rename Partial

2010-07-17 Thread Adrian A.

I've been thinking about renaming the Partial object to something more generic. 
I settled on Partial
initially for handling Ajax requests only. However there are use cases where a 
Page Action could
handle non-Ajax requests, for example binary content (PNG, PDF, Excel) etc.

Any suggestions?

Fragment, (Snippet, Slice, Brick, Pagelet, Partlet, Slicelet) ?

The "binary" content returned, it's indeed "complete", not "partial", 
but maybe the problem (and user confusion) is not with the naming, but 
the fact that "Partial" renders non-Ajax binary content too? For those 
binary resources, a much better name could be e.g. "Resource", so


E.g. Something like
public class Partial extends/implements Resource {
 ...
}
thus for "complete" binary responses to return a Resource, not a Partial?

Could this be an approach?

Adrian.
P.S. IMHO the naming "Behavior" is more confusing than "Callback", since 
the "Callback" concept is quite known to most programmers.




Rename Partial

2010-07-17 Thread Bob Schellink
Hi all,

I've been thinking about renaming the Partial object to something more generic. 
I settled on Partial
initially for handling Ajax requests only. However there are use cases where a 
Page Action could
handle non-Ajax requests, for example binary content (PNG, PDF, Excel) etc.

Any suggestions?

Kind regards

Bob