4
CHAPTER II: THEORETICAL FRAMEWORK
2.1 What is Java?
Java is a programming language released by Sun Microsystems in 1995, which has been acquired by Oracle in 2009. Java is intended to allow developer to create programs that are able to run across any platform that support Java Runtime
Environment (JRE). Java has several Java platforms that could be used to create different type of application, such as a computer program, enterprise application, and web application.
2.2 What is Java EE?
Java Enterprise Edition (EE) is a Java platform that provides an Application
Programming Interface (API) and runtime environment for developing and running large-scale, multi-tiered, scalable, reliable, and secure network applications. Java EE uses Model-View-Controller (MVC) model, with ‘Beans’ as model, Java Server
Page (JSP) as view, and ‘Servlet’ as controller.
2.3 Why Java?
Java is one of the most popular programming language. This popularity is supported by the advantages of Java. Java is a free and open sourced programming language. It is fast, secure, reliable and also has been tested, refined, extended, and proven by a dedicated community of Java developers, architects and enthusiasts.
Java is designed to enable development of portable, high-performance applications for the widest range of computing platforms possible. This allows developers to create an application that is available across heterogeneous environments and provide more services, which would boost end-user productivity, communication,
5
and collaboration, and dramatically reduce the cost of ownership of both enterprise
and consumer applications.
In Java EE, the application of the multi-service capabilities of Java is applied in a
what is called Enterprise Java Beans (EJB). EJBs act as the model in MVC
architecture of Java EE which has methods to operate with data in the database. This
Beans would be used to create a web application, and reused for the development of
mobile applications.
In summary, the main advantages of Java are:
• Write software on one platform and run it on virtually any other platform
• Create programs that can run within a web browser and access available web
services
• Develop server-side applications for online forums, stores, polls, HTML forms
processing, and more
• Combine applications or services using the Java language to create highly
customized applications or services
• Write powerful and efficient applications for mobile phones, remote processors,
microcontrollers, wireless modules, sensors, gateways, consumer products, and
practically any other electronic device
2.4 What is Frameworks?
In developing any application, developers tend to use frameworks to help them in
developing. Framework provides generic functionality for developers that can
extended based on needs by developer, thus providing application specific software.
6
Framework is a collection of software libraries/components providing a defined API.
However, it contains key distinguishing features that separate them from normal
libraries:
• inversion of control - In a framework, unlike in libraries or normal user
applications, the overall program's flow of control is not dictated by the caller,
but by the framework. default behavior
• A framework has a default behavior. This default behavior must actually be some
useful behavior and not a series of no-ops.
• extensibility - A framework can be extended by the user usually by selective
overriding or specialized by user code providing specific functionality.
• non-modifiable framework code - The framework code, in general, is not allowed
to be modified. Users can extend the framework, but not modify its code.
2.5 What framework is available?
There are a lot of frameworks exists for many programming languages, and there are
also many frameworks for Java. Several of them are Spring, Grails, Play, Google
Web Toolkit, JBoss, ZK, and Vaadin.
2.5.1 Spring Framework
Spring framework is an open source framework for Java which can be used by
any Java application. Although the framework does not impose any specific
programming model, it has become popular in the Java community as an
alternative to, replacement for, or even addition to the EJB.
7
2.5.2 Grails Framework
Grails is an open source web application framework that uses the Groovy
programming language, which is a programming language based on Java
platform. It is intended to be a high-productivity framework by following the
"coding by convention" paradigm, providing a stand-alone development
environment and hiding much of the configuration detail from the developer.
(The Grails Framework, 2015)
2.5.3 Play Framework
Play is an open source web application framework, written in Scala and Java,
which follows the MVC architecture. It aims to optimize developer
productivity by using convention over configuration, hot code reloading and
display of errors in the browser. (Play Framework, 2015)
2.5.4 Google Web Toolkit
Google Web Toolkit (GWT) is an open source set of tools that allows web
developers to create and maintain complex JavaScript front-end applications
in Java. Other than a few native libraries, everything is Java source that can be
built on any supported platform. (GWT, 2016)
2.5.5 JBoss
The JBoss Enterprise Application Platform (JBoss EAP) is a subscription-
based/open-source Java EE-based application server runtime platform used for
building, deploying, and hosting highly-transactional Java applications and
services. The JBoss Enterprise Application Platform is part of the JBoss
Enterprise Middleware portfolio of software. Because it is Java-based, the
8
JBoss application server operates cross-platform: usable on any operating
system that supports Java.
2.5.6 ZK Framework
ZK is a Java based open-source Web application framework, that enables
creation of graphical user interfaces for Web applications with little required
programming knowledge. With ZK, the end users get the similar interactivity
and responsiveness as a desktop application, while developer have similar
simplicity to that of web applications in developing. (Leading Enterprise Java
Web Framework | ZK, 2015)
2.5.7 Vaadin
Vaadin is an open source Web application framework for rich Internet
applications. In contrast to JavaScript libraries and browser-plugin based
solutions, it features a server-side architecture, which means that the majority
of the logic runs on the servers. Ajax technology is used at the browser-side to
ensure a rich and interactive user experience. On the client-side Vaadin is built
on top of and can be extended with Google Web Toolkit. (Vaadin – User
Interfae Components for business apps, 2015)
2.6 Why Maven?
Apache Maven is a software project management and comprehension tool, with the primary goal to to allow a developer to comprehend the complete state of a development effort in the Shortest period of time. Maven is based on the concept of a project object model (POM) and can manage a project's build, reporting and documentation from a central piece of information.
In order to attain its goal, Maven attempts to deal with several areas of concern.
9
▪ Making the build process easy
Maven eliminates the need to know details of underlying mechanism of Java
EE.
▪ Providing a uniform build system
Maven allows a project to build using its project object model (POM) and a set
of plugins that are shared by all projects using Maven, providing a uniform
build system. This helps developers to understand the build process of any
projects once they understand one, which could save a lot of time navigating
many projects.
▪ Providing quality project information
Maven provides plenty of useful project information that is in part taken from
your POM and in part generated from your project’s sources. For example,
Maven can provide things like change log document created directly from
source control, cross referenced sources, and dependency list. As Maven
improves the information set provided will improve, all of which will be
transparent to users of Maven.
▪ Providing guidelines for best practices development
Maven aims to gather current principles for best practices development, and
make it easy to guide a project in that direction. For example, specification,
execution, and reporting of unit tests are part of the normal build cycle using
Maven. Maven also aims to assist in project workflow such as release
management and issue tracking and suggests some guidelines on how to layout
a project’s directory structure