Front End Programming User Interface Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

This chapter deals with the implementation strategies being used for the development of the project. It contains details about the coding standards, the coding language being used and the justification to use it. It also contains details about the platform being used and the difficulties faced during coding. In computer science, an implementation understands the types of algorithm, programming code and the software used in the project. Many implementations may exist for a given specification or standard. Implementation in general terms is planning, executing and completing a plan, design or a method Cadle, James., Yeates, Donald, 2004. As such, implementation is the activity that follows preliminary thinking, research or survey in order for a plan to materialize. In IT, implementation embraces all the methods involved in acquiring software or hardware, installation, configuration, running and testing with assuring proper working in its environment. The word deployment is sometimes used to mean the same thing.

6.2 Selection of language

6.2.1 Front End Programming (User Interface)

Swing is a widget toolkit for Java which supports Graphical User Interface (GUI) developed by Sun Microsystems' Java Foundation Classes (JFC) within Application Processing Interface (API) which offers a graphical user interface (GUI) for Java programs.

Swing was an extension to the earlier set of GUI components called Abstract Window Toolkit (AWT) which compared to swing is less sophisticated.

The reasons for using Java Swing are:

This project required a good and simple user interface which make customers task to interact with the system easy. This job is simplified using Java Swing/JFC.

Java Foundation Class (JFC) encompasses a group of features for building graphical user interfaces (GUIs) and adding rich functionality and interactivity to Java applications.

Java Swing and JFC has inbuilt functions for drawing various user interface components. Thus by making a few changes in these function definitions we can get the appropriate component which can be directly used for user interface.

Marc Loy, Robert Eckstien, Dave wood, james Elliot and brain cole,(2003).

6.2.2 Back End Programming

The programming language used for this project is JAVA and ASPECTJ. Java has a wide range of classes and API and rich set of functions which can be used to implement all kinds of features Charatan, Quentin. Kans, Aaron  2001. This project uses JAVA for backend programming and AspectJ is used to establish only the security part of this system.

According to Charatan, Quentin. Kans, Aaron  2001 the reasons for choosing Java language in particular are as follows:

Compiled and interpreted: usually a computer language is either compiled or interpreted. Java combines both these approaches. Java compiler translates source code into byte code instruction which is used by Java interpreter to generate the machine code.

Platform-Independent and Portable: Java programs can be easily moved from one system to another, anywhere, anytime. So, it's easier to compile the program in any system.

Object-oriented: All program codes and data reside within the object and classes. It has extensive set of classes, arranged in packages.

Scalability and Performance: It improves the startup time and reduces the amount of memory used in runtime environment.

Interactive: Java was designed to meet the real world requirements of creating interactive networked programs. Java has several advanced features that allow writing programs that do many things at once.

Robust: Since java is a very strict language when it comes to types and declarations most common errors can be caught at the compile time. This saves time when compared to having to run programs and exercise all parts of it before catching some dynamic runtime mismatch.

Since we are using Java, the language used to add constructs like aspects, pointcuts and join point is AspectJ.

1.JPGFig 6.1 Weaver

AspectJ has been designed to support various implementation techniques which include source and byte code weaving directly into the Virtual machine (VM). In all cases, the program developed with AspectJ is run directly into the JAVA virtual machine after being transformed into a valid and working java program. All aspect affected classes are binary compatible with the unaffected classes to maintain with the classes which were compiled with the unaffected original ones. Also, to introduce the concept of cross-cutting concerns in Java AspectJ is used, which acts as a weaver for business logic and the cross-cutting concerns.

Figure 6.1 explains depicts how the weaver i.e. AspectJ compiler, combines customer, email and print module into a single program.

Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and a fewer low-level facilities. Java applications are typically compiled to byte code that can run on any Java Virtual Machine (JVM) regardless of computer architecture and hence this language is used for backend programming.

6.3 Selection of Platform

Though this project has been developed in Windows environment, it can still be run on any other operating system provided there is Java Virtual Machine (JVM) installed on it (since java is platform-independent).

Apart from this NetBeans IDE is being used as a platform in this project for development of the Java application. It is an open-source integrated development environment. NetBeans IDE supports development of all Java application types.

Advantage of using NetBeans in this project is :

GUI: NetBeans provide readymade windows forms with all the required buttons, labels, text boxes and like that can be tailor made for the program.

Database Integration: NetBeans interface back-end database to the front-end database.

6.4 Coding Standards

Code conventions are important to programmers for a number of reasons:

Hardly any software is maintained for its whole life by the original author.

Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.

6.4.1 With respect to Java

The code standards for the Java Programming Language document contain the standard conventions that we follow. It covers filenames, file organization, indentation, comments, declarations, statements and white space, naming conventions, programming practices.

Some of the standards followed in this project implementation are mentioned below: Beginning Comments

According to Sun Microsystems (1999) all source files begin with a c-style comment that lists the class name, version information, date, and copyright notice:


* Classname

* Version information

* Date

* Copyright notice


Other comments within the source file can be in the format:

// this is a comment

Packages and Import Statements

The first non-comment line of most Java source files is a import statement.

For example:


import java.swing.*;

import java.awt.*;

Class Declarations

The following examples describe the parts of a class declaration, in the order they appear.

Class documentation comment (/**…*/)

Class implementation comment (/*…*/), this comment contains any necessary information which was inappropriate for class documentation comment.

Class (static) variables: First the public class variables, and then the private ones.

Instance variables: First public variables then private.


Methods: the methods are grouped by functionality rather than by scope or accessibility Sun Microsystems (1999). For example, a private class method can be in between two public instance methods. The goal is to make reading and understanding the code easier.

Naming Conventions

According to Sun Microsystems (1999)

Classes: class names are nouns, in mixed case with the first letter of each internal word capitalized. Interfaces names should be capitalized like class names.

Methods: Methods are verbs, in mixed case with the first letter lowercase, with the first letter of each word capitalized.

Variables: Variable name are short yet meaningful. The choice of a variable name is mnemonic i.e. designed to indicate to the casual observer the intent of its use.

File name should be same as the name of the class containing main, declared as public.

With respect to AspectJ

Aspects: Declaration of aspect is to be done in following manner:

aspect aspect_name


// list of pointcuts



Pointcuts: syntax for pointcut is:

[access specifier] pointcut pointcut_name([args]): pointcut definition

Advice: knowing the type of advice, one can declare advice as,

Type_of_advice() : pointcut { advice }


The following challenges were faced while coding:

Jointpoints in the main program had to be discovered and some of the times they were dubious.

Socket programming for establishing client server relationship was used and it was required to implement more than one socket to take care of parallel processes.

Interfaces like client driver for database connection, sockets for client/server relationship had to be established and NetBeans IDE version 6.6 served as one stop solution for all of them.

Charatan, Quentin. Kans, Aaron  2001 Java : the first semester; London : McGraw-Hil

Bailey, Duane A., Bailey, Duane W. 2000 Java elements : principles of programming in Java; xiv, 333p. : ill. London : McGraw-Hill

Booch, Grady.1994 Object-oriented analysis and design with applications 2nd edition Redwood City, Calif. : Benjamin/Cummings Pub. Co.

Cadle, James., Yeates, Donald, 2004 Project management for information systems 4th ed xv, 432 p. : ill; Harlow : Prentice Hall.

Sun Microsystems 1999, Code Conventions for the Java TM Programming Language onlineƒ

Marc Loy, Robert Eckstien, Dave wood, james Elliot and brain cole, 2003, Java swing, O'Reilly Publications,onlineƒ