Issue
In my company we would like to develop a swing and a android application. Both should basically have the same functions. So we thought to create a normal java project with the core code, a java project for XML communication with the endpoint (both apps use the same endpoint) and a java project for shared resources like bundles, images and so on.
Now the drawback: After having a first look at android we noticed that android handles resources very much different from any other system. Everything has to be in XML files and logos/images have to be in different folders with different resolutions. From my understanding this would mean to discard the idea of a shared resource project and to maintain the resources two times: one time for swing in the form of bundles and the like and another time for android.
Our architecture is layer based: the business logic layer defines functions that are the core functionalities of the app. The presentation layer should grab the functions and build the layout dynamically based on the role of the logged in user. Here too, I'm not sure how to archive this with android.
Questions:
- Is it possible to have the applications use the same resources?
- Do someone know another way how to handle this? (I'm a noob with android)
All comments, ideas and alternatives are welcome!
Solution
You can have string resources in xml for android, so it will parse them by itself, so all you need in your desktop app is to write parser to grab this resources and use them. I believe it's better then duplicating. In case if you have too much resources you can put them in few xml files, that will be the same: android will grab them automatically but you will just change file name.
Answered By - bgplaya
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.