Hi, On Tue, Oct 13, 2015 at 11:37 AM, Nuno Carvalho <[email protected]> wrote:
> On Mon, Oct 12, 2015 at 8:16 PM, Pedro Melo <[email protected]> wrote: > > > > need to build a REST API with Dancer2. Any recommendations on what > plugins, > > if any, to use? > > > > I see Dancer2::Plugin::REST, is that the recommended one? It looks good… > any > > experiences with it? > > I always end up doing serialization "myself", instead of relying in > plugins. Because many times there will be some edge cases that using > the plugin will require a huge workaround. While handling the > serialization yourself it's always easier to adapt. And even so I > usually end up with very simple and clean applications like: > > sub '/users' => sub { > to_json MyModel->users; > }; > > If you prefer you can also use the "set serializer" option, to omit > the to_json parts, or if you intend to have more than one serializer > possible > Yeah… I have a base class for all my models so I'll probably take that route. Thank you all, -- Pedro Melo @pedromelo http://www.simplicidade.org/ xmpp:[email protected] mailto:[email protected]
_______________________________________________ dancer-users mailing list [email protected] http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
