Data Fetch From Server
Solution 1:
I would suggest using Rails for backend. You can create a simple rails app with a database, and rails comes with default REST interface( meaning it would be easy to retrieve a record from the database using a url.). Once you have this setup, you can just call the url from your android app, varying the necessary parameters. Rails also takes care of replying the data in JSON or XML format(without additional coding), which makes it easier for you to parse in the Android App.
If you are new to Rails, the above simple setup(database and fetch using URL) will hardly take half a day.
Solution 2:
Your server has to reply in a format that yout client can understand. You can reply in plain text, XML or JSON for example. You can implement your server as any other website, but you can keep it very minimal and reply with plain text instead of HTML.
Then you implement your client so it can understand the format you use. And you can send and receive your messages using the HttpClient.
You can use Jackson to manage JSON in your Java client on the Android phone. There is a tutorial about using Apache HttpClient that can be useful. And finally there is an interesting talk about Android REST client applications on Youtube by Google.
Solution 3:
Why Java? With the HTML5 functionality currently available you've got a full relational database, offline/online web integration. And a sensible language for building user interfaces!
Serverside.....anything you want. I find Java a PITA to work with for web-based applications (mostly use PHP) but there's also Ruby, Perl and others. Certainlyyou're going to need some smarts there to work out what content needs to be pushed to the client.
While there are no end of open-source CMS's available, I'm not aware of any designed to run in an offline client - there's a whole new business model to explore!
Post a Comment for "Data Fetch From Server"