[Glass] Getting started with REST

Philippe Marschall philippe.marschall at gmail.com
Thu Mar 20 06:21:05 PDT 2014


On Wed, Mar 19, 2014 at 11:24 PM, Thierry Thelliez
<thierry.thelliez.tech at gmail.com> wrote:
>
> Hello All,
>
> I need to start experimenting with Gemstone and REST.  Could you please
> point me to the latest/greatest stable versions?
>
> It seems that some work was done with Zinc-REST but that stopped.  Is this
> correct?
>
> Seaside-REST is the way to go?   What versions should be used (gemstone,
> seaside,...)?
>
> Also, what do you use to transport JSON?

I'm obviously biased and don't know Zinc-REST well so reader
discretion is advised.

What Seaside-REST has going for it:
First it works more or less everywhere where Seaside runs. This isn't
strictly true - it requires pragmas. It is not (yet?) common for
Smalltalk libraries to build on pragmas (Magritte and OB come to
mind). Initially pragmas were optional but they proved much more
powerful so now we require them. This makes Seaside-REST feel similar
to Java libraries like JAX-RS or Spring Web MVC (this is not a
coincidence).

Seaside-JSON builds on the same canvas classes as the HTML canvas.
This means it's possible to plug in "native accelerators" (we use
CharacterSet on Squeak/Pharo). Also when you have a server that does
buffer pooling you can greatly reduce your allocation rate.

The thing you may want consider no matter what you chose is
Magritte-JSON to do "automatic" data binding. Magritte is one of those
things once you understand it you solve everything with it.

I heard once of somebody working on a swagger binding for Seaside-REST
but haven't heard anything since. Maybe Johan knows more.

Keep in mind that in production you have to enable route caching for
Seaside-REST otherwise performance will suffer greatly.

Cheers
Philippe


More information about the Glass mailing list