You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Jo...@filternet.nl on 2015/03/30 11:37:22 UTC
consuming REST-api in ISIS?
I would like to consume data from an external REST-api (JSON like from http://api.postcodeapi.nu/) and use it in ISIS. Can anybody recommend a sensible approach?
grtz Johan
Re: consuming REST-api in ISIS?
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Um, not sure I agree that a view model is relevant if acting as a consumer
of an external REST API.
Put another way: it's perfectly fine for entities or regular domain
services to act as consumers of external REST APIs, too.
What I would do is to create a domain service that actually makes the REST
call, so that this can be tested in isolation. That domain service can
then provide a suitably simplified API for the other domain objects that
need info from that service.
HTH
Dan
On 30 March 2015 at 10:44, Martin Grigorov <mg...@apache.org> wrote:
> Hi Johan,
>
> Using a viewmodel should work.
> Recently someone complained that the action method (or maybe the
> constructor of the viewmodel?!) has been invoked twice per http request.
> Check whether this happens for you too and give us more details so we can
> optimize it. For more info check the mail archives from the past two weeks.
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Mar 30, 2015 at 12:37 PM, <Jo...@filternet.nl> wrote:
>
> > I would like to consume data from an external REST-api (JSON like from
> > http://api.postcodeapi.nu/) and use it in ISIS. Can anybody recommend a
> > sensible approach?
> >
> >
> >
> > grtz Johan
> >
> >
> >
> >
> >
> >
>
Re: consuming REST-api in ISIS?
Posted by Martin Grigorov <mg...@apache.org>.
Hi Johan,
Using a viewmodel should work.
Recently someone complained that the action method (or maybe the
constructor of the viewmodel?!) has been invoked twice per http request.
Check whether this happens for you too and give us more details so we can
optimize it. For more info check the mail archives from the past two weeks.
Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Mon, Mar 30, 2015 at 12:37 PM, <Jo...@filternet.nl> wrote:
> I would like to consume data from an external REST-api (JSON like from
> http://api.postcodeapi.nu/) and use it in ISIS. Can anybody recommend a
> sensible approach?
>
>
>
> grtz Johan
>
>
>
>
>
>