I’ll be very simple:
I want to be able to store Java objects from the phone to a webserver. Then, I want to be able to retrieve them later.
What could be a good combination of tools/webservers/languages to achieve this?
I have done that before with a serialization of objects through a LAMP server.
Example
[java object on the android phone] -> [object serialization] -> [POST request to PHP webserver ] -> [storage in a database]
Do you know any better and comfortable technique?
Can I work directly with Java objects using a JSP/Servlet?
Thank you.
On the server side, you are welcome to use whatever you are comfortable with.
On the client side, for Android, I would recommend serializing to JSON instead of XML, simply because the
org.jsonpackage supports creating JSON, and there are no classes in Android well-suited for creating XML.You are welcome to use the
Serializableinterface in Java and convert your Java objects to byte arrays for storage and retrieval, but then you are locked into Java, which may not be a sound plan for future flexibility.