Cluster Grid

Font Size

SCREEN

Layout

Menu Style

Cpanel
Error
  • Error loading feed data

MyContacts

 

alt

 

1. Introduction

MyContacts is an Android application designed and implemented at NCIT Summer School 2010. The goal of the project is to develop an application in order to get familiarized with several technologies like Android, Restlet, Hibernate and PostgreSQL.

2. Application Description

The application’s main purpose is to store the user’s contacts on a remote server. The main Activity of the application is the paginated list with the contacts; the idea is not to overload the server or the application. So, the user only sees 10 contacts on a page. Like any self-respecting contact application, it allows the user to create new contacts, delete or check the details of the current ones, navigate through the list, etc.


alt alt alt


alt alt alt

3. Application Design

alt

The architecture of the application is very easy to understand, once you see the overview.
The communication between the application and the server is implemented by using a REST (Representational State Transfer) architecture. REST is a typical example of a CRUD (Create, Retrieve, Update, Delete) implementation. We opted for a REST architecture because it is very common nowadays on the web and it is also very intuitive and easy to understand. The next step was to find a REST library suitable for Android development: Restlet. Restlet is a lightweight, comprehensive, open source REST framework for the Java platform. We choosed Restlet, not only because it is very easy to implement, but also because it is available for Android too.


The communication between the server and the database is handled by the Hibernate framework. Hibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database. Hibernate solves object-relational impedance mismatch problems by replacing direct persistence-related database accesses with high-level object handling functions. We opted for Hibernate because it is easy to implement on one hand, and it is easy to later change the database type on the other. For example, now we are storing our data on a PostgreSQL database. But if, for some reason, we decide to change our database to MySQL, then we will only have to edit the Hibernate configuration file.
During the development, we used Eclipse 3.5 Galileo development environment.

4. Problems Encountered

During development, I haven't encountered any major issues. However, I have discovred a bug with the emulator. For some strange reason, the emulator keeps thinking that I am constantly pressing the "=" key, therefore making development a nightmare. I have found other reports of the same problem on the internet (<a href="http://stackoverflow.com/questions/3344403/android-emulator-stuck-equals-phantom-keypress" style="color: #006699; text-decoration: underline;">http://stackoverflow.com/questions/3344403/android-emulator-stuck-equals-phantom-keypress ). The solution was to create a virtual device with the keyboad support off.</span></p> <p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 30px;"> </span></p> <p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 30px;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"><br /></span></p> <p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding: 0px;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;">


 

 

Author

 

Vlad Petre
vlad[at]vladpetre[dot]com
http://twitter.com/vladpetre88
http://linkedin.com/in/vladpetre88 
http://slideshare.com/vladpetre88