Menu Style

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.

3. Application Design

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.