Posts Tagged “Persistenz”

Especially if you want to transfer objects from and to a Android mobile device, XML serialization may be an option. XStream is a popular XML serialization tool, however it does not work out-of-the-box with Google Android. Although serialization works, the current XStream 1.2.2 has problems deserializing it: it throws an com.thoughtworks.xstream.converters.ConversionException caused by a java.lang.NullPointerException. Fortunately, this was easy to fix and in the course of patching XStream I stripped XStream down a bit. By removing classes that do not work on Android anyway, I could reduce it by about 20%.

Donwload patched XStream 1.2.2 for Android (Java Source)

Comments 12 Kommentare »

Google Android sieht folgende Persistenzkonzepte vor: Preferences, Dateien, SQLite Datenbank, und Content Provider. Für komplexere Daten und Abfragen kommt nur SQLite in Frage. An sich ja eine sehr gute schlanke SQL Datenbank. Aber das heißt auch wieder selber SQL formulieren und mit den Java Klassen zusammenbringen. Nach einigen Jahren JPA, Hibernate und anderen ORM Lösungen fällt das nicht gerade leicht. Die Chancen stehen somit gut für die Wiederauferstehung des DAO Pattern.
Den Rest des Eintrages lesen »

Comments Keine Kommentare »