Hi Dimuthu,

I would break out the codebase into two main layers:

- a lower-level API (applib) to interact with Restful Objects
- a higher-level Android UI that interacts with the applib

Now you've worked on ISIS-421 [1], you've got a better understanding of
what I mean by an "applib"; its a library that allows HTTP RESTful calls to
be made to RO resources.  Isis has its own RO applib [2]; you might want to
cross-compile parts of the Isis applib into Android code (though third
party dependencies might make that difficult); or you could start afresh.
 For another example of an applib, see the C# one I've worked on [3].

I could imagine you writing some simple integration tests in Android code
to test your applib; these would be similar to the TCK tests you wrote,
except what you're doing is testing your own applib implementation works as
expected.

The UI layer sits on top of the applib.  I don't really know enough about
Android UI to know if it breaks into separate layers or not.  A common
approach is to have views and underlying view models, with the view models
acting as a mechanism to pull information out of the applib representation
classes.  But - depending on how UI binding works in Android - you might
simply have the views pull data directly out of the applib representations

*Maurizio* - do you have anything to add on Android UI layering?  Perhaps
it's a technology you've worked with?

HTH

Dan

[1] https://issues.apache.org/jira/browse/ISIS-421
[2]
https://github.com/apache/isis/tree/master/component/viewer/restfulobjects/applib
[3] https://github.com/danhaywood/restfulobjects-wsa
[4]
http://stackoverflow.com/questions/4320141/android-model-view-presenter-controller-examples





On 20 June 2013 18:10, DImuthu Upeksha <[email protected]> wrote:

> Hi Dan,
> I'm trying to re structure the Android viewer code according to the
> layered structure you have mentioned while we were on skype chat. However
> it will be a great help for me if you can provide an example of such
> layered implementation and specially with functions of each layer is
> responsible for. Then I will commit changes on [1] to get further reviews.
>
> Up to now it is packaged under
> activity : this contains gui interfaces
> general : this contains object classes used in the apllication
> json : this contains json parsers  to give uniform json object interface
> to upper layers
>
>
> [1] https://github.com/DImuthuUpe/IsisAndroid
>
> --
> Regards
>
> W.Dimuthu Upeksha
> Undergraduate
> Department of Computer Science And Engineering
>
> University of Moratuwa, Sri Lanka
>

Reply via email to