sennin
sennin

Reputation: 8972

Sharing data between AppEngine and Android

I want to use AppEngine with Android based on C2DM, but I have strange question. Is there any possibility or metodology to share logic and maybe data of application between server and client? If I want to play chess online it is ok, but what if my game offers also ability to play chess offline on my tablet with my firend? I want to use exactly the same logic and use exactly the same data in both cases. In AppEngine I can use DataStore or CloudSQL (what is better for new application?) on android I have to use LiteSQL. I didn't hear about DataStore on Android. What way I need to take to do something like that? I want to reuse my code everywhere where it is possible. I know that in connected app engine + android project I can use share folder to put some classes that needs to be common, but problem exists with DataStore on server side and no alternatives I know on Android side.

Upvotes: 0

Views: 152

Answers (1)

Mark Finch
Mark Finch

Reputation: 766

If I am understanding your question correctly what you are really asking is if you can use the same datastore on both platforms. The answer is no if you want to use it offline.

That said if you write your data layer as an abstraction you should be able to use most of the code on both platforms and just modify the abstraction. I'm assuming your planning on coding the server side in Java, so most of the JDO calls will be similar. You would need to make your schema on Android similar to the abilities of App Engine Datastore.

Upvotes: 1

Related Questions