Without getting into a Rest vs RPC debate, Rest, and this plugin
specificially, has these advantages:

1. Unified architecture - your machine interfaces (Ajax) endpoints are
just another Struts action
2. Multiple content types - Data is exposed via XML and JSON
automatically, and XHTML with the corresponding template/jsp
3. Your private remote API is your public API - your Ajax app is just
another consumer of your remote api.  This makes tools like mashups
possible with no extra work.  DWR endpoints aren't meant to be
consumed externally.

I'm not saying DWR isn't a great tool and doesn't rock (cause it
does), but rather if using this plugin, I can write public-consumable
endpoints that reuse my Struts actions automatically for multiple
formats, then that saves me a lot of work and testing. Therefore, it
isn't "Rest" so much as how this plugin works, using Rest as the
vehicle (which as you meant, is more simply "different" to RPC than
intrinsically superior).

Don

On 10/22/07, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> Don Brown wrote:
> > Completely agree.  A lot of Struts developers have started moving to
> > more Ajax-centric approaches where the server-side is mostly static
> > html and DWR.  I think that Rest provides a more useful and ultimately
> > flexible solution, especially if you get things like XML and JSON
> > encoding for free like in this plugin.
>
> I'm one of those developers, so I'm curious to hear, how do you find the
> RESTful approach to be more useful and flexible?  I'm not saying I
> disagree or anything, the fact is I've done the REST approach as well
> and have been quite happy with it... in fact, I could argue they are
> just different forms of the same underlying concept.. but being one of
> those doing the DWR thing now, I'm more and more feeling like it's
> really the best answer (the basic idea is I mean, whether DWR is the
> best implementation or not might be debatable).  I'd love to hear why
> you view a REST-based approach as being better, and especially how you
> see it as being more flexible.
>
> Frank
>
> P.S., I don't want to hijack your thread Don, so if you feel this is a
> bit too tangential please do change the subject for any reply you may
> make to avoid that.
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM/Yahoo: fzammetti
> MSN: [EMAIL PROTECTED]
> Author of "Practical Ajax Projects With Java Technology"
>   (2006, Apress, ISBN 1-59059-695-1)
> and "JavaScript, DOM Scripting and Ajax Projects"
>   (2007, Apress, ISBN 1-59059-816-4)
> Java Web Parts - http://javawebparts.sourceforge.net
>   Supplying the wheel, so you don't have to reinvent it!
>
> ---------------------------------------------------------------------
> 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]

Reply via email to