Project Report On
XXXXXXXXX Project work submitted in partial fulfillment Of the requirement for the award of the degree
B.Tech By XXXXXXXXX
( Regd.No: )
!nder the "uidance of
Mr. XXXXXXXX (Project Coordinator, XXXXXXXXXXX )
XXXXXXX UNIVERSITY
CERTIFICATE
This is to certify that this project entitled #$ is a bonafide work carried out by bearing %all &icket No: '()'*'+, in and submitted to !ni-ersi !ni-ersity ty in partial fulfillment of the requirements for the award of Bachelor of &echnology.
Project "uide
/ternal /aminer
Principal
ACKNOWE!"MENT
Task successful! makes everyone happy" But the happiness will be gold without glitter if we didn#t state the persons who have supported us to make it a success" $uccess will be crowned to people who made it a reality but the people whose constant guidance and encouragement made it possible will be crowned first on the eve of success" This acknowledgement transcends the reality of formality when we would like to e%press deep gratitude and respect to all those people behind the screen who guided, inspired and helped me for the completion of our project work" & consider myself lucky enough to get such a good project" This project would add as an asset to my academic profile" & would like to e%press my thankfulness to my project guide,
0r.
for for his constant motivation and valuable help through the project work, and & e%pres ress my grati atitude to 0r. ,,
'irec 'irecto torr of of XXX XXXXX XXXX XXXX XX,,
(yderabad, (yderabad, for his constant supervision, supervision, guidance guidance and co)operation through out the project"
I also extend my thanks to my Team Members for their cooperation during my course. ina i nall lly y I !o !oul uld d like like to th than anks ks my frie friend nds s for for th thei eirr cocooperation to complete this pro"ect.
#######
$aste %rgani&ation pro'le here
CONTENTS #. INTRO!UC INTRO!UCTION TION IT%*+,TI% T% $%,T $+$%/ % T0 $%,T #I/TI1 #I/TI 1 /2/TM 3 IT/ *I/4*54T41/ $%$%/* /2/TM 3 IT/ 4*54T41/
$. SYSTEM SYSTEM ANAYSIS ANAYSIS 6.7. 6.7. 6.6. 6.8. 6.;.
/T+* T+*2 % % T0 T0 /2/ /2/TM TM I$+T 3 %+T$+T $/T4TI% $%,// M% M%*9/ +/ +/* :I :IT0 + +/TII,4TI% /2/TM 4,0IT,T+
%. FEASIBI FEASIBIITY ITY STU!Y STU!Y 8.7. 8.7. 8.6. 8.6. 8.8. 8.8.
T,0 T,0I I,4 ,49 9 4/ 4/I II9 I9IT IT2 2 %$ %$4 4TI% TI%49 49 4/ 4/I II9 I9IT IT2 2 ,% , %%M %MI, I, 4/ 4/I II9 I9IT IT2 2
&. RE'UIREMENT SPECIFICA SPECIFICATIONS TIONS ;.7. ;.7. + +, ,I% I%4 49 9 =+I =+I M MT T/ / ;.6. ;.6. $ $% %M4 M4, , =+ =+I IM M T/ T/ ;.8. ;.8. /%T /%T: :4 4 =+ =+I IM M T/ T/ ;.;. ;.;. 04* 04*: :4 4 =+ =+I IM M T/ T/ ;.;.7. IT%*+,TI% T% T% 4 454 ;.;.6. /erlets?/$ ;.;.8. *, ;.;.;. %racle ;.;.@. 0TM9 ;.;.A. aa /c /cript
. SYSTEM SYSTEM !ESI"N !ESI"N @.7 @.6 @.8 @.; @.@ @.A
.
IT%*+,TI% *4T4 9%: *I414M/ +M9 *I414M/ - *I414M %M49IB4TI% *4T4 *I,TI%42
. OUTPUT OUTPUT SCREENS SCREENS *. SYSTEM SYSTEM TESTI TESTIN" N" C.7 C.6
IT%*+,TI% T% T/TI1 T/TI1 /T4T1I/
+. SYSTEM SYSTEM SECURI SECURITY TY D.7 D.6
,.
IT%*+,TI% /,+IT2 I /%T:4 /%T:4
BIBIO"RAP-Y
#.#. #.#. INTRO INTRO!UC !UCTI TION ON OB/ECT OB/ECTIVE IVE The objective of this application is to develop dev elop a system that automates and organizes the ambulance service sector. The The purpose is to maintain a well-defined interface to the offered services and maintain a centralized database of entire information.
#.$. #.$. PURPO PURPOSE SE OF T-E T-E PRO/ PRO/EC ECT T The purpose of the project is to make the ambulance services available to everybody by maintaining the data in the database.
#.%. EXISTIN" SYSTEM !ISA!V !ISA!VANT ANTA"ES A"ES The present system is not efficient and effective as the entire data is maintained ac ross various files and systems. It is difficult to access the data and perform the necessary operations. The system cannot respond properly to emergency situations.
#.&. PROPOSE! SYSTEM ITS ITS !ISA!V !ISA!VANT ANTA"ES A"ES The proposed system organizes the data effectively. It provides mechanisms to communicate information efficiently and accurately. It provides information regarding ambulance services offered by different hospitals. It is easy to generate reports. Users can access the information quickly.
$.# STU!Y OF T-E SYSTEM To provide fleibility to the users! the interfaces have been developed that are accessible through a browser. The "UI#$ at the top level have been categorized as %. &dmini &dministr strati ative ve user user inte interfa rface ce '. The opera operatio tional nal or gene generic ric user user inte interfa rface ce The (administrative user interface# concentrates on the consistent information that is practically! part of the organi organizat zation ional al activi activitie tiess and which which needs needs proper proper authent authentica icatio tion n for the data data collec collectio tion. n. These These interfaces help the administrators with all the transactional states like )ata insertion! )ata deletion and )ate updation along with the etensive data search capabilities.
The (operational or generic user interface# helps the end users of the system in transactions through the eisting data and required services. The operational user interface also helps the ordinary users in managing their own information in a customized manner as per the included fleibilities
$.$ INPUT OUTPOUT REPRESENTETION Input design is a part of overall overall system design. The main objective during the input design is as given below* •
To produce a cost-effective method of input.
•
To achieve the highest possible level of accuracy.
•
To ensure that the input is acceptable and understood by the user.
INPUT STAGES: The main input stages can be listed as below* •
)ata recording
•
)ata transcription
•
)ata conversion
•
)ata verification
•
)ata control
•
)ata transmission
•
)ata validation
•
)ata correction
INPUT TYPES: It is necessary to to determine the various types types of inputs. Inputs can be categorized as follows* follows* •
+ternal inputs! which are prime inputs for the system.
•
Internal inputs! which are user communications with the system.
•
,perational! which are computer department#s communications to the system
•
Interactive! which are inputs entered during a dialogue.
INPUT MEDIA:
&t this stage choice choice has to be made about the input media. media. To conclud concludee about the input media consideration has to be given to •
Type of input
•
/leibility of format
•
$peed
•
&ccuracy
•
0erification methods
•
1ejection rates
•
+ase of correction
•
$torage and handling requirements
•
$ecurity
•
+asy to use
•
2ortability
3eeping in view the above description of the input types and input media! it can be said that most of the inputs are of the form form of internal and interactive. interactive. &s Input data is to be the directly keyed in by the user! the keyboard can be considered to be the most suitable input device.
OUTPUT DESIGN: In general are* •
+ternal ,utputs whose destination is outside the organization.
•
Internal ,utputs whose destination is with in organization and they are the User#s main interface with the computer. ,utputs from computer systems are required primarily to communicate the results of processing to users. They are also used to provide a permanent copy of the results for later consultation. The various types of outputs
•
,perational outputs whose use is purely with in the computer department.
•
Interface outputs! which involve the user in communicating directly with the system.
OUTPUT DEFINITION
The outputs should be defined in terms of the following points*
Type Type of the output
4ontent of the output
/ormat of the output
5ocation of the output
/requency of the output
0olume of the output
$equence of the output
It is not always desirable to print or display data as it is held on a computer. It should be decided as which form of the output is the most suitable. /or +ample •
6ill decimal points need to be inserted
•
$hould leading zeros be suppressed"
OUTPUT MEDIA: In the net stage it is to be decided that which medium is the most appropriate for the output. The main considerations when deciding about the output media are* •
The suitability for the device to the particular application.
•
The need for a hard copy.
•
The response time required.
•
The location of the users
•
The software and hardware available. 3eeping in view the above description the project is to have outputs mainly coming under the
category of internal outputs. The main outputs desired according to the requirement specification are* The outputs were needed to be generated as a hard copy and as well as queries to be viewed on the screen. screen. 3eeping 3eeping in view these outputs! outputs! the format format for the output is taken from the outputs! which which are currently being obtained after manual processing. The standard printer is to be used as output media for hard copies.
$.% PROCESS MO!E USE! WIT- /USTIFICATION SDLC (Umbrella Model): Umbrella Activity
!O&'MENT &ONTRO"
Business Requireent !ocuentation
Feasibility Study TEAM FORMATION Project Specification PREPARATION
Requireents %at*erin+
ANA"#SIS $ !ESI%N
INTE%RATION $ S#STEM TESTIN%
TRAININ%
!E"I(ER#)INS TA""ATION
Umbrella Activity
ASSESSMENT &O!E
'NIT TEST
A&&EPTAN&E TEST
Umbrella Activity
$)54 is nothing but $oftware )evelopment 5ife 4ycle. It is a standard which is used by software industry to develop good software.
Stages in SDLC: ♦
1equirement "athering
♦
&nalysis
♦
)esigning
♦
4oding
♦
Testing
♦
7aintenance
Requirements Requir ements "athering "athe ring stage: stage :
The requir requireme ements nts gather gathering ing proces processs takes takes as its input the goals goals identi identifie fied d in the high-l high-level evel requi require reme ment ntss sect sectio ion n of the the proj projec ectt plan plan.. +ach +ach goal goal will will be refi refined ned into into a set set of one or more more requirements. These requirements define the major functions of the intended application! d efine operational data areas and reference data areas! and define the initial data entities. 7ajor functions include critical processes to be managed! as well as mission critical inputs! outputs and reports. & user class hierarchy is developed and associated with these major functions! data areas! and data entities. +ach of these definitions is termed a 1equirement. 1equirements are identified by unique requirement identifiers and! at minimum! contain a requirement title and tetual description"
These requirements are fully described in the primary deliverables for this stage* the 1equirements )ocument )ocument and the 1equirements 1equirements Traceabili Traceability ty 7atri 7atri 81T79 81T79.. The requiremen requirements ts document document contains contains complete descriptions of each requirement! including diagrams and references to eternal documents as necessary necessary.. :ote that detailed detailed listings listings of database database tables tables and fields are not included in the requirements document. The title of each requirement is also placed into the first version of the 1T7! 1T7! along with the title of each goal from the project plan. The purpose of the 1T7 is to show that the product components develo developed ped during during each stage stage of the softwa software re develo developme pment nt lifec lifecycl yclee are formal formally ly connect connected ed to the components developed in prior stages.
In the requirements stage! the 1T7 consists of a list of high-level requirements! or goals! by title! with a listing of associated requirements for each goal! listed by requirement title. In this hierarchical listing! the 1T7 shows that each requirement developed during this stage is formally linked to a specific product goal. In this format! each requirement can be traced to a specific product goal! hence the term requirements requirements traceability. traceability. The outputs of the requirements definition stage include the requirements document! the 1T7! and an updated project plan. ♦ ♦
/easibility study is all about identification of problems in a project. :o. of staff required to handle a project is represented as Team /ormation! /ormation! in this case only modules are individual tasks will be assigned to employees who are working for that project.
♦
2roject $pecifications are all about representing of various possible inputs submitting to the server and corresponding outputs along with reports maintained by administrator
Analysis Stage: The planning stage establishes a bird;s eye view of the intended software product! and uses this to establish the basic project structure! evaluate feasibility and risks associated with the project! and describe appropriate management and technical approaches"
The most critical section of the project plan is a listing of high-level product requirements! also referred to as goals. &ll of the software product requirements to be developed during the requirements definition
stage flow from one or more of these goals. The minimum minimum information information for each goal consists consists of a title and tetual description! although additional information and references to eternal documents may be included. The outputs of the project planning stage are the configuration management plan! the quality assurance plan! and the project plan and schedule! with a detailed listing of scheduled activities for the upcoming 1equirements stage! and high level estimates of effort for the out stages.
1esigning 2tage: The design stage takes as its initial input the requirements identified in the approved requirements document. /or each requirement! a set of one or more design elements will be produced as a result of interviews! workshops! and
6hen the design document is finalized and accepted! the 1T7 is updated to show that each design element is formally associated with a specific requirement. The outputs of the design stage are the design document! an updated 1T7! 1T7! and an updated upd ated project plan.
1e-elopment 34oding5 2tage:
The development stage takes as its primary input the design elements described in the approved design document. /or each design element! a set of one or more software artifacts will be produced. $oftware artifacts include but are not limited to menus! dialogs! data management forms! data reporting formats! and specialized procedures and functions. &ppropriate test cases will be developed for each set of functionally related software artifacts! and an online help system will be developed to guide users in their interactions with the software.
The 1T7 will be updated to show that each developed artifact is linked to a specific design element! and that each developed artifact has one or more corresponding test case items. &t this point! the 1T7 is in its final configuration. The outputs of the development stage include a fully functional set of software that satisfies the requirements and design elements previously documented! an online help system that describes the operation of the software! an implementation map that identifies the primary code entry points for all major system functions! a test plan that describes the test cases to be used to validate the correctness and completeness of the software! an updated 1T7! and an updated project plan.
6ntegration 7 &est 2tage: )uring the integration and test stage! the software artifacts! online help! and test data are migrated from the development environment to a separate test environment. &t this point! all test cases are run to verify the correctness and completeness of the software. $uccessful eecution of the test suite confirms a
robust and complete migration capability. )uring this stage! reference data is finalized for production use and production users are identified and linked to their appropriate roles. The final reference data 8or links to reference data source files9 and production user list are compiled into the 2roduction Initiation 2lan.
The outputs of the integration and test stage include an integrated set of software! an online help system! an implementation map! a production initiation plan that describes reference data and production users! an acceptance plan which contains the final suite of test cases! and an updated project plan. ♦
Installation & Acceptance Test:
)uring )uring the instal installat lation ion and accepta acceptance nce stage! stage! the softwa software re artifa artifacts cts!! online online help! help! and initi initial al production data are loaded onto the production server. &t this point! all test cases are run to verify the correctness and completeness of the software. $uccessful eecution of the test suite is a prerequisite to acceptance of the software by the customer.
&fter customer personnel have verified that the initial production data load is correct and the test suite has been eecuted with satisfactory results! the customer formally accepts the delivery of the software.
The primary outputs of the installation and acceptance stage include a production application! a completed acceptance test suite! and a memorandum of customer acceptance of the software. /inally! the 2)1 enters the last of the actual labor data into the project schedule and locks the project as a permanent pe rmanent project record. &t this point the 2)1 =locks= the project by archiving all software items! the implementation map! the source code! and the documentation for future reference.
0aintenance: ,uter rectangle represents maintenance of a project! 7aintenance team will start with requirement study! understanding of documentation later employees will be assigned work and they will under go training on that particular assigned category. /or this life cycle there is no end! it will be continued so on like an umbrella 8no ending point to umbrella sticks9.
$.& SYSTEM ARC-ITECTURE
Arcitect!re "lo#: >elow architecture diagram represents mainly flow of requests from users to database through servers. In this scenario overall system is designed in three tires separately using three layers called presentation layer! business logic layer and data d ata link layer. This project was developed using ?-tire architecture.
User
SERVER Request
Dat a Bas e
Response
U$L Pattern:
Presentatio n Layer
Response sent !ro" the ser#let SERVLETS AT THE SERVER SIDE
URL Request sent through the broser
Veri!ying or up$ating the $atabase through a state"ent
Reply !ro" the $atabase a%%or$ing to the state"ent
DATABASE
U15 pattern pattern represents how the requests requests are flowing flowing through through one layer to another another layer and how the responses are getting by other layers to presentation layer through server in architecture diagram.
Fe0123242t5 St6758 2reliminary investigation eamines project feasibility! the likelihood the system will be useful to the organi organizat zation ion.. The main main objecti objective ve of the feasib feasibili ility ty study study is to test test the Techni echnical cal!! ,perat ,peration ional al and +conomical feasibility for adding new modules and debugging old running system. &ll systems are feasible if they are given unlimited resources and infinite time. There are aspects in the feasibility study portion of the preliminary investigation* •
Technical Technical /easibility
•
,peration /easibility
+conomical /easibility
%.# TEC-NICA FEASIBIITY The technical issue usually raised during the feasibility stage of the investigation includes the following* •
)oes the necessary technology eist to do what is suggested
•
)o the proposed equipments have the technical capacity to hold the data required to use the new system
•
6ill the proposed system provide adequate response to inquiries! regardless of the number or location of users
•
4an the system be upgraded if developed
&re there technical guarantees g uarantees of accuracy! reliability! reliability! ease of access and data security
%.$ OPERATIONA FEASIBIITY OPE$ATIONAL FEASI%ILITY User-friendly
4ustomer will use the forms for their various transactions i.e. for adding new routes! viewing the routes details. &lso the 4ustomer wants the reports to view the various transactions based on the constraints. Theses forms and reports are generated as user-friendly to the 4lient.
Reliability
The package wills pick-up current transactions on line. 1egarding the old transactions! User will enter them in to the system. Security
The web server and database server should be protected from hacking! virus etc Portability
The application will be developed using standard open source software 8+cept ,racle9 like @ava! tomcat web server! Internet +plorer >rowser etc these software will work both on 6indows and 5inu o
This software will be available always. Maintainability
The system called the ewheelz uses the '-tier architecture. The %st tier is the "UI! which is said to be front-end and the 'nd tier is the database! which uses 7y-$ql! which is the back-end. The front-end can be run on different systems 8clients9. The database will be running at the server. Users access these forms by using the user-ids and the passwords.
*.* 4ONO064 89266&; The computerized system takes care of the present eisting system#s data flow and procedures comple completel tely y and should should generate generate all the report reportss of the manual manual syste system m beside besidess a host host of other other management reports. It should be built as a web based application with separate web server and database server. This is required as the activities are spread through out the organization customer wants a centralized database. /urther some of the linked transactions take place in different locations.
,pen source software like T,74&T! T,74&T! @&0&! @&0&! 7ysql and 5inu is used to minimize the cost for the 4ustomer.
&.# FUNCTIONA RE'UIREMENTS SPECIFICATION This application mainly consist three modules ' A()inistra A()inistrator tor Mo(!le Mo(!le *' E)plo+ E)plo+ee ee Mo(!l Mo(!le e ,' $eport $eport Mo(!le Mo(!le
- A()ini A()inistra stratio tion n Mo(!le Mo(!le:: &dministrator manages the entire application. &dministrator can add! delete! edit and view the employee details. &dministrator &dministrator also manages the doctors details along with other attendants. &dministrator keeps track of ambulances available and their current status. 2. E)plo+ee
Mo(!le:
This module allows one to generate reports based on different criteria such as ambulance details! employee details! patient details! services offered and so on. ,- $eport Mo(!le:
This module allows employees to register and manage patient details. 6hen a request is made! an employee immediately dispatches an ambulance with available doctor and other attendants. +mployee keeps track of patient status and in case of emergency consults a hospital for admitting the patient.
&.$ PERFORMANCE RE'UIREMENTS 2erformance is measured in terms of the output provided by the application. 1equirement specification plays an important part in the analysis of a system. ,nly when the requirement specifications are properly given! it is possible to design a system! which will fit into required environment. It rests largely with the users of the eisting system to give the requirement specifications because they are the people who finally use the system. This is because the requirements have to be known during the initial initial stages so that the system system can be designed designed according according to those requirements. requirements. It is very difficult difficult to change the system once it has been designed and on the other hand designing a system! which does not cater to the requirements of the user! is of no use. The requirement specification for any system can be broadly stated as given below* The system should be able to interface with the eisting system •
The system should be accurate
•
The system should be better than the eisting system
The eisting system is completely dependent on the user to perform all the duties.
&.% SOFTWARE RE'UIREMENTSE RE'UIREMENTSE Technology Technology
* @ava and @'++
6eb 6e b Technologies Technologies
* AT75! 4$$! @ava$cript
)atabase
* ,racle%Bg
@)3 0ersion 0ersion
* @)3%.C
$erver
* TomcatC.C
&.& -AR!WARE RE'UIREMENTSE RE'UIREMENTSE • • • •
2rocessor** 2entium-III 8or9 Aigher 1am** DE7> 8or9 Aigher 4ache** C%'7> Aard disk** %B">
A((itional Tools: AT75 )esigning
* )ream weaver Tool Tool
)evelopment Tool Tool kit
* 7y +clipse
&.&.#. INTRO!UCTION TO /AVA About Abo ut Java Jav a*
Initially the language was called as FoakG but it was renamed as FjavaG in %HHC.The primary moti motiva vati tion on of this this lang langua uage ge was was the the need need for for a plat platfo form rm-i -ind ndep epen ende dent nt8i 8i.e .e..
arch archit itec ectu ture re
neutral neutral9la 9langu nguage age that that could could be used used to create create softwa software re to be embedde embedded d in variou variouss consume consumer r electronic devices. @ava is a programmer#s language @ava is cohesive and consistent +cep +ceptt for for thos thosee const constra rain intt impos imposed ed by the the Inte Intern rnet et envi enviro ronm nmen ent. t. @ava @ava give givess the the programmer! full control control
/inally @ava is to Internet 2rogramming where c was to $ystem 2rogramming. Importance of Java to the Internet
@ava has had a profound effect on the Internet. This is because java epands the Universe of objects that can move about freely in 4yberspace. In a network! two categories of objects are transmitted between the server and the personal computer. They are passive information and )ynamic active programs. in the areas of $ecurity and probability. probability. >ut @ava addresses these concerns and by doing so! has opened the door to an eciting new form of program called the &pplet.
Applications and applets .
&n application is a program that runs on our 4omputer under the operating system of that computer. It is more or less like one creating using 4 or 4 .@ava#s ability to create &pplets makes it important. &n &pplet I san application! designed to be transmitted over the Internet and eecuted by
a @ava-compatible web browser. &n applet I actually a tiny @ava program! dynamically downloaded across the network! just like an image. >ut the difference is! it is an intelligent program! not just a media file. It can be react to the user input and dynamically change.
byte byte code9f code9for or a
hypothetical machine called @ava 0irtual 7achine8@079. The @07 is supposed t eecuted the byte code. The @07 is created for the overcoming the issue of probability. The code is written and compiled for one machine and interpreted on all machines .This machine is called @ava 0irtual 7achine. Compiling and interpreting ava source code!
Pc co)piler So!rce co(e
Macintos co)piler
SPA$C Co)piler
.a/a %+te co(e Plat"or) in(epen( ent
.a/a interpreter .a/a interpreter )acintos
.a/a interpreter0 SPA$C'
)uring run-time the @ava interpreter tricks the byte code file into thinking that it is running on a @ava 0irtual 7achine. In reality this could be an Intel 2entium windows HC or sun $2&14station running
'''
$olaris or &pple 7acintosh running system and all could receive code from any computer through internet and run the &pplets.
2imp 2i mple le * @ava was designed to be easy for the 2rofessional programmer to learn and to use effectively. If you are an eperienced 4 2rogrammer. 5earning @ava will oriented features of 4 . 7ost of the confu confusi sing ng conce concept ptss from from 4 4 are are eith either er left left out out of @ava @ava or impl implem ement ented ed in a clea cleaner ner!! more more approachable manner. In @ava there are a small number of clearly defined ways to accomplish a given task.
Object oriented
+ava +ava was was not not desig designe ned d to be sourc source)c e)cod ode e compa compatib tible le with with any any other other langu languag age" e" This This allowed the +ava team the freedom to design with a blank state" ne outcome of this was a clean usable, pragmatic approach to objects" The object model in +ava is simple and easy to e%tend, while simple types, such as integers, are kept as high)performance non)objects" Robust
The multi)platform environment of the web places e%traordinary demands on a program, because the program must e%ecute reliably in a variety of systems" The ability to create robust programs" -as given a high priority in the design of +ava" +ava is strictly typed language. it checks your code at compile time and runtime" +ava virtually eliminates the problems of memory management and deal location, which is completely automatic" &n a well)written +ava program, all run)time errors can and should be managed by your program"
Ser94et1:/SP &/T0'1CT&/
2 $ervlet &s &s a generic generic server server e%tension" e%tension" a +ava +ava class class that can can be loaded loaded 'ynamically to e%pand the functionality of a server"$ervlets are commonly used with web servers" -here they can take the place C3& scripts"
2 servlet is similar to proprietary server e%tension, e%cept that it runs inside a +ava 4irtual 5achine 6+457 on the server, so it is safe and portable
$ervlets operate solely within the domain of the server"
1nlike C3& and 8ast C3&, which use multiple processes to handle separate program or separate requests, separate threads within web server process handle all servlets" This means that servlets are all efficient and scalable"
$ervlets are portable. portable. both across across operating operating systems and also across web web servers" +ava +ava $ervlets offer the best possible platform for web application development"
$ervlets are used used as replacement for C3& scripts on a web server, server, they can e%tend e%tend any sort of server such as a mail server that allows servelts t e%tend its functionality perhaps by performing a virus scan on all attached documents or handling mail filtering tasks"
$ervlets provide a +ava)based +ava)based solution used to address the problems currently associated associated with with doing doing server)s server)side ide programm programming ing includin including g ine%te ine%tensib nsible le scriptin scripting g solutio solutions ns platform) platform) specific 2Ps and incomplete interface"
$ervlets are objects that conform to a specific interface that can be plugged into a +ava) based based server server"$ "$erv ervlets lets are to the server)s server)side ide what what applets applets are to the server)s server)side ide what what applets are to the client)side)object byte codes that can be dynamically loaded off the net" They differ differ form applets applets in than they are faceles faceless s objects6 objects6wit with h out graphics graphics or a 31& component7"They component7"They serve as platform independent, independent, dynamically dynamically loadable,plugab loadable,plugable le helper byte code objects on the server side that can be used to dynamically e%tend server)side functionality"
8or e%ample an (TTP servlet can be used to generate dynamic (T59 content when you use servlets to do dynamic content you get the following advantages*
They#re faster and cleaner then C3& scripts They use a standard 2P&6 the servlet 2P&7 They provide all the advantages of +ava 6run on a variety of servers without needing to be rewritten7
A t t r 0 c t 2 9 e ; e 1 1 o < S e r 9 4 e t 1: They are many features of servlets that make them easy and attractive to tuse these include* :asily configure using the 31&)based 2dmin tool; Can be 9oaded and &nvoked from a local disk or remotely across the network" Can be linked together or chained, so that on servlet can call another servlet, or several servlets in sequence" Can be called dynamically from with in (T59, pages using server)side include) tags" 2re secure)even secure)even when downloading downloading across the network, network, the servlet security model and servlet and bo% protect your system from unfriendly behavior", 9d-antages of the t he ser-let 9P6
ne of the great advantages of the servlet 2P& is protocol independent" &t assumes nothing about* The protocol being used to transmit on the net (ow it is loaded The server environment it will be running in Thes These e quan quanti titi ties es are are impo import rtan ant, t, beca becaus use e it allo allows ws the the $erv $ervle lett 2P& to be embedded in many different kinds of servers"There are other advantages to the servelt 2P& as well These include* &t#s e%tensible)you can inherit all your functionality from the base classes made available to you &t#s simple small, and easy to use" 8eatures of 2er-lets:
$ervl $ervlets ets are are persi persist stent ent"$ "$erv ervlet let are are loade loaded d only only by the the web web serv server er and and can can maintain services between requests" $ervlets are fast" $ince servlets only need to be l
$erv ervlets ets
are
cla classes
and
inte interrfac faces
from rom
tow
packages, es,jav java%
"ser servlet let
and
java%"servlet"htt java%"servlet"http"The p"The java"servlet java"servlet package package contains classes t support generic, generic, protocol) protocol) independent servlets"The classes in the java%"servelt"http package To and (TTP specific functionality e%tend these classes
:very :very servlet servlet must implemen implementt the java%"s java%"serve ervelt lt interfac interface"5 e"5ost ost servlets servlets implemen implementt it by e%tending
one
of
two
classes"java%"servlet"3eneric$ervlet
or
java%"servlet"htt java%"servlet"http"(ttp$e p"(ttp$ervlet"2 rvlet"2 protocol)indepen protocol)independent dent servlet should subclass subclass 3eneric) $ervlet"while an (ttp servlet should subclass (ttp$ervlet, which is itself a subclass of 3eneric)servlet with added (TTP)specific functionality"
1nlike a java program, a servlet does not have a main67 method,&nstead the server in the process of handling requests invoke certain methods of a servlet":ach time the server dispatches a request to a servlet, it invokes the servelts $ervice67 method,
2 generic generic servlet servlet should override override its service67 method method to handle requests requests as appropriate appropriate for the servlet"The service67 accepts two parameters a request object and a response object "The request object tells the servlet about the request, request, while the response object object is used to return a response
&nCont &nContras rast" t"an an(tt (ttp p serv servlet let usua usually lly does does not not overr override ide the serv service ice67 67 method method"&n "&nste stead ad it overrides do3et67 to handle 3:T requests and doPost67 to handle Post requests" 2n (ttp servlet can override override either or both of these modules modules the service67 service67 method of (ttp$ervlet (ttp$ervlet handles the setup and dispatching to all the doXXX67 methods"which iswhy it usually should not be overridden
The remainde remainders rs in the java%" java%"serv servlet let and java%" java%"serv servlet" let"http http"pac "packag kage e are largely largely support support classes "The $ervlet0equest and $ervlet0esponse classes in java%"servlet provide access to
generic
server
requests
and
responses
while
(ttp$ervlet0equest
and
(ttp$ervlet0esponse classes in java%"servlet provide access to generic server requests and responses responses while (ttp$ervlet0equest (ttp$ervlet0equest and (ttp$ervlet0es (ttp$ervlet0esponse ponse in java%"servlet"htt java%"servlet"http p provide access a (TTP requests and responses " The java%"servlet"http provide contains an (ttp$ession class that provides built)in session tracking functionality and Cookie class that allows quickly setup and processing (ttpCookies" oading 2er-lets:
$ervlets can be loaded from their places" 8rom a directory that is on the C92$$P2T(" The C92$$P2 C92$$P2T( of the +ava-eb$erv +ava-eb$erver er includes service root=classes=, root=classes=, which is where the system classes reside 8rom the >$:04&C:?0T=servlets=directory"This is not in the server#s classpath" 2 class loader is used to create servlets form this directory"/ew servlets can be added)e%isting servlets servlets can be recompi recompiled led and the server will notice notice these these changes changes"" 8rom a remote remote location location"8o "8orr this a code code base like http*==nine"eng=classes=foo= is required in addtion to the servlet#s class name"0efer to the admin 3ui docs on servlet section to see how to set this up" 9oading 0emote $ervlets 0emote servlets can be loaded by*
Configuring the admin Tool to setup automatic loading of remote servlets" $electiong up server side include tags in "html files 'efining a filter chain Configuration
6n-oking 2er-lets
2 servlet invoker invoker is a servlet that invokes the server! server! method on a named servlet"&f servlet"&f the servlet is not loaded in the server,then the invoker first loades the servlet6either form local disk or from the network7 and the then invokes the service! method"2lso like applets,local servlets in the server can be identified by just the class name"&n other words, if a servlet name is not absolute"it is treated as local" 2 Client can can &nvoke &nvoke $ervlets $ervlets in the 8ollowing 8ollowing -ays* -ays* The client can ask for a document that is served by the servlet" The client6browser7 can invoke the servlet directly using a 109, once it has been mapped using the $:049:T 29&2$:$ $ection of the admin 31& The servlet can be invoked through server side include tags" The servlet can be invoked by placing it in the servlets=directory The servlet can be invoked by using it in a filter chain &he 2er-let ife 4ycle:=
The $ervlet life cycle is one of the most e%citing features of $ervlets"This life cycle is a powerful hybrid of the life cycles used in C3& programming and lower)level /$2P& and &$2P& programming" The servlet life cycle allows servlet engines to address both the performance and resource problems of C3& and the security concents of low level server 2P& programming" $ervlet life cycle is highly fle%ible $ervers hava significant leeway in how they choose to support servlets"The only hard and fast rule is that a servlet engine must confor to the following life cycle contact* Create and initiali@e the servlets (andle @ero or more service from clients 'estroy the servlet and then garbage Collects it" &t#s perfectly legal for a servlet t be loaded, created an initial@ed in its own +45,only to be destroyed an dgarbage collected without hancdling any clientrequest or after handling just one request
The most common and most sensible life cycle implemntations for (TTP servelts are* $ingle java virtual machine and astatine persistence" 6nit and 1estroy *)
+ust +ust like like 2pple pplets ts serv servle lets ts can can defi define ne init init67 67 and and dest destro roy y67 meth method ods, s, 2 serv servle lets ts init6$erviceConfig7 method is called by the server immediately after the server constructs the servlet#s instance"'epanding on the server and its configuration, this can be at any of these times
-hen the server states -hen the servlet is first requested, just before the service67 method is invoked 2t the request request of the server server administrator administrator
&n any case, nit67 is guaranteed to be called before the servlet handles its first request The init67 method is typically used to perform servlet initiali@ation creating or loading objects that are used by the servlet in handling of its request" &n order to providing a new servlet any information about itself and its environment, a server has to call a servelts init67 method and pass an object that implement the $ervletConfig interface" This This $erv $ervlet letCo Confi nfig g objec objectt supp supplie lies s a serv servlet let with with infor informat mation ion abou aboutt its initi initiali ali@at @ation ion parameters"These parameters are given to the servlets and are not associated with any single single request request"Th "They ey can specify specify initial values, values, such as where where a counter counter should begin begin counting, or default values, perhaps a template to use when not specified by the request, The server calls a servlet#s destroy67 method when the servlet is about to be unloaded" &n the destroy67 destroy67 method, a servlet should free free any resources resources it has acquired that will will not be garbage collected" The destroy67 method also gives a servlet a chance to write out its unsaved" cached information or any persistent information that should be read during the ne%t call to init67" 2ession &racking: &racking:
(TTP is a stateless protocol, protocol, it provides no way for for a server to recogni@e that a sequence sequence of requests is all from the same client" This causes a problem for application such as
shopping cart applications" :ven in chat application server can#t know e%actly who#s making a request of several clients" The solution for this is for client to introduce itself as it makes each request, :ach clients needs to provide a unique identifier that lets the server identify it, or it needs to give some information information that the server can use to properly handle handle the request, request, There are several ways to send this introductory information with each request $uch as* !2R 9!&%OR6>9&6ON: One way to perform session tracking is to le-erage the information that comes with
1ser authori@ation" -hen a web server restricts access to some of its resources to only those clients that log in using a recogni@ed username and password" 2fter the client logs in, the username is available to a servlet through get0emote1ser 67
-ean use the username to track the session" nce a user has logged in, the browser remembers her username and resends the name and password as the user views new pages on the site" 2 servlet can identify the user through her username and they#re by Track her session"
The biggest advantage advantage of using user authori@ation authori@ation to perform perform session tracking is that it#s easy to implement" $imply tell the protect a set of pages, and use get0emote1ser67 to identify each client"2nother advantage is that the technique works even when the user accesses your site form or e%ists her browser before coming back"
The biggest disadvantage of user authri@ation is that it requires each user to register for an account and then log in in each time the starts visiting your site" 5ost users will tolerate regi regist ster erin ing g and and lagg laggin ing g in as a nece necess ssar ary y evil evil when when they they are are acce access ssin ing g sens sensit itiv ive e infor informat matio ion, n, but but its all overk overkill ill for for simple simple sess session ion tracki tracking ng" "the therr proble problem m with with user user authori@ation is that a user cannot simultaneously maintain more than one session at the same site" %idden 8orm 8ields:
ne way to support anonymous anonymous session tracking is to use hidden from fields" 2s the name implies, these are fields added to an (T59, form that are not displayed in the client#s browser, They are sent back to the server when the form that contains them is submitted" &n a sense, hidden form fields define constant variables variables for a form" To a servlet receiving receiving a submitted form, there is no difference between a hidden fields and a visible filed" 2s more and more information information is associated associated with a clients session " &t can become burdensome to pass it all using hidden form fields" &n these situations it#s possible to pass on just a unique session &' that identifies as particular clients session" That session &' can be associated with complete information about its session that is stored on the server" The advantage of hidden form fields is their ubiquity and support for anonymity" (idden fiel fields ds are are supp suppor orte ted d in all all the the popu popula larr brow browse sers rs,, they they dema demand nd on spec specia iall serv server er requirements, and they can be used with clients that haven#t registered or logged in" The major disadvantage with this technique, however is that works only for a sequence of dyna dynamic micall ally y gene genera rated ted forms forms,, The The techni techniqu que e brea breaks ks down down immed immediat iately ely with with stati static c documents, emailed documents book marked documents and browser shutdowns" !R Rewriting:
109 109 rewrit rewriting ing is anoth another er way way to suppo support rt anony anonymou mous s sessi session on track tracking ing,, -ith -ith 109 109 rewriting every local 109 the user might click on is dynamically modified" or rewritten, to includ include e e%tra e%tra,, infor informat mation ion"" The The e%tra e%tra inform informat ation ion can be in the defor deform m of e%tra e%tra path path information, added parameters, or some custom, server)specific"109 change" 'ue to the limited space available in rewriting a 109, the e%tra information is usually limited to a unique session" :ach rewriting technique has its own advantage and disadvantage 1sing e%tra path information works on all servers, and it works as a target for forms that use both the 3et and Post methods" &t does not work well if the servlet has to use the e%tra path information as true path information
The advantages and disadvantages of 109"rewriting closely match those of hidden form filed fileds,T s,The he major major diffe differe renc nce e is that that 109 109 rewr rewriti iting ng works works for all all dyna dynamic micall ally y create created d documents, such as the (elp servlet, not just forms" -ith the right server support, custom 109 rewriting can even work for static documents" Persistent 4ookies:
2 fourth fourth technique to perform perform session tracking involves involves persistent persistent cookies" 2 cookie is a bit of information" sent by a web server to a browser that can later be read back form that browser" -hen a browser receives a cookie, it saves the cookie and there after sends the cookie back to the server each time it accesses a page on that server, subject to certain rules" Because a cookie#s value can uniquely identify a client, cookies are often used for session tracking" Persiste Persistent nt cookies cookies offer an elegant, elegant, efficien efficientt easy easy way to implemen implementt session session tracking tracking"" Cookies provide as automatic an introduction for each request as we could hope for" 8or each request, a cookie can automatically provide a client#s session &' or perhaps a list of clien clients ts perfo performa rmanc nce" e" The The abili ability ty to custo customi@ mi@e e cook cookies ies gives gives them them e%tra e%tra powe powerr and and versatility" The biggest problem with cookies is that browsers browsers don#t always always accept cookies sometimes this is because the browser doesn#t support cookies" 5ore often its because The browser doesn#t support cookies" 5ore often its because the user has specifically configured the browser to refuse cookies" The power of serves* The power of servlets is nothing but the advantages advantages of servlets servlets over other approaches, approaches, which
include
portability,
power,
efficiency,
endurance,
safety
elegance,integration,e%tensibility and fle%ibility" Portability:
2s servlets servlets are written in java and conform to a well defined and widely accepted accepted 2P&"they are highly highly portable portable across across operating operating systems systems and across across server server implementatio implementation n
-e can develop a servlet on a windows /T machine running the java web server and later deploy it effortlessly on a high)end 1ni% server running apache" -ith servlets we can really write once, serve every where! $ervlet portability is not the stumbling block it so often is with applets, for two reasons 8irst,$ervlet portability is not mandatory i"e" servlets has to work only on server machines that we are using for development and deployment $econd, servlets avoid the most error)prone and inconstancy implemented portion of the java languages" languages" Power:
$ervlets can harness the full power of the core java" 2Ps* 2Ps* such as /etworking and 1rl access, multithreading multithreading,, image manipulation, manipulation, data compression, compression, data base connectivity connectivity,, interna internation tionali@ ali@ati ation, on, remote remote method method invocat invocation6 ion605&7 05&7 C0B2 C0B2 connect connectivit ivity y, and object object seriali@ation, among others, fficiency 9nd ndurance:
$ervlet invocation invocation is highly efficient, efficient, nce a servlet is loaded it generally generally remains in the server#s memory as a single object instance, There after the server invokes the servelt to handle a request using a simple, light weighted method invocation "1nlike the C3&, there#s no process to spawn or interpreter to invoke, so the servlet can begin handling handling the request almost almost immed immediat iately ely,, 5ulti 5ultiple ple,, conc concurr urrent ent reque requests sts are hand handled led the the requ request est almos almostt immediately" 5ultiple, concurrent requests are handled by separate threads, so servlets are highly scalable"
$ervlets in general are enduring objects" Because a servlets stays in the server#s memory as a single object instance" it automatically maintains its state and can hold onto e%ternal resources, such as database connections" 2afety:
$ervlets support safe programming practices on a number of levels"
2s they are written in java,servlets java,servlets inherit the strong type safety of the java language" language" &n addition the servlet 2P& is implemented to be type safe" +ava#s automatic garbage collection and lack of pointers mean that servlets are generally safe from memory management problems like dangling pointers invalid pointer references and memory leaks" $ervlets can handle errors safely, due to java#s e%ception A handling mechanism" &f a servlet divides by @ero or performs some illegal operations, operations, it throws an e%ception that can be safely caught and handled by the server" 2 server can further protect
itself
from servlets through the use of java security
manager"2 server can e%ecute its servlets under the watch of a strict security manager" legance:
The elegance of the servlet code is striking "$ervlet code is clean, object oriented modular and ama@ingly simple one reason for this simplicity is the served 2P& itself" -hich includes methods and classes to handle many of the routine chores of servlet development" :ven :ven
advance advanced d to operation operations s like cookie cookie handling handling and session session tracking tracking tracking tracking are
abstracted int convenient classes" 6ntegration:
$ervlets $ervlets are tightly tightly integrat integrated ed with with the server server"" This This integrat integration ion allows allows a servlet servlet to cooperate with the server in two ways " for e"g"* a servlet can use the server to translate file paths, perform logging, check authori@ation, perform 5&5: type mapping and in some cases even add users to the server#s user database"
/tensibility and 8le/ibility:
The servlet 2P& is designed designed to be easily e%tensible" 2s it stands today the 2P& includes classes that are optimi@ed for (TTP servlets"But later it can can be e%tended and optimi@ed for another type of servlets"&t is also possible that its support for (TTP servlets could be further enhanced"
$ervlets are also quite fle%ible, $un also introduced java server pages" which offer a way to write snippets of servlet code directly with in a static (T59 page using synta% similar to 5icrosoft#s 2ctive server pages62$P7
?.?.(
/!BC
1at is .D%C2
any relational database" ne can write a single program using the +'BC 2P&,and the +'BC is a +ava 2pi for e%ecuting $9,$tatements62s a point of interest +'BC is trademarked name and is not an acronym. nevertheless,+dbc is often thought of as standing for +ava 'atabase Connectivity" &t consists of a set of classes and interfaces written in the +ava Programming language"+'BC provides a standard 2P& for tool=database developers and makes it possible to write database applications using a pure +ava 2P& 1sing +'BC, it is easy to send $9 statements to virtually program will be able to send $9 "statements to the appropriate database" The Combination of +ava and +'BC lets a programmer writes it once and run it anywhere" 1at Does .D%C Do2 Si)pl+ p!t3.D%C )a4es it possi5le to (o tree tings
o
:stablish a connection with a database
o
$end $9 statements
o
Process the results
o
+'BC 'river Types Types
o
The +'BC drivers that we are aware of this time fit into one of four categories
o
+'BC)'BC Bridge plus 'BC driver
o
/ative)2P& party)java driver
o
+'BC)/et pure java driver
o
/ative)protocol pure +ava driver
2n individual database system is accessed via a specific +'BC driver that implements the java"sql"'river java"sql"'river interface" 'rivers e%ist for nearly all)popular 0'B5$ systems, systems, through few are available for free" $un bundles a free +'BC)'BC bridge driver with the +' to allow
access to a standard 'BC,data sources, such as a 5icrosoft 2ccess database, $un advises advises against against using using the bridge bridge driver driver for anythin anything g other other than than develop development ment and very limited development" +'BC drivers are available for most database platforms, from a number of vendors and in a number of different flavours" There are four driver categories T+pe 67.D%C7OD%C %ri(ge Dri/er
Type Type DE drivers use a bridge technology technology to connect connect a java client to an 'BC database service" $un#s +'BC)'BC bridge is the most common type DE driver" These drivers implemented using native code" T+pe 6*7Nati/e7API part+78a/a Dri/er
Type Type DF drivers wrap a thin layer of java around database)specific database)specific native code libraries for racle databases, the native code libraries might be based on the C&6racle call &nterface7 libraries, which were originally designed for c@cAA programmers, Because type) DF drivers are implemented using native code" in some cases they have better performance than their all)java counter parts" They add an element of risk, however, because a defect in a driver#s native code section can crash the entire server T+pe 6,7Net7Protocol All7.a/a Dri/er
Type Type DG drive drivers rs commu communic nicate ate via via a gener generic ic netw network ork proto protoco coll to a piece piece of custo custom m middleware" middleware" The middleware component might use any type of driver to provide the actual data databa base se acce access ss"" These hese driv driver ers s are are all all java java,, which hich make makes s them them usef useful ul for for appl applet et deployment and safe for servlet deployment T+pe7697nati/e7protocol All78a/a Dri/er
Type oH drivers are the most direct of the lot" -ritten entirely in java, Type DH drivers understand database)specific networking" protocols and can access the database directly without any additional software
.D%C7OD%C %ri(ge
&f possible use a Pure +ava +'BC driver instead of the Bridge and an 'BC driver" This complete completely ly eliminat eliminates es the client client configu configurati ration on require required d by 'BC"& 'BC"&tt also eliminat eliminates es the potential that the +ava 45 could be corrupted by an error in the native code brought in by the Bridge6that is, the Bridge native library, the 'BC driver manager library, library, the 'BC driver library, and the database client library7 1AT IS Te .D%C7OD%E %ri(ge 2
The +'BC)'BC Bridge is a +dbc driver, which implements +'BC operations by translating them into 'BC operations" To 'BC it appears as a normal application program" The Bridge is implemented as the sun"jdbc"odbc +ava package and contains a native library used to access 'BC"The Bridge is joint development of &ntersolv and +ava $oft
Or0c4e
?.?.*
racle is a relational database management system, which organi@es data in the form of tables" racle is one of many database servers based on 0'B5$ model, which manages a seer seer of data data that that atten attends ds three three spec specifi ific c thing things)d s)dat ata a struc structur tures es,, data data integ integrit rity y and and data data manipulation" -ith oracle cooperative server technology we can reali@e the benefits of open, relational systems for all the applications" racle makes efficient use of all systems resources, on all hardware architecture. to deliver unmatched performance, price performance and scalability" 2ny 'B5$ 'B5$ to be called called as 0'B5$ 0'B5$ has has to satisfy satisfy 'r":"8 'r":"8""Codd#s rules"
"eatures of #racle$ Portable
The racle 0'B5$ is available on wide range of platforms ranging from PCs to super computers computers and as a multi user loadable module for /ovel /et-are, /et-are, if you develop application on system you can run the same application on other systems without any modifications"
Compatible
racle commands can be used for communicating with &B5 'BF mainframe 0'B5$ that is different from racle, which is racle compatible with 'BF" racle 0'B5$ is a high performance fault tolerant 'B5$, which is specially designed for online transaction processing and for handling large database applications" Multithreaded Server Architecture
racle adaptable multithreaded server architecture delivers scalable high performance for for very ery larg large e numb number er of user users s on all hard hardw ware are arch archit itec ectu ture re incl includ udin ing g symm symmet etri ric c multiprocessors 6sumps7 and loosely coupled multiprocessors" Performance is achieved by eliminating eliminating CP1, &=, memory and operating system bottlenecks and by optimi@ing the racle 'B5$ server code to eliminate all internal bottlenecks" racle has become the most popular 0'B5$ in the market because of its ease of use •
Client=server architecture"
•
'ata independence"
•
:nsuring data integrity and data security"
•
5anaging data concurrency"
•
Parallel processing support for speed up data entry and online transaction processing used for applications"
•
'B procedures, functions and packages"
%r!&!"!Codd's Rules
These These rules rules are are used used for for valua valuatin ting g a produ product ct to be called called as relat relation ional al data databas base e management management systems" ut of EF rules, a 0'B5$ product product should satisfy at least I rules J rule called rule D that must be satisfied"
RU(& )$ "oundation Rule
8or any system to be advertised as, or claimed to be relational 'B5$ should manage database with in it self, with out using an e%ternal language"
RU(& *$ Information Rule
2ll information in relational relational database database is represented at logical level in only one way as values in tables"
RU(& +$ ,uaranteed Access
:ach and every data in a relational database is guaranteed to be logically accessibility by using to a combination of table name, primary key value and column name"
RU(& $ Systematic .reatment of /ull 0alues
/ull /ull value values s are are supp support orted ed for for repr represe esenti nting ng missin missing g inform informati ation on and and inap inappli plica cable ble information" They must be handled in systematic way, independent of data types"
RU(& 1$ %ynamic #nline Catalog based Relation Model
The database description is represented at the logical level in the same way as ordinary data so that authori@ed users can apply the same relational language to its interrogation as they do to the regular data"
RU(& 2$ Comprehensive %ata Sub (anguage
2 relational relational system system may support several several languages languages and various models models of terminal use" (owever there must be one language whose statement can e%press all of the following* 'ata 'ata
'efin 'efiniti ition ons, s,
4iew 4iew
'efin 'efiniti itions ons,,
'ata 'ata
5anip 5anipula ulatio tions, ns, &ntegr &ntegrity ity,,
Cons Constra traint ints, s,
2uthori@ation 2uthori@ation and and transaction transaction boundaries boundaries""
RU(& 3$ 0ie4 Updating
2ny view that is theoretical theoretical can be updatable if changes can be made to the tables that effect the desired changes in the view"
RU(& 5$ 6igh level Update7 Insert and %elete
The capability of handling a base relational or derived relational as a single operand applies not only retrieval of data also to its insertion, updating, and deletion"
RU(& 8$ Physical %ata Independence
2pplication 2pplication program program and terminal activities activities remain logically logically unimpaired unimpaired whenever whenever any changes are made in either storage representation or access method" RU(& 9$ (ogical %ata Independence
2pplication 2pplication programs and terminal activities activities remain logically unimpaired whenever any changes are made in either storage representation or access methods"
RU(& *)$ Integrity Independence
&ntegrity constraints specific to particular database must be definable in the relational data stored in the catalog, not in application program" RU(& **$ %istributed Independence
-hether or not a system supports database distribution, it must have a data sub) language that can support distributed databases without changing the application program"
RU(& *+$ /on Sub-0ersion
&f a rela relati tion onal al syst system em has has low low leve levell lang langua uage ge,, that that low low lang langua uage ge cann cannot ot use use to subv subvers ersion ion or by pass pass the integ integrit rity y rules rules and and cons constra traint ints s e%pre e%presse ssed d in the high higher er level level relational language .
#racle supports the follo4ing Codd's Rules
0ule E* &nformation 0ule 60epresentation of information7)K:$" 0ule F* 3uaranteed 2ccess)K:$" 0ule G* $ystematic treatment of /ull values)K:$" 0ule H* 'ynamic on)line catalog)based 0elational 5odel)K:$" 0ule L* Comprehensive data sub language)K:$" 0ule M* 4iew 1pdating)P20T&29" 1pdating)P20T&29" 0ule N* (igh)level 1pdate, &nsert and 'elete)K:$" 0ule I* Physical data &ndependence)P20T&29" &ndependence)P20T&29" 0ule O* 9ogical data &ndependence)P20T&29" &ndependence)P20T&29" 0ule ED* &ntegrity &ndependence)P20T&29" 0ule EE* 'istributed &ndependence)K:$"
0ule EF* /on)subversion)K:$"
?.?.?
-TM (yperte (yperte%t %t 5arkup 5arkup 9anguag 9anguage6(T e6(T597, 597, the langua languages ges of the world world wide wide web6---7 web6---7,,
allows users to produces web pages that included te%t, graphics and pointer to other web pages 6(yperlinks7" (T59 (T59 is not a prog progra ramm mmin ing g lang langua uage ge but but it is an appl applic icat atio ion n of &$ &$ $tand tandar ard d IINO,$3596$tandard 3enerali@ed 5arkup 9anguage7,but $peciali@ed to hyperte%t and adapted to the -eb" The idea behind (yperte%t one point to anoth another er point point"" -e can can navig navigat ate e throu through gh the the infor informat mation ion based based on out out inter interest est and and preference" 2 markup language is simply a series of items enclosed within the elements should be displayed" (yperlinks are underlined or emphasi@ed works that load to other documents or some portions of the same document" (tml can be used to display any type of document on the host computer, which can be geographically at a different location" &t is a versatile language and can be used on any platform or desktop
(T59 provides tags6special codes7 to make the document look attractive"
(T59 provides are not case)sensitive" case)sensitive" 1sing graphics,fonts,diff graphics,fonts,different erent si@es, color, color, etc"" can enhance the presentation of the document" 2nything That is not a tag is part of the document it self" Basic %tml &ags *
>)) ))Q
$pecific Comments"
>2QRRR>=2Q
Creates (yperte%t links"
>BQRRR>=BQ
Creates hyperte%t links"
>BigQRR"">=BigQ
8ormats te%t in large)font
>BodyQRR">=BodyQ
contains al all ta tags and te te%t in in th the (tml)document
>CenterQRR>=CenterQ
Creates Te Te%t
>''QRRR"">=''Q
'efinition of a term"
>T2B9:QRR>=T2B9:Q
creates table
>TdQRRR"">=TdQ
indicates table data in a table"
>TrQRRR"">=TrQ
designates a table row
>ThQRRR">=ThQ
creates a heading in a table"
9 1 9 N & 9 " 2:=
2 (T59 document is small and hence easy to send over the net"&t is small because it does not include formatted information" (T59 is platform independent (T59 tags are not case)sensitive"
&.&. /AVA SCRIPT The +ava $cript 9anguage +ava$cript is a compact , object)based scripting language for developing client and server internet applications" /etscape /avigator F"D interprets +ava$cript statements embedded directly in an (T59 page" and 9ivewire enables you to create server)based applications similar to common gateway interface6cgi7 programs" &n a client application for /avigator, +ava$cript statements embedded in an (T59 Page can recogni@e and respond to user events such as mouse clicks form &nput, and page navigation" 8or e%ample, you can write a +ava$cript function to verify that users enter valid information into a form requesting a telephone number or @ip code " -ithout any network transmission, an (tml page with embedded +ava $cript can interpret the entered te%t and alert the user with a message dialog if the input is invalid or you can use +ava$cript +ava$cript to perform an action 6such as play an audio file, e%ecute an applet, or communicate with a plug)in7 in response to the user opening or e%iting a page"
.# INTRO!UCTION INTRO!UCTION
S51te=1 7e12>; 6ntroduction: 2ystems design is the process or art of defining the architecture, components, modules, interfaces, and data for a system to satisfy specified requirements" ne could see it as the application of systems theory to product development" There is some overlap and synergy with the disciplines of systems analysis, systems architecture and systems engineering"
Conte:t level %"%$
&dmin $erver on Internet< Intranet 8intra comm. s
Client
(evel-) %"% for &dmin
5ogin Information
0erify 0erify &dmin &dm in I)! 2assword
&dmin
1eturn 7essage
% 5ogin 2roces s
? 4onfer ence
E &dmin ,ption s
)>
(evel-) %"% for 4lient
5ogin Information
0erify User I) 2assword
4lient
% 5ogin
1eturn 7essage
Invalid User
2roces s
0alid 0alid User Us er ? 4onfer ence
E 4lient ,ption s
$toring Info
' 1egistrati on 2rocess
(evel-* %"% for 4lient
2assword
User )etails
Userid
User Info
UserIdJ2wd 2assword %.% 5ogin
4lient
%.' User ,ption s
Invalid User
' 1egistrati on 2rocess
2roces s 0alid 0alid User
$ecurity
?.% 4onferen ce ,ptions
4lient ,nline
Aint KJ&
1oom 4reation 1oom :ame
?.' 4reat e 1oom
1oom )etails
?.E $end "roup ,ffline
?.C 5ogin 1oom ?.? 4reate Table with 1oom :ame $ave online messages $ave ,ffline
?.D 4onfe rence
1oom table 1oom table
,ffline
%.' User ,ption s 5ogout
4lient online
2assword
E.' 4hange 2asswor d
4lient
&dd 4ontac t
E.? 0iew 2rofile
%.' User ,ption s
E.% &ddres s ,ption s 0iew 4ontac t
User details
)elete 4ontac t
&ddresses
(evel-* %"% for &dmin
2assword
Userid 2assword %.% 5ogin
&dmin
2roces s
User 7ainte nance
>an User
2assword
&dd +mplo yee
)elet e User
4heck $ugges tions
+72 )etails
$tatisti cs
MAI/
A%MI/
SI.&MA P SI.&MA P SI.&MA Change P Pass4ord SI.&MA P Contacts SU,,&S .I#/S Conference
Statistics
C(I&/.
SU,,&S .I#/S
Contacts
Conference
#ffline
Change Pass4ord
#ffline Contacts User Maintenance 0ie4 Profiles of #thers Add &mployee Chec; suggestions
0ie4 Profiles of #thers
Chec; User Status
Search Contact
6&(P
.% UM !IA"RAMS Uni"ie( Mo(eling Lang!age:
The 1nified 5odeling 9anguage allows the software engineer to e%press an analysis model using the modeling notation that is governed by a set of syntactic semantic and pragmatic rules" 2 159 159 system system is represented represented using five five different different views that describe describe the system system from distinctly distinctly different perspective" :ach view is defined by a set of diagram, which is as follows" •
1ser 5odel 4iew i" This view view represe represents nts the system system from from the users users perspect perspective" ive" ii" The The analy analysis sis repres represen entat tation ion describ describes es a usag usage e scena scenario rio from the end) end) users perspective"
•
$tructural model view i" &n this model the the data and functional functionality ity are arrived from inside inside the system" ii" This model model view view models models the the static static struc structure tures" s"
•
Behavioral 5odel 4iew &t represents the dynamic of behavioral as parts of the system, depicting the interactions of collection between various structural elements described in the user model and structural model view"
•
&mplementation 5odel 4iew &n this the structural and behavioral as parts of the system are represented as they are to be built"
•
:nvironmental 5odel 4iew
&n this the structural and behavioral aspects of the environment in which the system is to be implemented are represented"
159 is specifically constructed through two different domains they are*
159 2nalysis modeling, this focuses on the user model and structural model views of the system"
159 design modelin modeling, g, which which focuses focuses on the behavio behavioral ral modeling modeling,, implemen implementati tation on modeling and environmental model views"
1se case 'iagrams represent the functionality of the system from a user#s point of view" 1se cases are used during requirements elicitation and analysis to represent the functionality of the system" 1se cases focus on the behavior of the system from e%ternal point of view"
2ctors are are e%ternal e%ternal entities entities that interact interact with with the system" system" :%amples :%amples of actors actors include include users users like administrator, bank customer Retc", or another system like central database"
UM( %IA,RAMS UM(-%iagrams US&-Case %iagram of Admin$
5anage employee
5anage 'octors
2dmin 5anage 5anage 2tt 2 tten endan dantt s
5anage 5anage 2m 2mbula bulances nces
Use diagram of &mployee$
5anage Patient
:mployee
Patient status
Se
2dmin
5anage 5anage employee 5anaging the employees employe es 5anaging the doctors 5anaging the attendants 5anaging the ambulances
5anage 'octors
5anage 2ttendants 2ttendants
5anage 2mbulances 2mbulances
Se
:mployee
5anage Patients
5anaging 5anaging the patients 4iewing the patient status
.. NORMAI?ATION
Patient $tatus
2 'atabase 'atabase is a collection collection of interrelated interrelated data stored with a minimum of redundancy redundancy to serve many applications" The database design is used to group data into a number of tables and minimi@es the artificiality embedded in using separate files" The tables are organi@ed to* 0educed duplication of data" $implify functions like adding, deleting, modifying data etc"", 0etrieving data Clarity and ease of use 5ore information at low cost /ormali@ation /ormali@ation is built around the concept of normal forms" 2 relation is said to be in a particular normal form if it satisfies a certain specified set of constraints on the kind of functional dependencies that could be associated with the relation" The normal forms are used to ensure that various types of anomalies and inconsistencies inconsistencies are not introduced introduced into the database" 8irst Normal 8orm:
2 relation relation 0 is in first normal form if and only if all underlying domains contained contained atomic values only" 2econd Normal 8orm:
2 relation 0 is said to be in second normal form if and only if it is in first normal form and every non)key attribute is fully dependent on the primary key" &hird Normal 8orm:
2 relation 0 is said to be in third third normal normal form if and only if it is in second normal form and every non key attribute is non transitively depend on the primary key"
. !ATA !ICTIONARY. 41+&T+ 41+&T+ T&>5+ T&>5+ =&7>U5&:4+= =&7>U5& :4+= 8 =&7> =&7>U5 U5&: &:4+ 4+:U :U7= 7= 0&14A 14A&1'8 &1'8EB EB99 :,T :,T :U55 U55 +:&> :&>5+! 5+! =1+$U5T= 0&14A&1'8EB9 9 41+&T+ 41+&T+ T&>5+ T&>5+ =&TT+:)&:T =&TT+:)&:T== 8 =&T =&TT+:) T+:)&: &:T T:&7+ :&7+== 0& 0&14A&1 4A&1'8 '8EB EB99 :,T :,T :U55 :U55 +:&>5 :&>5+! +! =&TT+:)&:TI)= 0&14A&1'8EB9 :,T :U55 +:&>5+ 9 41+&T+ 41+&T+ T&>5+ T&>5+ =),4T,1= 8 =),4:&7+= 0&14A&1 A&1'8E '8EB9 :,T :U55 +:&>5+! =),4I)= 0&14A&1'8EB9 :,T :U55 +:&>5+ 9 41+&T+ 41+&T+ T&>5+ T&>5+ =+725,L++= =+725, L++= 8 =+72:&7+= 0&14A&1'8E '8EB9 :,T :U55 +:&>5+! =+72I)= 0&14A&1'8EB9 :,T :U55 +:&>5+ 9 41+&T+ 41+&T+ T&>5+ T&>5+ =+725,L++I:/,= =+725, L++I:/,= 8 =5,"I::&7+= 0& 0&14A&1'8EB9 :, :,T :U55 +:&>5+! =),>= 0&14A&1'8EB9 :,T :U55 +:&>5+! =4,:T&4T:,= 0&14A&1'8EB9 :,T :U55 +:&>5+! =+7&I5= 0&14A&1'8EB9 :,T :U55 +:&>5+! =4U11+:T5,4&TI,:= 0&14A&1'8EB9 :,T :U55 +:&>5+! =2,$T&5&))1+$$= 0&14A&1'8EB9 :,T :U55 +:&>5+! =4U11+:T,1"&:I$&TI,:= 0&14A&1'8EB9 :,T :U55 +:&>5+! =+M2+1I+:4+= 0&14A&1'8EB9 0&14A&1'8EB9 :,T :U55 +:&>5+! =4U11+:T)+$I":&TI,:= 0&14A&1'8EB9 :,T :U55 +:&>5+ 9 41+&T+ 41+&T+ T&>5+ T&>5+ =5,"I:= 8 =5,"I::&7+= 0& 0&14A&1'8EB9 :, :,T :U55 +:&>5+! =2&$$6,1)= 0&14A&1'8EB9 :,T :U55 +:&>5+! =1,5+= 0&14A&1'8EB9 :,T :U55 +:&>5+ 9 41+&T+ T&>5+ =2&TI+:T= =2&TI+:T= 8 =2& =2&TI+:T I+:T:& :&7+ 7+== 0&14A 14A&1'8 &1'8EB EB99 :,T :,T :U5 :U55 +:&> +:&>5+ 5+!! =2&TI+:TI)= 0&14A&1'8EB9 :,T :U55 +:&>5+ 9
Aome page*
(ogin Page$
Admin's login$
Admin's login page$
Manage &mployee screen$
Adding employee$
%elete &mployee$
0ie4 &mployee$
Managing the doctors =adding a doctor>$
0ie4 %octors$
%elete %octor$
Managing the attendants =adding the attendant>$
0ie4 Attendants$
%elete Attendant$
Status of ambulance$
Status of ambulance$
0ie4 ambulance services$
&mployee's login$
Managing the patient =adding a patient>$
0ie4 patients$
%elete Patient$
0ie4ing patient Status$
*.# INTRO!UCTION TO TESTIN" 6ntroduction to &esting: &esting:
Testing esting is a process, process, which reveals errors in the
program" program" &t is the major major quality quality measure measure
employed employed during software software development" development" 'uring software software development" development" 'uring testing, testing, the program is e%ecuted with a set of test cases and the output of the program for the test cases is evaluated to determine if the program is performing as it is e%pected to perform"
*.$ TESTIN" IN STRATE"IES &n order to make sure that the system does not have errors, the different different levels of testing strategies that are applied at differing phases of software development are* Unit Testing:
1nit 1nit Testing sting is done done on indivi individua duall modul modules es as they they are are compl complete eted d and beco become me e%ecutable" &t is confined only to the designerSs requirements"
Eac )o(!le can 5e teste( !sing te "ollo#ing t#o Strategies: %lac4 %o; Testing:
&n this strategy some test cases are generated as input conditions that fully e%ecute all functional requirements for the program" This testing has been uses to find errors in the following categories* &ncorrect or missing functions
&nterface errors :rrors in data structure or e%ternal database access Performance errors &nitiali@ation and termination errors" &n this testing only the output is checked for correctness" The logical flow of the data is not checked" 1ite %o; testing :
&n this the test cases are generated on the logic of each module by drawing flow graphs of that module and logical decisions are tested on all the cases" &t has been uses to generate the test cases in the following cases*
3uarantee that all independent paths have been :%ecuted"
:%ecute all logical decisions on their true and false $ides"
:%ecute all loops at their boundaries and within their operational bounds
:%ecute internal data structures to ensure their validity"
Integrating Testing :
&ntegration &ntegration testing ensures that that software and subsystems subsystems work together a whole" &t tests tests the interface interface of all the modules modules to make sure that the modules modules behave behave properly properly when integrated together" S+ste) Testing:
&nvolves &nvolves in)house testing of the entire entire system before delivery delivery to the user" &tSs aim is to satisfy the user the system meets all requirements of the clientSs specifications" Acceptance Testing :
&t is a pre)delivery testing in which entire system is tested at clientSs site on real world data to find errors" Test Approac : Testing can 5e (one in t#o #a+s:
Bottom up approach Top down approach
%otto) !p Approac:
Testing sting can be performe performed d startin starting g from from smallest smallest and lowest lowest level level modules modules and proceeding one at a time" 8or each module in bottom up testing a short program e%ecutes the module and provides the needed data so that the module is asked to perform the way it will when embedded with in the larger system" -hen bottom level modules are tested attention turns to those on the ne%t level that use the lower level ones they are tested individually and then linked with the previously e%amined lower level modules" Top (o#n approac:
This type of testing starts from upper level modules" $ince the detailed activities usually performed in the lower level routines are not provided stubs are written" 2 stub stub is a module shell called by upper level module and that when reached properly will return a message to the calling module indicating that proper interaction occurred" /o attempt is made to verify the correctness of the lower level module .
The system has been tested and implemented successfully and thus ensured that all the requirements as listed in the software requirements specification are completely fulfilled" &n case of erroneous input corresponding error messages are displayed
+.# INTRO!UCTION 2ystem 2ecurity: 2etting !p 9uthentication for f or Ceb 9pplications 6ntroduction: To configur configure e authent authenticat ication ion for a -eb 2pplica 2pplication tion,, use the >login)c >login)confi onfigQ gQ element element of the
web"%ml deployment descriptor" &n this element you define the security realm containing the user credentials, the method of authentication, and the location of resources for authentication"
+.$ SECURITY IN SOFTWARE To set up authentication for -eb 2pplications* E" pen pen the the web"% web"%ml ml deploy deploymen mentt descr descript iptor or in a te%t te%t edito editorr or use use the the 2dminis dministra trati tion on Console Console"" $pecify $pecify the authent authenticat ication ion method method using using the >auth)me >auth)metho thodQ dQ element element"" The The available options are* B9264 Basic authentication uses the -eb Browser to display a username=password dialog
bo%" This username and password is authenticated against the realm" 8OR0
8orm)based authentication requires that you return an (T59 form containing the username and password" The fields returned from the form elements must be* j?username j?username and j?passw j?password, ord, and the the action attribute must be j?security j?security?check" ?check" (ere (ere is an e%ample of the (T59 coding for using 805 authentication* >form methodUP$TU actionUj?security?checkUQ
>input typeUte%tU nameUj?usernameUQ >input typeUpasswordU nameUj?passwordUQ >=formQ The resource used to generate the (T59 form may be an (T59 page, a +$P, or a servlet" Kou define this resource with the >form)login)pageQ element"
The (TTP session object is created when the login page is served" Therefore, the sess sessio ion" n"is is/e /ew w 67 meth method od retu return rns s 829$: 9$: when when call called ed from from page pages s serv served ed afte after r successful authentication"
,. BIBIO"RAP-Y 0 e f er e r e n ce c e s f o r t h e P r o j ec e c t ' e ve v e l o p me m e n t - e r e T ak ak e n 8 r o m t h e f o l l ow o w i ng ng Books and -eb $ites" JAVA Technologie Technologies s
+242 Complete 0eference +ava $cript Programming by Kehuda $hiran 5astering +242 $ecurity +242F +242F /etworking by Pistoria Pistor ia +242 +242 $ecurity by $cotl $cot l oaks (ead 8irst :+B $ierra Bates +F:: Professional by $hadab siddiqui +242 +242 server pages by b y 9arne Pekowsley +242 $erver pages by /ick Todd HTML
(T59 Black Book by (ol@ner JDBC
+ava 'atabase Programming with +'BC by Patel moss" $oftware :ngineering by 0oger Pressman