CHAPTER 5
PROPOSED SYSTEM
5.1
DESCRIPTION OF LANGUAGES & TOOLS USED
The
Airline reservation system is a Web-based on-line reservation system that is
intended to provide information needed to reserve seat(s) on certain flights.
This
project is based on the 3-tier architecture. It is a pure JAVA/HTML/JSP/
Servlet solution.
JAVA
JAVA
is Object-oriented Language ( supports abstraction, Encapsulation , Inheritance
, polymorphism), developed by five Sun Microsoft Engineers-viz James Gosling,
Patrick Naughton, Chris Warth, Ed Frank and Mike Sheridan, spent 18 months
developing the programming language, called “OAK”, later renamed “JAVA” in
1995.
It is portable (write-once-run-anywhere),
security (provide firewall between networked application and client computer),
and platform independent. Java programs could be run on computers running
Microsoft Windows, UNIX, Macintosh. It supports multithreading. It is widely
used for developing Internet based applications. It doesn’t support multiple inheritance.
Java
features are grouped into three editions and each having a Software Development
Kit (SDK): (i) J2SE (Java 2 Standard
Edition)-original edition of java, consists of application programming
interfaces (APIs) needed to built a java application or applet. (ii) J2ME (Java
2 Micro Edition) contains APIs used to create applications for a small
computing devices, including wireless java application.
It
is a reduced version of Java APIs and Java Virtual Machine. (iii) J2EE (Java 2
Enterprise Edition), an embellished version of J2SE to accommodate n-tier
architecture has APIs to build applications for multi-tier architecture.
JSPs
(Java Server Pages)
JSP is a
server side technology. It is used for creating dynamic pages and for presentation (for creating forms fields).
Sun
introduced JSPs which offers a way to write snippets of servlet code directly
within a static HTML page similar to Active Server Pages (ASPs). Each block of
servlet code (called scriptlet) is surrounded by a leading <% tag and a
closing %> tag.
Java Server
Pages allow the use of expression and directives. A JSP expression begins with
<% =and ends with %>. Any java expression between the two tags is
evaluated, the result is converted to a string, and the text is included
directly in the page. A JSP directive begins with <%@ and ends with %>. A
directive allows a JSP page to control certain aspects of its workhorse.
JAVA
SERVLET
A servlet is
a generic extension-a java class that can be loaded dynamically to expand the
functionality of a server. It provides best possible platform for web
application development. It is neutral both across operating system and web
server. Servlets are commonly used with
web servers, where they can take the place of CGI script (Common Gateway
Interface). Servlets are multithreaded by nature. A servlet runs inside a Java
Virtual Machine (JVM) on the server, so it is save and portable both across
operating systems and also across web servers. “Write Once, Serve Everywhere”.
Servlets are used in MVC architecture as a controller.
Servlets
operate solely within the domain of the server, unlike applets, they do not
require support for java in the web browser. Servlets are all handled by
separate threads with in the web server process. Servlet is based on Request
and Response paradigm. Servlet API contains two packages one javax.servlet
package and the other javax.servlet.http package. These are not part of java
core packages.
JDBC
The JDBC ( Java Database Connectivity)
API defines interfaces and classes for writing database applications in Java by
making database connections. Using JDBC we can send SQL, PL/SQL statements to
almost any relational database. JDBC is a Java API for executing SQL statements
and supports basic SQL functionality. It provides RDBMS access by allowing us
to embed SQL inside Java code. Because Java can run on a thin client, applets
embedded in Web pages can contain downloadable JDBC code to enable remote
database access.
Although JDBC was designed
specifically to provide a Java interface to relational databases, we may find
that we need to write Java code to access non-relational databases as well.
The JDBC Architecture is as
follows:
JDBC
Architecture
Java
application calls the JDBC library. JDBC loads a driver which talks to the
database. We can change database engines without changing database code.
|
JDBC
drivers are divided into four types or levels. The different types of jdbc drivers are:
Type 1: JDBC-ODBC Bridge driver (Bridge)Type 2: Native-API/partly Java driver (Native)
Type 3: All Java/Net-protocol driver (Middleware)
Type 4: All Java/Native-protocol driver (Pure)
Type
1 JDBC Driver
JDBC-ODBC
Bridge driver
The
Type 1 driver translates all JDBC calls into ODBC calls and sends them to the
ODBC driver. ODBC is a generic API. The JDBC-ODBC Bridge driver is recommended
only for experimental use or when no other alternative is available.
Type 2 JDBC Driver
Native-API/partly
Java driver
The
distinctive characteristic of type 2 jdbc drivers are that Type 2 drivers
convert JDBC calls into database-specific calls i.e. this driver is specific to
a particular database. Some distinctive characteristic of type 2 jdbc drivers
are shown below. Example: Oracle will have oracle native api.
Type 3 JDBC Driver
All
Java/Net-protocol driver
Type
3 database requests are passed through the network to the middle-tier server.
The middle-tier then translates the request to the database. If the middle-tier
server can in turn use Type1, Type 2 or Type 4 drivers.
Type 4 JDBC Driver
Native-protocol/all-Java
driver
The
Type 4 uses java networking libraries to communicate directly with the database
server.
JDBC
process can be divided into five routines: loading the JDBC drivers, connecting to the DBMS,
creating and executing a statement, processing data returned by the DBMS and
terminating the connection with the DBMS.
JDBC/ODBC
bridge driver can be loaded by calling the Class.forName( ) method and passing
drivers name sun.jdbc.odbc.JdbcOdbcDriver. For example
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
Java
Script
Java Script is a scripting
programming language, designed to add interactivity to HTML pages. It is
usually embedded directly into HTML pages.
JavaScript gives HTML
designers a programming tool which can put dynamic text into HTML pages. It can
react to events, can read and write HTML elements, can be used to validate
data, to detect the visitor’s browser and create cookies.
JavaScript can be put
into an HTML page as follow:
<html>
<body>
<script type =
“text/javascript”>
document.write(“Hello
Word!”);
</script>
</body>
</html>
HTML (HyperText
Markup Language)
HTML, an
acronym for HyperText Markup Language, is the predominant markup language for
web pages.
It provides a means to describe the structure of text-based information
in a document-by denoting certain text as links, headings, paragraphs,
lists, etc.- and to supplement that text with interactive forms, embedded
images, and other objects.
HTML is Written in the forms of “tags”
, that are surrounded by angle brackets.HTML
can also describe, to some degree, the appearance and semantics of a document,
and can include embedded scripting language code (such as JavaScript) that can
affect the behavior of Web browsers and other HTML processors.
CSS
(Cascading Style Sheets)
CSS is
typically used to create presentational effects for semantic HTML. Style HTML, an acronym for HyperText Markup
Language, is the predominant markup language for web pages.
Style sheets
form an integral part of dynamic HTML as they can be accessed and changed
on-the-fly by scripting languages. CSS offers much more flexibility in terms of
presentation effects.
With CSS, a
designer can create the content with the appropriate, semantic markup and then
use CSS to alter the appearance of their markup.The benefit of semantic HTML is
that presentation of the text will be consistently applied, so long as the
proper markup is consistently applied. Moreover, it allows for easy change of
presentation, by simply editing the style sheets as well as being able to
transfer the text from one site to another.
HTML
documents can be delivered by the same means as any other computer file;
however, they are most often delivered either by HTTP from a Web server or by
e-mail.
Style sheets
are used for adding styles (e.g. Font, Colors, Background, Margin, Border,
Spacing, etc.) to web documents. It provides standards and uniformity
throughout a web site and other dynamic
attributes. HTML elements on web page are bound with style sheet. The
advantages of style sheet includes ability to make global changes to all
documents from a single location. <Style>………</Style> tags are used
for style process. Between this tags HTML tags are specified.
CSS syntax
is rather logical and easy to learn, there are 6 basic rules of style
definition.
e.g. H1, B{color: olive; background: yellow;
font-family: arial, courier}
Database
(MySQL 5)
MySQL (My Structured Query
Language) is a open source Relational Database
Management System. MySQL is very fast reliable and flexible Database Management
System. It provides a very high performance and it is multi threaded and multi
user Relational Database management system. The program runs as a server
providing multi-user access to a number of databases. MySQL
5.0 is in two different variants: the MySQL Community Server and Enterprise Server. They have a common code base and
include the various features.
TOMCAT SERVER :
Apache Tomcat (or Jakarta Tomcat or simply Tomcat) is a servlet
container
developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a "pure
Java" HTTP web
server
environment for Java code to run.
Tomcat is not the Apache web server (which is a C implementation of an HTTP web server); these two web servers
are not bundled together. Apache Tomcat includes tools for configuration and
management, but can also be configured by editing XML configuration files.
Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies.
The Java Servlet and JavaServer Pages specifications are
developed under the Java Community Process.
Tomcat can be used as
either a standalone product with its own internal Web server or together with other Web servers, including
Apache, Netscape Enterprise Server, Microsoft
Internet Information Server (IIS), and Microsoft Personal Web Server. Tomcat requires a Java Runtime Enterprise
Environment that conforms to JRE 1.1 or later.
|
No comments:
Post a Comment
We’re eager to see your comment. However, Please Keep in mind that all comments are moderated manually by our human reviewers according to our comment policy. Let’s enjoy a personal and evocative conversation.