rest-java tokamak support.

4 views
Skip to first unread message

jdbj...@gmail.com

unread,
Jan 18, 2011, 5:27:14 AM1/18/11
to restfu...@googlegroups.com
Note sure if this question should be here or at vraptor-en list,sorry
if it's the wrong list.

Now that tokamak have been extracted from restfulie, it may be easier
to support it at the java implementation.
The idea is to have a marshall which will eval the ruby file as it
marshall/unmarshall the object.
My question is how would it be decided to use the tokamak marshall
instead of json/xml marshall?

Thanks.

Guilherme Silveira

unread,
Jan 20, 2011, 7:48:47 AM1/20/11
to restfulie-dev
Hi Doni,

It makes sense... we have two options here:
a) use a template engine such as jsp/freemarker/velocity/tokamak
b) use a programming approach such as a media type builder

I prefer the second approach, such as:

rep = new Representation("items");
for(Item i : items) {
rep.startChild("item");
rep.value("");
rep.link("...");
rep.endChild();
}

And then building (a) on top of (b). What do you think?

Regards

Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br

Reply all
Reply to author
Forward
0 new messages