Tuesday 28 June 2011

Latest Ramblings

After getting back from am amazing holiday travelling around Brazil I've been yearning to get stuck in to some code after a good 3 three weeks plus off.

I've finally got round to starting my latest Android application, and have been investigating some various methods and libraries for use in my persistence layer.

One of the libraries I've been looking into has been ORMLite. A simple ORM library which I don't think is specifically built for Android but has good support. It tries to follow the KISS principle which I believe will fit nicely in to the resource limited scope which many Android supported devices have. Previously I have ending up making simple wrapper classes which I have used as a form of object to DB mapping but then in the end still actually writing my own SQLLite queries and handling connect scope etc. After trialling it this weekend and creating a few simple relational classes it seems to fit my purpose well. It doesn't have all the bells and whistles of a big ORM library such as Hibernate but it makes the creation and query of my SQLLite tables much easier.

One good thing about using a ORM technology is that when using it, it quickly developed itself it to a very familiar structure which I have seen in many projects forming a simple Repository layer. Coming from a enterprise background, usually working on large scale J2EE, JDBC and/or Hibernate based projects, the class structure and layout all feels good and usable, a problem which I have had when directly interfacing with SQLLite via the inbuilt Android libraries. After a few more weekends hacking away I'll aim to get a simple demonstration of ORMLite's capabilities and show how I use it plus any issues and aids I have develop when using the library.

No comments:

Post a Comment