Learn, how to work with androrm

The following tutorial consists of three parts. You will create an android application, that lets you manage a small book collection. You will be able to add books and authors, browse all your books and also browse all authors and view, which books were written by them. In the first part, you learn how to create the objects from a given form and save them to the database. The second part then teaches you how to retrieve objects from the database and how to look up their fields. In the last part, you will have a look at relations and how they can be used, to improve your apps.

Please note, that the actual androrm part in this tutorials is surprisingly small. I would see this as a plus for androrm, as it is so easy to use. The more complex part will be writing the actual app. But anyhow, it is just another chance to learn a little bit about writing android apps.


Part 1: Getting ready

Learn how to create objects from data, that has been entered into form fields of you activities and how to link them together.

  • Create model classes using androrm fields
  • Get your model ready for queries
  • Create a TabActivity

Part 2: Forms and validation

Create a form to add new books and authors and validate the results before saving them.

  • Create an activity using different fields and widgets
  • Create custom dialogs
  • Validate user inputs

Part 3: Simple queries and fields

Use the objects, you created in the step before and perform your first androrm queries, to fill your app with some content.

  • Create a ListActivity
  • Create a custom adapter
  • Do simple queries on the models and retrieve data

Part 4: Traversing relations

Last but not least, see how powerful the relational fields of androrm can be and how they can help you, to build more complex views for your data with just some lines of code.

  • Create a ExpandableListActivity
  • Create a custom adapter
  • Do more complex queries using special androrm fields and relations
androrm on github

Django is a registered trademark of the Django Foundation. Android is a registered trademark of Google Inc.