Reputation: 19
I am getting acquainted with Android Studio for one of my mobile app projects, I would like to use a database to save/update date used across users in the app. I am considering the Google App Engine, and specifically the Google Datastore. I have read a lot of documentation and have tried to get started but unfortunately I keep spinning my wheels and not getting far enough!
Ideally, I would like help on the end-to-end process for getting setup as well as a sample code that reads/writes to the Datastore to confirm all the steps are correct. In particular:
1) Where/how do I install the packages for Google Datastore for Java on Windows? I have found some links on their website but I keep going in circles trying to find the Java libraries but no luck. I saw the Javadoc, but not the package to install. 2) Once installed, are there any special setups needed within Android Studio for this to work? I see that we might need to create a Google Cloud Module, but I am not quite clear whether that should be App Engine Java Servlet Module, or App Engine Java Endpoints Module (and why? – I can’t find much documentation to understand the differences and which one is suited better for our needs). 3) Once setup, do you recommend that all the Datastore APIs be used on the backend module, or are there any best practices to follow?
Finally, do you know of a good reference for App Engine and/or Datastore that I might get my hands on? I feel like I get the overall idea, but having a good source that helps me understand the details and why each step is needed will be a great asset going forward.
I really appreciate any help I can get on this! Thanks, Karine
Upvotes: 1
Views: 89
Reputation: 1674
Karine, There's much terrain to cover, for starters you should go through the App Engine Docs which will help you through the first steps.
Having said that, here are a few pointers:
1) If you already have Android studio you shouldn't require any additional installations. Just add a backend module and you are good to go.
2) App Engine Java Servlet Module, or App Engine Java Endpoints Module? My suggestion would be to go for the Endpoints. Why? Endpoints are specially designed to connect app engine with external clients like an Android App. You'll get authentication, native libraries and most communication related problems already setup and ready to go, practically for free.
The learning curve is a little steeper, but it's well worth the effort.
3) For persistance in the datastore I strongly recommend you use Objectify unlike JDO or JPA ( which you'll find in the docs) it's completely designed for the datastore and it will help you get started and grasp all concepts faster.
Upvotes: 1