0% found this document useful (0 votes)
226 views

Introduction To Online Voting System 1

This document is a project report on a "Voting Management System" submitted by Swapnali B. Asgolkar and Sanchita B. Kamble, students of BSc. IT at SNDT College of Arts and SCB College of Science and Commerce for Women. The report details the successful completion of the analysis and design portion of the project under the guidance of Professor Sanjay Ranveer. It includes an acknowledgment, abstract, introduction providing background on online voting systems, and sections on system analysis and design.

Uploaded by

Swaragini Patil
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
226 views

Introduction To Online Voting System 1

This document is a project report on a "Voting Management System" submitted by Swapnali B. Asgolkar and Sanchita B. Kamble, students of BSc. IT at SNDT College of Arts and SCB College of Science and Commerce for Women. The report details the successful completion of the analysis and design portion of the project under the guidance of Professor Sanjay Ranveer. It includes an acknowledgment, abstract, introduction providing background on online voting systems, and sections on system analysis and design.

Uploaded by

Swaragini Patil
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 52

A

PROJET REPORT ON

“VOTING MANGEMENT SYSTEM”


Submitted By
“MS. SWAPNALI B. ASGOLKAR
&
MS. SANCHITA B. KAMBLE”
BSc.IT (INFORMATION TECHNOLOGY)
SEMESTER-VI
2019-2020
Under the guidance of
Prof. Mr. Sanjay Ranveer

SNDT COLLEGE OF ARTS AND SCB COLLEGE


OF SCIENCE AND COMMERCE FOR WOMEN,
CHURCHGATE, MUMBAI-400 020

1
DEPARTMENT OF INFORMATION TECHNOLOGY

SNDT COLLEGE OF ARTS & SCB COLLEGE OF SCIENCE

AND COMMERCE

This is to certify that the following students of SNDT Women’s


University have successfully completed the analysis and design part of
the project work on the topic “VOTING MANAGEMENT SYSTEM”
under the
esteemed guidance of our renowned Prof. Mr. SANJAY RANVEER, in
SNDT College of Arts & SCB College of Commerce & Science
. Churchgate in the year 2018-2019

SEAT NUMBER

 SWAPNALI ASGOLKAR

 SANCHITA KAMBLE

Mr. Sanjay Ranveer External Examiner


(Internal Guide)

Mr. Sanjay Ranveer Dr. Rajendra G. Gurao


(Head of Department) (Principal)

2
3
ACKNOWLEDGEMENT

We takes this opportunity to express our deep sense of gratitude to all at


“SHRIMATI NATHIBAI DAMODAR THACKERSEY COLLEGE OF
ARTS AND S.C.B COLLEGE OF COMMERCE AND SCIENCE FOR
WOMEN’S” and who have been very kind & helpful to us.
We lend our sincere and heartfelt acknowledgement towards our
principal “Dr. Rajendra G. Gurao” for being so kind and supportive
throughout the semester.
We would like to thank Head Of IT Department, Prof. Mr. Sanjay Ranveer, for
giving valuable support, inputs and comments which have help us for
completing the analysis and design part of the project
. At last, but not the least, we would like to thank the whole IT Department, B.sc
IT students, and to all those, we may have forgotten to mention who have helped
and encouraged us throughout the semester. IT Department.

4
5
6
Abstract

The project “online voting system” aims at making the voting process easy .present
voting system is performed using ballot paper and the counting is done manually,
Hence it consumes a lot of time there can be possibility of invalid votes. All
these makes election a tedious task. In our proposed system voting and counting is
done with the help of computer. It saves time, avoid error in counting and there
will be no invalid votes. It makes the election process easy.

OVS provides online voters registration forms for students where students registers
and are allowed to log in as either students or delegates or candidates. Each
registered user has a password to log in. The system provides an interactive
platform where voters and candidates interacts and thus candidates perform their
campaigns. The system allows preliminary voting and the results are graphically
represented in percentage. This system also allows the candidates to be liked by
users and the most liked candidate is the most popular. The system compute and
gives the election results for all the posts and provides reports for the whole
election process. The main objective of this system is to design, develop and
implement an efficient, user friendly, interactive web based student voting system.
The methodology used is waterfall.

7
chapter1

8
INTRODUCTION

"Online Voting System" is a simple web-based online voting system that will help
our college to know student's most preferred language for software development.
Online voting (also known as e-voting) is voting using electronic systems to aid
casting and counting vote.

Remote e-Voting is where voting is performed within the voter's sole influence and
is not physically supervised by representatives (e.g. voting from one's personal
computer, mobile phone, television via the internet (also called i-voting).
Electronic voting technology can speed the counting of ballots and can provide
efficiency in statistics.
In this project students must register first by clicking on "Sign Up" button in order
to vote for their preferred development language. Once registered, they can sign in
through the "Student Login page" with their respective username and password.
After successful sign in they can go to "Vote Here" tab and register their vote by
selecting any one language of their choice and hitting the "Submit" button. Once
done their vote will be registered. One vote per student is allowed. In "Voting
Statistics" tab students can see the total number of votes received for each
development language

After registration, the voter is assigned a secret Voter ID with which he/she can
use to log into the system and enjoy services provided by the system such as
voting. If invalid/wrong details are submitted, then the citizen is not registered to
vote.

9
BACKGROUND OF STUDY

The online voting system (OVS) also known as e-voting is a term encompassing
several different types of voting embracing both electronic means of counting
votes. Electronic voting technology can include punched cards, optical scan voting
systems and specialized voting kiosks. It can also involve transmission of ballots
and votes via telephones, private computer networks or the internet.

Online voting is an electronic way of choosing leaders via a web driven


application. The advantage of online voting over the common “queue method” is
that the voters have the choice of voting at their own free time and there is reduced
congestion. It also minimizes on errors of vote counting. The individual votes are
submitted in a database which can be queried to find out who of the aspirants for a
given post has the highest number of votes.

With the “ONLINE VOTING SYSTEM”, a voter can use his/her voting right
online without any difficulty. He/ She has to register as voter before being
authorized to vote. The registration should be done prior to the voting date to
enable data update in the database.

Internet voting system are appealing for several reasons which include; People are
getting more used to work with computer to do all sorts of thing, namely sensitive

operations such as shopping, and home banking and they allow people to vote

far form they usually live, helping to reduce absenteeism rate.

10
SIGNIFICANCE OF STUDY

The main purpose of OVS include:

 Provision of improved voting service to the voters though fast,


timely and convenient voting.

 Check to ensure that the members who are registered are the only
ones to vote.

 Online voting system (OVS) will require being very precise or cost
cutting to produce an effective management system.

 This voting system is only for IT or programing language users.

 Increased number of voters as individual will find it easier and


more convenient to vote, especially those are using this language.

11
OBJECTIVE OF THE PROJECT

The specific objective of the project includes:

 Reviewing the existing /current voting process or approach in our


college;
 Coming up with an automated voting system in our college;
 Implementing a an automated/online voting system;
 Validating the system to ensure that legible voters can vote.
 The main objective of this study is an important step towards
streamlining this effort is to develop a framework and identify
necessary properties that a secure and trusted online voting system
must satisfy to reduce discovery redundancy. Such a framework
will allow us to evaluate as well as compare the merits of existing
and future candidate online voting schemes. System should support
multi-user environment. System should be fully automated. System
should provide concrete security features like creating users and
assigning privileges to users of the system. System should be
capable to keep track of all the detailed descriptions of the client
and the whole details of services offered by the client organization.
 Various outputs (reports) should be available online any time.
System should be able to handle extremely large volumes of data
(i.e. large database support).

12
PROJECT JUSTIFICATION

The ONLINE VOTING SYSTEM shall reduce the time spend making
long queues at the polling stations during voting.

It shall also enable the voters to vote form any part of the globe as
explained since this is an online.

Cases of vote miscounts shall also be solved since at the backend of this
system resides a well-developed database using MYSQL that can
provide the correct data once its correctly queried.

Since the voting process shall be open as early as possible, the voters
shall have ample time to decide when and whom to vote for.

13
Chapter2

14
SYSTEM ANALYSIS

A) Background

This software is being developed for use by everyone with a simple and self-
explanatory GUI. This is software that can be used by people to vote in an election.
All the user must do is login and click on his favorite candidates to register his
vote. The development and testing are done on Ethernet. While online voting
system has been an active area of research in recent years, the use of insecure
Internet, well documented cases of incorrect implementations reported recently.
These challenges are to be resolved so that public should cast their vote in secure
and convenient way. Proposed online voting system is a voting system by which
any Voter can use his/her voting rights from anywhere in country. Online voting
system contains:

 Voter’s information in database.


 Voter’s Names with ID and password.
 Voter’s vote in a database.
 Calculation of total number of votes.

Various operational works proposed in the system are:

Recording information of the Voter in database. Checking of information filled by


voter. Discard the false information. Each information is sent to election
commission.

15
B) Existing System

The existing system of voting is highly manual. A period for


registration is set to start and end on a day, such a period is announced to the
students using the various mass communication medium including notice
board, WhatsApp messages. During such a period potential voter are
expected to report to these officers to be registered using paper and pen.
Every potential voter fills out a form with details; such an individual must be
verified authority.
The officers collect filled in data capture forms from officials at the
end of the registration period. Then data entry clerks are employed to do
entry into the database from which a voter register is produced. At the end of
this process, voters are registration cards are produced to be issued to voters.

C) Problems with The Existing Voter Registration System


 Expensive and Time Consuming: the process of collecting data and
entering this data into the database takes too much time and is
expensive to conduct.
 Too Much Paper Work: the process involves too much paper work
and paper storage which is difficult as papers become bulky with
population.
 Errors During Data Entry: errors are part of all human’s beings; it is
very unlikely for humans to be 100 percent efficient in data entry.
 Loss of Registration Forms: sometimes, registration forms get lost
 difficult to follow-up and therefore many remain unregistered even
though they are interested in exercising their right to vote.
16
 Above all, several voters end up being locked out from voting.
 Hence there is great desire to reduce official procedure in the current
voter registration process if the general electoral process is to
improve.

D) Proposed System

The proposed system will provide online voters registration forms for
students which they will fill and upon registration of their details, they will be
allowed to log in and interact with the system.

The student details will be saved in the student details database. The user
will be allowed to create their various passwords which they will use along their
school admission number to log into the system. The users will be able to log in as
either normal student or delegate or candidate. Delegates details are saved in the
delegate database while candidates details are saved in the candidate’s database.

The proposed system will also provide interaction platforms for both the
voters and the candidates where they will interact and discuss matters elections.
The candidates shall therefore perform their campaigns and answer the possible
questions from the voters on the chat platforms.

The system will be able to perform some sort of tallying before and after voting.
The results and statistics on the election will be shown and be updated properly
and instantly. The system shall also allow preliminary voting where the delegates
are able to vote, and results are displayed openly to everyone. The students and
delegates will be able to like the various candidates and the most liked candidate
will be the most popular. The system will display the results of likes and votes and
even percentage of victory. The proposed system will therefore compute the
election results for all the posts voted and compute the most popular candidate and

17
the least popular candidate. The system will also compute reports for the whole
election process.

In propose system remote and users can exercise. In the proposed system we can
get the result without manually counting. The computerized counting is simple.

. The following are the goals of the proposed system;

 Only eligible voters can vote


 Every voter shall cast only one vote
 It must be impossible to change anybody’s vote
 The complete voting procedure must be so transparent
 User friendly
 Robustness; it functions no matter any failure
 Hacker secure
 Transparency; users can check the system integrity without any trouble.

E) Advantages

Following are the features of the project;

1. Planned approach towards working: - The working in the organization


will be well planned and organized. The data will be stored properly in
data stores, which will help in retrieval of information as well as its
storage.

18
2. Accuracy: - The level of accuracy in the system will be higher. All
operation would be done correctly, and it ensures that whatever
information is coming from the center is accurate.
3. Reliability: - The reliability of the system will be high due to the above
stated reasons. The reason for the increased reliability of the system is that
now there would be proper storage of information.
4. No Redundancy: - In the system utmost care would be that no information
is repeated anywhere, in storage or otherwise. This would assure economic
use of storage space and consistency in the data stored.
5. Immediate retrieval of information: - The main advantage of the system
is to provide for a quick and efficient retrieval of information.
6. Immediate storage of information: - In manual system there are many
problems to store the largest amount of information.
7. Easy to Operate: - The system should be easy to operate and should be
such that it can be developed within a short period of time and fit in the
limited budget of the user
8. Private and Secure: - the system provides a layer of separation between
the voting process and individuals involved. No unsecured paper ballots.
9. Authentication: - each vote is captured with a date and timestamp along
with voter’s internet address.
10. Cost-effective: - no paper ballots, no postage and no printing, no time or
resources needed for manual hand counts results in cost effective system.

19
Chapter3

20
FEASIBILITY STUDY
Feasibility analysis begins once the goals are defined. It starts by generating broad
possible solutions, which are possible to give an indication of what the new system
should look like. This is where creativity and imagination are used. Analysts must
think up new ways of doing things- generate new ideas. There is no need to go into
the detailed system operation yet. The solution should provide enough information
to make reasonable estimates about project cost and give users an indication of
how the new system will fit into the organization. It is important not to exert
considerable effort at this stage only to find out that the project is not worthwhile
or that there is a need significantly change the original goal. Feasibility of a new
system means ensuring that the new system, which we are going to implement, is
efficient and affordable. There are various types of feasibility to be determined.
They are,

21
22
3.1 Economically Feasibility
Development of this application is highly economically feasible. The only thing to
be done is making an environment with an effective supervision. It is cost effective
in the sense that has eliminated the paper work completely. The system is also time
effective because the calculations are automated which are made at the end of the
month or as per the user requirement.

3.2 Technical Feasibility


The technical requirement for the system is economic and it does not use any other
additional Hardware and software. Technical evaluation must also assess whether
the existing systems can be upgraded to use the new technology and whether the
organization has the expertise to use it. Install all upgrades framework into the Java
package supported widows-based application. This application depends on
Microsoft office and intranet service, database.

3.3 Operational Feasibility


The system working is quite easy to use and learn due to its simple but attractive
interface. User requires no special training for operating the system. Technical
performance includes issues such as determining whether the system can provide
the right information for the Department personnel student details, and whether the
system can be organized so that it always delivers this information at the right
place and on time using intranet services. Acceptance revolves around the current
system and its personnel

23
Chapter4

24
REQUIRMENT ANALYSIS

A) FUNCTION REQUIRMENT:

 REGISTRATION of the voter is done by ELECTION BETWEEN THE


LAGUVEGES.
 Registration of the Voter depend upon the information filled by the user.
 Voter is given a unique ID and PASSWORD.
 Voter can give vote after login and entering the ID and PASSWORD.
 In the DATABASE INFORMATION of evert voter is stored.
 Database shows the information of every user.
 Secure storage and retrieval of voters’ details from the database.
 Maintaining and manipulating records in database through function like
edit, delete and view.
 Validate and verify input and output data.
 To count the total number of votes
 To calculate the percentage of total votes
 To check for duplication
 To find the winning persons in each section. All the process above
mentioned should be done fast.

B) NON-FUNCTIONAL REQUIREMENTS:

 Secure access of confidential data (user’s details). SSL can be used.


 24 X 7 availability.
 Better component design to get better performance at peak time.

25
 Flexible service-based architecture will be highly desirable for future
extension

C) USER REQUIREMENT:

The online voting system should:


1) Be able to display all registered voters in the database to the system admin
as per their access rights and privileges.
2) Have a user-friendly interface and user guide understandable by people of
average computer skills.
3) Be robust enough so that users do not corrupt it in the event of voting.
4) Be able to handle multiple users at the same time and with the same
efficiency, this will cater for the large and ever-growing population of
voters.

D) SOFTWARE REQUIREMENTS:

1. MYSQL DBMS- It allows combination, extraction, manipulation and


organization of data in the voters’ database. It is platform independent
and therefore can be implemented and used across several such as
Windows, Linux server and is compatible with various hardware
mainframes. It is fast in performance, stable and provides business value
at a low cost.

2. NetBeans IDE 7.1.2- The NetBeans IDE is an award-winning integrated


development environment available for Windows, Mac, Linux, and

26
Solaris. The NetBeans project consists of an open-source IDE and an
application platform that enable developers to rapidly create web,
enterprise, desktop, and mobile applications using the Java platform, as
well as PHP, JavaScript and Ajax, Groovy and Grails, and C/C++.

3. HTML – Hypertext Markup Language- this is currently the core of the


web world, it is a language used to makeup web page. It is the glue that
holds everything together.

4. Testing- XAMP/WAMP SERVER.

5. Internet explorer

E) HARDWARE REQUIREMENTS:

1. Microsoft Windows XP Professional /Windows 7 Professional


/Windows 10
2. Processor: 800MHz Intel Pentium III or equivalent
3. Memory: 512 MB

4. Disk space: 750 MB of free disk space.

5. Finger Print Scanner

27
6. RAM: 1GB

7. Keyboard: Normal or Multimedia

8. Mouse: Compatible mouse

9.

28
Chapter5

29
PROCESS MODEL

A process model for software engineering is cho ose based on the nature of
the project and application, the method and tools to be used ,and the controls and
deliverables that are required.
The model is used to build the “ONLINE VOTING SYSTEM” software is :
“The Prototyping Model”.
The prototyping paradigm is ” WATERFALL MODEL”

Idea

Analysis

Fig.1.1 Waterfall model

The water fall model is a software development model in which a


system development is viewed as methodology is powerful, precise, and
though. It has a number of phase that have to be implemented in a
sequential manner

30
31
32
4.2 Software & Tools Used

33
4.2.1 HTML
HTML or Hyper Text Markup Language is the standard markup language used to
create web pages.
HTML was created in 1991 by Tim Berners-Lee at CERN in Switzerland. It was
designed to allow scientists to display and share their research.
HTML is written in the form of HTML elements consisting of tags enclosed in
angle brackets (like <html>). HTML tags most commonly come in pairs like
College

34
<h1> and </h1>, although some tags represent empty elements and so are unpaired,
for example <img>. The first tag in a pair is the start tag, and the second tag is the
end tag (they are also called opening tags and closing tags).
The purpose of a web browser is to read HTML documents and compose them into
visible or audible web pages. The browser does not display the HTML tags but
uses the tags to interpret the content of the page. HTML describes the structure of a
website semantically along with cues for presentation, making it a markup
language rather than a programming language.
HTML elements form the building blocks of all websites. HTML allows images
and objects to be embedded and can be used to create interactive forms. It provides
a means to create structured documents by denoting structural semantics for text
such as headings, paragraphs, lists, links, quotes and other items. It can embed
scripts written in languages such as Java Script which affect the behavior of HTML
web pages.
HTML is descriptive markup language. Library of various markup languages is
defined in various browsers.
a) HTML Images - The <img> Tag and the Src Attribute
In HTML, images are defined with the <img> tag.
The <img> tag is empty, which means that it contains attributes only, and has no
closing tag.
To display an image on a page, you need to use the src attribute. Src stands for
"source". The value of the src attribute is the URL of the image you want to
display.
Syntax for defining an image:
<imgsrc="url" alt="some_text">

35
b) HTML FORMS
HTML forms are used to pass data to a server. The <form>
tag is used to create an HTML form:
<form> . input elements . </form>

An HTML form can contain input elements like text fields, checkboxes, radio-
buttons, submit buttons and more. A form can also contain select lists, textarea,
fieldset, legend, and label elements.
c) Image tag (<img>) :
To add an image to an HTML document, we just need to include an <IMG> tag
with a reference to the desired image. The <IMG> tag is an empty element i.e. it
doesn’t require a closing tag and we can use it to include from small icons to large
images.
Syntax: <imgsrc=‖URL‖ alt=‖alternative text‖>

d) HTML Lists: An ordered An unordered list:


list: List item
The first list item List item
The second list item List item
The third list item

36
4.2.2 HTML 5
HTML5 will be the new standard for HTML. The previous version of HTML,
HTML 4.01, came in 1999. The web has changed a lot since then. HTML5 is still a
work in progress. However, the major browsers support many of the new HTML5
elements and APIs.
HTML5 is cooperation between the World Wide Web Consortium (W3C) and the
Web Hypertext Application Technology Working Group (WHATWG).
WHATWG was working with web forms and applications, and W3C was working
with XHTML 2.0. In 2006, they decided to cooperate and create a new version of
HTML.
Some rules for HTML5 were established:
a) New features should be based on HTML, CSS, DOM, and JavaScript
b) Reduce the need for external plug-ins (like Flash)
c) Better error handling
d) More markup to replace scripting
e) HTML5 should be device independent
f) The development process should be visible to the public
4.2.3 CSS
CSS tutorial or CSS 3 tutorial provides basic and advanced concepts of CSS
technology. Our CSS tutorial is developed for beginners and professionals. The
major points of CSS are given below:
 CSS stands for Cascading Style Sheet.

 CSS is used to design HTML tags.

 CSS is a widely used language on the web.

 HTML, CSS and JavaScript are used for web designing. It helps the web
37
designers to apply style on HTML tags.
Cascading Style Sheets (CSS) is a style sheet language used for describing the look
and formatting of a document written in a markup language. While most often used
to style web pages and user interfaces written in HTML and XHTML, the language
can be applied to any kind of XML document, including plain XML, SVG and
XUL. CSS is a cornerstone specification of the web and almost all web pages use
CSS style sheets to describe their presentation.
CSS is designed primarily to enable the separation of document content from
document presentation, including elements such as the layout, colors, and fonts.
This separation can improve content accessibility, provide more flexibility and
control in the specification of presentation characteristics, enable multiple pages to
share formatting, and reduce complexity and repetition in the structural content
(such as by allowing for table less web design).
CSS can also allow the same markup page to be presented in different styles for
different rendering methods, such as on-screen, in print, by voice (when read out
by a speech-based browser or screen reader) and on Braille-based, tactile devices.
It can also be used to allow the web page to display differently depending on the
screen size or device on which it is being viewed. While the author of a document
typically links that document to a CSS file, readers can use a different style sheet,
perhaps one on their own computer, to override the one the author has specified.
With plain HTML you define the colors and sizes of text and tables throughout
your pages. If you want to change a certain element you will therefore have to
work your way through the document and change it. With CSS you define the
colors and sizes in "styles". Then as you write your documents you refer to the

38
styles. Therefore: if you change a certain style it will change the look of your entire
site. Another big advantage is that CSS offers much more detailed attributes than

39
plain HTML for defining the look and feel of your site.
4.2.4 JAVASCRIPT
JavaScript (JS) is a dynamic computer programming language. It is most
commonly used as part of web browsers, whose implementations allow client-side
scripts to interact with the user, control the browser, communicate asynchronously,
and alter the document content that is displayed. It is also being used in server-side
network programming (with Node.js), game development and the creation of
desktop and mobile applications.
JavaScript is a prototype-based scripting language with dynamic typing and has
first-class functions. Its syntax was influenced by C. JavaScript copies many names
and naming conventions from Java, but the two languages are otherwise unrelated
and have very different semantics. The key design principles within JavaScript are
taken from the Self and Scheme programming languages. It is a multi-paradigm
language, supporting object-oriented, imperative, and functional programming
styles.
The application of JavaScript in use outside of web pages—for example, in PDF
documents, site-specific browsers, and desktop widgets—is also significant. Newer
and faster JavaScript VMs and platforms built upon them (notably Node.js) have
also increased the popularity of JavaScript for server-side web applications. On the
client side, JavaScript was traditionally implemented as an interpreted language,
but just-in-time compilation is now performed by recent (post-2012) browsers.
JavaScript was formalized in the ECMA Script language standard and is primarily
used as part of a web browser (client-side JavaScript). This enables programmatic
access to objects within a host environment.

40
JavaScript is the most popular programming language in the world.
It is the language for HTML, for the Web, for computers, servers, laptops, tablets,
smart phones, and more.
You can use JavaScript to:
 Change HTML elements
 Delete HTML elements
 Create new HTML elements
 Copy and clone HTML elements

4.2.5 Java Server Page (JSP)


What is Java Server Pages?
Java Server Pages (JSP) is a technology for developing Webpages that supports
dynamic content. This helps developers insert java code in HTML pages by
making use of special JSP tags, most of which start with <% and end with %>.
A Java Server Pages component is a type of Java servlet that is designed to fulfill
the role of a user interface for a Java web application. Web developers write JSPs
as text files that combine HTML or XHTML code, XML elements, and embedded
JSP actions and commands.
Using JSP, you can collect input from users through Webpage forms, present
records from a database or another source, and create Webpages dynamically.
JSP tags can be used for a variety of purposes, such as retrieving information from
a database or registering user preferences, accessing JavaBeans components,
passing control between pages, and sharing information between requests, pages
etc.

41
Why Use JSP?
Java Server Pages often serve the same purpose as programs implemented using
the Common Gateway Interface (CGI). But JSP offers several advantages in
comparison with the CGI.
 Performance is significantly better because JSP allows embedding Dynamic
Elements in HTML Pages itself instead of having separate CGI files.
 JSP are always compiled before they are processed by the server unlike
CGI/Perl which requires the server to load an interpreter and the target script
each time the page is requested.
 Java Server Pages are built on top of the Java Servlets API, so like Servlets,
JSP also has access to all the powerful Enterprise Java APIs, including
JDBC, JNDI, EJB, JAXP, etc.
 JSP pages can be used in combination with servlets that handle the business
logic, the model supported by Java servlet template engines.
 Finally, JSP is an integral part of Java EE, a complete platform for enterprise
class applications. This means that JSP can play a part in the simplest
applications to the most complex and demanding.

Advantages of JSP
Following table lists out the other advantages of using JSP over other technologies:
-
vs. Active Server Pages (ASP)
The advantages of JSP are twofold. First, the dynamic part is written in Java, not
Visual Basic or other MS specific language, so it is more powerful and easier to
use. Second, it is portable to other operating systems and non-Microsoft Web
servers.
42
vs. Pure Servlets
It is more convenient to write (and to modify!) regular HTML than to have plenty
of printing statements that generate the HTML.
vs. Server-Side Includes (SSI)
SSI is only intended for simple inclusions, not for "real" programs that use form
data, make database connections, and the like.
vs. JavaScript
JavaScript can generate HTML dynamically on the client but can hardly interact
with the web server to perform complex tasks like database access and image
processing etc.
vs. Static HTML
Regular HTML, of course, cannot contain dynamic information.

4.3 About Back End


In a previous blog, we talked about how web programmers are concerned with
launching websites, updates, and maintenance, among other things. All that works
to support the front-end of the website. The back-end has three parts to it: server,
application, and database.
To better explain how all of this works, let’s use the example of a customer trying
to purchase a plane ticket using a website. Everything that the customer sees on the
webpage is the front-end, as we have explained before, but once that customer
enters all of his or her information, such as their name, billing address, destination,
etc, the web application stores the information in a database that was created
previously on the server in which the website is calling for information.

43
The web application creates, deletes, changes, renames, etc. items in the database.
For example, when a customer purchases a ticket, that creates an item in the
database, but when they have a change in their order or they wish to cancel, the
item in the database is changed.
In short, when a customer wants to buy a ticket, the backend operation is the
web application communicating with the server to make a change in a
database stored on said server. Technologies like PHP, Ruby, Python, and
others are the ones backend programmers use to make this communication
work smoothly, allowing the customer to purchase his or her ticket with
ease.

44
MySQL’s Logical Architecture

The topmost layer contains the services that aren’t unique to MySQL. They’re
services most network-based client/server tools or servers need: connection
handling, authentication, security, and so forth.

The third layer contains the storage engines. They are responsible for storing and
retrieving all data stored ―in MySQL. Like the various filesystems available for
GNU/Linux, each storage engine has its own benefits and drawbacks. The
server communicates with them through the storage engine API. This interface
hides differences between storage engines and makes them largely transparent at
the query layer. The API contains a couple of dozen low-level functions that
45
perform operations such as ―begin a transaction‖ or ―fetch the row that has this
primary key. The storage engines don’t parse SQL or communicate with each
other; they simply respond to requests from the server.

46
Software’s and Tools used

MYSQL Introduction

The database has become an integral part of almost every human's life. Without it,
many things we do would become very tedious, perhaps impossible tasks. Banks,
universities, and libraries are three examples of organizations that depend heavily
on some sort of database system. On the Internet, search engines, online shopping,
and even the website naming convention would be impossible without the use of a
database. A database that is implemented and interfaced on a computer is often
termed a database server.
One of the fastest SQL (Structured Query Language) database servers currently on
the market is the MySQL server, developed by T.C.X. Data Konsult AB. MySQL,
available for download at www.mysql.com, offers the database programmer with
an array of options and capabilities rarely seen in other database servers. MySQL
is free of charge for those wishing to use it for private and commercial use. Those
wishing to develop applications specifically using MySQL should consult
MySQL's licensing section, as there is charge for licensing the product.
These capabilities range across several topics, including the following:

47
a) Ability to handle an unlimited number of simultaneous users.

b) Capacity to handle 50,000,000+ records.

c) Very fast command execution, perhaps the fastest to be found on the market.
d)Easy and efficient user privilege system.
However, perhaps the most interesting characteristic of all is the fact that it's free.
That's right, T.C.X offers MySQL as a free product to the general public.
Reasons to Use MySQL
a) Scalability and Flexibility
The MySQL database server provides the ultimate in scalability, sporting the
capacity to handle deeply embedded applications with a footprint of only 1MB to
running massive data warehouses holding terabytes of information. Platform
flexibility is a stalwart feature of MySQL with all flavors of Linux, UNIX, and
Windows being supported.
b) High Performance
A unique storage-engine architecture allows database professionals to configure
the MySQL database server specifically for applications, with the end result being
amazing performance results.
c) High Availability
Rock-solid reliability and constant availability are hallmarks of MySQL, with
customers relying on MySQL to guarantee around-the-clock uptime. MySQL
offers a variety of high-availability options from high-speed master/slave
replication configurations, to specialized Cluster servers offering instant failover,
to third party vendors offering unique high-availability solutions for the MySQL
database server.
d) Robust Transactional Support

48
MySQL offers one of the most powerful transactional database engines on the
market. Features include complete ACID (atomic, consistent, isolated, durable)
transaction support, unlimited row-level locking, distributed transaction capability,
and multi-version transaction support where readers never block writers and vice-
versa.

e) Web and Data Warehouse Strengths


MySQL is the de-facto standard for high-traffic web sites because of its high-
performance query engine, tremendously fast data inserts capability, and strong
support for specialized web functions like fast full text searches.
f) Strong Data Protection
Because guarding the data assets of corporations is the number one job of database
professionals, MySQL offers exceptional security features that ensure absolute
data protection. In terms of database authentication, MySQL provides powerful
mechanisms for ensuring only authorized users have entry to the database server,
with the ability to block users down to the client machine level being possible.
g) Management Ease
MySQL offers exceptional quick-start capability with the average time from
software download to installation completion being less than fifteen minutes. This
rule holds true whether the platform is Microsoft Windows, Linux, Macintosh, or
UNIX.

49
SERVLET
Java Servlets are programs that run on a Web or Application server and act as a
middle layer between a request coming from a Web browser or other HTTP client
and databases or applications on the HTTP server.
Using Servlets, you can collect input from users through web page forms, present
records from a database or another source, and create web pages
dynamically.
Java Servlets often serve the same purpose as programs implemented using the
Common Gateway Interface (CGI). But Servlets offer several advantages in
comparison with the CGI.
 Performance is significantly better.

 Servlets execute within the address space of a Web server. It is not necessary to
create a separate process to handle each client request.

 Servlets are platform-independent because they are written in Java.

 Java security manager on the server enforces a set of restrictions to protect the
resources on a server machine. So servlets are trusted.

 The full functionality of the Java class libraries is available to a servlet. It can
communicate with applets, databases, or other software via the sockets and RMI
mechanisms that you have seen already.

Servlets Tasks
Servlets perform the following major tasks −
 Read the explicit data sent by the clients (browsers). This includes an HTML
form on a Web page or it could also come from an applet or a custom HTTP client
program.

50
 Read the implicit HTTP request data sent by the clients (browsers). This
includes cookies, media types and compression scheme the browser understands,
and so forth.

 Process the data and generate the results. This process may require talking to a
database, executing an RMI or CORBA call, invoking a Web service, or
computing the response directly.

 Send the explicit data (i.e., the document) to the clients (browsers). This
document can be sent in a variety of formats, including text (HTML or

XML), binary (GIF images), Excel, etc.

 Send the implicit HTTP response to the clients (browsers). This includes telling
the browsers or other client’s what type of document is being returned (e.g.,
HTML), setting cookies and caching parameters, and other such tasks.
Servlets Packages
Java Servlets are Java classes run by a web server that has an interpreter that
supports the Java Servlet specification.
Servlets can be created using the javax.servlet and javax.servlet.httppackages,
which are a standard part of the Java's enterprise edition, an expanded version of
the Java class library that supports large-scale development projects.
These classes implement the Java Servlet and JSP specifications. At the time of
writing this tutorial, the versions are Java Servlet 2.5 and JSP 2.1.
Java servlets have been created and compiled just like any other Java class. After
you install the servlet packages and add them to your computer's Class path, you
can compile servlets with the JDK's Java compiler or any other current compiler.
A development environment is where you would develop your Servlet, test them
and finally run them.
51
Like any other Java program, you need to compile a servlet by using the Java
compiler javac and after compilation the servlet application, it would be deployed
in a configured environment to test and run.

52

You might also like