Hi Cesar,
... answering your first query second, it seems!  Some answers within....

On 8 October 2015 at 23:11, Cesar Lugo <[email protected]> wrote:

> Hello. I have been getting familiar with Apache ISIS and so far I have
> created an application which uses about 10 domain entities with their
> corresponding domain services, and integrated the Excel and the Gmap3
> add-on
> modules. So far so good, I can see that the framework does a great job with
> DDD and RAD!.
>
>
Glad you've been making progress, always nice to hear!



>
>
> Now I am trying to use Ionic framework to build a client app using Apache
> ISIS services, but I am not experienced with Ionic or Javascript.
>
>
I think that's a good choice.  I'm a long way from being a Javascript
expert also, but Ionic has caught my attention too.  I'm looking forward to
Ionic 2 on top of Angular 2, coupled with Typescript.  I think that
combination will feel quite natural to server-side Java developers.  For
now, you could use Ionic 1.  Spend the time putting together a build
pipeline, though, with Gulp or Grunt and Bower etc.  You should be able to
find examples out there on github ... check out the "Adventures in Angular"
and "Javascript Jabber" podcasts.




> So far I followed an Ionic tutorial and built a basic menu application and
> adapted it to use some basic dummy REST services included in an Ionic
> tutorial.  The client app is working with some dummy REST services, and now
> I am trying to make it work with the Apache ISIS REST services, but so far
> I
> have not been successful on that. I have not been able to make RESTful
> calls
> to get the objects within my Apache ISIS application. I have been following
> Apache ISIS tutorials and samples you provide and they are great, but I
> have
> not been able to find a sample application or tutorial to use Apache ISIS
> REST services from a Ionic or JavaScript application. I am probably not
> parsing the Apache ISIS REST JSON messages properly, which seem to be quite
> different from some basic REST JSON services I have been using in the Ionic
> tutorial.
>
>

>
>
> Could you please direct me to some sample app or tutorial to help me
> understand how can I build such a Ionic or JavaScript app that uses Apache
> ISIS REST services from my Apache ISIS app?
>
>
First off, in answering this, I'm assuming you want to build a custom app,
rather than a generic app.

Assuming that's so, then there's two things here.

First, you *are* going to need to figure out how to perform the RESTful
calls, and from within Ionic.  For that I suggest getting familiar using
Chrome Postman plugin; you might've seen my tutorial on using that with
Isis, but I've linked to it anyway here [1].

On the flip side, though... rather than try to bend Ionic to fit in with -
admittedly rather complex - REST JSON representations that Isis generates
(as per the RO spec), you might find it easier to bend Isis to fit in with
Ionic.

The easiest way to do that is by implementing the ContentMappingService
[2], mapping specific representations (as per the HTTP Accept header) to
specific DTOs, mapped to JSON or XML.  Or, if you want to take full control
of every representation, then you can use the RepresentationService [3].

There's an example of the ContentMappingService in the todoapp [4] ... see
the README on the front page.



>
>
> Also, any advice or direction on which client framework to use to build
> mobile and web client apps with Apache ISIS will be highly appreciated.
>
>
>
I think you've made a good choice in Ionic.  A couple of years ago we had a
Google Summer of Coder who did a Javascript client using JQueryMobile [5].
But it was somewhat rough-n-ready, and was also intended to be a generic
viewer.

But if you were intending to write a generic viewer... well, I suggest
writing a custom one first.  It'll be less work, and give you chance to
become familiar with Ionic before attempting something more substantial.
 (But I'm happy to help if I can if that is ultimate intention).

HTH
Dan



[1] https://www.youtube.com/watch?v=_-TOvVYWCHc
[2]
http://isis.apache.org/guides/rg.html#_rg_services-spi_manpage-ContentMappingService
[3]
http://isis.apache.org/guides/rg.html#_rg_services-spi_manpage-RepresentationService
[4] https://github.com/isisaddons/isis-app-todoapp
[5] https://github.com/bhargavgolla/isisJavaScript/



>
> Cesar Lugo.
>
>
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>

Reply via email to