PhoneWare

Introduction

PhoneWare is a software tool designed for phone suppliers in shops and stores, which interacts with a MySQL database where the data about products (mainly phones) are kept. PhoneWare has been developed in Java SE 1.6.0 and assumes that a working MySQL database is already configured and accessible.

This project is part of a course named Applied Java Programming, included in my studies of Software Engineering at Helsinki Metropolia University of Applied Sciences. PhoneWare is totally free (under the terms of the GPLv2).

Motivation

The main goal was to be able to create a piece of software capable of interconnecting a graphical user interface (GUI), made in Java Swing, with a working MySQL database, using the JDBC driver manager.

pw_products.png
Typical view of PhoneWare showing a few products

Such a program should be able to present data (from the database) in an easy and abstract manner, letting the final user (typically phone suppliers in shops and stores) to manage large amounts of information with a few-clicks philosophy. Thus, PhoneWare became an experimentative prototype of software which could be used in actual shops and stores anywhere.

Design and Implementation

As every OOP software project, PhoneWare was initially designed as a layered piece of software, delegating lower-level functions to lower-level classes and avoiding implementation details in higher-level classes. Thus, the class Connection is here in charge of encapsulating the database functionality, offering high-level functions which work in a more abstract way.

The lowest classes are Product and Order, which are then used by ProuctAdder, ProductView, OrderAdder and OrderView. Any 'order' or 'product' manipulation class will therefore relay on the lower-level Order or Product corresponding class. Further, an abstract class named View is used for coordinating the functionality of both ProductView and Order View.

Finally, the GUI class is the topmost one, which presents the graphical interface to the final user, whereas the PhoneWare class is just a final wrapper for the whole program.

Installation and Configuration

PhoneWare is distributed both with the source code (since it is GPL) and a JAR archive, which contains a ready and executable version of the program itself. The only part that the end user has to take care of is to install a MySQL database server on his or her computer and create an empty database named phoneware.

The file phoneware_db_creation.sql contains the necessary definitions for the database and makes possible for the end user to run it and create the database organization without any problem. For that, you should run the command:

~$ mysql -p phoneware phoneware_db_creation.sql

Moreover, this project provides a sample data file which can populate the database with some testing-purpose values so that the end user is able to play with the program from the very beginning. For that, you should run the command:

~$ mysql -p phoneware phoneware_db_sample_data.sql

Once the database server is working and accessible, the only necessary thing left is to make sure that the JDBC driver manager is installed and well configured on the current computer. Please note that the class path to the JDBC driver has been set by default to /usr/share/java/mysql-connector-java.jar, which is the default in GNU/Linux systems. After the three points required above are met, PhoneWare will be ready to be run.

pw_home.png
PhoneWare home screen (disconnected)

User Functionality

Running PhoneWare

In order to run PhoneWare, just type:

~$ java PhoneWare

Alternatively, you can run the Java archive provided with the distribution of the program. When the program is up and running, nothing will be displayed, since we need to perform a connection to the database in order to start working. For that purpose, open File and select Connect to database, which will pop up a connection dialog in which the server, port, user and password can be provided, according to the following figure:

pw_connect.png
PhoneWare connection dialog

Once the connection is made, the program will automatically fetch the list of existing products on the database and present them to the user in a table view. Each element shows a few fields of information, but the user can click on each element and all the information about the selected product will be displayed on the navigator on the left, labeled Product information.

Adding and Removing Products and Orders

In order to add new products or new orders, you just have to click on Edit and then select New product or New order. The program will automatically display the corresponding option according to the current view.

pw_neworder.png
PhoneWare and its 'New Order' dialog

Immediately after an order or a product has been added, the product will refresh the view and display the new information on the screen. Moreover, PhoneWare makes sure that the user has entered the mandatory fields for the database, before a product or an order is added. This assures that the program will be stable and work with future additions.

Updating Information

Updating products or orders information is made directly through the table which presents the information. There, the user is able to edit any field of any row, and the program will automatically fetch the new information and update it in the database.

NOTE: Information edition is not implemented as of version 0.2 of PhoneWare. This feature has been delayed to version 0.3, due to some time limitations.

Manual Queries

PhoneWare introduces an interesting feature which allows advanced and experienced users to enter manual queries from a manual query text entry field. This field is situated at the bottom of the application and allows the user to enter any type of command in SQL, which will be directly performed against the working database.

pw_manual.png
PhoneWare manual query entry

Therefore, the user has full access to the whole database and can also mess it in any way. Please note that PhoneWare is not, in any case, aware of what the user is doing with the database. For that reason, PhoneWare will always ask the user for confirmation before performing a manual query.

Other Features

An extra feature which has not been discussed yet is information search as whole. Through the menu Edit, Find.. or Find next, the user is able to search for an information on the current view, just for adding some extra functionality to the basic one.

Download

Download PhoneWare (Java archive) PhoneWare (Java archive)
 Click on the link above to start the download.
Download PhoneWare (Source code) PhoneWare (Source code)
 Click on the link above to start the download.

Online Repository

More information

For more information please check out the PhoneWare User Manual (PDF document).

This is free software. You may redistribute copies of it under the terms of the GNU General Public License http://www.gnu.org/licenses/gpl.html.

The author of this software is Claudio M. Camacho, and his name has to be included in any reproduction of any kind of this software. Furthermore, commercial reproductions of this software cannot be used to generate incomes.

There is NO WARRANTY, to the extent permitted by law. For more information, please read LICENSE.

www.claudiocamacho.org
Updated on Friday, 26 September 2008 15:55