isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JohanDoornen...@filternet.nl
Subject Re: consuming REST-api in ISIS?
Date Mon, 30 Mar 2015 16:08:49 GMT
Hi Dan, 



I did a very simple implementation with Jersey Client Api in simple app the way you reccomended and
it works fine indeed.

Any recommandation of how parse the JSON returned? Are you using libs for that purpose in
ISIS already?



grtz Johan








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  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,  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
> >
> >
> >
> >
> >
> >
>

	 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message