I am working on designing an Android application, and I have several questions I would like to have your opinion on.
Right now, the architecture I am thinking of is the following:
- Android application for the User Interface,
- Library (Android or "purely" Java?) for the Business Logic,
- Android Library for accessing SQLLite Databases (will be used by the Business Logic),
- Android Library for accessing Wifi/BT modules (will be used by the Business Logic).
Since it is very likely that in a close future a Java based version of this Android application might be developed for Win/Mac/Linux, I am trying to keep the Business Logic as much apart from Android specific APIs.
Basically, the Business Logic will need to use the embedded SQLite DB as well as use the BT adapter and access the Internet through Wifi for example, this could be done using the two dedicated Android Library. The issue is that I would like the Business Logic to be only a "pure" Java library, and not built upon an Android project. Is that feasible according to this architecture, knowing that is is possible the Android Application will have a configuration "module" in charge to setup and configure and initiate if needed the two Android based libraries.
Does the currently chosen architecture make sense in your eyes ?
What could be your advice for this application to:
- Be as modular as possible with good abstraction level (on DB and BT/Wifi adapter),
- Keep the Business Logic as much as possible clear from Android APIs,
- Require minimal changes to adapt this whole solution for a classical Java application.
Thank you in advance for your time and opinions.