I agree that while the same annotations would be nice you do have a good
point about confusing users. And I definitely don't think that Stripes needs
to go all out compliance for the JSR (although I'm not really sure what else
is involved in the spec really, so not sure how much effort that really
consists of).
So I guess I would lean more towards stripes 'own' annotations, and they
will be 'rest' like enough that it shouldn't really confuse anyone.
And I think I like the convention over configuration part as long as there
would be a way to 'override' that behavior.
@Rest
class SomethingActionBean {
@Post
public Resolution save(){ ... }
}
or something like that.
-Nick
On Wed, Jul 9, 2008 at 10:22 PM, Will Hartung <[EMAIL PROTECTED]>
wrote:
>
> On Jul 8, 2008, at 11:21 PM, Gérald Quintana wrote:
>
> > What about using annotations/ideas from JSR 311 aka JAX-RS annotations
> > (@HttpMethod("MYHTTPVERB", @GET, @PUT...) ? Being very close to Sun's
> > "standard" could bring better acceptance.
>
> Yea, I looked at that today. I hadn't really though about that JSR,
> though when you brought it up it triggered an "Oh yeah" moment.
>
> On the one hand, I think they could (almost) be adopted wholesale,
> since they pretty much do the same thing (it IS the same problem,
> after all).
>
> On the other hand, though, especially after reading it, I don't see a
> real need to make the Stripes REST layer to be 311 compliant.
>
> So, if we use the same annotations, they may well confuse users who
> expect it to work like 311. The words will be the same, but the
> implementation and very possible the actual semantics will be different.
>
> Frankly, I'm game either way, but the potential for confusion bears a
> bit on my soul.
>
> What do you think?
>
> Also, what do you think about Convention over Configuration on top of
> pure annotations?
>
> If we do:
> public Resolution <eventname><HTTP Methodname>
>
> You think that's a good thing or a bad thing?
>
> @Rest
> @UrlBinding("/action/blog/{$event}")
> public class RestActionBean implements ActionBean {
> // default event processes
> public Resolution post() { ... }
> public Resolution get() { ... }
> public Resolution delete() { ... }
>
> // for the "month" event (event and REST don't really mix, but
> that's the way the baby bounces)
> public Resolution monthGet() { ... }
> public Resolution monthPost() { ... }
> public Resolution monthDelete() { ... }
> }
>
> Assuming we can annotate any Resolution method as we like, but by
> default using convention.
>
> Note I moved @Rest all the way to the class level so we wouldn't have
> to annotated each method.
>
> Anyway, just some more gas for the fire.
>
> Regards,
>
> Will Hartung
>
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users