Rest in Seaside3.1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Rest in Seaside3.1

Johan Brichau-2
Hi Philippe,

I'm having issues with the REST implementation in Seaside 3.1
Routes are not getting matched.

I eventually narrowed the issue down by creating a WARestfulFilter with a simple method:

all
        <get>

        ^''

This should catch all incoming GET calls, right?

The problem is that the method WARouteBuilder>>initializeOn: is setting the path instvar to the selector of the method.
However, the WARouteBuilder>>create method dispatches on the value of path to create a WASimpleRoute when it's nil.
This does not happen.

If I change the WARouteBuilder>>initializeOn: method to set the path to nil (like its done in Seaside 3.0), I'm getting it to work.

However, it seems the change was intentionally introduced in the following commit:

Name: Seaside-REST-Core-pmm.48
Author: pmm
Time: 24 August 2012, 4:22:37 pm
UUID: 7c575e6c-04b6-4a29-b0d8-f59f8cae63af
Ancestors: Seaside-REST-Core-pmm.47

- <path: > defaults to method name


However, I don't grasp why it was done as it was the sole change in the package?

I hope you can remember something ;-)

cheers
Johan_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Rest in Seaside3.1

Johan Brichau-2
ah... if I change the method to:

all
        <get>
        <path: ''>

Then it gets matched...
We should update the documentation... what was the rationally for changing that ;-)

Let me see if I can solve my original matching troubles.

cheers
Johan


On 15 Apr 2014, at 16:01, Johan Brichau <[hidden email]> wrote:

> Hi Philippe,
>
> I'm having issues with the REST implementation in Seaside 3.1
> Routes are not getting matched.
>
> I eventually narrowed the issue down by creating a WARestfulFilter with a simple method:
>
> all
> <get>
>
> ^''
>
> This should catch all incoming GET calls, right?
>
> The problem is that the method WARouteBuilder>>initializeOn: is setting the path instvar to the selector of the method.
> However, the WARouteBuilder>>create method dispatches on the value of path to create a WASimpleRoute when it's nil.
> This does not happen.
>
> If I change the WARouteBuilder>>initializeOn: method to set the path to nil (like its done in Seaside 3.0), I'm getting it to work.
>
> However, it seems the change was intentionally introduced in the following commit:
>
> Name: Seaside-REST-Core-pmm.48
> Author: pmm
> Time: 24 August 2012, 4:22:37 pm
> UUID: 7c575e6c-04b6-4a29-b0d8-f59f8cae63af
> Ancestors: Seaside-REST-Core-pmm.47
>
> - <path: > defaults to method name
>
>
> However, I don't grasp why it was done as it was the sole change in the package?
>
> I hope you can remember something ;-)
>
> cheers
> Johan

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Rest in Seaside3.1

Philippe Marschall
On Tue, Apr 15, 2014 at 4:07 PM, Johan Brichau <[hidden email]> wrote:
> ah... if I change the method to:
>
> all
>         <get>
>         <path: ''>
>
> Then it gets matched...
> We should update the documentation... what was the rationally for changing that ;-)

:-) Keep us posted.

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Rest in Seaside3.1

Johan Brichau-2
haha, well... another email that proves that rubber duck debugging works :-)

But the documentation should be updated about this. Should I ask Stephane for access to write in the seaside book?

On 15 Apr 2014, at 17:02, Philippe Marschall <[hidden email]> wrote:

> On Tue, Apr 15, 2014 at 4:07 PM, Johan Brichau <[hidden email]> wrote:
>> ah... if I change the method to:
>>
>> all
>>        <get>
>>        <path: ''>
>>
>> Then it gets matched...
>> We should update the documentation... what was the rationally for changing that ;-)
>
> :-) Keep us posted.
>
> Cheers
> Philippe
> _______________________________________________
> seaside-dev mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Rest in Seaside3.1

Philippe Marschall
On Tue, Apr 15, 2014 at 9:05 PM, Johan Brichau <[hidden email]> wrote:
> haha, well... another email that proves that rubber duck debugging works :-)
>
> But the documentation should be updated about this. Should I ask Stephane for access to write in the seaside book?

That makes sense, yes please.

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev