CRM for Mobile Service Provider
Transcript of CRM for Mobile Service Provider
-
8/13/2019 CRM for Mobile Service Provider
1/130
Customer
Relationship
Management(CRM)
for Mobile ServiceProvider Operator
-
8/13/2019 CRM for Mobile Service Provider
2/130
1. Abstract
2. Contents
o Introduction
Purpose
Scope
Overview
o Software Requirement Specification
Software Requirements
Hardware Requirements
o System Anaysis
!"istin# System
$imitations in !"istin# System
Proposed System
Probem %efinition
Advanta#es over !"istin# System
&easibiity Study
!conomic &easibiity
Operationa &easibiity
'ec(nica &easibiity
System %esi#n
Arc(itecture %ia#ram
Aut(entication
&unctiona %escription
&unctions
)aintenance
&unctiona %escription
&unctions
-
8/13/2019 CRM for Mobile Service Provider
3/130
! * R %ia#rams
+)$ %ia#rams
Activity %ia#ram
Cass %ia#ram
+se*case %ia#ram
Sequence %ia#ram
Component %ia#ram
%epoyment %ia#ram
%ata %ictionary
Codin# , Impementation
o 'ec(noo#ies +sed
H')$ , -avaScript /)$
-ava 'ec(noo#y
%atabase 'oo 0 S$
ebserver 0 Appication Server
'estin#
o )et(odoo#ies
o 'est Cases
Snaps(ots
Reports
+ser 3roups
Scope for &uture !n(ancements
Pro4ect Summary
5ibio#rap(y
-
8/13/2019 CRM for Mobile Service Provider
4/130
Abstract
'(is pro4ect is aimed to automate t(e operations of )obie Service Providers.
Customers0Company representatives o##in# in may aso access0searc( any
information of mobie reated services.
'(is ambitious service uses state*of*t(e*art tec(noo#y to attain #oba
e"ceence and eaders(ip in business. Our entry into t(is sector (as brou#(t
mobie service at an affordabe cost to t(e common man. A servin# a sin#e
ob4ective to provide better communication to miions across India.
'(is Customer service eads to (ave a #ood response for services and it can
ma6e users enro as customers wit(in mont(s of aunc( t(is service.
-
8/13/2019 CRM for Mobile Service Provider
5/130
Introduction
-
8/13/2019 CRM for Mobile Service Provider
6/130
Purpose
'(e system is an onine appication t(at can be accessed t(rou#(out t(e
or#ani7ation and outside customers as we wit( proper o#in provided w(ic(
wi #ive better service to t(e customers.
Scope
'(e scope of t(e )obie Service Provider and Operation Porta is as foows8
'(is system can be used as an appication for t(e )obie Service Providers of t(e
)obie Company to mana#e t(e product information. Customer o##in# s(oud
be abe to upoad t(e information of t(e any required mobie.
Overview
Overa description consists of bac6#round of t(e entire specific requirement. It
aso #ives e"panation about actor and function w(ic( is used. It #ives
e"panation about arc(itecture dia#ram and it aso #ives w(at we are assumed
and dependencies. It aso support specific requirement and aso it support
functiona requirement suppementary requirement ot(er t(an actor w(ic( is
used. It aso #ives inde" and appendices. It aso #ives e"panation about any
doubt and queries.
-
8/13/2019 CRM for Mobile Service Provider
7/130
Software Reuirement
Specification
-
8/13/2019 CRM for Mobile Service Provider
8/130
Software Reuirements
Operatin# System 8 +buntu $inu".
%esi#nin# $an#ua#es 8 H')$ CSS.
Scriptin# $an#ua#es 8 -avaScript A-A/.
Pro#rammin# $an#ua#e 8 -ava 9-S!:;.
'ec(noo#ies0&ramewor6s 8 -!!
, Sprin#?.
I%! 8 !cipse @eper.
%atabase 8 )yS$ .
Server 8 Apac(e 'omcat :.
!ardware Reuirements
Processor 8 i? Core.
Hard %is6 8 BB35.
RA) 8 >35.
-
8/13/2019 CRM for Mobile Service Provider
9/130
S"stem Anal"sis
-
8/13/2019 CRM for Mobile Service Provider
10/130
#$isting S"stem
'(e !"istin# system is a computeri7ed system contains a t(e detais of t(e
mobie services providers are maintained in t(e individua databases. If
customer wants t(e information t(ey must 6eep a request to t(e admin
aut(ority and #et t(e information. It=s a time deay process. And maintainin# a
t(e records in !"ce s(eets and parado" cipper. If t(ey want any record t(ey
(ave to searc( a t(e records. '(e w(oe process is now manuay controed.
'(is requires maintainin# t(e records of t(e queries comin# from t(e corporate
in t(e paper.
%imitations in #$isting S"stem
)aintainin# t(e data in e"ce s(eets and fies is very (ard to remember t(e fie
names in w(ic( t(e required data is feed. o easy access to t(e required
queries. %ata redundancy inconsistency ot of (uman wor6 need to be done in
order anay7e t(e detais present in t(e e"ce s(eets. It eads to wasta#e of
time.
Proposed S"stem
'(e Proposed system is a browser w(ic( is competey reated to internet
browsin#. '(e web enabed information mana#ement system desi#ned to
automate t(e entire operations of a modern tec(noo#y. )obie Service Provider
and Operationa Porta aow muti*divisiona muti*department system (andin#
t(at incudes various Services.
Services8ews , +pdates
Ca )ana#ement Services
Astroo#y
!ntertainment
Sports
'rave
-
8/13/2019 CRM for Mobile Service Provider
11/130
Advantages over #$isting S"stem
1. '(is system provides a Common +ser Interface for t(e system to o# on
to t(e system.
2. Here t(e user interface is 3rap(ica +ser Interface.
?. '(is appication is a eb based Appication.
>. 5ein# a web based appication it doesn=t require any cient side
instaation.
. Any number of users can interact wit( t(e system simutaneousy.
-
8/13/2019 CRM for Mobile Service Provider
12/130
&easibilit" Stud"
#conomic &easibilit"
!conomic feasibiity attempts 2 wei#( t(e costs of deveopin# and impementin#
a new system a#ainst t(e benefits t(at woud accrue from (avin# t(e new
system in pace. '(is feasibiity study #ives t(e top mana#ement t(e economic
4ustification for t(e new system.
A simpe economic anaysis w(ic( #ives t(e actua comparison of costs and
benefits are muc( more meanin#fu in t(is case. In addition t(is proves to be a
usefu point of reference to compare actua costs as t(e pro4ect pro#resses.'(ere coud be various types of intan#ibe benefits on account of automation.
'(ese coud incude increased customer satisfaction improvement in product
quaity better decision ma6in# timeiness of information e"peditin# activities
improved accuracy of operations better documentation and record 6eepin#
faster retrieva of information better empoyee morae.
Operational &easibilit"
Proposed pro4ect is beneficia ony if it can be turned into information systems
t(at wi meet t(e or#ani7ations operatin# requirements. Simpy stated t(is test
of feasibiity as6s if t(e system wi wor6 w(en it is deveoped and instaed. Are
t(ere ma4or barriers to ImpementationD Here are questions t(at wi (ep test
t(e operationa feasibiity of a pro4ect8
Is t(ere sufficient support for t(e pro4ect from mana#ement from usersD If t(e
current system is we i6ed and used to t(e e"tent t(at persons wi not be abe
to see reasons for c(an#e t(ere may be resistance.
Are t(e current business met(ods acceptabe to t(e userD If t(ey are not +sers
may wecome a c(an#e t(at wi brin# about a more operationa and usefu
systems.
Have t(e user been invoved in t(e pannin# and deveopment of t(e pro4ectD
-
8/13/2019 CRM for Mobile Service Provider
13/130
!ary invovement reduces t(e c(ances of resistance to t(e system and in
#enera and increases t(e i6ei(ood of successfu pro4ect.
Since t(e proposed system was to (ep reduce t(e (ards(ips encountered. In
t(e e"istin# manua system t(e new system was considered to be operationa
feasibe.
'echnical &easibilit"
!vauatin# t(e tec(nica feasibiity is t(e tric6iest part of a feasibiity study. '(is
is because .at t(is point in time not too many detaied desi#n of t(e system
ma6in# it difficut to access issues i6e performance costs on 9on account of t(e
6ind of tec(noo#y to be depoyed; etc. A number of issues (ave to beconsidered w(ie doin# a tec(nica anaysis.
+nderstand t(e different tec(noo#ies invoved in t(e proposed system before
commencin# t(e pro4ect we (ave to be very cear about w(at are t(e
tec(noo#ies t(at are to be required for t(e deveopment of t(e new system.
&ind out w(et(er t(e or#ani7ation currenty possesses t(e required tec(noo#ies.
Is t(e required tec(noo#y avaiabe wit( t(e or#ani7ationD
-
8/13/2019 CRM for Mobile Service Provider
14/130
S"stem esign
-
8/13/2019 CRM for Mobile Service Provider
15/130
Architecture iagram
-
8/13/2019 CRM for Mobile Service Provider
16/130
Authentication
&unctional escription
a. $o#in to t(e system t(rou#( t(e first pa#e of t(e appication.
b. C(an#e t(e password after o#in to t(e appication.
c. See (is0(er detais and c(an#e it.
d. Hep from t(e system.
Maintenance
&unctional escription
'(e &oowin# &unctiona Components are supported by t(e system8
&unctions Provided by t(e System8
Products8
Prepaid8 '(e service t(at (eps you #ive words to every
feein# an e"pression to every emotion.
&eatures
Handset Offers
Services
'ariffsRoamin#
@now )ore
Postpaid8 It #ives you t(e unimited freedom to reac( out to
peope in your specia way.
)ont(y Pans
Services
ord Cain# Cards
Home Cain# Cards
-
8/13/2019 CRM for Mobile Service Provider
17/130
# R iagrams
-
8/13/2019 CRM for Mobile Service Provider
18/130
*M% iagrams
*+I&I# MO#%I+, %A+,*A,# IA,RAMS
'(e unified modein# an#ua#e aows t(e software en#ineer to e"press an
anaysis mode usin# t(e modein# notation t(at is #overned by a set of
syntactic semantic and pra#matic rues.
A +)$ system is represented usin# five different views t(at describe t(e system
from distincty different perspective. !ac( view is defined by a set of dia#ram
w(ic( is as foows.
+ser )ode Eiew
i. '(is view represents t(e system from t(e users perspective.
ii. '(e anaysis representation describes a usa#e scenario from
t(e end*users perspective.
Structura mode view
i. In t(is mode t(e data and functionaity are arrived from
inside t(e system.
ii. '(is mode view modes t(e static structures.
5e(aviora )ode Eiew
It represents t(e dynamic of be(aviora as parts of t(e system
depictin# t(e interactions of coection between various structura
eements described in t(e user mode and structura mode view.
Impementation )ode Eiew
In t(is t(e structura and be(aviora as parts of t(e system are
represented as t(ey are to be buit.
!nvironmenta )ode Eiew
In t(is t(e structura and be(aviora aspects of t(e environment in
w(ic( t(e system is to be impemented are represented.
-
8/13/2019 CRM for Mobile Service Provider
19/130
+)$ is specificay constructed t(rou#( two different domains t(ey are8
+)$ Anaysis modein# t(is focuses on t(e user mode and structura
mode views of t(e system.
+)$ desi#n modein# w(ic( focuses on t(e be(aviora modein#
impementation modein# and environmenta mode views.
+se case %ia#rams represent t(e functionaity of t(e system from a user=s point
of view. +se cases are used durin# requirements eicitation and anaysis to
represent t(e functionaity of t(e system. +se cases focus on t(e be(avior of t(e
system from e"terna point of view.
Actors are e"terna entities t(at interact wit( t(e system. !"ampes of actorsincude users i6e administrator ban6 customer Fetc. or anot(er system i6e
centra database.
-
8/13/2019 CRM for Mobile Service Provider
20/130
Class iagram
Cass dia#rams describe t(e structure of t(e system in terms of casses and
ob4ects. '(e servet api cass dia#ram wi be as foows.
JSP: Implicit Objects
-
8/13/2019 CRM for Mobile Service Provider
21/130
-
8/13/2019 CRM for Mobile Service Provider
22/130
-
8/13/2019 CRM for Mobile Service Provider
23/130
*secase iagram
Admin
-
8/13/2019 CRM for Mobile Service Provider
24/130
ealer
-
8/13/2019 CRM for Mobile Service Provider
25/130
Customer
-
8/13/2019 CRM for Mobile Service Provider
26/130
Seuence iagram
-
8/13/2019 CRM for Mobile Service Provider
27/130
-
8/13/2019 CRM for Mobile Service Provider
28/130
Component iagram
-
8/13/2019 CRM for Mobile Service Provider
29/130
eplo"ment iagram
-
8/13/2019 CRM for Mobile Service Provider
30/130
-
8/13/2019 CRM for Mobile Service Provider
31/130
ata ictionar"
Account Profile
ColumnName DataType Size ConstraintsLoginname Text !! N
"ccountNo Text !! p#
P$oneNo text !! N
Ser%iceName Text !! N
Ser%iceType Text !! N
-ill
ColumnName DataType Size Constraints
"ccountno text &' P(
)ont$lyC$arges text &! *(
CallC$arges text &' *(
+alue",,Ser%ices text &' N
Discount text &' N
TotalC$arges text N
*romDate Date-time N
ToDate Date-time N
-ill Plan
ColumnName DataType Size Constraints
"ccountno Text ' *(
)ont$lyc$arges Text ' N
ToSamemobile Text ' N
ToOt$ermobile Text ' N
ToLan,Line Text ' N
.ene/its Text ' N
-
8/13/2019 CRM for Mobile Service Provider
32/130
Card Offer
ColumnName DataType Size Constraints
Ser%iceType text !! N
Typeo/Car, text !! N
SmsO//er text !! N
LocalCost text !! N
St,Cost text !! N
Is,Cost text !! N
Compliant and Reuest
ColumnName DataType Size Constraints
"ccountno text !! *(
0e/erenceNo Number &' N
Type text !! N
Category text !! N
Creation,ate text !! N
1xpecte,,ate text !! N
Status text !! N
%ogin Audit
ColumnName DataType Size Constraints
logini, text !! P(
login,ate ,ate-time &! N
login2,esc text !! N
-
8/13/2019 CRM for Mobile Service Provider
33/130
%ogin etails
ColumnName DataType Size Constraints
loginname text !! N
Pass3or, text !! N
/irstname text !! N
lastname text !! N
logintype text !! N
loginstatus text !! N
reg,ate ,ate-time !! N
s4uestioni, number N
sans3er text !! N
/irstlogin number N
passmo,i/ie,,ate ,ate-time N
%ogin Profile
ColumnName DataType Size Constraints
logini, text !! P(
birt$,ate ,ate-time N
5ouseno text !! N
Street text !! N
city text !! N
state text !! Ncountry text !! N
Pinco,e text !! N
1mail text !! N
locale text !! N
pro/ilemo,i/ie,,ate ,ate-time N
Mobile +o.s
ColumnName DataType Size Constraints
Ser%iceName text !! N
Ser%iceType text !! N
Simno text !! p#
Mobile Offers
-
8/13/2019 CRM for Mobile Service Provider
34/130
ColumnName DataType Size Constraints
Ser%iceName text !! N
Ser%iceType text !! N
0ec$argeCar, text !! p#
+ali,ity text !! N
Incomming text !! N
.alance text !! N
SameSer%ice text !! N
ToSer%ice text !! N
Mobile 'raffic
ColumnName DataType Size Constraints
Ser%iceName text !! N
0ec$argeCar, text !! p#
LocalCost text !! N
St,Cost text !! N
ISDCost text !! N
LocalSms text !! N
STDSms text !! N
InternationalSms text !! N
Pa"ment
ColumnName DataType Size Constraints
"ccountno text !! *(
TypeO/Pai, text !! N
Dateo/Pay)ent Date-time N
"mountPai, Text !! N
-
8/13/2019 CRM for Mobile Service Provider
35/130
Post Paid Places
ColumnName DataType Size Constraints
Ser%iceName text !! *(
Pai,Type text !! N
Storename text !! N
"rea text !! N
City text !! N
State text !! N
Country text !! N
Post Paid Rental Services
ColumnName DataType Size Constraints
Ser%iceName text !! N
0entCost text !! P(
*reeTal#Time text !! N
*reeSms text !! N
Ot$er)obiles text !! N
Recharge Cards
ColumnName DataType Size Constraints
Ser%iceName text !! N
0ec$argeCost text !! p#
Ser%ice*ee text !! N
Tal#Time text !! N
+ali,ity text !! N
-
8/13/2019 CRM for Mobile Service Provider
36/130
Roaming
ColumnNameDataType
Size Description
Constraints
Ser%iceType text!! *(
TypeO/0oaming text!! N
IncommingCalls Number N
LocalCalls text!! N
St,Calls text!! N
ISDCalls text!! N
S)SOut6oing text!! N
S)SIncomming text !! N
Services
ColumnNameDataType Size Constraints
Ser%iceName text !! *(
Process& T17T !! N
Process text !! N
process8 text !! N
SMS
ColumnName DataType Size Constraints
Ser%iceName text !! *(
Ser%iceType text !! N
Ser%iceCar, text !! N
LocalSmscost text !! N
NationalSmsCost text !! N
Internationalcost text !! N
Store %ocation
ColumnName DataType Size Constraints
Ser%iceName text !! P(
Ser%iceType text !! N
City text !! N
-
8/13/2019 CRM for Mobile Service Provider
37/130
"rea text !! N
StoreName text !! N
",,ress text !! N
Telep$oneno text !! N
9or#ing$rs text !! N
-
8/13/2019 CRM for Mobile Service Provider
38/130
Coding
/Implementation
-
8/13/2019 CRM for Mobile Service Provider
39/130
'echnologies *sed
!'M%H')$ an initiaism of Hyperte"t )ar6up $an#ua#e is t(e predominant mar6up
an#ua#e for web pa#es. It provides a means to describe t(e structure of te"t*
based information in a document G by denotin# certain te"t as (eadin#s
para#rap(s ists and so on G and to suppement t(at te"t wit( interactive
forms embedded ima#es and ot(er ob4ects. H')$ is written in t(e form of
abes 96nown as ta#s; surrounded by an#e brac6ets. H')$ can aso describe
to some de#ree t(e appearance and semantics of a document and can incude
embedded scriptin# an#ua#e code w(ic( can affect t(e be(avior of web
browsers and ot(er H')$ processors.
H')$ is aso often used to refer to content of t(e )I)! type te"t0(tm or even
more broady as a #eneric term for H')$ w(et(er in its /)$*descended form
9suc( as /H')$ 1.B and ater; or its form descended directy from S3)$
Hyper 'e"t )ar6up $an#ua#e
Hyperte"t )ar6up $an#ua#e 9H')$; t(e an#ua#es of t(e ord ide eb
9; aows users to produces eb pa#es t(at incude te"t #rap(ics and
pointer to ot(er eb pa#es 9Hyperin6s;.
H')$ is not a pro#rammin# an#ua#e but it is an appication of ISO Standard
: S3)$ 9Standard 3enerai7ed )ar6up $an#ua#e; but speciai7ed to
(yperte"t and adapted to t(e eb. '(e idea be(ind Hyperte"t is t(at instead of
readin# te"t in ri#id inear structure we can easiy 4ump from one point to
anot(er point. e can navi#ate t(rou#( t(e information based on our interest
and preference. A mar6up an#ua#e is simpy a series of eements eac(
deimited wit( specia c(aracters t(at define (ow te"t or ot(er items encosed
wit(in t(e eements s(oud be dispayed. Hyperin6s are underined or
emp(asi7ed wor6s t(at oad to ot(er documents or some portions of t(e same
document.
H')$ can be used to dispay any type of document on t(e (ost computer w(ic(
can be #eo#rap(icay at a different ocation. It is a versatie an#ua#e and can
be used on any patform or des6top.
-
8/13/2019 CRM for Mobile Service Provider
40/130
H')$ provides ta#s 9specia codes; to ma6e t(e document oo6 attractive. H')$
ta#s are not case*sensitive. +sin# #rap(ics fonts different si7es coor etc. can
en(ance t(e presentation of t(e document. Anyt(in# t(at is not a ta# is part of
t(e document itsef.
5asic H')$ 'a#s8
JK ** **L Specifies comments
JALFFF.J0AL Creates (yperte"t in6s
J5LFFF.J05L &ormats te"t as bod
J5I3LFFF.J05I3L &ormats te"t in ar#e font.
J5O%MLFJ05O%ML Contains a ta#s and te"t in t(e H')$ document
JC!'!RL...J0C!'!RL Creates te"t
J%%LFJ0%%L %efinition of a term
J%$L...J0%$L Creates definition ist
J&O'LFJ0&O'L &ormats te"t wit( a particuar font
J&OR)L...J0&OR)L !ncoses a fi*out form
J&RA)!L...J0&RA)!L %efines a particuar frame in a set of frames
JHNLFJ0HNL Creates (eadin#s of different eves9 1 < ;
JH!A%L...J0H!A%L Contains ta#s t(at specify information about a
document
JHRL...J0HRL Creates a (ori7onta rue
JH')$LFJ0H')$L Contains a ot(er H')$ ta#s
J)!'AL...J0)!'AL Provides meta*information about a document
JSCRIP'LFJ0SCRIP'L Contains cient*side or server*side script
J'A5$!LFJ0'A5$!L Creates a tabe
J'%LFJ0'%L Indicates tabe data in a tabe
J'RLFJ0'RL %esi#nates a tabe row
J'HLFJ0'HL Creates a (eadin# in a tabe
Attributes
'(e attributes of an eement are name*vaue pairs separated by Q and
written wit(in t(e start abe of an eement after t(e eements name. '(e vaue
s(oud be encosed in sin#e or doube quotes at(ou#( vaues consistin# of
-
8/13/2019 CRM for Mobile Service Provider
41/130
certain c(aracters can be eft unquoted in H')$ 9but not /H')$;.$eavin#
attribute vaues unquoted is considered unsafe.
)ost eements ta6e any of severa common attributes8 id cass stye and tite.
)ost aso ta6e an#ua#e*reated attributes8 an# and dir.
'(e id attribute provides a document*wide unique identifier for an eement. '(is
can be used by styes(eets to provide presentationa properties by browsers to
focus attention on t(e specific eement or by scripts to ater t(e contents or
presentation of an eement. '(e cass attribute provides a way of cassifyin#
simiar eements for presentation purposes. &or e"ampe an H')$ document 9or
a set of documents; may use t(e desi#nation cassQnotation to indicate t(at
a eements wit( t(is cass vaue are a subordinate to t(e main te"t of t(e
document 9or documents;. Suc( notation casses of eements mi#(t be #at(ered
to#et(er and presented as footnotes on a pa#e rat(er t(an appearin# in t(e
pace w(ere t(ey appear in t(e source H')$.
An aut(or may use t(e stye non*attributa codes presentationa properties to a
particuar eement. It is considered better practice to use an eement=s son* id
pa#e and seect t(e eement wit( a styes(eet t(ou#( sometimes t(is can be
too cumbersome for a simpe ad (oc appication of styed properties. '(e tite is
used to attac( subte"tua e"panation to an eement. In most browsers t(is tite
attribute is dispayed as w(at is often referred to as a tootip. '(e #eneric inine
span eement can be used to demonstrate t(ese various non*attributes.
'(e precedin# dispays as H')$ 9pointin# t(e cursor at t(e abbreviation s(oud
dispay t(e tite te"t in most browsers;.
Advanta#es
A H')$ document is sma and (ence easy to send over t(e net. It
is sma because it does not incude formatted information.
H')$ is patform independent.
H')$ ta#s are not case*sensitive.
-
8/13/2019 CRM for Mobile Service Provider
42/130
0avaScript
-avaScript is a script*based pro#rammin# an#ua#e t(at was deveoped by
etscape Communication Corporation. -avaScript was ori#inay caed $ive
Script and renamed as -avaScript to indicate its reations(ip wit( -ava.
-avaScript supports t(e deveopment of bot( cient and server components of
eb*based appications. On t(e cient side it can be used to write pro#rams
t(at are e"ecuted by a eb browser wit(in t(e conte"t of a eb pa#e. On t(e
server side it can be used to write eb server pro#rams t(at can process
information submitted by a eb browser and t(en update t(e browser=s dispayaccordin#y
!ven t(ou#( -avaScript supports bot( cient and server eb pro#rammin# we
prefer -avaScript at Cient side pro#rammin# since most of t(e browsers
supports it. -avaScript is amost as easy to earn as H')$ and -avaScript
statements can be incuded in H')$ documents by encosin# t(e statements
between a pair of scriptin# ta#s
JSCRIP'SL.. J0SCRIP'L.
JSCRIP' $A3+A3! Q -avaScriptTL
-avaScript statements
J0SCRIP'L
Here are a few t(in#s we can do wit( -avaScript8
Eaidate t(e contents of a form and ma6e cacuations.
Add scroin# or c(an#in# messa#es to t(e 5rowser=s status ine.
Animate ima#es or rotate ima#es t(at c(an#e w(en we move t(e
mouse over t(em.
%etect t(e browser in use and dispay different content for different
browsers.
%etect instaed pu#*ins and notify t(e user if a pu#*in is required.
e can do muc( more wit( -avaScript incudin# creatin# entire appication.
-
8/13/2019 CRM for Mobile Service Provider
43/130
-avaScript Es -ava
-avaScript and -ava are entirey different an#ua#es. A few of t(e most #arin#
differences are8
-ava appets are #eneray dispayed in a bo" wit(in t(e web documentU
-avaScript can affect any part of t(e eb document itsef.
(ie -avaScript is best suited to simpe appications and addin#
interactive features to eb pa#esU -ava can be used for incrediby
compe" appications.
'(ere are many ot(er differences but t(e important t(in# to remember is t(at
-avaScript and -ava are separate an#ua#es. '(ey are bot( usefu for different
t(in#sU in fact t(ey can be used to#et(er to combine t(eir advanta#es.
Advanta#es
-avaScript can be used for Sever*side and Cient*side scriptin#.
It is more fe"ibe t(an E5Script.
-avaScript is t(e defaut scriptin# an#ua#es at Cient*side since a
t(e browsers supports it.
-
8/13/2019 CRM for Mobile Service Provider
44/130
1M% 2 e1tensible Mar3up %anguage
/)$ is a mar6up an#ua#e for documents containin# structured information.
Structured information contains bot( content 9words pictures etc.; and some
indication of w(at roe t(at content pays 9for e"ampe content in a section
(eadin# (as a different meanin# from content in a footnote w(ic( means
somet(in# different t(an content in a fi#ure caption or content in a database
tabe etc.;. Amost a documents (ave some structure.
A mar6up an#ua#e is a mec(anism to identify structures in a document. '(e
/)$ specification defines a standard way to add mar6up to documents.
'(e !"tensibe )ar6up $an#ua#e 9/)$; is a #enera*purpose mar6up
an#ua#e.It is cassified as an e"tensibe an#ua#e because it aows its users to
define t(eir own ta#s. Its primary purpose is to faciitate t(e s(arin# of
structured data across different information systems particuary via t(e
Internet.It is used bot( to encode documents and seriai7e data. In t(e atter
conte"t it is comparabe wit( ot(er te"t*based seriai7ation an#ua#es suc( as
-SO and MA)$.
It started as a simpified subset of t(e Standard 3enerai7ed )ar6up $an#ua#e
9S3)$; and is desi#ned to be reativey (uman*e#ibe. 5y addin# semantic
constraints appication an#ua#es can be impemented in /)$. '(ese incude
/H')$ RSS )at()$ 3rap()$ Scaabe Eector 3rap(ics )usic/)$ and
t(ousands of ot(ers. )oreover /)$ is sometimes used as t(e specification
an#ua#e for suc( appication an#ua#es.
(y /)$D
In order to appreciate /)$ it is important to understand w(y it was created.
/)$ was created so t(at ric(y structured documents coud be used over t(e
web. '(e ony viabe aternatives H')$ and S3)$ are not practica for t(is
purpose.
-
8/13/2019 CRM for Mobile Service Provider
45/130
H')$ comes bound wit( a set of semantics and does not provide arbitrary
structure.
S3)$ provides arbitrary structure but is too difficut to impement 4ust for a
web browser. &u S3)$ systems sove ar#e compe" probems t(at 4ustify t(eir
e"pense. Eiewin# structured documents sent over t(e web rarey carries suc(
4ustification.
/)$ s(a support a wide variety of appications. /)$ s(oud be beneficia to a
wide variety of diverse appications8 aut(orin# browsin# content anaysis etc.
At(ou#( t(e initia focus is on servin# structured documents over t(e web it is
not meant to narrowy define /)$.
/)$ s(a be compatibe wit( S3)$. )ost of t(e peope invoved in t(e /)$
effort come from or#ani7ations t(at (ave a ar#e in some cases sta##erin#
amount of materia in S3)$. /)$ was desi#ned pra#maticay to be compatibe
wit( e"istin# standards w(ie sovin# t(e reativey new probem of sendin#
ric(y structured documents over t(e web.
It s(a be easy to write pro#rams t(at process /)$ documents. '(e cooquia
way of e"pressin# t(is #oa w(ie t(e spec was bein# deveoped was t(at it
ou#(t to ta6e about two wee6s for a competent computer science #raduate
student to buid a pro#ram t(at can process /)$ documents.
/)$ synta"
As on# as ony we*formedness is required /)$ is a #eneric framewor6 for
storin# any amount of te"t or any data w(ose structure can be represented as atree. '(e ony indispensabe syntactica requirement is t(at t(e document (as
e"acty one root eement 9aternativey caed t(e document eement;. '(is
means t(at t(e te"t must be encosed between a root openin# ta# and a
correspondin# cosin# ta#. '(e foowin# is a we*formed /)$ document8
Jboo6L'(is is a boo6.... J0boo6L
-
8/13/2019 CRM for Mobile Service Provider
46/130
'(e root eement can be preceded by an optiona /)$ decaration. '(is eement
states w(at version of /)$ is in use 9normay 1.B;U it may aso contain
information about c(aracter encodin# and e"terna dependencies.
JD"m versionQ1.B encodin#Q+'&*DL
'(e specification requires t(at processors of /)$ support t(e pan*+nicode
c(aracter encodin#s +'&* and +'&*1< 9+'&*?2 is not mandatory;. '(e use of
more imited encodin#s suc( as t(ose based on ISO0I!C is ac6nowed#ed
and is widey used and supported.
Comments can be paced anyw(ere in t(e tree incudin# in t(e te"t if t(e
content of t(e eement is te"t or NPC%A'A.
/)$ comments start wit( JK** and end wit( **L. 'wo das(es 9**; may not
appear anyw(ere in t(e te"t of t(e comment.
JK** '(is is a comment. **L
In any meanin#fu appication additiona mar6up is used to structure t(e
contents of t(e /)$ document. '(e te"t encosed by t(e root ta#s may contain
an arbitrary number of /)$ eements. '(e basic synta" for one eement is8
Jname attributeQvaueLcontentJ0nameL
Here VcontentW is some te"t w(ic( may a#ain contain /)$ eements. So a
#eneric /)$ document contains a tree*based data structure. In t(is respect it is
simiar to t(e $ISP pro#rammin# an#ua#es S*e"pressions w(ic( describe tree
structures w(erein eac( node may (ave its own property ist.
Attribute vaues must aways be quoted usin# sin#e or doube quotes and eac(
attribute name s(oud appear ony once in any eement. /)$ requires t(at
eements be propery nested G eements may never overap. &or e"ampe t(e
code beow is not we*formed /)$ because t(e em and stron# eements
overap8
-
8/13/2019 CRM for Mobile Service Provider
47/130
JK** RO3K O' !$$*&OR)!% /)$K **L
JpLorma JemLemp(asi7ed Jstron#Lstron# emp(asi7edJ0emL
stron#J0stron#LJ0pL
/)$ provides specia synta" for representin# an eement wit( empty content.
Instead of writin# a start ta# foowed immediatey by an end ta# a document
may contain an empty*eement ta#. An empty*eement ta# resembes a start ta#
but contains a sas( 4ust before t(e cosin# an#e brac6et.
Processin# /)$ fies
'(ree traditiona tec(niques for processin# /)$ fies are8
+sin# a pro#rammin# an#ua#e and t(e SA/ API.
+sin# a pro#rammin# an#ua#e and t(e %O) API.
)ore recent and emer#in# tec(niques for processin# /)$ fies are8
Pus( Parsin#
%ata bindin#
on*e"tractive /)$ Processin# API suc( as E'%*/)$
Simpe API for /)$ 9SA/;
SA/ is a e"ica event*driven interface in w(ic( a document is read seriay and
its contents are reported as cabac6s to various met(ods on a (ander ob4ect
of t(e users desi#n. SA/ is fast and efficient to impement but difficut to use
for e"tractin# information at random from t(e /)$ since it tends to burden t(e
appication aut(or wit( 6eepin# trac6 of w(at part of t(e document is bein#
processed. It is better suited to situations in w(ic( certain types of information
are aways (anded t(e same way no matter w(ere t(ey occur in t(e document.
%O)
%O) is an interface*oriented Appication Pro#rammin# Interface t(at aows for
navi#ation of t(e entire document as if it were a tree of ode ob4ects
representin# t(e documents contents. A %O) document can be created by a
parser or can be #enerated manuay by users 9wit( imitations;. %ata types in
-
8/13/2019 CRM for Mobile Service Provider
48/130
%O) odes are abstractU impementations provide t(eir own pro#rammin#
an#ua#e*specific bindin#s. %O) impementations tend to be memory intensive
as t(ey #eneray require t(e entire document to be oaded into memory and
constructed as a tree of ob4ects before access is aowed.
-
8/13/2019 CRM for Mobile Service Provider
49/130
0ava 'echnolog"
Initiay t(e an#ua#e was caed as oa6T but it was renamed as -avaT in 1.
'(e primary motivation of t(is an#ua#e was t(e need for a patform*independent 9i.e. arc(itecture neutra; an#ua#e t(at coud be used to create
software to be embedded in various consumer eectronic devices.
-ava is a pro#rammer=s an#ua#e.
-ava is co(esive and consistent.
!"cept for t(ose constraints imposed by t(e Internet environment
-ava #ives t(e pro#rammer fu contro.
&inay -ava is to Internet pro#rammin# w(ere C was to system
pro#rammin#.
Importance of -ava to t(e Internet
-ava (as (ad a profound effect on t(e Internet. '(is is becauseU -ava e"pands
t(e +niverse of ob4ects t(at can move about freey in Cyberspace. In a networ6
two cate#ories of ob4ects are transmitted between t(e Server and t(e Persona
computer. '(ey are8 Passive information and %ynamic active pro#rams. '(e
%ynamic Sef*e"ecutin# pro#rams cause serious probems in t(e areas of
Security and probabiity. 5ut -ava addresses t(ose concerns and by doin# so
(as opened t(e door to an e"citin# new form of pro#ram caed t(e Appet.
-ava can be used to create two types of pro#rams
App ications and Appets 8 An appication is a pro#ram t(at runs on our
Computer under t(e operatin# system of t(at computer. It is more or ess i6e
one creatin# usin# C or CXX. -ava=s abiity to create Appets ma6es it important.
An Appet is an appication desi#ned to be transmitted over t(e Internet and
e"ecuted by a -ava compatibe web browser. An appet is actuay a tiny -ava
pro#ram dynamicay downoaded across t(e networ6 4ust i6e an ima#e. 5ut
t(e difference is it is an intei#ent pro#ram not 4ust a media fie. It can react to
t(e user input and dynamicay c(an#e.
-
8/13/2019 CRM for Mobile Service Provider
50/130
&eatures of -ava Security
!very time you t(at you downoad a normaT pro#ram you are ris6in# a vira
infection. Prior to -ava most users did not downoad e"ecutabe pro#rams
frequenty and t(ose w(o did scan t(em for viruses prior to e"ecution. )ost
users sti worried about t(e possibiity of infectin# t(eir systems wit( a virus. In
addition anot(er type of maicious pro#ram e"ists t(at must be #uarded
a#ainst. '(is type of pro#ram can #at(er private information suc( as credit card
numbers ban6 account baances and passwords. -ava answers bot( t(ese
concerns by providin# a firewaT between a networ6 appication and your
computer.
(en you use a -ava*compatibe eb browser you can safey downoad -ava
appets wit(out fear of virus infection or maicious intent.
Portabiity
&or pro#rams to be dynamicay downoaded to a t(e various types of patforms
connected to t(e Internet some means of #eneratin# portabe e"ecutabe code
is needed .As you wi see t(e same mec(anism t(at (eps ensure security aso
(eps create portabiity. Indeed -ava=s soution to t(ese two probems is bot(
ee#ant and efficient.
'(e 5yte code
'(e 6ey t(at aows t(e -ava to sove t(e security and portabiity probems is
t(at t(e output of -ava compier is 5yte code. 5yte code is a (i#(y optimi7ed
set of instructions desi#ned to be e"ecuted by t(e -ava run*time system w(ic(
is caed t(e -ava Eirtua )ac(ine 9-E);. '(at is in its standard form t(e -E) is
an interpreter for byte code.
'ransatin# a -ava pro#ram into byte code (eps ma6es it muc( easier to run a
pro#ram in a wide variety of environments. '(e reason is once t(e run*time
pac6a#e e"ists for a #iven system any -ava pro#ram can run on it.
At(ou#( -ava was desi#ned for interpretation t(ere is tec(nicay not(in# about
-ava t(at prevents on*t(e*fy compiation of byte code into native code. Sun (as
4ust competed its -ust In 'ime 9-I'; compier for byte code. (en t(e -I'
-
8/13/2019 CRM for Mobile Service Provider
51/130
compier is a part of -E) it compies byte code into e"ecutabe code in rea
time on a piece*by*piece demand basis. It is not possibe to compie an entire
-ava pro#ram into e"ecutabe code a at once because -ava performs various
run*time c(ec6s t(at can be done ony at run time. '(e -I' compies code as it
is needed durin# e"ecution.
-ava Eirtua )ac(ine 9-E);
5eyond t(e an#ua#e t(ere is t(e -ava virtua mac(ine. '(e -ava virtua
mac(ine is an important eement of t(e -ava tec(noo#y. '(e virtua mac(ine
can be embedded wit(in a web browser or an operatin# system. Once a piece of
-ava code is oaded onto a mac(ine it is verified. As part of t(e oadin# process
a cass oader is invo6ed and does byte code verification ma6es sure t(at t(ecode t(at=s (as been #enerated by t(e compier wi not corrupt t(e mac(ine
t(at it=s oaded on. 5yte code verification ta6es pace at t(e end of t(e
compiation process to ma6e sure t(at is a accurate and correct. So byte code
verification is inte#ra to t(e compiin# and e"ecutin# of -ava code.
Overa %escription
Picture s(owin# t(e deveopment process of -AEA Pro#ram
-ava pro#rammin# uses to produce byte codes and e"ecutes t(em. '(e first bo"
indicates t(at t(e -ava source code is ocated in a. -ava fie t(at is processed
wit( a -ava compier caed 4avac. '(e -ava compier produces a fie caed a.
cass fie w(ic( contains t(e byte code. '(e .Cass fie is t(en oaded across t(enetwor6 or oaded ocay on your mac(ine into t(e e"ecution environment is t(e
-ava virtua mac(ine w(ic( interprets and e"ecutes t(e byte code.
-ava Arc(itecture
-ava arc(itecture provides a portabe robust (i#( performin# environment for
deveopment. -ava provides portabiity by compiin# t(e byte codes for t(e -ava
Java Source Java byte code JavaVM
J ava .Class
-
8/13/2019 CRM for Mobile Service Provider
52/130
Eirtua )ac(ine w(ic( is t(en interpreted on eac( patform by t(e run*time
environment. -ava is a dynamic system abe to oad code w(en needed from a
mac(ine in t(e same room or across t(e panet.
Compiation of code
(en you compie t(e code t(e -ava compier creates mac(ine code 9caed
byte code; for a (ypot(etica mac(ine caed -ava Eirtua )ac(ine 9-E);. '(e
-E) is supposed to e"ecute t(e byte code. '(e -E) is created for overcomin#
t(e issue of portabiity. '(e code is written and compied for one mac(ine and
interpreted on a mac(ines. '(is mac(ine is caed -ava Eirtua )ac(ine.
Compiin# and interpretin# -ava Source Code
%urin# run*time t(e -ava interpreter tric6s t(e byte code fie into t(in6in# t(at it
is runnin# on a -ava Eirtua )ac(ine. In reaity t(is coud be a Inte Pentium
indows or SunSARC station runnin# Soaris or Appe )acintos( runnin#
system and a coud receive code from any computer t(rou#( Internet and run
t(e Appets.
Simpe
-ava was desi#ned to be easy for t(e Professiona pro#rammer to earn and to
use effectivey. If you are an e"perienced CXX pro#rammer earnin# -ava wi
be even easier. 5ecause -ava in(erits t(e C0CXX synta" and many of t(e ob4ect
-
8/13/2019 CRM for Mobile Service Provider
53/130
oriented features of CXX. )ost of t(e confusin# concepts from CXX are eit(er
eft out of -ava or impemented in a ceaner more approac(abe manner. In
-ava t(ere are a sma number of ceary defined ways to accompis( a #iven
tas6.
Ob4ect*Oriented
-ava was not desi#ned to be source*code compatibe wit( any ot(er an#ua#e.
'(is aowed t(e -ava team t(e freedom to desi#n wit( a ban6 sate. One
outcome of t(is was a cean usabe pra#matic approac( to ob4ects. '(e ob4ect
mode in -ava is simpe and easy to e"tend w(ie simpe types suc( as
inte#ers are 6ept as (i#(*performance non*ob4ects.
Robust
'(e muti*patform environment of t(e eb paces e"traordinary demands on a
pro#ram because t(e pro#ram must e"ecute reiaby in a variety of systems.
'(e abiity to create robust pro#rams was #iven a (i#( priority in t(e desi#n of
-ava. -ava is stricty typed an#ua#eU it c(ec6s your code at compie time and
run time.
-ava virtuay eiminates t(e probems of memory mana#ement and de*
aocation w(ic( is competey automatic. In a we*written -ava pro#ram a run
time errors can and s(oud be mana#ed by your pro#ram.
-
8/13/2019 CRM for Mobile Service Provider
54/130
0ava Collections
A coection G sometimes caed a container G is simpy an ob4ect t(at #roups
mutipe eements into a sin#e unit. Coections are used to store retrieve
manipuate and communicate a##re#ate data. 'ypicay t(ey represent data
items t(at form a natura #roup suc( as a po6er (and 9a coection of cards; a
mai foder 9a coection of etters; or a teep(one directory 9a mappin# of
names to p(one numbers;.
If youve used t(e -ava pro#rammin# an#ua#e G or 4ust about any ot(er
pro#rammin# an#ua#e G youre aready famiiar wit( coections. Coection
impementations in earier 9pre*1.2; versions of t(e -ava patform incuded
Eector Has(tabe and array. However t(ose earier versions did not contain a
coections framewor6.
A coections framewor6 is a unified arc(itecture for representin# and
manipuatin# coections. A coections framewor6s contain t(e foowin#8
Interfaces8 '(ese are abstract data types t(at represent coections. Interfaces
aow coections to be manipuated independenty of t(e detais of t(eir
representation. In ob4ect*oriented an#ua#es interfaces #eneray form a(ierarc(y.
Impementations8 '(ese are t(e concrete impementations of t(e coection
interfaces. In essence t(ey are reusabe data structures.
A#orit(ms8 '(ese are t(e met(ods t(at perform usefu computations suc( as
searc(in# and sortin# on ob4ects t(at impement coection interfaces. '(e
a#orit(ms are said to be poymorp(ic8 t(at is t(e same met(od can be used on
many different impementations of t(e appropriate coection interface. In
essence a#orit(ms are reusabe functionaity.
-
8/13/2019 CRM for Mobile Service Provider
55/130
-enefits of the 0ava Collections &ramewor3
'(e -ava Coections &ramewor6 provides t(e foowin# benefits8
Reduces pro#rammin# effort8 5y providin# usefu data structures and
a#orit(ms t(e Coections &ramewor6 frees you to concentrate on t(e important
parts of your pro#ram rat(er t(an on t(e ow*eve pumbin# required to ma6e
it wor6. 5y faciitatin# interoperabiity amon# unreated APIs t(e -ava
Coections &ramewor6 frees you from writin# adapter ob4ects or conversion
code to connect APIs.
Increases pro#ram speed and quaity8 '(is Coections &ramewor6 provides (i#(
performance (i#(*quaity impementations of usefu data structures and
a#orit(ms. '(e various impementations of eac( interface are interc(an#eabe
so pro#rams can be easiy tuned by switc(in# coection impementations.
5ecause youre freed from t(e drud#ery of writin# your own data structures
you (ave more time to devote to improvin# pro#rams quaity and
performance.
Aows interoperabiity amon# unreated APIs8 '(e coection interfaces are t(e
vernacuar by w(ic( APIs pass coections bac6 and fort(. If my networ6administration API furnis(es a coection of node names and if your 3+I too6it
e"pects a coection of coumn (eadin#s our APIs wi interoperate seamessy
even t(ou#( t(ey were written independenty.
Reduces effort to earn and to use new APIs8 )any APIs naturay ta6e
coections on input and furnis( t(em as output. In t(e past eac( suc( API (ad
a sma sub*API devoted to manipuatin# its coections. '(ere was itte
consistency amon# t(ese ad (oc coections sub*APIs so you (ad to earn eac(
one from scratc( and it was easy to ma6e mista6es w(en usin# t(em. it( t(e
advent of standard coection interfaces t(e probem went away.
Reduces effort to desi#n new APIs8 '(is is t(e fip side of t(e previous
advanta#e. %esi#ners and impementers dont (ave to reinvent t(e w(ee eac(
time t(ey create an API t(at reies on coectionsU instead t(ey can use standard
-
8/13/2019 CRM for Mobile Service Provider
56/130
coection interfaces.
&osters software reuse8 ew data structures t(at conform to t(e standard
coection interfaces are by nature reusabe. '(e same #oes for new a#orit(ms
t(at operate on ob4ects t(at impement t(ese interfaces.
'he core collection interfaces4
A Set is a specia 6ind of Coection a SortedSet is a specia 6ind of Set and so
fort(. ote aso t(at t(e (ierarc(y consists of two distinct trees G a )ap is not a
true Coection.
ote t(at a t(e core coection interfaces are #eneric. &or e"ampe t(is is t(e
decaration of t(e Coection interface.
pubic interface CoectionJ!L...
'(e foowin# ist describes t(e core coection interfaces8
Coection G t(e root of t(e coection (ierarc(y. A coection represents a #roup
of ob4ects 6nown as its eements. '(e Coection interface is t(e east common
denominator t(at a coections impement and is used to pass coectionsaround and to manipuate t(em w(en ma"imum #eneraity is desired. Some
types of coections aow dupicate eements and ot(ers do not.
Some are ordered and ot(ers are unordered. '(e -ava patform doesnt provide
any direct impementations of t(is interface but provides impementations of
more specific sub interfaces suc( as Set and $ist. Aso see '(e Coection
-
8/13/2019 CRM for Mobile Service Provider
57/130
Interface section.
Set G a coection t(at cannot contain dupicate eements. '(is interface modes
t(e mat(ematica set abstraction and is used to represent sets suc( as t(e
cards comprisin# a po6er (and t(e courses ma6in# up a students sc(edue or
t(e processes runnin# on a mac(ine. See aso '(e Set Interface section.
$ist G an ordered coection 9sometimes caed a sequence;. $ists can contain
dupicate eements. '(e user of a $ist #eneray (as precise contro over w(ere
in t(e ist eac( eement is inserted and can access eements by t(eir inte#er
inde" 9position;. If youve used Eector youre famiiar wit( t(e #enera favor of
$ist. Aso see '(e $ist Interface section.
ueue G a coection used to (od mutipe eements prior to processin#. 5esides
basic Coection operations a ueue provides additiona insertion e"traction
and inspection operations. ueues typicay but do not necessariy order
eements in a &I&O 9first*in first*out; manner. Amon# t(e e"ceptions are
priority queues w(ic( order eements accordin# to a suppied comparator or t(e
eements natura orderin#D (atever t(e orderin# used t(e (ead of t(e queue
is t(e eement t(at woud be removed by a ca to remove or po. In a &I&Oqueue a new eements are inserted at t(e tai of t(e queue. Ot(er 6inds of
queues may use different pacement rues. !very ueue impementation must
specify its orderin# properties. Aso see '(e ueue Interface section.
A ueue is a coection for (odin# eements prior to processin#. 5esides basic
Coection operations queues provide additiona insertion remova and
inspection operations.
!ac( ueue met(od e"ists in two forms8 91; one t(rows an e"ception if t(e
operation fais and 92; t(e ot(er returns a specia vaue if t(e operation fais
9eit(er nu or fase dependin# on t(e operation;. '(e re#uar structure of t(e
interface is iustrated in t(e foowin# tabe.
)ap G an ob4ect t(at maps 6eys to vaues. A )ap cannot contain dupicate
-
8/13/2019 CRM for Mobile Service Provider
58/130
6eysU eac( 6ey can map to at most one vaue. If youve used Has(tabe youre
aready famiiar wit( t(e basics of )ap. Aso see '(e )ap Interface section. '(e
ast two core coection interfaces are merey sorted versions of Set and
)ap8
SortedSet G a Set t(at maintains its eements in ascendin# order. Severa
additiona operations are provided to ta6e advanta#e of t(e orderin#. Sorted
sets are used for naturay ordered sets suc( as word ists and members(ip
ros. Aso see '(e SortedSet Interface section.
Sorted)ap G a )ap t(at maintains its mappin#s in ascendin# 6ey order. '(is is
t(e )ap anao# of SortedSet. Sorted maps are used for naturay ordered
coections of 6ey0vaue pairs suc( as dictionaries and teep(one directories.
Aso see '(e Sorted)ap Interface section.
Iterators8 An Iterator is an ob4ect t(at enabes you to traverse t(rou#( a
coection and to remove eements from t(e coection seectivey if desired. Mou
#et an Iterator for a coection by cain# its iterator met(od. '(e foowin# is t(e
Iterator interface.
pubic interface IteratorJ!L Y
booean (ase"t9;U ! ne"t9;U void remove9;U 00optionaZ
'(e (ase"t met(od returns true if t(e iteration (as more eements and t(e
ne"t met(od returns t(e ne"t eement in t(e iteration. '(e remove met(od
removes t(e ast eement t(at was returned by ne"t from t(e underyin#
Coection. '(e remove met(od may be caed ony once per ca to ne"t and
t(rows an e"ception if t(is rue is vioated.
5u6 operations perform an operation on an entire Coection. Mou coud
impement t(ese s(ort(and operations usin# t(e basic operations t(ou#( in
most cases suc( impementations woud be ess efficient. '(e foowin# are t(e
-
8/13/2019 CRM for Mobile Service Provider
59/130
bu6 operations8
containsA G returns true if t(e tar#et Coection contains a of t(e eements in
t(e specified Coection.
addA G adds a of t(e eements in t(e specified Coection to t(e tar#et
Coection.
removeA G removes from t(e tar#et Coection a of its eements t(at are aso
contained in t(e specified Coection.
retainA G removes from t(e tar#et Coection a its eements t(at are not aso
contained in t(e specified Coection. '(at is it retains ony t(ose eements in
t(e tar#et Coection t(at are aso contained in t(e specified Coection.
cear G removes a eements from t(e Coection.
'(e addA removeA and retainA met(ods a return true if t(e tar#et
Coection was modified in t(e process of e"ecutin# t(e operation.
-
8/13/2019 CRM for Mobile Service Provider
60/130
0ava Swing
Swin# Components enabe t(e user to buid functionay ric( user interfaces. '(e
Swin# #rap(ica user interface components were introduced wit( t(e -ava
&oundation Casses 9-&C; as a downoadabe e"tension to t(e -ava 1.1 Patform
t(en became a standard e"tension in t(e -ava 2 Patform. Swin# provides a
more compete set of 3+I components t(an t(e Abstract indowin# 'oo6it
9A'; incudin# advanced features suc( as a pu##abe oo6 and fee
i#(twei#(t component renderin# and dra#*and*drop capabiities.
Swin# 'e"t Components and H')$ Renderin#
)any appications present te"t to t(e user for viewin# and editin#. '(is te"t may
consist of pain unformatted c(aracters or it may consist of ric(y styed
c(aracters t(at use mutipe fonts and e"tensive formattin#. Swin# provides
t(ree basic types of te"t components for presentin# and editin# te"t. Cass
-'e"tComponent is t(e base cass for a Swin# te"t components incudin#
-'e"t&ied -'e"tArea and -!ditorPane. -'e"t&ied is a sin#e*ine te"t component
suitabe for obtainin# simpe user input or dispayin# information suc( as form
fied vaues cacuation resuts and so on. -password&ied is a subcass of
-'e"t&ied suitabe for obtainin# user passwords. '(ese components do not
perform any specia te"t styin#. Rat(er t(ey present a te"t in a sin#e font
and coor. -'e"tArea i6e -'e"t&ied and -Password&ied aso does not stye its
te"t. However -'e"tArea does provide a ar#er visibe area and supports ar#er
pain*te"t documents.
-!ditorPane provides en(anced te"t*renderin# capabiities. -!ditorPane supports
styed documents t(at incude formattin# font and coor information. -!ditor*
Pane is capabe of renderin# H')$ documents as we as Ric( 'e"t &ormat 9R'&;
documents. e use cass -!ditorPane to render H')$ pa#es for a simpe eb
browser appication. -'e"tPane is a -!ditorPane subcass t(at renders ony styed
documents and not pain te"t. -'e"tPane provides deveopers wit( fine*#rained
contro over t(e stye of eac( c(aracter and para#rap( in t(e rendered
document.
-
8/13/2019 CRM for Mobile Service Provider
61/130
Swin# 'oobars
'oobars are 3+I containers typicay ocated beow an appication=s menus.
'oobars contain buttons and ot(er 3+I components for commony used
features suc( as cut copy and paste or navi#ation buttons for a eb browser.
&i#ure 2.2 s(ows toobars in Internet !"porer and )o7ia. Cass
4ava".swin#.-'oo5ar enabes deveopers to add toobars to Swin# user
interfaces. -'oo5ar aso enabes users to modify t(e appearance of t(e -'oo5ar
in a runnin# appication. &or e"ampe t(e user can dra# t(e -'oo5ar from t(e
top of a window and doc6 t(e -'oo5ar on t(e side or bottom of t(e window.
-SpitPane and -'abbedPane
-SpitPane and -'abbedPane are container components t(at enabe deveopers
to present ar#e amounts of information in a sma screen area. -SpitPane
accompis(es t(is by dividin# two components wit( a divider users can
reposition to e"pand and contract t(e visibe areas of t(e -SpitPane=s c(id
components 9&i#. 2.:;. -'abbedPane uses a fiefoder* stye tab interface to
arran#e many components t(rou#( w(ic( t(e user can browse.
-ava Swin# provides casses -%es6topPane and -Interna&rame for buidin#
mutipe*document interfaces. '(ese cass names reinforce t(e idea t(at eac(
document is a separate window 9-Interna&rame; inside t(e appication=s des6top
9-%es6top*Pane; 4ust as ot(er appications are separate windows 9e.#.
-&rames; on t(e operatin# system=s des6top. -Interna&rames be(ave muc( i6e
-&rames. +sers can ma"imi7e iconify resi7e open and cose -Interna&rames.
-Interna&rames (ave tite bars wit( buttons for iconifyin# ma"imi7in# and
cosin#. +sers aso can move -Interna*&rames wit(in t(e -%es6topPane.
%ra# and drop is a common way to manipuate data in a 3+I. )ost 3+Is
emuate rea word des6tops wit( icons t(at represent t(e ob4ects on a virtua
des6. %ra# and drop enabes users to move items around t(e des6top and to
move and copy data amon# appications usin# mouse #estures. A #esture is a
mouse movement t(at corresponds to a dra# and*drop operation suc( as
dra##in# a fie from one foder and droppin# t(e fie into anot(er foder. 'wo
-
8/13/2019 CRM for Mobile Service Provider
62/130
-ava APIs enabe dra#*and*drop data transfer between appications. '(e data
transfer APIGpac6a#e 4ava.awt.datatransferGenabes copyin# and movin# data
wit(in a sin#e appication or amon# mutipe appications. '(e dra#*and*drop
API enabes -ava appications to reco#ni7e dra#*and*drop #estures and to
respond to dra#*and drop operations. A dra#*and*drop operation uses t(e data
transfer API to transfer data from t(e dra# source to t(e drop tar#et. &or
e"ampe a user coud be#in a dra# #esture in a fiemana#er appication 9t(e
dra# source; to dra# a fie from a foder and drop t(e fie on a -ava appication
9t(e drop tar#et;. '(e -ava appication woud use t(e dra#*and*drop API to
reco#ni7e t(at a dra#*and*drop operation occurred and woud use t(e data
transfer API to retrieve t(e data transferred t(rou#( t(e dra#*and*drop
operation.
-
8/13/2019 CRM for Mobile Service Provider
63/130
S#R5%#'S
Introduction
'(e -ava web server is -avaSofts own web Server. '(e -ava web server is 4ust a
part of a ar#er framewor6 intended to provide you not 4ust wit( a web server
but aso wit( toos. 'o buid customi7ed networ6 servers for any Internet or
Intranet cient0server system. Servets are to a web server (ow appets are to
t(e browser.
About Servets
Servets provide a -ava*based soution used to address t(e probems currentyassociated wit( doin# server*side pro#rammin# incudin# ine"tensibe scriptin#
soutions patform*specific APIs and incompete interfaces.
Servets are ob4ects t(at conform to a specific interface t(at can be pu##ed into
a -ava*based server. Servets are to t(e server*side w(at appets are to t(e
cient*side * ob4ect byte codes t(at can be dynamicay oaded off t(e net. '(ey
differ from appets in t(at t(ey are faceess ob4ects 9wit(out #rap(ics or a 3+I
component;. '(ey serve as patform independent dynamicay oadabepu##abe (eper byte code ob4ects on t(e server side t(at can be used to
dynamicay e"tend server*side functionaity.
&or e"ampe an H''P Servets can be used to #enerate dynamic H')$ content.
(en you use Servets to do dynamic content you #et t(e foowin# advanta#es8
'(ey=re faster and ceaner t(an C3I scripts
'(ey use a standard API 9t(e Servets API;
'(ey provide a t(e advanta#es of -ava 9run on a variety of serverswit(out needin# to be rewritten;.
Attractiveness of Servets
'(ere are many features of Servets t(at ma6e t(em easy and attractive to use.
'(ese incude8
!asiy confi#ured usin# t(e 3+I*based Admin too
-
8/13/2019 CRM for Mobile Service Provider
64/130
Can be oaded and invo6ed from a oca dis6 or remotey across t(e
networ6.
Can be in6ed to#et(er or c(ained so t(at one Servets can ca
anot(er Servets or severa Servets in sequence.
Can be caed dynamicay from wit(in H')$ pa#es usin# server*
side incude ta#s.
Are secure * even w(en downoadin# across t(e networ6 t(e
Servets security mode and Servets sandbo" protect your system
from unfriendy be(avior.
Advanta#es of t(e Servet API
One of t(e #reat advanta#es of t(e Servet API is protoco independence. Itassumes not(in# about8
'(e protoco bein# used to transmit on t(e net
How it is oaded
'(e server environment it wi be runnin# in
'(ese quaities are important because it aows t(e Servet API to be embedded
in many different 6inds of servers. '(ere are ot(er advanta#es to t(e Servet
API as we. '(ese incude8
It=s e"tensibe * you can in(erit a your functionaity from t(e base
casses made avaiabe to you.
It=s simpe sma and easy to use.
-
8/13/2019 CRM for Mobile Service Provider
65/130
&eatures of Servets8
Servets are persistent. Servet are oaded ony by t(e web server and
can maintain services between requests.
Servets are fast. Since Servets ony need to be oaded once t(ey
offer muc( better performance over t(eir C3I counterparts.
Servets are patform independent.
Servets are e"tensibe. -ava is a robust ob4ect*oriented pro#rammin#
an#ua#e w(ic( easiy can be e"tended to suit your needs
Servets are secure.
Servets can be used wit( a variety of cients.
$oadin# Servets8
Servets can be oaded from t(ree paces
&rom a directory t(at is on t(e C$ASSPA'H. '(e C$ASSPA'H of t(e
-avaebServer incudes service root0casses0 w(ic( is w(ere t(e system casses
reside.
&rom t(e JS!REIC![ROO' 0Servets0 directory. '(is is \not\ in t(e server=s
cass pat(. A cass oader is used to create Servets from t(is directory. ew
-
8/13/2019 CRM for Mobile Service Provider
66/130
Servets can be added * e"istin# Servets can be recompied and t(e server wi
notice t(ese c(an#es.
&rom a remote ocation for t(is a code base i6e (ttp8 00 nine.en# 0 casses 0 foo
0 is required in addition to t(e Servets cass name. Refer to t(e admin 3+I docs
on Servet section to see (ow to set t(is up.
$oadin# Remote Servets
Remote Servets can be oaded by8
1. Confi#urin# t(e Admin 'oo to setup automatic oadin# of remote Servets
2. Settin# up server side incude ta#s in. s(tm fies
?. %efinin# a fiter c(ain confi#uration
Invo6in# Servets
A Servet invo6er is a Servet t(at invo6es t(e service met(od on a named
Servet. If t(e Servet is not oaded in t(e server t(en t(e invo6er first oads t(e
Servet 9eit(er from oca dis6 or from t(e networ6; and t(e t(en invo6es t(e
service met(od. Aso i6e appets oca Servets in t(e server can be identified
by 4ust t(e cass name. In ot(er words if a Servet name is not absoute it is
treated as oca.
A cient can invo6e Servets in t(e foowin# ways4
'(e cient can as6 for a document t(at is served by t(e Servet.
'(e cient 9browser; can invo6e t(e Servet directy usin# a +R$ once it
(as been mapped usin# t(e Servet Aiasessection of t(e admin 3+I.
'(e Servet can be invo6ed t(rou#( server side incudeta#s.
'(e Servet can be invo6ed by pacin# it in t(e Servets0 directory.
'(e Servet can be invo6ed by usin# it in a fiter c(ain.
0ava atabase Connectivit"
(at Is -%5CD
-%5C is a -ava API for e"ecutin# S$ statements. 9As a point of interest -%5C is
a trademar6ed name and is not an acronymU nevert(eess -%5C is often
t(ou#(t of as standin# for -ava %atabase Connectivity. It consists of a set of
casses and interfaces written in t(e -ava pro#rammin# an#ua#e. -%5C provides
http://var/www/apps/conversion/tmp/administration/servlet_alias.htmlhttp://var/www/apps/conversion/tmp/scratch_1/ssinclude.htmlhttp://var/www/apps/conversion/tmp/scratch_1/ssinclude.htmlhttp://var/www/apps/conversion/tmp/administration/servlet_alias.html -
8/13/2019 CRM for Mobile Service Provider
67/130
a standard API for too0database deveopers and ma6es it possibe to write
database appications usin# a pure -ava API.
+sin# -%5C it is easy to send S$ statements to virtuay any reationa
database. One can write a sin#e pro#ram usin# t(e -%5C API and t(e pro#ram
wi be abe to send S$ statements to t(e appropriate database. '(e
combinations of -ava and -%5C ets a pro#rammer write it once and run it
anyw(ere.
(at %oes -%5C %oD
Simpy put -%5C ma6es it possibe to do t(ree t(in#s8
!stabis( a connection wit( a database
Send S$ statements
Process t(e resuts.
-%5C versus O%5C and ot(er APIs
At t(is point )icrosofts O%5C 9Open %atabase Connectivity; API is t(at
probaby t(e most widey used pro#rammin# interface for accessin# reationa
databases. It offers t(e abiity to connect to amost a databases on amost a
patforms.
So w(y not 4ust use O%5C from -avaD '(e answer is t(at you can use O%5C
from -ava but t(is is best done wit( t(e (ep of -%5C in t(e form of t(e -%5C*
O%5C 5rid#e w(ic( we wi cover s(orty. '(e question now becomes (y do
you need -%5CD '(ere are severa answers to t(is question8
1. O%5C is not appropriate for direct use from -ava because it uses a C
interface. Cas from -ava to native C code (ave a number of drawbac6s in
t(e security impementation robustness and automatic portabiity of
appications.
2. A itera transation of t(e O%5C C API into a -ava API woud not be
desirabe. &or e"ampe -ava (as no pointers and O%5C ma6es copious
use of t(em incudin# t(e notoriousy error*prone #eneric pointer void
\. Mou can t(in6 of -%5C as O%5C transated into an ob4ect*oriented
interface t(at is natura for -ava pro#rammers.
?. O%5C is (ard to earn. It mi"es simpe and advanced features to#et(er
and it (as compe" options even for simpe queries. -%5C on t(e ot(er
-
8/13/2019 CRM for Mobile Service Provider
68/130
(and was desi#ned to 6eep simpe t(in#s simpe w(ie aowin# more
advanced capabiities w(ere required.
>. A -ava API i6e -%5C is needed in order to enabe a pure -ava soution.
(en O%5C is used t(e O%5C driver mana#er and drivers must be
manuay instaed on every cient mac(ine. (en t(e -%5C driver is
written competey in -ava (owever -%5C code is automaticay
instaabe portabe and secure on a -ava patforms from networ6
computers to mainframes.
'wo*tier and '(ree*tier )odes
'(e -%5C API supports bot( two*tier and t(ree*tier modes for database access.
In t(e two*tier mode a -ava appet or appication ta6s directy to t(e database.
'(is requires a -%5C driver t(at can communicate wit( t(e particuar database
mana#ement system bein# accessed. A users S$ statements are deivered to
t(e database and t(e resuts of t(ose statements are sent bac6 to t(e user. '(e
database may be ocated on anot(er mac(ine to w(ic( t(e user is connected via
a networ6. '(is is referred to as a cient0server confi#uration wit( t(e users
mac(ine as t(e cient and t(e mac(ine (ousin# t(e database as t(e server. '(e
networ6 can be an Intranet w(ic( for e"ampe connects empoyees wit(in a
corporation or it can be t(e Internet.
JAVA
Application
JDBC
DBMS
Client machine
DBMS-proprietary protocol
Database server
-
8/13/2019 CRM for Mobile Service Provider
69/130
In t(e t(ree*tier mode commands are sent to a midde tier of services w(ic(
t(en send S$ statements to t(e database. '(e database processes t(e S$
statements and sends t(e resuts bac6 to t(e midde tier w(ic( t(en sends
t(em to t(e user. )IS directors find t(e t(ree*tier mode very attractive because
t(e midde tier ma6es it possibe to maintain contro over access and t(e 6inds
of updates t(at can be made to corporate data. Anot(er advanta#e is t(at w(en
t(ere is a midde tier t(e user can empoy an easy*to*use (i#(er*eve API
w(ic( is transated by t(e midde tier into t(e appropriate ow*eve cas. &inay
in many cases t(e t(ree*tier arc(itecture can provide performance advanta#es.
+nti now t(e midde tier (as typicay been written in an#ua#es suc( as C or CX
X w(ic( offer fast performance. However wit( t(e introduction of optimi7in#
compiers t(at transate -ava byte code into efficient mac(ine*specific code it is
becomin# practica to impement t(e midde tier in -ava. '(is is a bi# pus
ma6in# it possibe to ta6e advanta#e of -avas robustness mutit(readin# and
security features. -%5C is important to aow database access from a -ava
midde tier.
Java applet or
Html browser
Application
Server (Java)
JDBC
DBMS
Client machine (!")
H##$% &M"% or C'&BA calls
Server machine (business
oic)
DBMS-proprietary protocol
Database server
-
8/13/2019 CRM for Mobile Service Provider
70/130
-%5C %river 'ypes
'(e -%5C drivers t(at we are aware of at t(is time fit into one of four
cate#ories8
-%5C*O%5C brid#e pus O%5C driver
ative*API party*-ava driver
-%5C*et pure -ava driver
ative*protoco pure -ava driver
0-CO-C -ridge4 If possibe use a Pure -ava -%5C driver instead of t(e
5rid#e and an O%5C driver. '(is competey eiminates t(e cient confi#uration
required by O%5C. It aso eiminates t(e potentia t(at t(e -ava E) coud be
corrupted by an error in t(e native code brou#(t in by t(e 5rid#e 9t(at is t(e
5rid#e native ibrary t(e O%5C driver mana#er ibrary t(e O%5C driver ibrary
and t(e database cient ibrary;.
(at Is t(e -%5C* O%5C 5rid#eD
'(e -%5C*O%5C 5rid#e is a -%5C driver w(ic( impements -%5C operations by
transatin# t(em into O%5C operations. 'o O%5C it appears as a norma
-
8/13/2019 CRM for Mobile Service Provider
71/130
appication pro#ram. '(e 5rid#e impements -%5C for any database for w(ic( an
O%5C driver is avaiabe. '(e 5rid#e is impemented as t(e
Sun.4dbc.odbc -ava pac6a#e and contains a native ibrary used to access
O%5C. '(e 5rid#e is a 4oint deveopment of Innersoe and -ava Soft.
-%5C connectivity
'(e -%5C provides database*independent connectivity between t(e -2!!
patform and a wide ran#e of tabuar data sources. -%5C tec(noo#y aows an
Appication Component Provider to8
Perform connection and aut(entication to a database server
)ana#er transactions
)ove S$ statements to a database en#ine for preprocessin# and
e"ecution
!"ecute stored procedures
Inspect and modify t(e resuts from Seect statements
-
8/13/2019 CRM for Mobile Service Provider
72/130
atabase4
A database mana#ement system 9%5)S; is computer software desi#ned for t(e
purpose of mana#in# databases a ar#e set of structured data and run
operations on t(e data requested by numerous users. 'ypica e"ampes of
%5)Ss incude Orace %52 )icrosoft Access )icrosoft S$ Server &irebird
Post#reS$ )yS$ S$ite &ie)a6er and Sybase Adaptive Server !nterprise.
%5)Ss are typicay used by %atabase administrators in t(e creation of
%atabase systems. 'ypica e"ampes of %5)S use incude accountin# (uman
resources and customer support systems.
Ori#inay found ony in ar#e companies wit( t(e computer (ardware needed to
support ar#e data sets %5)Ss (ave more recenty emer#ed as a fairy standard
part of any company bac6 office.
escription
A %5)S is a compe" set of software pro#rams t(at contros t(e or#ani7ation
stora#e mana#ement and retrieva of data in a database. A %5)S incudes8
A modein# an#ua#e to define t(e sc(ema of eac( database (osted in t(e
%5)S accordin# to t(e %5)S data mode.
'(e four most common types of or#ani7ations are t(e (ierarc(ica
networ6 reationa and ob4ect modes. Inverted ists and ot(er
met(ods are aso used. A #iven database mana#ement system may
provide one or more of t(e four modes. '(e optima structure depends
on t(e natura or#ani7ation of t(e appications data and on t(e
appications requirements 9w(ic( incude transaction rate 9speed;
reiabiity maintainabiity scaabiity and cost;.
'(e dominant mode in use today is t(e ad (oc one embedded in S$
despite t(e ob4ections of purists w(o beieve t(is mode is a corruption
of t(e reationa mode since it vioates severa of its fundamenta
principes for t(e sa6e of practicaity and performance. )any %5)Ss
-
8/13/2019 CRM for Mobile Service Provider
73/130
aso support t(e Open %atabase Connectivity API t(at supports a
standard way for pro#rammers to access t(e %5)S.
%ata structures 9fieds records fies and ob4ects; optimi7ed to dea wit(
very ar#e amounts of data stored on a permanent data stora#e device9w(ic( impies reativey sow access compared to voatie main memory;.
A database query an#ua#e and report writer to aow users to
interactivey interro#ate t(e database anay7e its data and update it
accordin# to t(e users privie#es on data.
It aso contros t(e security of t(e database.
%ata security prevents unaut(ori7ed users from viewin# or updatin#
t(e database. +sin# passwords users are aowed access to t(e entire
database or subsets of it caed subsc(emas. &or e"ampe an
empoyee database can contain a t(e data about an individua
empoyee but one #roup of users may be aut(ori7ed to view ony
payro data w(ie ot(ers are aowed access to ony wor6 (istory and
medica data.
If t(e %5)S provides a way to interactivey enter and update t(e
database as we as interro#ate it t(is capabiity aows for mana#in#
persona databases. However it may not eave an audit trai of actions
or provide t(e 6inds of contros necessary in a muti*user or#ani7ation.
'(ese contros are ony avaiabe w(en a set of appication pro#rams
are customi7ed for eac( data entry and updatin# function.
A transaction mec(anism t(at ideay woud #uarantee t(e ACI% properties
in order to ensure data inte#rity despite concurrent user accesses
9concurrency contro; and fauts 9faut toerance;.
It aso maintains t(e inte#rity of t(e data in t(e database.
-
8/13/2019 CRM for Mobile Service Provider
74/130
'(e %5)S can maintain t(e inte#rity of t(e database by not aowin#
more t(an one user to update t(e same record at t(e same time. '(e
%5)S can (ep prevent dupicate records via unique inde" constraintsU
for e"ampe no two customers wit( t(e same customer numbers 96ey
fieds; can be entered into t(e database. See ACI% properties for more
information 9Redundancy avoidance;.
'(e %5)S accepts requests for data from t(e appication pro#ram and instructs
t(e operatin# system to transfer t(e appropriate data.
(en a %5)S is used information systems can be c(an#ed muc( more easiy
as t(e or#ani7ations information requirements c(an#e. ew cate#ories of data
can be added to t(e database wit(out disruption to t(e e"istin# system.
Or#ani7ations may use one 6ind of %5)S for daiy transaction processin# and
t(en move t(e detai onto anot(er computer t(at uses anot(er %5)S better
suited for random inquiries and anaysis. Overa systems desi#n decisions are
performed by data administrators and systems anaysts. %etaied database
desi#n is performed by database administrators.
%atabase servers are speciay desi#ned computers t(at (od t(e actua
databases and run ony t(e %5)S and reated software. %atabase servers are
usuay mutiprocessor computers wit( RAI% dis6 arrays used for stabe stora#e.
Connected to one or more servers via a (i#(*speed c(anne (ardware database
acceerators are aso used in ar#e voume transaction processin# environments.
%5)Ss are found at t(e (eart of most database appications. Sometimes %5)Ss
are buit around a private mutitas6in# 6erne wit( buit*in networ6in# support
at(ou#( nowadays t(ese functions are eft to t(e operatin# system.
-
8/13/2019 CRM for Mobile Service Provider
75/130
S6%
Structured uery $an#ua#e 9S$; is t(e an#ua#e used to manipuate reationa
databases. S$ is tied very cosey wit( t(e reationa mode.
In t(e reationa mode data is stored in structures caed reations or tabes.
S$ statements are issued for t(e purpose of8
ata definition4 %efinin# tabes and structures in t(e database 9%%$ used to
create ater and drop sc(ema ob4ects suc( as tabes and inde"es;.
ata manipulation4 +sed to manipuate t(e data wit(in t(ose sc(ema ob4ects
9%)$ Insertin# +pdatin# %eetin# t(e data and ueryin# t(e %atabase;.
A sc(ema is a coection of database ob4ects t(at can incude8 tabes views
inde"es and sequences
$ist of S$ statements t(at can be issued a#ainst an Orace database sc(ema
are8
A%'#R* C(an#e an e"istin# tabe view or inde" definition 9%%$;
A*I'* 'rac6 t(e c(an#es made to a tabe 9%%$;
COMM#+'* Add a comment to a tabe or coumn in a tabe 9%%$;
COMMI'* )a6e a recent c(an#es permanent 9%)$ * transactiona;
CR#A'#* Create new database ob4ects suc( as tabes or views 9%%$;
#%#'#* %eete rows from a database tabe 9%)$;
ROP* %rop a database ob4ect suc( as a tabe view or inde" 9%%$;
,RA+'* Aow anot(er user to access database ob4ects suc( as tabes or
views 9%%$;
I+S#R'* Insert new data into a database tabe 9%)$;
+o A*I'* 'urn off t(e auditin# function 9%%$;
R#5O7#* %isaow a user access to database ob4ects suc( as tabes and
views 9%%$;
-
8/13/2019 CRM for Mobile Service Provider
76/130
RO%%-AC7 * +ndo any recent c(an#es to t(e database 9%)$ *
'ransactiona;
S#%#C'* Retrieve data from a database tabe 9%)$;
'R*+CA'#* %eete a rows from a database tabe 9can not be roed
bac6; 9%)$;
*PA'# * C(an#e t(e vaues of some data items in a database tabe
9%)$;
-
8/13/2019 CRM for Mobile Service Provider
77/130
0ava Server Pages (0SP)
-ava server Pa#es is a simpe yet powerfu tec(noo#y for creatin# and
maintainin# dynamic*content web pa#es. 5ased on t(e -ava pro#rammin#
an#ua#e -ava Server Pa#es offers proven portabiity open standards and a
mature re*usabe component mode .'(e -ava Server Pa#es arc(itecture enabes
t(e separation of content #eneration from content presentation. '(is separation
not eases maintenance (eadac(esU it aso aows web team members to focus on
t(eir areas of e"pertise. ow web pa#e desi#ner can concentrate on ayout and
web appication desi#ners on pro#rammin# wit( minima concern about
impactin# eac( ot(er=s wor6.
&eatures of 0SP
Portabilit"4
-ava Server Pa#es fies can be run on any web server or web*enabed
appication server t(at provides support for t(em. %ubbed t(e -SP en#ine
-
8/13/2019 CRM for Mobile Service Provider
78/130
t(is support invoves reco#nition transation and mana#ement of t(e -ava
Server Pa#e ifecyce and its interaction components.
Components
It was mentioned earier t(at t(e -ava Server Pa#es arc(itecture can incude
reusabe -ava components. '(e arc(itecture aso aows for t(e embeddin# of
a scriptin# an#ua#e directy into t(e -ava Server Pa#es fie. '(e components
current supported incude -ava 5eans and Servets.
Processing
A -ava Server Pa#es fie is essentiay an H')$ document wit( -SP scriptin#
or ta#s. '(e -ava Server Pa#es fie (as a -SP e"tension to t(e server as a
-ava Server Pa#es fie. 5efore t(e pa#e is served t(e -ava Server Pa#es
synta" is parsed and processed into a Servet on t(e server side. '(e Servet
t(at is #enerated outputs rea content in strai#(t H')$ for respondin# to t(e
cient.
Access Models4
A -ava Server Pa#es fie may be accessed in at east two different ways. A
cient=s request comes directy into a -ava Server Pa#e. In t(is scenario
suppose t(e pa#e accesses reusabe -ava 5ean components t(at perform
particuar we*defined computations i6e accessin# a database. '(e resut of
t(e 5eans computations caed resut sets is stored wit(in t(e 5ean as
properties. '(e pa#e uses suc( 5eans to #enerate dynamic content and
present it bac6 to t(e cient.
In bot( of t(e above cases t(e pa#e coud aso contain any vaid -ava code.
-ava Server Pa#es arc(itecture encoura#es separation of content from
presentation.
-
8/13/2019 CRM for Mobile Service Provider
79/130
Steps in the e$ecution of a 0SP Application4
1. '(e cient sends a request to t(e web server for a -SP fie by #ivin# t(e
name of t(e -SP fie wit(in t(e form ta# of a H')$ pa#e.
2. '(is request is transferred to t(e -avaebServer. At t(e server side
-avaebServer receives t(e request and if it is a request for a 4sp fie
server #ives t(is request to t(e -SP en#ine.
?. -SP en#ine is pro#ram w(ic( can under stands t(e ta#s of t(e 4sp and
t(en it converts t(ose ta#s into a Servet pro#ram and it is stored at t(e
server side. '(is Servet is oaded in t(e memory and t(en it is e"ecuted
and t(e resut is #iven bac6 to t(e -avaebServer and t(en it is
transferred bac6 to t(e resut is #iven bac6 to t(e -avaebServer and
t(en it is transferred bac6 to t(e cient.
-
8/13/2019 CRM for Mobile Service Provider
80/130
#clipse I#
!cipse is an open*source software framewor6 written primariy in -ava. In its
defaut form it is an Inte#rated %eveopment !nvironment 9I%!; for -ava
deveopers consistin# of t(e -ava %eveopment 'oos 9-%'; and t(e !cipse
Compier for -ava 9!C-;. +sers can e"tend its capabiities by instain# pu#*ins
written for t(e !cipse software framewor6 suc( as deveopment too6its for
ot(er pro#rammin# an#ua#es and can write and contribute t(eir own pu#*in
modues. $an#ua#e pac6s are avaiabe for over a do7en an#ua#es.
Architecture
'(e basis for !cipse is t(e Ric( Cient Patform 9RCP;. '(e foowin# components
constitute t(e ric( cient patform8
OS3i * a standard bundin# framewor6
Core patform * boot !cipse run pu#*ins
t(e Standard id#et 'oo6it 9S'; * a portabe wid#et too6it
-&ace * viewer casses to brin# mode view controer pro#rammin# to
S' fie buffers te"t (andin# te"t editors
'(e !cipse or6benc( * views editors perspectives wi7ards
!cipses wid#ets are impemented by a wid#et too6it for -ava caed S'
uni6e most -ava appications w(ic( use t(e -ava standard Abstract indow
'oo6it 9A'; or Swin#. !cipses user interface aso evera#es an intermediate
3+I ayer caed -&ace w(ic( simpifies t(e construction of appications based on
S'.
!cipse empoys pu#*ins in order to provide a of its functionaity on top of 9and
incudin#; t(e ric( cient patform in contrast to some ot(er appications w(ere
functionaity is typicay (ard coded. '(is pu#*in mec(anism is a i#(twei#(t
software componentry framewor6. In addition to aowin# !cipse to be e"tended
usin# ot(er pro#rammin# an#ua#es suc( as C and Pyt(on t(e pu#*in
-
8/13/2019 CRM for Mobile Service Provider
81/130
framewor6 aows !cipse to wor6 wit( typesettin# an#ua#es i6e $a'e/
networ6in# appications suc( as tenet and database mana#ement systems. '(e
pu#*in arc(itecture supports writin# any desired e"tension to t(e environment
suc( as for confi#uration mana#ement. -ava and CES support is provided in t(e
!cipse S%@.
'(e 6ey to t(e seamess inte#ration of toos wit( !cipse is t(e pu#in. it( t(e
e"ception of a sma run*time 6erne everyt(in# in !cipse is a pu#*in. '(is
means t(at a pu#*in you deveop inte#rates wit( !cipse in e"acty t(e same
way as ot(er pu#*insU in t(is respect a features are created equa.
'(e !cipse S%@ incudes t(e !cipse -ava %eveopment 'oos offerin# an I%!
wit( a buit*in incrementa -ava compier and a fu mode of t(e -ava sourcefies. '(is aows for advanced refactorin# tec(niques and code anaysis. '(e I%!
aso ma6es use of a wor6space in t(is case a set of metadata over a fat
fiespace aowin# e"terna fie modifications as on# as t(e correspondin#
wor6space resource is refres(ed afterwards. '(e Eisua !ditor pro4ect aows
interfaces to be created interactivey (ence aowin# !cipse to be used as a
RA% too.
'(e foowin# is a ist of notabe pro4ects and pu#ins for t(e !cipse I%!.
'(ese pro4ects are maintained by t(e !cipse community and (osted by t(e
!cipse &oundation.
1. Core pro4ects
Ric( Cient Patform 9Patform; is t(e core framewor6 t(at a ot(er !cipse
pro4ects are buit on.
-ava %eveopment 'oos 9-%'; provides support for core -ava S!. '(is incudes a
standaone fast incrementa compier.
-
8/13/2019 CRM for Mobile Service Provider
82/130
'oos pro4ects
C0CXX %eveopment 'oos 9C%'; adds support for C0CXX synta" (i#(i#(tin#
code formattin# debu##er inte#ration and pro4ect structures. +ni6e t(e -%'
pro4ect t(e C%' pro4ect does not add a compier and reies on an e"terna too
c(ain.
3rap(ica !ditin# &ramewor6 93!&; aows deveopers to buid standaone
#rap(ica toos. !"ampe use incude circuit dia#ram desi#n toos activity
dia#ram editors and MSIM3 document editors.
eb pro4ects
-2!! Standard 'oos 9-S'; e"tends t(e core -%' to incude support for -ava !!
pro4ects. '(is incudes !-5s -SPs and Servets.
PHP %eveopment 'oos 9P%';
eb Standard 'oos 9S'; adds standards compiant web deveopment toos.
'(ese toos incude editors for /)$ H')$ and CSS.
Modelling pro8ects
!cipse )odein# &ramewor6 9!)&; a modein# framewor6 and code #eneration
faciity for buidin# toos and ot(er appications based on a structured data
mode from a mode specification described in /)I.
3rap(ica )odein# &ramewor6 93)&; is a #enerative component and runtime
infrastructure for deveopin# #rap(ica editors based on !)& and 3!&.
Ot(er pro4ects
'est and Performance 'oos Patform 9'P'P; w(ic( provides a patform t(at
aows software deveopers to buid test and performance toos suc( as
debu##ers profiers and benc(mar6in# appications.
5usiness Intei#ence and Reportin# 'oos Pro4ect 95IR'; an !cipse*based open
source reportin# system for web appications especiay t(ose based on -ava !!.
-
8/13/2019 CRM for Mobile Service Provider
83/130
Applications Server
An appication server is a software en#ine t(at deivers appications to cient
computers or devices typicay t(rou#( t(e Internet and usin# t(e Hyperte"t
'ransfer Protoco. Appication servers are distin#uis(ed from web servers by t(e
e"tensive use of server*side dynamic content and frequent inte#ration wit(
datab