August 2, 2011

Android ORM (Object Relational Management)

Posted in Android Development at 10:57 pm by tetontech

For quite some time I have been thinking about what a good ORM library should look like.  I haven’t had any time to design and create it until now because of the university classes I’ve been teaching and supporting and completing the other QuickConnect Family projects.  For the last couple of days, since school is now out for the summer, I have been making a cut at it.

I am very pleased.  I have a very functional and easy to use implementation.  It avoids the pitfalls that Hibernate made back in the day when it was designed and it avoids mistakes made by Apple when the created CoreData.

You don’t need any annotations.  You don’t need any HQL like language for queries.

Even better it is only 16K in size!  I was surprised but pleased at how little code was required.

It is untested at the moment but you can see what the code looks like if you download the source from sourceForge using git.

https://sourceforge.net/scm/?type=git&group_id=508843

I hope to have an example working soon and want to create a GUI front end to make use even easier.  This GUI will create your SQLite tables for you and put everything together you need in one jar file.

What fun.

 

 

 

 

 

Advertisements

4 Comments »

  1. Rock Yin said,

    Hi Lee,

    Can I let the QCiPhone work with xcode4? Which version should I use?

    I download QCFamily 2.0.2, but don’t know how to install it.

    Which version should I download and how to install?

    Thanks!

    Rock

    • lee barney said,

      Rock,

      The 2.x versions work with Xcode 4 but there is no installation. In the 2.x download you will find several directories depending on what you want to do. The directory you are interested in is QC iOS -> QC Hybrid -> include files.

      In that directory you will find the Creating a new QC Hybrid application.rtf file. Open it and follow the instructions.

      Check out the examples in the download for how to create your application behavior.

      Let us know when you have more questions.

      Lee

      • Rock Yin said,

        Thanks Lee for your fast response!

        I will try this.

        I have two other questions:
        1. How can I select a photo form iPhone photo album?
        2. How to download and save the image to iPhone photo album from my app if I know the image URL?

        Thanks,
        -Rock

      • lee barney said,

        Rock,

        In the QC 2.x download you will find an Xcode 4 workspace. In there you will find the Camera and Images example. It should be of help with your first question. You will also find the File Download and File Upload Examples to help with your second question.

        Both of these are in the Hybrid App Examples -> iOS groups in the workspace.

        Lee


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: