archiving this to the mailing list ... a gtalk chat between Dimuthu and
Maurizio ...

Dimuthu,
I have some additional thoughts, I'll mail on dev separately

---------- Forwarded message ----------
From: Maurizio Taverna <[email protected]>
Date: 26 June 2013 17:45
Subject: Dimuthu Chat
To: Dan Haywood <[email protected]>


Hello Dan,
below my chat with dimuthu.

Cheers
Maurizio

Dimuthu: Hi Maurizio
maurizio: Hello
Dimuthu: Are you busy now?
maurizio: it is a good time
maurizio: Dan asked  me to take a look to the code
Dimuthu: So what do you think? I'm having some confusion about layering of
the application
For now I have 3 packages. 1 for UI , one for applib and one for
communication stuff
maurizio: let me see if I understand the architecture
you post/get the request
and based on the response the app renders the UI
Dimuthu:  yes
maurizio: I see
I have a question, what library did you use for the JSON parsing?
Dimuthu:  Mmmm Can you see the class JSONParser in github ?
maurizio: yep, why not something like jackson?
Dimuthu:  jackson?
https://github.com/DImuthuUpe/IsisAndroid/tree/master/IsisAndroid/src/com/dimuthuupeksha/json
maurizio: I got you, why don't use a ready to use library
http://www.mkyong.com/java/how-to-convert-java-object-to-from-json-jackson/
Dimuthu:  Ah thnx. I didn't know about that. I think it is better to use a
library like that
Is this an opensource library?
maurizio: yes, I think Isis use Jackson as well, let me check
Dimuthu:  ok
maurizio: yep, it does
about the over all achitecture
I wrote a viewer for DHTMLX
there is a mismatch between the Isis metamodel an the DHTMLX API
I think you are facing the some issue with Android
Dimuthu:  yes
maurizio: after a some testing I decided to add a 'model' layer
I have a presentation on that here: http://www.slideshare.net/mylaensys
Dimuthu:  Thank you
I'll look into it.
maurizio: just look at slide 6
Dimuthu:  Yes. What is the task of semantic model?
maurizio: very good ! you got it!
basically it is a model representing of the user interface
querying the Isis meta model, in your case using Json calls
and create a representation in the 'semantic model'
the render module reads sematic model and create the user interface
Dimuthu:  As an example let's say json object returns a string value to be
shown on the user interface. But in android we need to map it to label or
text field to bind into the layout. Task of this 'semantic model' is to do
this mapping. Am I right?
maurizio: right
but it has additional advantages
do you have time to look at an example ?
Dimuthu:  yes
taverna
here is the code:
https://github.com/madytyoo/dhtmlx-isis-viewer
for example this class :
https://github.com/madytyoo/dhtmlx-isis-viewer/blob/master/src/main/java/com/mylaensys/isis/viewer/dhtmlx/desktop/component/Form.java
the DHTMLX Lib has the concept of Form which can be mapped to a
DomainObject or to a Prompt
in case the you have a object method with parameters
in both cases the viewer creates a form, and the render in the model
and the render component
in this case the rendering is performed on the client (browser) and the
viewer just create an XML representation
DImuthu Upeksha    DImuthu Upeksha
ok got it
So this works as a middle layer to rectify mismatches. Isn't it?
maurizio:
exactly
Dimuthu:  I also thought about this idea but not in this much deeper.
Please look at
https://github.com/DImuthuUpe/IsisAndroid/blob/master/IsisAndroid/src/com/dimuthuupeksha/general/DataConverter.java
I think your approach is much better.
I need to study it more. Specially architecture you have used
maurizio; you used a static approach, as I did in the beginning
Dimuthu:  yes. It need to be changed.
maurizio:
let's say is need to evolve, you did a pretty good job
Dimuthu:  Thnx. Any idea how to find a better approach for android?
maurizio;
I'm not sure to understand your question
Dimuthu:  I think I can't directly use your approach here because
environment is different
maurizio:
what is the problem in creating a model in Android?
I did many times
Dimuthu:  Sry slamm connection issue :) *small
maurizio:
alright, no worries
Dimuthu:  I want to know how can I improve my static approach?
What I do is simply check data type of web service and return suitable ui
element to render on android view.
maurizio: alright, I'm not here to tell you what to do I'm just telling my
experience
Dimuthu:  yes I understand :)
maurizio; and the static approach tend to degenerate in a complex class
Dimuthu:  yes. I need to look in to it.
And it there a specific way to create layers in android apps
??
Dan asked me to use layered architecture to implement the project. Like one
layer for applib and other one for UI. Is it enough to separate them using
two packages?
maurizio;
yes sure,
however ask Dan for confirmation, may be he expect something more
Dimuthu:  ok. Sure :) And thank you so much for helping me.
maurizio: remember to report to Dan the topics of conversation, he wants to
share on the ML
I have another question
Dimuthu:  Yes sure
maurizio:  why you did NOT use an AsyncTask as wrapper for Http calls?

Reply via email to