You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frans Thamura <fr...@meruvian.org> on 2009/01/08 17:13:27 UTC
REST Again
hi there
chat with musa
and he said that REST create the "action" for us
but i still dont get,
first Struts without REST, 1 action 1 result
in REST, 1 result multiple action and mapped as REST URL
can help all
--
--
Frans Thamura
Meruvian
One Stop Java and Enterprise OSS Provider
Technopreneurship, Training, Internship, Outsourcing and Corporate
Competency Center
Mobile: +62 855 7888 699
Blog & Profile: http://frans.thamura.info
Training JENI, Medallion (Alfresco, Liferay dan Compiere).. buruan...
URL: http://www.meruvian.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: REST Again
Posted by Frans Thamura <fr...@meruvian.org>.
On Thu, Jan 8, 2009 at 11:23 PM, Musachy Barroso <mu...@gmail.com> wrote:
> ok, here we go. Looking at the rest showcase application, when you hit this url:
>
> /orders/10
>
> the REST plugin (to simplify) says "I have to invoke the 'show' method
> in the 'orders' action, and set its 'id' parameter to 10". How does
> the REST plugin know what to invoke? based on some simple convention
> rules which are defined in the documentation:
>
thx for the glue, still switch my paradigm , esp for convention.
i am debuging the example here.. hope can get a glue soon.
i see that my standard using S2 before REST must be change a lot
new -> create.action -> /
search -> filter,action -> /list
edit -> edit.action -> /xx/edit
i still thinking of smooth migration and argh....
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: REST Again
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Musachy Barroso on 08/01/09 16:23, wrote:
> ok, here we go. Looking at the rest showcase application, when you hit this url:
>
> /orders/10
>
> the REST plugin (to simplify) says "I have to invoke the 'show' method
> in the 'orders' action, and set its 'id' parameter to 10". How does
> the REST plugin know what to invoke? based on some simple convention
> rules which are defined in the documentation:
>
> * GET: /movies => method="index"
> * GET: /movies/Thrillers => method="show", id="Thrillers"
> * GET: /movies/Thrillers;edit => method="edit", id="Thrillers"
> * GET: /movies/Thrillers/edit => method="edit", id="Thrillers"
> * GET: /movies/new => method="editNew"
> * POST: /movies => method="create"
> * PUT: /movies/Thrillers => method="update", id="Thrillers"
> * DELETE: /movies/Thrillers => method="destroy", id="Thrillers"
>
> so, the REST plugin based on some conventions, saves you the time of
> having to define the mappings for the actions and results, among other
> things.
Just wondering, in the REST paradigm, are Query String parameters banished?
regards
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: REST Again
Posted by Musachy Barroso <mu...@gmail.com>.
ok, here we go. Looking at the rest showcase application, when you hit this url:
/orders/10
the REST plugin (to simplify) says "I have to invoke the 'show' method
in the 'orders' action, and set its 'id' parameter to 10". How does
the REST plugin know what to invoke? based on some simple convention
rules which are defined in the documentation:
* GET: /movies => method="index"
* GET: /movies/Thrillers => method="show", id="Thrillers"
* GET: /movies/Thrillers;edit => method="edit", id="Thrillers"
* GET: /movies/Thrillers/edit => method="edit", id="Thrillers"
* GET: /movies/new => method="editNew"
* POST: /movies => method="create"
* PUT: /movies/Thrillers => method="update", id="Thrillers"
* DELETE: /movies/Thrillers => method="destroy", id="Thrillers"
so, the REST plugin based on some conventions, saves you the time of
having to define the mappings for the actions and results, among other
things.
musachy
On Thu, Jan 8, 2009 at 11:13 AM, Frans Thamura <fr...@meruvian.org> wrote:
> hi there
>
> chat with musa
>
> and he said that REST create the "action" for us
>
> but i still dont get,
>
> first Struts without REST, 1 action 1 result
>
> in REST, 1 result multiple action and mapped as REST URL
>
> can help all
> --
> --
> Frans Thamura
> Meruvian
> One Stop Java and Enterprise OSS Provider
> Technopreneurship, Training, Internship, Outsourcing and Corporate
> Competency Center
>
> Mobile: +62 855 7888 699
> Blog & Profile: http://frans.thamura.info
>
> Training JENI, Medallion (Alfresco, Liferay dan Compiere).. buruan...
> URL: http://www.meruvian.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org