You are on page 1of 106

Cargo Manager

ABSTRACT
OBJECTIVE :
Cargo Manager is a comprehensive cargo management module,
designed for addressing the areas of General cargo, Bul cargo operations through
!viation" !ll the aspects of cargo lie documentation handling, movement, and storage
are addressed in this module"
Key Features Include
General Cargo Booing #Manifestation of cargo$
%toring of Cargo #actual cargo &eight, volume etc" are recorded$
Generating the gate pass for 'ringing the cargo into the &arehouse
Maring the truc e(it
)eliver* order for re+ected or damaged cargo
Generating gate pass for redeliver* of cargo
,ouse eeping movements for maintenance i"e", moving the cargo from one
place to another
E(tensive report and -uer*ing facilities
Creation of master lie cargo agents, commodit* master"

1
Cargo Manager
INDEX
S. N CONTENTS
1. INTRODUCTION
2. ANALYSIS
../ %0%TEM !1!20%I%
.". %0%TEM %3ECI4IC!TIO1%
. DESI!N A""ROAC#
5"/ I1T6O)7CTIO1 TO )E%IG1
5". 7M2 )I!G6!M%
5"5 )!T! 42O8 )I!G6!M%
5"9 E:6 )I!G6!M%
4" "RO$ECT %ODULES
&. I%"LE%ENTATION
9"/ CO1CE3T% !1) TEC,1I;7E%
9". TE%TI1G
9"."/ TE%T C!%E%
'. OUT"UT SCREENS
(. CONCLUSION
). FUTURE EN#ANCE%ENTS
2
Cargo Manager
*. +I+ILIO!RA"#Y


3
Cargo Manager
INTRODUCTION:
C!6GOM!1!GE6 re-uires user entr* of container and product
dimensions, together &ith information on &eight and orientation constraints" In:'uilt
data'ase facilities for up to <= containers and 9=== products are provided so that input
into these screens can 'e carried out &ith minimal effort" If information for a particular
product code is alread* held in the 9=== product data'ase then this is automaticall*
entered into the appropriate fields"
The first of these &ill attempt to pac as much of the cargo using
an* of the pacing methods availa'le to C!6GOM!1!GE6" This ma* 'e a loading
from the floor or from the end of the container" The second and third options are self
e(planator* and the one most appropriate to the practical circumstances should 'e
selected"
Once input is complete, a summar* of input information is
provided #&hich might result in a user deciding to return to add items to the
consignment$, 'efore the #optional$ saving of the data file, and the su'se-uent pacing
of the cargo is carried out"
4
Cargo Manager
5
Cargo Manager
SYSTEM ANALYSIS :
%ana,-n, T.e Data
The fundamental 'uilding 'locs to cargo revenue ma(imi>ation
'egin &ith sufficient, relia'le and accessi'le data" 4ull air &a*'ill capture is a good
starting point" The &a*'ill histor* should 'e stored in an accessi'le format in a data'ase
that can 'e updated dail*"
The real challenge is not +ust to capture the complete life c*cle of a
shipment from original 'ooing through to invoicing, 'ut to do so in a d*namic and
timel* &a*" 8ith ne& developments in data handling and communications, it is no&
possi'le to 'uild a data &arehouse that receives seamless, real time updates from
reservation s*stems and &ith minimal changes to e(isting s*stems"
Unc/nstra-ned De0and

%hipment dimensions cannot 'e given accuratel* at the time the
'ooing re-uest is made" Often the actual dimensions received at tender do not an*&a*
'ecome part of an* permanent record" %ince flights &ill reach their volume limitations
'efore the* hit &eight limits on some sectors, some heuristic calculation, such as a
densit* code, is needed to forecast liel* volumes" The first step is to use historic data to
gauge the total maret demand regardless of the airline?s availa'le capacit*" This
unconstrained demand is set for each product t*pe '* origin and destination #O@)$, da*
of &ee, time of da*"
6
Cargo Manager
Most cargo customers, unlie passengers, are more concerned &ith
speed and relia'ilit* than &ith routings" That gives the cargo carrier an opportunit* to
route shipments a&a* from congested 'ottlenecs and give a 'etter spread of revenues
across the net&or"
4or e(ample, a 'ooing re-uest comes through the reservation center to
ship 'et&een a hu' airport and ma+or destination" The route is consistentl* oversold, so
the 'id rate is high" The router &ill evaluate alternative feasi'le routes &hich meet 'oth
the shipper?s re-uirements and the carrier?s 'usiness rules"
Re0/1-n, t.e "/l-t-cs
Effectivel*, the cargo revenue optimi>ation s*stem &ill allo& decisions to
'e taen that mae optimal use of another, then the choice &ill not 'e made" There &ill
'e times &hen the users override the s*stem?s decisions, 'ut overall it provides the 'asis
for o'+ective net&or:&ide decision:maing, taing a&a* the guess&or and the
politics"
Tools
0ou can use Oracle as 'ac:end data'ase and VB"1ET A Java to develop the
pro+ect"

7
Cargo Manager
System Specifications
,ard&are 6e-uirements::
3entium:IV #3rocessor$"
.<B MB 6am
,ard dis 9= GB
Microsoft Compati'le /=/ or more Ce* Board
%oft&are 6e-uirements: :
8e' Technologies : !%3"1ET ."=
2anguage : CD
)ata'ase : %;2 %E6VE6 .==<
8e' %erver : II%
Operating %*stem : 8I1)O8% E3
8
Cargo Manager
9
Cargo Manager
INTRODUCTION:
Cargo Manager is a comprehensive cargo management module, designed for
addressing the areas of General cargo, Bul cargo operations" !ll the aspects of cargo
lie documentation handling, movement, and storage are addressed in this module"
Key Features Include
General Cargo Booing #Manifestation of cargo$
%toring of Cargo #actual cargo &eight, volume etc" are recorded$
Generating the gate pass for 'ringing the cargo into the &arehouse
Maring the truc e(it
)eliver* order for re+ected or damaged cargo
Generating gate pass for redeliver* of cargo
,ouse eeping movements for maintenance i"e", moving the cargo from one
place to another
E(tensive report and -uer*ing facilities
Creation of master lie cargo agents, commodit* master"
10
Cargo Manager
UML Diagrams:
!ctor:
! coherent set of roles that users of use cases pla* &hen interacting &ith the use
Fcases"
7se case:
! description of se-uence of actions, including variants, that a s*stem
performs that *ields an o'serva'le result of value of an actor"

7M2 stands for 7nified Modeling 2anguage" 7M2 is a language for
specif*ing, visuali>ing and documenting the s*stem" This is the step &hile developing
an* product after anal*sis" The goal from this is to produce a model of the entities
involved in the pro+ect &hich later need to 'e 'uilt" The representation of the entities
that are to 'e used in the product 'eing developed need to 'e designed"
There are various inds of methods in soft&are design:
11
Cargo Manager

The* are as follo&s:
7se case )iagram
%e-uence )iagram
Colla'oration )iagram
!ctivit* )iagram
%tate chat )iagram
USECASE DIA!RA%S2
7se case diagrams model 'ehavior &ithin a s*stem and helps the
developers understand of &hat the user re-uire" The stic man represents &hat?s called
an actor"
7se case diagram can 'e useful for getting an overall vie&
of the s*stem and clarif*ing that can do and more importantl* &hat the* can?t do"
7se case diagram consists of use cases and actors and
sho&s the interaction 'et&een the use case and actors"
The purpose is to sho& the interactions 'et&een the use case and actor"
To represent the s*stem re-uirements from user?s perspective"
!n actor could 'e the end:user of the s*stem or an e(ternal s*stem"
12
Cargo Manager
USECASE DIA!RA%2

! 7se case is a description of set of se-uence of actions"
Graphicall* it is rendered as an ellipse &ith solid line including onl* its name" 7se case
diagram is a 'ehavioral diagram that sho&s a set of use cases and actors and their
relationship" It is an association 'et&een the use cases and actors" !n actor represents a
real:&orld o'+ect
13
Cargo Manager
Actor
Re,estrat-/n
L/,-n
Searc. 3/r
address
Calcul at-n,
Car,/4r-ce
+//5 a Car,/
6-e7 status /3
Car,/
Cancel t.e Car,/
SE8UENCE DIA!RA%2
%e-uence diagram and colla'oration diagram are called I1TE6!CTIO1
)I!G6!M%" !n interaction diagram sho&s an interaction, consisting of set of o'+ects
and their relationship including the messages that ma* 'e dispatched among them"
! se-uence diagram is an introduction that empathi>es the time ordering of
messages" Graphicall* a se-uence diagram is a ta'le that sho&s o'+ects arranged along
the E:a(is and messages ordered in increasing time along the 0:a(is"
14
Cargo Manager
Re,-ster L/,-n Car,/4r-ce
6-e7 status
Regist ration
At!ent ication
"tats o# Cargo
$oo% a Cargo
&ie' Cargo (rice
&a)i* ser
+ot ,a)i* ser
15
Cargo Manager
COLLA+ORATION DIA!RA%2
! colla'oration diagram is an introduction diagram that emphasi>es the
structural organi>ation of the o'+ects that send and receive messages" Graphicall* a
colla'oration diagram is a collection of vertices and arcs"
Re,-strat-/n
L/,-n
Car,/ 4r-ce
6-e7 status
2.At!entication
3.&a)i* User
4.-o t!e "tats
+//5 a Car,/
1.&a)i* User
5.+ot &a)i* User
16
Cargo Manager
CLASS DIA!RA%2
Class is nothing 'ut a structure that contains 'oth varia'les and methods" The
Class )iagram sho&s a set of classes, interfaces, and colla'orations and their relating
ships" There is most common diagram in modeling the o'+ect oriented s*stems and are
used to give the static vie& of a s*stem" It sho&s the dependenc* 'et&een the classes
that can 'e used in our s*stem"
The interactions 'et&een the modules or classes of our pro+ects are sho&n 'elo&"
Each 'loc contains Class 1ame, Varia'les and Methods"
CLASS:
! description of set of o'+ects that share the same attri'utes, operations,
relationships, and semantics
17
Cargo Manager
0a-nta-n-n,
user deta-ls
status
user re,-strat-/n
userna0e91arc.ar:2;<
4ass7/rd91arc.ar:2;<
4.n/9-nt:1;<
e0a-l-d=1arc.ar:;<
u4date user deta-ls
delete userdeta-ls
searc.user
1-e7 user
status
cust/0erna0e91arc.ar:2;<
4.n/9-nt:1;<
e0a-l-d91arc.ar:;<
address91arc.ar:&;<
ty4e /3 0eter-al91arc.ar:1;<
4r/duct na0e91arc.ar:1;<
n//34r/ducts 9-nt:1;<
s/urce91arc.ar:2;<
dest-nat-/n91arc.ar:2;<
dest-nat-/naddress91arc.ar:2;<
date 91arc.ar:1;<
t-0e 9:1arc.ar:1;<
cust/0er-d9-nt:1;<
u4date cust/0er deta-ls
u4date s/urce
u4date dest-nat-/n
u4date 4.n/
u4date date >t-0e
18
Cargo Manager
State C.art D-a,ra0
User re,-strat-/n
C.ec5- n, 3/r 1al-d
user
+//5-n, Car,/
6-e7 t.e Status
+ot ,a)i* ser
,ie' t!e st ats
19
Cargo Manager
DATA LO! DIA"RAMS :

The )4) taes an input:process:output vie& of a s*stem i"e" data o'+ects flo&
into the soft&are, are transformed '* processing elements, and resultant data o'+ects
flo& out of the soft&are"
)ata o'+ects represented '* la'eled arro&s and transformation are
represented '* circles also called as 'u''les" )4) is presented in a hierarchical fashion
i"e" the first data flo& model represents the s*stem as a &hole" %u'se-uent )4) refine
the conte(t diagram #level = )4)$, providing increasing details &ith each su'se-uent
level"
The )4) ena'les the soft&are engineer to develop models of the
information domain @ functional domain at the same time" !s the )4) is refined into
greater levels of details, the anal*st perform an implicit functional decomposition of the
s*stem" !t the same time, the )4) refinement results in a corresponding refinement of
the data as it moves through the process that em'od* the applications"
! conte(t:level )4) for the s*stem the primar* e(ternal entities
produce information for use '* the s*stem and consume information generated '* the
s*stem" The la'eled arro& represents data o'+ects or o'+ect hierarch*"
20
Cargo Manager
RULES FOR DFD2
4i( the scope of the s*stem '* means of conte(t diagrams"
Organi>e the )4) so that the main se-uence of the actions
6eads left to right and top to 'ottom"
Identif* all inputs and outputs"
Identif* and la'el each process internal to the s*stem &ith 6ounded circles"
! process is re-uired for all the data transformation and Transfers"
Therefore, never connect a data store to a data %ource or the destinations or
another data store &ith +ust a )ata flo& arro&"
)o not indicate hard&are and ignore control information"
Mae sure the names of the processes accuratel* conve* ever*thing the
process is done"
There must not 'e unnamed process"
Indicate e(ternal sources and destinations of the data, &ith %-uares"
1um'er each occurrence of repeated e(ternal entities"
Identif* all data flo&s for each process step, e(cept simple 6ecord retrievals"
2a'el data flo& on each arro&"
7se details flo& on each arro&"
7se the details flo& arro& to indicate data movements"
21
Cargo Manager
DATAFLO? DIA!RA%S2
Data.ase:



"tats
Cstomer
i*
22
User
registrationn
$oo%ing
cargo
Cargo Manager
user re,-strat-/n
User re,-strat-/n

+//5-n, car,/
+//5-n, car,/

23
User
*etai)s
Register
ser
U/*ate
ser
*etai)s
"earc! #or
ser
*etai)s
nregister
ser
,ie' ser
*etai)s
User
*etai)s
$oo%ing
cargo
U/*ate
.oo%ing
"earc! #or
cargo
&ie'
*etai)s
&ie'
"tats
Cargo Manager


E#R Dia$%ams:
The Entit*:6elationship #E6$ model &as originall* proposed '* 3eter in
/GHB IChenHBJ as a &a* to unif* the net&or and relational data'ase vie&s" %impl* stated the
E6 model is a conceptual data model that vie&s the real &orld as entities and relationships" !
'asic component of the model is the Entit*:6elationship diagram &hich is used to visuall*
represents data o'+ects" %ince Chen &rote his paper the model has 'een e(tended and toda* it is
commonl* used for data'ase design 4or the data'ase designer, the utilit* of the E6 model is:
it maps &ell to the relational model" The constructs used in the E6 model can easil* 'e
transformed into relational ta'les"
it is simple and eas* to understand &ith a minimum of training" Therefore, the model
can 'e used '* the data'ase designer to communicate the design to the end user"
In addition, the model can 'e used as a design plan '* the data'ase developer to
implement a data model in a specific data'ase management soft&are"
C/nnect-1-ty and Card-nal-ty
The 'asic t*pes of connectivit* for relations are: one:to:one, one:to:
man*, and man*:to:man*" ! one-to-one #/:/$ relationship is &hen at most one instance of a
entit* ! is associated &ith one instance of entit* B" 4or e(ample, Kemplo*ees in the compan*
are each assigned their o&n office" 4or each emplo*ee there e(ists a uni-ue office and for each
office there e(ists a uni-ue emplo*ee"
! one-to-many #/:1$ relationships is &hen for one instance of entit* !, there
are >ero, one, or man* instances of entit* B, 'ut for one instance of entit* B, there is onl* one
instance of entit* !" !n e(ample of a /:1 relationships is
a department has man* emplo*ees
each emplo*ee is assigned to one department
24
A,ai)a.
e
0antiti
es
Cargo Manager
! many-to-many #M:1$ relationship, sometimes called non:specific, is &hen for one instance of
entit* !, there are >ero, one, or man* instances of entit* B and for one instance of entit* B there
are >ero, one, or man* instances of entit* !" The connectivit* of a relationship descri'es the
mapping of associated
ER N/tat-/n
There is no standard for representing data o'+ects in E6 diagrams" Each modeling
methodolog* uses its o&n notation" The original notation used '* Chen is &idel* used in
academics te(ts and +ournals 'ut rarel* seen in either C!%E tools or pu'lications '* non:
academics" Toda*, there are a num'er of notations used, among the more common are
Bachman, cro&Ls foot, and I)E4IE"
!ll notational st*les represent entities as rectangular 'o(es and relationships as lines
connecting 'o(es" Each st*le uses a special set of s*m'ols to represent the cardinalit* of a
connection" The notation used in this document is from Martin" The s*m'ols used for the 'asic
E6 constructs are:
entities are represented '* la'eled rectangles" The la'el is the name of the entit*" Entit*
names should 'e singular nouns"
%e&ations'ips are represented '* a solid line connecting t&o entities" The name of the
relationship is &ritten a'ove the line" 6elationship names should 'e ver's
att%i()tes, &hen included, are listed inside the entit* rectangle" !ttri'utes &hich are
identifiers are underlined" !ttri'ute names should 'e singular nouns"
ca%*ina&ity of man* is represented '* a line ending in a cro&Ls foot" If the cro&Ls foot is
omitted, the cardinalit* is one"
e+istence is represented '* placing a circle or a perpendicular 'ar on the line"
Mandator* e(istence is sho&n '* the 'ar #loos lie a /$ ne(t to the entit* for an
instance is re-uired" Optional e(istence is sho&n '* placing a circle ne(t to the entit*
that is optional
25
Cargo Manager
26
Cargo Manager
"RO$ECT %ODULES
MODULES:
T'e%e a%e t'%ee mo*)&es in t'is ,%o-ect
!)MI1I%T6!TO6 MO)72E
2OGI1 MO)72E
7%E6 MO)72E
%ODULE DESCRI"TION
ADMINISTRATOR MODULE :
C!6GOM!1!GE6 re-uires as input details of the
cargo items forming the load and of the availa'le container A containers #or truc,
trailer, frame pallet etc"$ &hich might 'e used for the load" Much of this
information relates to dimensions and &eights, and additional information can
optionall* 'e provided on the characteristics of each cargo item t*pe #fragilit*,
la*ering constraints etc$"
LO!IN %ODULE 2
This module &ill provide 6egistration, forgot pass&ord, change
pass&ord pages to the user"
27
Cargo Manager
USER %ODULE 2
This module &ill provide in'o( for the user to vie& the messages
from the administrator" It also provides to vie& the status of *our cargo" This
module also provides to cancel the cargo"

1&2R&324 15 -2C6+1L1732" U"2D
3.1 5ront 2n* -ec!no)og8
Microso#t .+2- 5rame'or%
The "1ET 4rame&or is a ne& computing platform that simplifies application
development in the highl* distri'uted environment of the Internet" The "1ET
4rame&or is designed to fulfill the follo&ing o'+ectives:
To provide a consistent o'+ect:oriented programming environment &hether
o'+ect code is stored and e(ecuted locall*, e(ecuted locall* 'ut Internet:
distri'uted, or e(ecuted remotel*"
To provide a code:e(ecution environment that minimi>es soft&are
deplo*ment and versioning conflicts"
To provide a code:e(ecution environment that guarantees safe e(ecution of
code, including code created '* an unno&n or semi:trusted third part*"
To provide a code:e(ecution environment that eliminates the performance
pro'lems of scripted or interpreted environments"
To mae the developer e(perience consistent across &idel* var*ing t*pes of
applications, such as 8indo&s:'ased applications and 8e':'ased
applications"
28
Cargo Manager
To 'uild all communication on industr* standards to ensure that code 'ased
on the "1ET 4rame&or can integrate &ith an* other code"
The "1ET 4rame&or has t&o main components: the common language runtime and
the "1ET 4rame&or class li'rar*" The common language runtime is the foundation
of the "1ET 4rame&or" 0ou can thin of the runtime as an agent that manages
code at e(ecution time, providing core services such as memor* management, thread
management, and remoting, &hile also enforcing strict t*pe safet* and other forms
of code accurac* that ensure securit* and ro'ustness" In fact, the concept of code
management is a fundamental principle of the runtime" Code that targets the runtime
is no&n as managed code, &hile code that does not target the runtime is no&n as
unmanaged code" The class li'rar*, the other main component of the "1ET
4rame&or, is a comprehensive, o'+ect:oriented collection of reusa'le t*pes that
*ou can use to develop applications ranging from traditional command:line or
graphical user interface #G7I$ applications to applications 'ased on the latest
innovations provided '* !%3"1ET, such as 8e' 4orms and EM2 8e' services"
The "1ET 4rame&or can 'e hosted '* unmanaged components that load the
common language runtime into their processes and initiate the e(ecution of managed
code, there'* creating a soft&are environment that can e(ploit 'oth managed and
unmanaged features" The "1ET 4rame&or not onl* provides several runtime hosts,
'ut also supports the development of third:part* runtime hosts"
4or e(ample, !%3"1ET hosts the runtime to provide a scala'le, server:side
environment for managed code" !%3"1ET &ors directl* &ith the runtime to ena'le
8e' 4orms applications and EM2 8e' services, 'oth of &hich are discussed later
in this topic"
Internet E(plorer is an e(ample of an unmanaged application that hosts the
runtime #in the form of a MIME t*pe e(tension$" 7sing Internet E(plorer to host the
runtime ena'les *ou to em'ed managed components or 8indo&s 4orms controls in
,TM2 documents" ,osting the runtime in this &a* maes managed mo'ile code
29
Cargo Manager
#similar to MicrosoftM !ctiveEM controls$ possi'le, 'ut &ith significant
improvements that onl* managed code can offer, such as semi:trusted e(ecution and
secure isolated file storage"
The follo&ing illustration sho&s the relationship of the common language
runtime and the class li'rar* to *our applications and to the overall s*stem" The
illustration also sho&s ho& managed code operates &ithin a larger architecture"
Features /3 t.e C/00/n Lan,ua,e Runt-0e
The common language runtime manages memor*, thread e(ecution, code
e(ecution, code safet* verification, compilation, and other s*stem services" These
features are intrinsic to the managed code that runs on the common language
runtime"
8ith regards to securit*, managed components are a&arded var*ing degrees of trust,
depending on a num'er of factors that include their origin #such as the Internet,
enterprise net&or, or local computer$" This means that a managed component
might or might not 'e a'le to perform file:access operations, registr*:access
operations, or other sensitive functions, even if it is 'eing used in the same active
application"
The runtime enforces code access securit*" 4or e(ample, users can trust that an
e(ecuta'le em'edded in a 8e' page can pla* an animation on screen or sing a song,
'ut cannot access their personal data, file s*stem, or net&or" The securit* features
of the runtime thus ena'le legitimate Internet:deplo*ed soft&are to 'e e(ceptionall*
featuring rich"
The runtime also enforces code ro'ustness '* implementing a strict t*pe:
and code:verification infrastructure called the common t*pe s*stem #CT%$" The CT%
ensures that all managed code is self:descri'ing" The various Microsoft and third:
part* language compilers generate managed code that conforms to the CT%" This
30
Cargo Manager
means that managed code can consume other managed t*pes and instances, &hile
strictl* enforcing t*pe fidelit* and t*pe safet*"
In addition, the managed environment of the runtime eliminates man*
common soft&are issues" 4or e(ample, the runtime automaticall* handles o'+ect
la*out and manages references to o'+ects, releasing them &hen the* are no longer
'eing used" This automatic memor* management resolves the t&o most common
application errors, memor* leas and invalid memor* references"
The runtime also accelerates developer productivit*" 4or e(ample,
programmers can &rite applications in their development language of choice, *et
tae full advantage of the runtime, the class li'rar*, and components &ritten in other
languages '* other developers" !n* compiler vendor &ho chooses to target the
runtime can do so" 2anguage compilers that target the "1ET 4rame&or mae the
features of the "1ET 4rame&or availa'le to e(isting code &ritten in that language,
greatl* easing the migration process for e(isting applications"
8hile the runtime is designed for the soft&are of the future, it also supports
soft&are of toda* and *esterda*" Interopera'ilit* 'et&een managed and unmanaged
code ena'les developers to continue to use necessar* COM components and )22s"
The runtime is designed to enhance performance" !lthough the common language
runtime provides man* standard runtime services, managed code is never
interpreted" ! feature called +ust:in:time #JIT$ compiling ena'les all managed code
to run in the native machine language of the s*stem on &hich it is e(ecuting"
Mean&hile, the memor* manager removes the possi'ilities of fragmented memor*
and increases memor* localit*:of:reference to further increase performance"
4inall*, the runtime can 'e hosted '* high:performance, server:side
applications, such as MicrosoftM %;2 %erverN and Internet Information %ervices
#II%$" This infrastructure ena'les *ou to use managed code to &rite *our 'usiness
31
Cargo Manager
logic, &hile still en+o*ing the superior performance of the industr*Ls 'est enterprise
servers that support runtime hosting"
.NET Fra0e7/r5 Class L-@rary
The "1ET 4rame&or class li'rar* is a collection of reusa'le t*pes that
tightl* integrate &ith the common language runtime" The class li'rar* is o'+ect
oriented, providing t*pes from &hich *our o&n managed code can derive
functionalit*" This not onl* maes the "1ET 4rame&or t*pes eas* to use, 'ut also
reduces the time associated &ith learning ne& features of the "1ET 4rame&or" In
addition, third:part* components can integrate seamlessl* &ith classes in the "1ET
4rame&or"
4or e(ample, the "1ET 4rame&or collection classes implement a set of
interfaces that *ou can use to develop *our o&n collection classes" 0our collection
classes &ill 'lend seamlessl* &ith the classes in the "1ET 4rame&or"
!s *ou &ould e(pect from an o'+ect:oriented class li'rar*, the "1ET
4rame&or t*pes ena'le *ou to accomplish a range of common programming tass,
including tass such as string management, data collection, data'ase connectivit*,
and file access" In addition to these common tass, the class li'rar* includes t*pes
that support a variet* of speciali>ed development scenarios" 4or e(ample, *ou can
use the "1ET 4rame&or to develop the follo&ing t*pes of applications and
services:
Console applications"
%cripted or hosted applications"
8indo&s G7I applications #8indo&s 4orms$"
!%3"1ET applications"
EM2 8e' services"
8indo&s services"
32
Cargo Manager
4or e(ample, the 8indo&s 4orms classes are a comprehensive set of reusa'le t*pes
that vastl* simplif* 8indo&s G7I development" If *ou &rite an !%3"1ET 8e'
4orm application, *ou can use the 8e' 4orms classes"
Cl-ent A44l-cat-/n De1el/40ent
Client applications are the closest to a traditional st*le of application in
8indo&s:'ased programming" These are the t*pes of applications that displa*
&indo&s or forms on the destop, ena'ling a user to perform a tas" Client
applications include applications such as
&ord processors and spreadsheets, as &ell as custom 'usiness applications such as
data:entr* tools, reporting tools, and so on" Client applications usuall* emplo*
&indo&s, menus, 'uttons, and other G7I elements, and the* liel* access local
resources such as the file s*stem and peripherals such as printers"
!nother ind of client application is the traditional !ctiveE control #no&
replaced '* the managed 8indo&s 4orms control$ deplo*ed over the Internet as a
8e' page" This application is much lie other client applications: it is e(ecuted
nativel*, has access to local resources, and includes graphical elements"
In the past, developers created such applications using CACOO in con+unction
&ith the Microsoft 4oundation Classes #M4C$ or &ith a rapid application
development #6!)$ environment such as MicrosoftM Visual BasicM" The "1ET
4rame&or incorporates aspects of these e(isting products into a single, consistent
development environment that drasticall* simplifies the development of client
applications" The 8indo&s 4orms classes contained in the "1ET 4rame&or are
designed to 'e used for G7I development" 0ou can easil* create command
&indo&s, 'uttons, menus, tool'ars, and other screen elements &ith the fle(i'ilit*
necessar* to accommodate shifting 'usiness needs"
33
Cargo Manager
4or e(ample, the "1ET 4rame&or provides simple properties to ad+ust visual
attri'utes associated &ith forms" In some cases the underl*ing operating s*stem does
not support changing these attri'utes directl*, and in these cases the "1ET
4rame&or automaticall* recreates the forms" This is one of man* &a*s in &hich
the "1ET 4rame&or integrates the developer interface, maing coding simpler and
more consistent"
7nlie !ctiveE controls, 8indo&s 4orms controls have semi:trusted access
to a userLs computer" This means that 'inar* or nativel* e(ecuting code can access
some of the resources on the userLs s*stem #such as G7I elements and limited file
access$ &ithout 'eing a'le to access or compromise other resources" Because of
code access securit*, man* applications that once needed to 'e installed on a userLs
s*stem can no& 'e safel* deplo*ed through the 8e'" 0our applications can
implement the features of a local application &hile 'eing deplo*ed lie a 8e' page"
Ser1er A44l-cat-/n De1el/40ent
%erver:side applications in the managed &orld are implemented through
runtime hosts" 7nmanaged applications host the common language runtime, &hich
allo&s *our custom managed code to control the 'ehavior of the server" This model
provides *ou &ith all the features of the common language runtime and class li'rar*
&hile gaining the performance and scala'ilit* of the host server"
The follo&ing illustration sho&s a 'asic net&or schema &ith managed code
running in different server environments" %ervers such as II% and %;2 %erver can
perform standard operations &hile *our application logic e(ecutes through the
managed code"
Ser1er9s-de 0ana,ed c/de
!%3"1ET is the hosting environment that ena'les developers to use the
"1ET 4rame&or to target 8e':'ased applications" ,o&ever, !%3"1ET is more
than +ust a runtime hostP it is a complete architecture for developing 8e' sites and
34
Cargo Manager
Internet:distri'uted o'+ects using managed code" Both 8e' 4orms and EM2 8e'
services use II% and !%3"1ET as the pu'lishing mechanism for applications, and
'oth have a collection of supporting classes in the "1ET 4rame&or"
EM2 8e' services, an important evolution in 8e':'ased technolog*, are
distri'uted, server:side application components similar to common 8e' sites"
,o&ever, unlie 8e':'ased applications, EM2 8e' services components have no
7I and are not targeted for 'ro&sers such as Internet E(plorer and 1etscape
1avigator" Instead, EM2 8e' services consist of reusa'le soft&are components
designed to 'e consumed '* other applications, such as traditional client
applications, 8e':'ased applications, or even other EM2 8e' services" !s a result,
EM2 8e' services technolog* is rapidl* moving application development and
deplo*ment into the highl* distri'uted environment of the Internet"
If *ou have used earlier versions of !%3 technolog*, *ou &ill immediatel*
notice the improvements that !%3"1ET and 8e' 4orms offers" 4or e(ample, *ou
can develop 8e' 4orms pages in an* language that supports the "1ET 4rame&or"
In addition, *our code no longer needs to share the same file &ith *our ,TT3 te(t
#although it can continue to do so if *ou prefer$" 8e' 4orms pages e(ecute in native
machine language 'ecause, lie an* other managed application, the* tae full
advantage of the runtime" In contrast, unmanaged !%3 pages are al&a*s scripted
and interpreted" !%3"1ET pages are faster, more functional, and easier to develop
than unmanaged !%3 pages 'ecause the* interact &ith the runtime lie an* managed
application"
The "1ET 4rame&or also provides a collection of classes and tools to aid in
development and consumption of EM2 8e' services applications" EM2 8e'
services are 'uilt on standards such as %O!3 #a remote procedure:call protocol$,
35
Cargo Manager
EM2 #an e(tensi'le data format$, and 8%)2 # the 8e' %ervices )escription
2anguage$" The "1ET 4rame&or is 'uilt on these standards to promote
interopera'ilit* &ith non:Microsoft solutions"
4or e(ample, the 8e' %ervices )escription 2anguage tool included &ith
the "1ET 4rame&or %)C can -uer* an EM2 8e' service pu'lished on the 8e',
parse its 8%)2 description, and produce CD or Visual Basic source code that *our
application can use to 'ecome a client of the EM2 8e' service" The source code
can create classes derived from classes in the class li'rar* that handle all the
underl*ing communication using %O!3 and EM2 parsing" !lthough *ou can use
the class li'rar* to consume EM2 8e' services directl*, the 8e' %ervices
)escription 2anguage tool and the other tools contained in the %)C facilitate *our
development efforts &ith the "1ET 4rame&or"
If *ou develop and pu'lish *our o&n EM2 8e' service, the "1ET
4rame&or provides a set of classes that conform to all the underl*ing
communication standards, such as %O!3, 8%)2, and EM2" 7sing those classes
ena'les *ou to focus on the logic of *our service, &ithout concerning *ourself &ith
the communications infrastructure re-uired '* distri'uted soft&are development"
4inall*, lie 8e' 4orms pages in the managed environment, *our EM2 8e' service
&ill run &ith the speed of native machine language using the scala'le
communication of II%"
Act-1e Ser1er "a,es.NET
36
Cargo Manager
!%3"1ET is a programming frame&or 'uilt on the common language runtime that
can 'e used on a server to 'uild po&erful 8e' applications" !%3"1ET offers several
important advantages over previous 8e' development models:
En.anced "er3/r0ance.
!%3"1ET is compiled common language runtime code running on the server"
7nlie its interpreted predecessors, !%3"1ET can tae advantage of earl* 'inding,
+ust:in:time compilation, native optimi>ation, and caching services right out of the
'o(" This amounts to dramaticall* 'etter performance 'efore *ou ever &rite a line of
code"
?/rld9Class T//l Su44/rt.
The !%3"1ET frame&or is complemented '* a rich tool'o( and designer in the
Visual %tudio integrated development environment" 80%I80G editing, drag:and:
drop server controls, and automatic deplo*ment are +ust a fe& of the features this
po&erful tool provides"
"/7er and FleA-@-l-ty.
Because !%3"1ET is 'ased on the common language runtime, the po&er and
fle(i'ilit* of that entire platform is availa'le to 8e' application developers" The
"1ET 4rame&or class li'rar*, Messaging, and )ata !ccess solutions are all
seamlessl* accessi'le from the 8e'" !%3"1ET is also language:independent, so *ou
can choose the language that 'est applies to *our application or partition *our
application across man* languages" 4urther, common language runtime
interopera'ilit* guarantees that *our e(isting investment in COM:'ased
development is preserved &hen migrating to !%3"1ET"
37
Cargo Manager
S-04l-c-ty.
!%3"1ET maes it eas* to perform common tass, from simple form su'mission
and client authentication to deplo*ment and site configuration" 4or e(ample, the
!%3"1ET page frame&or allo&s *ou to 'uild user interfaces that cleanl* separate
application logic from presentation code and to handle events in a simple, Visual
Basic : lie forms processing model" !dditionall*, the common language runtime
simplifies development, &ith managed code services such as automatic reference
counting and gar'age collection"
%ana,ea@-l-ty
!%3"1ET emplo*s a te(t:'ased, hierarchical configuration s*stem, &hich simplifies
appl*ing settings to *our server environment and 8e' applications" Because
configuration information is stored as plain te(t, ne& settings ma* 'e applied
&ithout the aid of local administration tools" This K>ero local administrationK
philosoph* e(tends to deplo*ing !%3"1ET 4rame&or applications as &ell" !n
!%3"1ET 4rame&or application is deplo*ed to a server simpl* '* cop*ing the
necessar* files to the server" 1o server restart is re-uired, even to deplo* or replace
running compiled code"
Scala@-l-ty and A1a-la@-l-ty. !%3"1ET has 'een designed &ith
scala'ilit* in mind, &ith features specificall* tailored to improve
performance in clustered and multiprocessor environments" 4urther,
processes are closel* monitored and managed
'* the !%3"1ET runtime, so that if one mis'ehaves #leas, deadlocs$, a
ne& process can 'e created in its place, &hich helps eep *our application
constantl* availa'le to handle re-uests"
Cust/0-Ba@-l-ty and EAtens-@-l-ty. !%3"1ET delivers a &ell:factored
architecture that allo&s developers to Kplug:inK their code at the appropriate
level" In fact, it is possi'le to e(tend or replace an* su'component of the
38
Cargo Manager
!%3"1ET runtime &ith *our o&n custom:&ritten component" Implementing
custom authentication or state services has never 'een easier"
Secur-ty. 8ith 'uilt in 8indo&s authentication and per:application
configuration, *ou can 'e assured that *our applications are secure"
Lan,ua,e Su44/rt
The Microsoft "1ET 3latform currentl* offers 'uilt:in support for three
languages: CD, Visual Basic, and J%cript"
?.at -s AS".NET ?e@ F/r0sC
T'e AS,.NET !e( o%ms pa$e f%ame.o%/ is a sca&a(&e common
&an$)a$e %)ntime p%o$%ammin$ mo*e& t'at can (e )se* on t'e se%0e% to
*ynamica&&y $ene%ate !e( pa$es.
Inten*e* as a &o$ica& e0o&)tion of AS, 1AS,.NET p%o0i*es synta+
compati(i&ity .it' e+istin$ pa$es23 t'e AS,.NET !e( o%ms f%ame.o%/ 'as
(een specifica&&y *esi$ne* to a**%ess a n)m(e% of /ey *eficiencies in t'e
p%e0io)s mo*e&. In pa%tic)&a%3 it p%o0i*es:
The a'ilit* to create and use reusa'le 7I controls that can encapsulate
common functionalit* and thus reduce the amount of code that a page
developer has to &rite"
The a'ilit* for developers to cleanl* structure their page logic in an orderl*
fashion #not Kspaghetti codeK$"
The a'ilit* for development tools to provide strong 80%I80G design
support for pages #e(isting !%3 code is opa-ue to tools$"
39
Cargo Manager
4AS,.NET !e( o%ms pa$es a%e te+t fi&es .it' an .asp+ fi&e name
e+tension. T'ey can (e *ep&oye* t'%o)$'o)t an IIS 0i%t)a& %oot *i%ecto%y t%ee.
!'en a (%o.se% c&ient %e5)ests .asp+ %eso)%ces3 t'e AS,.NET %)ntime pa%ses
an* compi&es t'e ta%$et fi&e into a .NET %ame.o%/ c&ass. T'is c&ass can t'en
(e )se* to *ynamica&&y p%ocess incomin$ %e5)ests. 1Note t'at t'e .asp+ fi&e is
compi&e* on&y t'e fi%st time it is accesse*6 t'e compi&e* type instance is t'en
%e)se* ac%oss m)&tip&e %e5)ests2.
An AS,.NET pa$e can (e c%eate* simp&y (y ta/in$ an e+istin$ 7TML
fi&e an* c'an$in$ its fi&e name e+tension to .asp+ 1no mo*ification of co*e is
%e5)i%e*2. o% e+amp&e3 t'e fo&&o.in$ samp&e *emonst%ates a simp&e 7TML
pa$e t'at co&&ects a )se%8s name an* cate$o%y p%efe%ence an* t'en pe%fo%ms a
fo%m post (ac/ to t'e o%i$inatin$ pa$e .'en a ()tton is c&ic/e*:
!%3"1ET provides s*nta( compati'ilit* &ith e(isting !%3 pages" This
includes support for QR RS code render 'locs that can 'e intermi(ed &ith ,TM2
content &ithin an "asp( file" These code 'locs e(ecute in a top:do&n manner at
page render time"
C/de9+e.-nd ?e@ F/r0s
!%3"1ET supports t&o methods of authoring d*namic pages" The first is the
method sho&n in the preceding samples, &here the page code is ph*sicall* declared
&ithin the originating "asp( file" !n alternative approach::no&n as the code:'ehind
method::ena'les the page code to 'e more cleanl* separated from the ,TM2
content into an entirel* separate file"
Int%o*)ction to AS,.NET Se%0e% Cont%o&s
40
Cargo Manager
In addition to #or instead of$ using QR RS code 'locs to program d*namic
content, !%3"1ET page developers can use !%3"1ET server controls to program
8e' pages" %erver controls are declared &ithin an "asp( file using custom tags or
intrinsic ,TM2 tags that contain a runatTKserverK attri'utes value" Intrinsic ,TM2
tags are handled '* one of the controls in the %*stem"8e'"7I",tmlControls
namespace" !n* tag that doesnLt e(plicitl* map to one of the controls is assigned the
t*pe of %*stem"8e'"7I",tmlControls",tmlGenericControl"
%erver controls automaticall* maintain an* client:entered values 'et&een round trips
to the server" This control state is not stored on the server #it is instead stored &ithin
an Qinput t*peTKhiddenKS form field that is round:tripped 'et&een re-uests$" 1ote
also that no client:side script is re-uired"
In addition to supporting standard ,TM2 input controls, !%3"1ET ena'les
developers to utili>e richer custom controls on their pages" 4or e(ample, the
follo&ing sample demonstrates ho& the Qasp:adrotatorS control can 'e used to
d*namicall* displa* rotating ads on a page"
/" !%3"1ET 8e' 4orms provide an eas* and po&erful &a* to 'uild d*namic
8e' 7I"
." !%3"1ET 8e' 4orms pages can target an* 'ro&ser client #there are no
script li'rar* or cooie re-uirements$"
5" !%3"1ET 8e' 4orms pages provide s*nta( compati'ilit* &ith e(isting !%3
pages"
41
Cargo Manager
9" !%3"1ET server controls provide an eas* &a* to encapsulate common
functionalit*"
<" !%3"1ET ships &ith 9< 'uilt:in server controls" )evelopers can also use
controls 'uilt '* third parties"
B" !%3"1ET server controls can automaticall* pro+ect 'oth up level and do&n
level ,TM2"
H" !%3"1ET templates provide an eas* &a* to customi>e the loo and feel of
list server controls"
U" !%3"1ET validation controls provide an eas* &a* to do declarative client or
server data validation"
Crystal Re4/rts
Cr*stal 6eports for Visual Basic "1ET is the standard reporting tool for
Visual Basic"1ETP it 'rings the a'ilit* to create interactive, presentation:-ualit*
content V &hich has 'een the strength of Cr*stal 6eports for *ears V to the "1ET
platform"
8ith Cr*stal 6eports for Visual Basic"1ET, *ou can host reports on 8e'
and 8indo&s platforms and pu'lish Cr*stal reports as 6eport 8e' %ervices on a
8e' server"
To present data to users, *ou could &rite code to loop through record sets
and print them inside *our 8indo&s or 8e' application" ,o&ever, an* &or
'e*ond 'asic formatting can 'e complicated: consolidations, multiple level totals,
charting, and conditional formatting are difficult to program"
8ith Cr*stal 6eports for Visual %tudio "1ET, *ou can -uicl* create
comple( and professional:looing reports" Instead of coding, *ou use the Cr*stal
42
Cargo Manager
6eport )esigner interface to create and format the report *ou need" The po&erful
6eport Engine processes the formatting, grouping, and charting criteria *ou specif*"
Re4/rt EA4erts
Usin$ t'e C%ysta& Repo%t E+pe%ts3 yo) can 5)ic/&y c%eate %epo%ts (ase* on yo)%
*e0e&opment nee*s:
Choose from report la*out options ranging from standard reports to form letters, or
'uild *our o&n report from scratch"
)ispla* charts that users can drill do&n on to vie& detailed report data"
Calculate summaries, su'totals, and percentages on grouped data"
%ho& Top1 or Bottom1 results of data"
Conditionall* format te(t and rotate te(t o'+ects"
.2 +ACK END TEC#NOLO!Y2
A@/ut %-cr/s/3t S8L Ser1er 2;;;
Microsoft %;2 %erver is a %tructured ;uer* 2anguage #%;2$ 'ased, clientAserver
relational data'ase" Each of these terms descri'es a fundamental part of the
architecture of %;2 %erver"
Data@ase
! data'ase is similar to a data file in that it is a storage place for data" 2ie a data
file, a data'ase does not present information directl* to a userP the user runs an
application that accesses data from the data'ase and presents it to the user in an
understanda'le format"
! data'ase t*picall* has t&o components: the files holding the ph*sical data'ase
and the data'ase management s*stem #)BM%$ soft&are that applications use to
access data" The )BM% is responsi'le for enforcing the data'ase structure,
including:
Maintaining the relationships 'et&een data in the data'ase"
43
Cargo Manager
Ensuring that data is stored correctl* and that the rules defining data
relationships are not violated"
6ecovering all data to a point of no&n consistenc* in case of s*stem
failures"
6elational )ata'ase
There are different &a*s to organi>e data in a data'ase 'ut relational
data'ases are one of the most effective" 6elational data'ase s*stems are an
application of mathematical set theor* to the pro'lem of effectivel* organi>ing data"
In a relational data'ase, data is collected into ta'les #called relations in relational
theor*$"
8hen organi>ing data into ta'les, *ou can usuall* find man* different &a*s
to define ta'les" 6elational data'ase theor* defines a process, normali>ation, &hich
ensures that the set of ta'les *ou define &ill organi>e *our data effectivel*"
ClientA%erver::
In a clientAserver s*stem, the server is a relativel* large computer in a central
location that manages a resource used '* man* people" 8hen individuals need to
use the resource, the* connect over the net&or from their computers, or clients, to
the server"
E(amples of servers are: In a clientAserver data'ase architecture, the data'ase
files and )BM% soft&are reside on a server" ! communications component is
provided so applications can run on separate clients and communicate to the
data'ase server over a net&or" The %;2 %erver communication component also
allo&s communication 'et&een an application running on the server and %;2
%erver"
%erver applications are usuall* capa'le of &oring &ith several clients at the
same time" %;2 %erver can &or &ith thousands of client applications
simultaneousl*" The server has features to prevent the logical pro'lems that occur if
a user tries to read or modif* data currentl* 'eing used '* others"
44
Cargo Manager
8hile %;2 %erver is designed to &or as a server in a clientAserver net&or,
it is also capa'le of &oring as a stand:alone data'ase directl* on the client" The
scala'ilit* and ease:of:use features of %;2 %erver allo& it to &or efficientl* on a
client &ithout consuming too man* resources"
%tructured ;uer* 2anguage #%;2$
To &or &ith data in a data'ase, *ou must use a set of commands and
statements #language$ defined '* the )BM% soft&are" There are several different
languages that can 'e used &ith relational data'asesP the most common is %;2" Both
the !merican 1ational %tandards Institute #!1%I$ and the International %tandards
Organi>ation #I%O$ have defined standards for %;2" Most modern )BM% products
support the Entr* 2evel of %;2:G., the latest %;2 standard #pu'lished in /GG.$"
%;2 %erver 4eatures
Microsoft %;2 %erver supports a set of features that result in the follo&ing 'enefits:
Ease of installation, deplo*ment, and use
%;2 %erver includes a set of administrative and development tools that improve
*our a'ilit* to install, deplo*, manage, and use %;2 %erver across several sites"
%cala'ilit*
The same data'ase engine can 'e used across platforms ranging from laptop
computers running Microsoft 8indo&sM G<AGU to large, multiprocessor servers
running Microsoft 8indo&s 1TM, Enterprise Edition"
)ata &arehousing
%;2 %erver includes tools for e(tracting and anal*>ing summar* data for online
anal*tical processing #O2!3$" %;2 %erver also includes tools for visuall* designing
data'ases and anal*>ing data using English:'ased -uestions"
%*stem integration &ith other server soft&are
%;2 %erver integrates &ith e:mail, the Internet, and 8indo&s"
45
Cargo Manager
)ata'ases
! data'ase in Microsoft %;2 %erver consists of a collection of ta'les that contain
data, and other o'+ects, such as vie&s, inde(es, stored procedures, and triggers,
defined to support activities performed &ith the data" The data stored in a data'ase is
usuall* related to a particular su'+ect or process, such as inventor* information for a
manufacturing &arehouse"
%;2 %erver can support man* data'ases, and each data'ase can store either
interrelated data or data unrelated to that in the other data'ases" 4or e(ample, a
server can have one data'ase that stores personnel data and another that stores
product:related data" !lternativel*, one data'ase can store current customer order
data, and anotherP related data'ase can store historical customer orders that are used
for *earl* reporting" Before *ou create a data'ase, it is
important to understand the parts of a data'ase and ho& to design these parts to
ensure that the data'ase performs &ell after it is implemented"
N/r0al-Bat-/n t.e/ry2
6elations are to 'e normali>ed to avoid anomalies" In insert, update and delete
operations" 1ormali>ation theor* is 'uilt around the concept of normal forms" !
relation is said to 'e in a particular form if it satisfies a certain specified set if
constraints" To decide a suita'le logical structure for given data'ase design the
concept of normali>ation, &hich are 'riefl* descri'ed 'elo&"
/" / st 1ormal 4orm #/ 1"4$: ! relation is said to 'e in / 14 is and onl* if all
unaligned domains contain values onl*" That is the fields of an n:set should
have no group items and no repeating groups"
46
Cargo Manager
." . nd 1ormal 4orm #. 1"4$ : ! relation is said to 'e in . 14 is and onl* if it
is in / 14 and ever* non e* attri'ute is full* dependent on primar* e*"
This normal taes care of functional dependencies on non:e* attri'utes"
5" 5 rd 1ormal 4orm #5 1"4$ : ! relation is said to 'e in 5 14 is and onl* if it
is in . 14 and ever* non e* attri'ute is non transitivel* dependent on the
primar* e*" This normal form avoids the transitive dependencies on the
primar* e*"
9" Bo*ce code 1ormal 4orm #BC14$ : This is a stronger definition than that of
14" ! relation is said to 'e in BC14 if and onl* if ever* determinant is a
Candidate e*"
<" 9 th 1ormal 4orm #9 14$ : ! relation is said to 'e in 9 14 if and onl* if
&henever there e(ists a multi valued dependenc* in a relation sa* !:S:SB
then all of the relation are also functionall* dependent on !#i"e" !:SE for all
attri'utes ( of the relation"$"
B" < th 1ormal 4orm #< 14$ O6 3ro+ection Join 1ormal 4orm #3J14$: !
relation 6 is in < 14 "if and onl* if ever* +oin dependenc* in 6 is implied '*
the candidate e* on 6 " ! relation can?t 'e non:loss split into t&o ta'les 'ut
can 'e split into three ta'les" This is called Join )ependenc*"
Middle&are Technolog*
!ctive( )ata O'+ects"1et Overvie&
!)O"1ET is an evolution of the !)O data access model that directl*
addresses user re-uirements for developing scala'le applications" It &as designed
specificall* for the &e' &ith scala'ilit*, statelessness, and EM2 in mind"
47
Cargo Manager
!)O"1ET uses some !)O o'+ects, such as the Connection and Command o'+ects,
and also introduces ne& o'+ects" Ce* ne& !)O"1ET o'+ects include the )ataset,
)ata 6eader, and )ata !dapter"
The important distinction 'et&een this evolved stage of !)O"1ET
and previous data architectures is that there e(ists an o'+ect :: the )ataset :: that is
separate and distinct from an* data stores" Because of that, the )ataset functions as a
standalone entit*" 0ou can thin of the )ataset as an al&a*s disconnected record set
that no&s nothing a'out the source or destination of the data it contains" Inside a
)ataset, much lie in a data'ase, there are ta'les, columns, relationships,
constraints, vie&s, and so forth"
! )ata !dapter is the o'+ect that connects to the data'ase to fill the )ataset"
Then, it connects 'ac to the data'ase to update the data there, 'ased on operations
performed &hile the )ataset held the data" In the past, data processing has 'een
primaril* connection:'ased" 1o&, in an effort to mae multi:tiered apps more
efficient, data processing is turning to a message:'ased approach that revolves
around chuns of information" !t the center of this approach is the )ata !dapter,
&hich provides a 'ridge to retrieve and save data 'et&een a )ataset and its source
data store" It accomplishes this '* means of re-uests to the appropriate %;2
commands made against the data store"
The EM2:'ased )ataset o'+ect provides a consistent programming model
that &ors &ith all models of data storage: flat, relational, and hierarchical" It does
this '* having no Lno&ledgeL of the source of its data, and '* representing the data
that it holds as collections and data t*pes" 1o matter &hat the source of the data
&ithin the )ataset is, it is manipulated through the same set of standard !3Is
e(posed through the )ataset and its su'ordinate o'+ects"
8hile the )ataset has no no&ledge of the source of its data, the managed
provider has detailed and specific information" The role of the managed provider is
to connect, fill, and persist the )ataset to and from data stores" The O2E )B and
48
Cargo Manager
%;2 %erver "1ET )ata 3roviders #%*stem")ata"Ole)' and %*stem")ata"%-lClient$
that are part of the "1et 4rame&or provide four 'asic o'+ects: the Command,
Connection, )ata 6eader and )ata !dapter" In the remaining sections of this
document, &eLll &al through each part of the )ataset and the O2E )BA%;2
%erver "1ET )ata 3roviders e(plaining &hat the* are, and ho& to program against
them" The follo&ing sections &ill introduce *ou to some o'+ects that have evolved,
and some that are ne&" These o'+ects are:
Connections" 4or connection to and managing transactions against a
data'ase"
Commands" 4or issuing %;2 commands against a data'ase"
)ata 6eaders" 4or reading a for&ard:onl* stream of data records from a %;2
%erver data source"
)atasets" 4or storing, removing and programming against flat data, EM2
data and relational data"
)ata !dapters" 4or pushing data into a )ataset, and reconciling data against
a data'ase"
8hen dealing &ith connections to a data'ase, there are t&o different options: %;2
%erver "1ET )ata 3rovider #%*stem")ata"%-lClient$ and O2E )B "1ET )ata
3rovider #%*stem")ata"Ole)'$" In these samples &e &ill use the %;2 %erver "1ET
)ata 3rovider" These are &ritten to tal directl* to Microsoft %;2 %erver" The O2E
)B "1ET )ata 3rovider is used to tal to an* O2E )B provider #as it uses O2E )B
underneath$"
Connections
Connections are used to Ltal toL data'ases, and are represented '* provider:
specific classes such as %;2Connection" Commands travel over connections and
result sets are returned in the form of streams &hich can 'e read '* a )ata 6eader
o'+ect, or pushed into a )ataset o'+ect"
49
Cargo Manager
Comman*s
Commands contain the information that is su'mitted to a data'ase, and are
represented '* provider:specific classes such as %;2Command" ! command can 'e
a stored procedure call, an 73)!TE statement, or a statement that returns results"
0ou can also use input and output parameters, and return values as part of *our
command s*nta(" The e(ample 'elo& sho&s ho& to issue an I1%E6T statement
against the 1orth &ind data'ase"
Data Rea*e%s
The )ata 6eader o'+ect is some&hat s*non*mous &ith a read:onl*Afor&ard:
onl* cursor over data" The )ata 6eader !3I supports flat as &ell as hierarchical
data" ! )ata 6eader o'+ect is returned after e(ecuting a command against a
data'ase" The format of the returned )ata 6eader o'+ect is different from a record
set" 4or e(ample, *ou might use the )ata 6eader to sho& the results of a search list
in a &e' page"
Datasets
The )ataset o'+ect is similar to the !)O 6ecord set o'+ect, 'ut more po&erful, and
&ith one other important distinction: the )ataset is al&a*s disconnected" The
)ataset o'+ect represents a cache of data, &ith data'ase:lie structures such as
ta'les, columns, relationships, and constraints" ,o&ever, though a )ataset can and
does 'ehave much lie a data'ase, it is important to remem'er that )ataset o'+ects
do not interact directl* &ith data'ases, or other source data" This allo&s the
developer to &or &ith a programming model that is al&a*s consistent, regardless
of &here the source data resides" )ata coming from a data'ase, an EM2 file, from
code, or user input can all 'e placed into )ataset o'+ects" Then, as changes are made
to the )ataset the* can 'e traced and verified 'efore updating the source data" The
Get Changes method of the )ataset o'+ect actuall* creates a second )ataset that
contains onl* the changes to the data" This )ataset is then used '* a )ata !dapter
50
Cargo Manager
#or other o'+ects$ to update the original data source" The )ataset has man* EM2
characteristics, including the a'ilit* to produce and consume EM2 data and EM2
schemas" EM2 schemas can 'e used to descri'e schemas interchanged via 8e'
%ervices" In fact, a )ataset &ith a schema can actuall* 'e compiled for t*pe safet*
and statement completion"
Data Ada4ters :OLED+DS8L<
The )ata !dapter o'+ect &ors as a 'ridge 'et&een the )ataset and the source data"
7sing the provider:specific %-l)ata!dapter #along &ith its associated %-lCommand
and %-lConnection$ can increase overall performance &hen &oring &ith a
Microsoft %;2 %erver data'ases" 4or other O2E )B:supported data'ases, *ou
&ould use the Ole)')ata!dapter o'+ect and its associated Ole)'Command and
Ole)'Connection o'+ects" The )ata !dapter o'+ect uses commands to update the
data source after changes have 'een made to the )ataset" 7sing the 4ill method of
the )ata !dapter calls the %E2ECT commandP using the 7pdate method calls the
I1%E6T, 73)!TE or )E2ETE command for each changed ro&" 0ou can
e(plicitl* set these commands in order to control the statements used at runtime to
resolve changes, including the use of stored procedures" 4or ad:hoc scenarios, a
Command Builder o'+ect can generate these at run:time 'ased upon a select
statement" ,o&ever, this run:time generation re-uires an e(tra round:trip to the
server in order to gather re-uired metadata, so e(plicitl* providing the I1%E6T,
73)!TE, and )E2ETE commands at design time &ill result in 'etter run:time
performance"
/" !)O"1ET is the ne(t evolution of !)O for the "1et 4rame&or"
." !)O"1ET &as created &ith n:Tier, statelessness and EM2 in the forefront"
T&o ne& o'+ects, the )ataset and )ata !dapter, are provided for these
scenarios" !)O"1ET can 'e used to get data from a stream, or to store data
in a cache for updates"
5" There is a lot more information a'out !)O"1ET in the documentation"
51
Cargo Manager
9" 6emem'er, *ou can e(ecute a command directl* against the data'ase in
order to do inserts, updates, and deletes" 0ou donLt need to first put data into
a )ataset in order to insert, update, or delete it"
<" !lso, *ou can use a )ataset to 'ind to the data, move through the data, and
navigate data relationships
Cl-ent9s-de Scr-4t:$A6ASCRI"T<29
Java%cript:
Java%cript is a ne& scripting language for 8e'3ages" %cripts &ritten &ith +ava
script can 'e em'edded into *our ,TM2 pages" 8ith +ava script *ou have man*
possi'ilities for enhancing *our ,TM2 page &ith interesting elements" 4or e(ample
*ou are a'le to respond to user:initiated events -uite easil*" %ome effects that are no&
possi'le &ith +ava script &ere some time ago onl* possi'le &ith CGI" %o *ou can create
reall* sophisticated pages &ith the helps of +ava script on the Internet"
,o& can Java %cript scripts runW
The first 'ro&ser to support +ava script &as the 1etscape 1avigator ."= of course
the higher versions do have +ava script as &ell" 0ou might no& that +ava does not run
on all 1etscape 1avigators ."= #or higher versions$ versions" But this is not true for +ava
script :although there are some pro'lems &ith the different versions"
The Mac version for e(ample seems to have man* 'ugs" In the near future there
are going to 'e some other 'ro&sers, &hich support +ava script" The Microsoft Internet
e(plorer 5"= is going to support +ava script" Java%cript ena'led 'ro&sers are going to
spread soon : it is &orth learning this ne& techni-ue no&" 0ou might reali>e that is
reall* eas* to &rite Java %cript scripts" 8e have to no& is some 'asic techni-ues and
some &or:around for pro'lems *ou might encounter" Of course &e need a 'asic"
7nderstanding ,TM2 'efore reading this tutorial *ou can find man* reall* good online
resources a'out ,TM2" Best *ou mae an online search a'out Xhtml? at *ahoo if *ou
52
Cargo Manager
&ant to get informed a'out ,TM2" 1o& I &ant to sho& some small scripts so *ou can
learn ho& the* are implemented into ,TM2:documents and to sho& &hich possi'ilities
*ou have &ith the ne& scripting language" The follo&ing is a ver* small script, &hich
&ill onl* print a te(t into an ,TM2 document"
QhtmlS
QheadS
M* first Java%cript
QAheadS
Q'od*SQ'rS
This is a normal ,TM2 document
Q'rS
Qscript languageTYJava%criptYS
)ocument"&rite #Zthis is a +ava scriptY$
QAscriptSQ' rS
Bacing ,TM2 again
QA'od*S
QAhtmlS
If *ou are using a +ava script ena'led:'ro&ser at the moment then *ou &ill have the
possi'ilit* to see this script &oring" If *our 'ro&ser doesn?t support Java %cript then
this output might 'e some ind of strange[
This is a normal ,TM2 document
This is +ava script\
Bac in ,TM2 again"
4unctions
53
Cargo Manager
4unctions are 'et declared 'et&een the Q,eadS tag of ,TM2 page" 4unctions are
called '* user:initiated events" %eems reasona'le to eep the functions 'et&een the
Q,eadS tags" The* are loaded first 'efore a user can do an*thing that might call a
function" %cripts can 'e placed 'et&een inside comment fields to ensure that older
'ro&ser do not displa* the script itself"
QhtmlS
QheadS
Qscript languageTYJava%criptYS
function push'utton #$]
alert #Z,ello\Y$P
^
QAscriptS
QAheadS
Q'od*S
QformS
Qinput t*peTY'uttonY nameTYButton/Y valueTYpush meY onclicTYpush'utton #$YS
QAformS
QA'od*S
QAhtmlS
If &e &ant to test this one immediatel* and *ou are using a Java %cript ena'led
'ro&ser then please go ahead and push the 'utton"
This script &ill create a 'utton and &hen *ou press it a &indo& &ill pop up sa*ing
Zhello\Y" In fact &e have a lot of possi'ilities +ust '* adding functions to our scripts"
The common 'ro&sers transmit the form information '* either method: here?s the
complete tag including the GET transmission method attri'ute for the previous form
E(ample
Q4orm method TGET actionThttp:AA&&&"m*compan*"comAcgi:'inAupfdate"plS
54
Cargo Manager
[[[
QAformS
Input elements"
7se the QinputS tag to define an* one of a num'er of common form elements
including te(t fields multiple choice lists clic a'le images and su'mission 'uttons"
There are man* attri'uters for this tag onl* that t*pes and name attri'utes are re-uired
for each element, each t*pe of input element uses onl* a su'set of the follo&ed
attri'utes" !dditional QinputS attri'utes ma* 'e re-uired 'ased upon &hich t*pe of the
form element *ou specif*"
%u'mit 'utton:
The su'mit 'utton #Qinput t*peTsu'mitS $ does &hat its name implies, settings in
motion the form?s su'mission to the server from the 'ro&ser" 8e man* have more than
su'mit 'uttons &ill 'e added to the parameter list the 'ro&ser sends along to the server"
E(ample
Q Input t*pe TYsu'mitYS
QInput t*peTYsu'mitY valueTYsu'mitY nameTYnameYS
6eset 'utton:
The reset 'utton if firm QinputS 'utton is nearl* self: e(planator*P it lets the user reset
erase or set to some default value all elements in the form" B* default the 'ro&ser
55
Cargo Manager
displa*s a reset 'utton &orth the la'el ZresetY" 8e can change that '* specif*ing a value
attri'ute &ith tour o&n 'utton la'el"
)!T!B!%E MO)E2%
!)O"1ET and accessing the data'ase through applets and !)O"1ET !3I via
an intermediate server resulted server resulted in a ne& t*pe of data'ase model &hich is
different from the client:server model" Based on num'er of intermediate server through
the re-uest should go it is named as single tire, t&o tire and multi tire architecture
%ingle Tier
In a single tier the server and client are the same in the sense that a client
program that needs information #client$ and the source of this t*pe of architecture is also
possi'le in +ava, in case flat files are used to store the data" ,o&ever this is useful onl*
in case of small applications" The advantage &ith this is the simplicit* and porta'ilit* of
the application developed"


)ata'ase

T&o Tier #client:server$
56
"er,er an*
c)ient
Cargo Manager
In t&o tier architecture the data'ase resides in one machine and client in different
machine the* are connected through the net&or" In this t*pe of architecture a data'ase
management taes control of the data'ase and provides access to clients in a net&or"
This soft&are 'undle is also called as the server" %oft&are in different machines,
re-uesting for information are called as the clients"

)ata'ase
Three Tier and 1:Tier
57
"er,er
C)ient
C)ient
Cargo Manager
In the three:tier architecture, an* num'er servers can access the data'ase that
resides on server" 8hich in turn serve clients in a net&or" 4or e(ample, *ou &ant to
access the data'ase using +ava applets, the applet running in some other machine, can
send re-uest onl* to the server from &hich it is do&n loaded" 4or this reason &e &ill
need to have a intermediate server &hich &ill accept the re-uests from applets and them
to the actual data'ase server" This intermediate server acts as a t&o:&a* communication
channel also" This is the information or data from the data'ase is passed on to the applet
that is re-uesting it" This can 'e e(tended to mae n tiers of servers, each server
carr*ing to specific t*pe of re-uest from clients, ho&ever in practice onl* 5 tiers
architecture is popular"
CD 2anguage
CD #pronounced C %harp$ is a multi:paradigm programming language that encompasses
functional, imperative, generic, o'+ect:oriented #class:'ased$, and component:oriented
programming disciplines" It &as developed '* Microsoft as part of the "1ET initiative
and later approved as a standard '* ECM! #ECM!:559$ and I%O #I%OAIEC .5.H=$" CD
is one of the 99 programming languages supported '* the "1ET 4rame&orLs Common
2anguage 6untime"
CD is intended to 'e a simple, modern, general:purpose, o'+ect:oriented programming
language" !nders ,e+ls'erg, the designer of )elphi, leads the team &hich is developing
CD" It has an o'+ect:oriented s*nta( 'ased on COO and is heavil* influenced '* other
programming languages such as )elphi and Java" It &as initiall* named Cool, &hich
stood for KC lie O'+ect Oriented 2anguageK" ,o&ever, in Jul* .===, &hen Microsoft
made the pro+ect pu'lic, the name of the programming language &as given as CD" The
most recent version of the language is CD 5"= &hich &as released in con+unction &ith
the "1ET 4rame&or 5"< in .==H" The ne(t proposed version, CD 9"=, is in development"
,istor*::
58
Cargo Manager
In /GGB, %un Micros*stems released the Java programming language &ith Microsoft
soon purchasing a license to implement it in their operating s*stem" Java &as originall*
meant to 'e a platform independent language, 'ut Microsoft, in their implementation,
'roe their license agreement and made a fe& changes that &ould essentiall* inhi'it
JavaLs platform:independent capa'ilities" %un filed a la&suit and Microsoft settled,
deciding to create their o&n version of a partiall* compiled, partiall* interpreted o'+ect:
oriented programming language &ith s*nta( closel* related to that of COO"
)uring the development of "1ET, the class li'raries &ere originall* &ritten in a
languageAcompiler called %imple Managed C #%MC$" In Januar* /GGG, !nders
,e+ls'erg formed a team to 'uild a ne& language at the time called Cool, &hich stood
for KC lie O'+ect Oriented 2anguageK"Microsoft had considered eeping the name
KCoolK as the final name of the language, 'ut chose not to do so for trademar reasons"
B* the time the "1ET pro+ect &as pu'licl* announced at the Jul* .=== 3rofessional
)evelopers Conference, the language had 'een renamed CD, and the class li'raries and
!%3"1ET runtime had 'een ported to CD"
CDLs principal designer and lead architect at Microsoft is !nders ,e+ls'erg, &ho &as
previousl* involved &ith the design of Visual JOO, Borland )elphi, and Tur'o 3ascal"
In intervie&s and technical papers he has stated that fla&s in most ma+or programming
languages #e"g" COO, Java, )elphi, and %malltal$ drove the fundamentals of the
Common 2anguage 6untime #C26$, &hich, in turn, drove the design of the CD
programming language itself" %ome argue that CD shares roots in other languages"
Features /3 CE29
B* design, CD is the programming language that most directl* reflects the underl*ing
Common 2anguage Infrastructure #C2I$" Most of CDLs intrinsic t*pes correspond to
value:t*pes implemented '* the C2I frame&or" ,o&ever, the CD language
specification does not state the code generation re-uirements of the compiler: that is, it
does not state that a CD compiler must target a Common 2anguage 6untime #C26$, or
generate Common Intermediate 2anguage #CI2$, or generate an* other specific format"
Theoreticall*, a CD compiler could generate machine code lie traditional compilers of
COO or 4O6T6!1P in practice, all e(isting CD implementations target CI2"
%ome nota'le CD distinguishing features are:
There are no glo'al varia'les or functions" !ll methods and mem'ers must 'e
declared &ithin classes" It is possi'le, ho&ever, to use static methodsAvaria'les
&ithin pu'lic classes instead of glo'al varia'lesAfunctions"
59
Cargo Manager
2ocal varia'les cannot shado& varia'les of the enclosing 'loc, unlie C and CO
O" Varia'le shado&ing is often considered confusing '* COO te(ts"
CD supports a strict Boolean data t*pe, 'ool" %tatements that tae conditions,
such as &hile and if, re-uire an e(pression of a 'oolean t*pe" 8hile COO also has
a 'oolean t*pe, it can 'e freel* converted to and from integers, and e(pressions
such as if#a$ re-uire onl* that a is converti'le to 'ool, allo&ing a to 'e an int, or a
pointer" CD disallo&s this Kinteger meaning true or falseK approach on the
grounds that forcing programmers to use e(pressions that return e(actl* 'ool can
prevent certain t*pes of programming mistaes such as if #a T '$ #use of T instead
of TT$"
In CD, memor* address pointers can onl* 'e used &ithin 'locs specificall*
mared as unsafe, and programs &ith unsafe code need appropriate permissions
to run" Most o'+ect access is done through safe o'+ect references, &hich are
al&a*s either pointing to a valid, e(isting o'+ect, or have the &ell:defined null
valueP a reference to a gar'age:collected o'+ect, or to random 'loc of memor*,
is impossi'le to o'tain" !n unsafe pointer can point to an instance of a value:
t*pe, arra*, string, or a 'loc of memor* allocated on a stac" Code that is not
mared as unsafe can still store and manipulate pointers through the %*stem"Int3tr
t*pe, 'ut cannot dereference them"
Managed memor* cannot 'e e(plicitl* freed, 'ut is automaticall* gar'age
collected" Gar'age collection addresses memor* leas" CD also provides direct
support for deterministic finali>ation &ith the using statement #supporting the
6esource !c-uisition Is Initiali>ation idiom$"
Multiple inheritance is not supported, although a class can implement an*
num'er of interfaces" This &as a design decision '* the languageLs lead architect
to avoid complication, avoid dependenc* hell and simplif* architectural
re-uirements throughout C2I"
CD is more t*pe safe than COO" The onl* implicit conversions '* default are
those &hich are considered safe, such as &idening of integers and conversion
from a derived t*pe to a 'ase t*pe" This is enforced at compile:time, during JIT,
and, in some cases, at runtime" There are no implicit conversions 'et&een
'ooleans and integers, nor 'et&een enumeration mem'ers and integers #e(cept
for literal =, &hich can 'e implicitl* converted to an* enumerated t*pe$" !n*
user:defined conversion must 'e e(plicitl* mared as e(plicit or implicit, unlie
COO cop* constructors #&hich are implicit '* default$ and conversion operators
#&hich are al&a*s implicit$"
Enumeration mem'ers are placed in their o&n scope"
CD provides s*ntactic sugar for a common pattern of a pair of methods, accessor
#getter$ and mutator #setter$ encapsulating operations on a single attri'ute of a
class, in form of properties"
4ull t*pe reflection and discover* is availa'le"
CD currentl* #as of 5 June .==U$ has HH reserved &ords"
60
Cargo Manager
Common Type system (CTS)
CD has a unified type system" This unified t*pe s*stem is called Common T*pe %*stem
#CT%$"
! unified t*pe s*stem implies that all t*pes, including primitives such as integers, are
su'classes of the System.Object class" 4or e(ample, ever* t*pe inherits a ToString()
method" 4or performance reasons, primitive t*pes #and value t*pes in general$ are
internall* allocated on the stac"
Cate$o%ies of *atatypes
CT% separates datat*pes into t&o categories:
Value t*pes
6eference t*pes
Value t*pes are plain aggregations of data" Instances of value t*pes do not have
referential identit* nor a referential comparison semantics : e-ualit* and ine-ualit*
comparisons for value t*pes compare the actual data values &ithin the instances, unless
the corresponding operators are overloaded" Value t*pes are derived from
System.9a&)eType, al&a*s have a default value, and can al&a*s 'e created and copied"
%ome other limitations on value t*pes are that the* cannot derive from each other #'ut
can implement interfaces$ and cannot have a default #parameterless$ constructor"
E(amples of value t*pes are some primitive t*pes, such as int #a signed 5.:'it integer$,
f&oat #a 5.:'it IEEE floating:point num'er$, c'a% #a /B:'it 7nicode codepoint$, and
System.DateTime #identifies a specific point in time &ith millisecond precision$"
In contrast, reference t*pes have the notion of referential identit* : each instance of
reference t*pe is inherentl* distinct from ever* other instance, even if the data &ithin
'oth instances is the same" This is reflected in default e-ualit* and ine-ualit*
comparisons for reference t*pes, &hich test for referential rather than structural e-ualit*,
unless the corresponding operators are overloaded #such as the case for System.St%in$$" In
general, it is not al&a*s possi'le to create an instance of a reference t*pe, nor to cop* an
e(isting instance, or perform a value comparison on t&o e(isting instances, though
specific reference t*pes can provide such services '* e(posing a pu'lic constructor or
implementing a corresponding interface #such as IC&onea(&e or ICompa%a(&e$" E(amples
of reference t*pes are o(-ect #the ultimate 'ase class for all other CD classes$,
System.St%in$ #a string of 7nicode characters$, and System.A%%ay #a 'ase class for all CD
arra*s$"
Both t*pe categories are e(tensi'le &ith user:defined t*pes"
61
Cargo Manager
Bo+in$ an* )n(o+in$
Boxing is the operation of converting a value of a value t*pe into a value of a
corresponding reference t*pe"
E(ample:
int foo T 9.P AA Value t*pe"""
o'+ect 'ar T fooP AA foo is 'o(ed to 'ar"
Unboxing is the operation of converting a value of a reference t*pe #previousl* 'o(ed$
into a value of a value t*pe"
E(ample:
int foo T 9.P AA Value t*pe"
o'+ect 'ar T fooP AA foo is 'o(ed to 'ar"
int foo. T #int$'arP AA 7n'o(ed 'ac to value t*pe"
Features of C# 2.0
1e& features in CD for the "1ET %)C ."= #corresponding to the 5rd edition of the
ECM!:559 standard$ are:
,a%tia& c&ass
3artial classes allo& implementation of a class to 'e spread 'et&een several files, &ith
each file containing one or more class mem'ers" It is primar* useful &hen parts of a
class are automaticall* generated" 4or e(ample, the feature is heavil* used '* code:
generating user interface designers in Visual %tudio"
file/"cs:
pu'lic partial class M*Class
]
pu'lic void M*Method/#$
]
AA Manuall* &ritten code
^
^
file."cs:
pu'lic partial class M*Class
]
pu'lic void M*Method.#$
]
AA !utomaticall* generated code
^
62
Cargo Manager
^
!ener-cs
Generics, or parameteri>ed t*pes, or parametric pol*morphism is a "1ET ."= feature
supported '* CD" 7nlie COO templates, "1ET parameteri>ed t*pes are instantiated at
runtime rather than '* the compilerP hence the* can 'e cross:language &hereas COO
templates cannot" The* support some features not supported directl* '* COO templates
such as t*pe constraints on generic parameters '* use of interfaces" On the other hand,
CD does not support non:t*pe generic parameters" 7nlie generics in Java, "1ET
generics use reification to mae parameteri>ed t*pes first:class o'+ects in the C2I
Virtual Machine, &hich allo&s for optimi>ations and preservation of the t*pe
information"
Static c&asses
%tatic classes are classes that cannot 'e instantiated or inherited from, and that onl*
allo& static mem'ers" Their purpose is similar to that of modules in man* procedural
languages"
A ne. fo%m of ite%ato% p%o0i*in$ $ene%ato% f)nctiona&ity
! ne& form of iterator that provides generator functionalit*, using a yield return
construct similar to yield in 3*thon"
AA Method that taes an itera'le input #possi'l* an arra*$
AA and returns all even num'ers"
pu'lic static IEnumera'leQintS GetEven#IEnumera'leQintS num'ers$
]
foreach #int i in num'ers$
]
if #i R . TT =$ *ield return iP
^
^
Anonymo)s *e&e$ates
!non*mous delegates provide closure functionalit* in CD" Code inside the 'od* of an
anon*mous delegate has full readA&rite access to local varia'les, method parameters,
and class mem'ers in scope of the delegate, e(cepting out and ref parameters" 4or
e(ample::
int %umOf!rra*Elements#intIJ arra*$
]
int sum T =P
!rra*"4orEach#
arra*,
delegate#int ($
]
63
Cargo Manager
sum OT (P
^
$P
return sumP
^
De&e$ate co0a%iance an* cont%a0a%iance
Conversions from method groups to delegate t*pes are covariant and contravariant in
return and parameter t*pes, respectivel*"
T'e accessi(i&ity of p%ope%ty accesso%s can (e set in*epen*ent&y
E(ample:
string status T string"Empt*P

pu'lic string %tatus
]
get ] return statusP ^ AA an*one can get value of this propert*,
protected set ] status T valueP ^ AA 'ut onl* derived classes can change it
^
N)&&a(&e types
1ulla'le value t*pes #denoted '* a -uestion mar, e"g" int: i ; n)&&6$ &hich add n)&& to the
set of allo&ed values for an* value t*pe" This provides improved interaction &ith %;2
data'ases, &hich can have nulla'le columns of t*pes corresponding to CD primitive
t*pes: an %;2 INTE"ER NULL column t*pe directl* translates to the CD int:"
1ulla'le t*pes received an eleventh:hour improvement at the end of !ugust .==<, mere
&ees 'efore the official launch, to improve their 'o(ing characteristics: a nulla'le
varia'le &hich is assigned null is not actuall* a null reference, 'ut rather an instance of
struct Nullable<T> &ith propert* HasValue e-ual to false" 8hen 'o(ed, the
Nullable instance itself is 'o(ed, and not the value stored in it, so the resulting
reference &ould al&a*s 'e non:null, even for null values" The follo&ing code illustrates
the corrected fla&:
intW i T nullP
o'+ect o T iP
if #o TT null$
Console"8rite2ine#KCorrect 'ehaviour : runtime version from %eptem'er .==< or laterK$P
else
Console"8rite2ine#KIncorrect 'ehaviour : pre:release runtime #from 'efore %eptem'er .==<$K$P
8hen copied into o'+ects, the official release 'o(es values from Nullable instances, so
null values and null references are considered e-ual" The late nature of this fi( caused
some controvers* , since it re-uired core:C26 changes affecting not onl* "1ET., 'ut all
dependent technologies #including CD, VB, %;2 %erver .==< and Visual %tudio .==<$"
64
Cargo Manager
DATABASE TABLES:
U"2R R27 -A$L2

$1193+7 -A$L2
EASIBILITY STUDY:
4easi'ilit*
stud* is conducted once the pro'lem is clearl* understood" 4easi'ilit* stud* is a high
level capsule version of the entire s*stem anal*sis and design process" The o'+ective is
+AM2 +ULL : +1-+ULL -;(2
sername +1-+ULL &ARC6AR2<10=
/ass'or* +ULL &ARC6AR2<20=
/!no +ULL int <10=
emai)i* +ULL &ARC6AR2<20=
+AM2 +1- : +1-+ULL -;(2
cstomername +1-+ULL &ARC6AR2<10=
emai)i* +1-+ULL &ARC6AR2<10=
a**ress +1-+ULL &ARC6AR2<10=
-8oeo#meteria) +1-+ULL &ARC6AR2<10=
/ro*ctname +1-+ULL &ARC6AR2<10=
noo#/ro*cts +1-+ULL &ARC6AR2<15=
sorce +1-+ULL &ARC6AR2<20=
*estination +1-+ULL &ARC6AR2<10=
*estinationa**ress +1-+ULL +UM$2R<10>2==
65
Cargo Manager
to determine -uicl* at a minimum e(pense ho& to solve a pro'lem" The purpose of
feasi'ilit* is not to solve the pro'lem 'ut to determine if the pro'lem is &orth solving"


The s*stem has 'een tested for feasi'ilit* in the follo&ing points"
/" Technical 4easi'ilit*
." Economical 4easi'ilit*
5" Operational 4easi'ilit*"
/" Technical 4easi'ilit*
The pro+ect entitles KCourier %ervice %*stemY is technicall* feasi'ilit*
'ecause of the 'elo& mentioned feature" The pro+ect &as developed in Java &hich
Graphical 7ser Interface"
It provides the high level of relia'ilit*, availa'ilit* and compati'ilit*"
!ll these mae Java an appropriate language for this pro+ect" Thus the e(isting
soft&are Java is a po&erful language"
66
Cargo Manager
." Economical 4easi'ilit*
The computeri>ed s*stem &ill help in automate the selection
leading the profits and details of the organi>ation" 8ith this soft&are, the machine and
manpo&er utili>ation are e(pected to go up '* U=:G=R appro(imatel*" The costs
incurred of not creating the s*stem are set to 'e great, 'ecause precious time can 'e
&anted '* manuall*"
5" Operational 4easi'ilit*
In this pro+ect, the management &ill no& the details
of each pro+ect &here he ma* 'e presented and the data &ill 'e maintained as
decentrali>ed and if an* in-uires for that particular contract can 'e no&n as per their
re-uirements and necessaries"
Imp&ementation:
Implementation is the stage &here the theoretical design is turned into a
&oring s*stem" The most crucial stage in achieving a ne& successful s*stem and in
giving confidence on the ne& s*stem for the users that it &ill &or efficientl* and
effectivel*"
The s*stem can 'e implemented onl* after thorough testing is done and if it
is found to &or according to the specification"

It involves careful planning, investigation of the current s*stem and its constraints on
implementation, design of methods to achieve the change over and an evaluation of
change over methods a part from planning" T&o ma+or tass of preparing the
67
Cargo Manager
implementation are education and training of the users and testing of the s*stem"
The more comple( the s*stem 'eing implemented, the more involved &ill 'e the
s*stems anal*sis and design effort re-uired +ust for implementation"

The implementation phase comprises of several activities" The re-uired hard&are
and soft&are ac-uisition is carried out" The s*stem ma* re-uire some soft&are to 'e
developed" 4or this, programs are &ritten and tested" The user then changes over to his
ne& full* tested s*stem and the old s*stem is discontinued"
TESTIN":

The testing phase is an important part of soft&are development" It is the
puteri>ed s*stem &ill help in automate process of finding errors and missing operations
and also a complete verification to determine &hether the o'+ectives are met and the
user re-uirements are satisfied"
%oft&are testing is carried out in three steps:

/" The first includes unit testing, &here in each module is tested to provide its
correctness, validit* and also determine an* missing operations and to verif* &hether
the o'+ectives have 'een met" Errors are noted do&n and corrected immediatel*" 7nit
testing is the important and ma+or part of the pro+ect" %o errors are rectified easil* in
particular module and program clarit* is increased" In this pro+ect entire s*stem is
68
Cargo Manager
divided into several modules and is developed individuall*" %o unit testing is conducted
to individual modules"
." The second step includes Integration testing" It need not 'e the case, the
soft&are &hose modules &hen run individuall* and sho&ing perfect results, &ill also
sho& perfect results &hen run as a &hole" The individual modules are clipped under this
ma+or module and tested again and verified the results" This is due to poor interfacing,
&hich ma* results in data 'eing lost across an interface" ! module can have inadvertent,
adverse effect on an* other or on the glo'al data structures, causing serious pro'lems"



5" The final step involves validation and testing &hich determines &hich
the soft&are functions as the user e(pected" ,ere also some modifications &ere" In the
completion of the pro+ect it is satisfied full* '* the end user"
Maintenance an* en0i%onment:
!% the num'er of computer 'ased s*stems, grieve li'raries of computer
soft&are 'egan to e(pand" In house developed pro+ects produced tones of thousand soft
program source statements" %oft&are products purchased from the outside added
hundreds of thousands of ne& statements" ! dar cloud appeared on the hori>on" !ll of
these programs, all of those source statements:had to 'e corrected &hen false &ere
detected, modified as user re-uirements changed, or adapted to ne& hard&are that &as
purchased" These activities &ere collectivel* called soft&are Maintenance"
The maintenance phase focuses on change that is associated &ith error
correction, adaptations re-uired as the soft&areLs environment evolves, and changes due
to enhancements 'rought a'out '* changing customer re-uirements" 4our t*pes of
changes are encountered during the maintenance phase"
69
Cargo Manager
Correction
!daptation
Enhancement
3revention
Co%%ection:
Even &ith the 'est -ualit* assurance activities is lightl* that the customer
&ill uncover defects in the soft&are" Corrective maintenance changes the
soft&are to correct defects"
Maintenance is a set of soft&are Engineering activities that occur after
soft&are has 'een delivered to the customer and put into operation" %oft&are
configuration management is a set of tracing and control activities that 'egan
&hen a soft&are pro+ect 'egins and terminates onl* &hen the soft&are is taen
out of the operation"
8e ma* define maintenance '* descri'ing four activities that are undertaen
after a program is released for use:

Corrective Maintenance
!daptive Maintenance
3erfective Maintenance or Enhancement
3reventive Maintenance or reengineering


Onl* a'out .= percent of all maintenance &or are spent Kfi(ing mistaesK" The
remaining U= percent are spent adapting e(isting s*stems to changes in their
e(ternal environment, maing enhancements re-uested '* users, and
reengineering an application for use"
!)!3T!TIO1:
Over time, the original environment #ESG", C37, operating s*stem, 'usiness
rules, e(ternal product characteristics$ for &hich the soft&are &as developed is liel* to
change" !daptive maintenance results in modification to the soft&are to accommodate
change to its e(ternal environment"
70
Cargo Manager
E1,!1CEME1T:
!s soft&are is used, the customerAuser &ill recogni>e additional functions that &ill
provide 'enefit" 3erceptive maintenance e(tends the soft&are 'e*ond its original
function re-uirements"
36EVE1TIO1 :
Computer soft&are deteriorates due to change, and 'ecause of this,
preventive maintenance, often called soft&are re engineering, must 'e conducted
to ena'le the soft&are to serve the needs of its end users" In essence, preventive
maintenance maes changes to computer programs so that the* can 'e more
easil* corrected, adapted, and enhanced" %oft&are configuration management
#%CM$ is an um'rella activit* that is applied throughout the soft&are process"
%CM activities are developed to


71
Cargo Manager
Testing is a process of e(ecuting a program &ith the indent of
finding an error" Testing is a crucial element of soft&are -ualit*
assurance and presents ultimate revie& of specification, design and
coding"
%*stem Testing is an important phase" Testing represents an interesting anomal* for the
soft&are" Thus a series of testing are performed for the proposed s*stem 'efore the
s*stem is read* for user acceptance testing"
! good test case is one that has a high pro'a'ilit* of finding an as undiscovered
error" ! successful test is one that uncovers an as undiscovered error"
Testing O'+ectives:
72
Cargo Manager
/" Testing is a process of e(ecuting a program &ith the intent of finding an
error
." ! good test case is one that has a pro'a'ilit* of finding an as *et
undiscovered error
5" ! successful test is one that uncovers an undiscovered error
Testing 3rinciples:
!ll tests should 'e tracea'le to end user re-uirements
Tests should 'e planned long 'efore testing 'egins
Testing should 'egin on a small scale and progress to&ards testing in
large
E(haustive testing is not possi'le
To 'e most effective testing should 'e conducted '* a independent third part*
The primar* o'+ective for test case design is to derive a set of tests that has the
highest livelihood for uncovering defects in soft&are" To accomplish this o'+ective t&o
different categories of test case design techni-ues are used" The* are
8hite 'o( testing"
Blac 'o( testing"
8hite:'o( testing:
8hite 'o( testing focus on the program control structure" Test cases are derived
to ensure that all statements in the program have 'een e(ecuted at least once during
testing and that all logical conditions have 'een e(ecuted"
Bloc:'o( testing:
Blac 'o( testing is designed to validate functional re-uirements &ithout regard to the
internal &orings of a program" Blac 'o( testing mainl* focuses on the information
73
Cargo Manager
domain of the soft&are, deriving test cases '* partitioning input and output in a manner
that provides through test coverage" Incorrect and missing functions, interface errors,
errors in data structures, error in functional logic are the errors falling in this categor*"
Testing strategies:
! strateg* for soft&are testing must accommodate lo&:level tests that are
necessar* to verif* that all small source code segment has 'een correctl* implemented
as &ell as high:level tests that validate ma+or s*stem functions against customer
re-uirements"
Testing fundamentals:
Testing is a process of e(ecuting program &ith the intent of finding error" !
good test case is one that has high pro'a'ilit* of finding an undiscovered error" If testing
is conducted successfull* it uncovers the errors in the soft&are" Testing cannot sho& the
a'sence of defects, it can onl* sho& that soft&are defects present"
Testing Information flo&:
Information flo& for testing flo&s the pattern" T&o class of input provided to
test the process" The soft&are configuration includes a soft&are re-uirements
specification, a design specification and source code"
Test configuration includes test plan and test cases and test tools" Tests are
conducted and all the results are evaluated" That is test results are compared &ith
e(pected results" 8hen erroneous data are uncovered, an error is implied and de'ugging
commences"
7nit testing:
7nit testing is essential for the verification of the code produced during the
coding phase and hence the goal is to test the internal logic of the modules" 7sing the
74
Cargo Manager
detailed design description as a guide, important paths are tested to uncover errors &ith
in the 'oundar* of the modules" These tests &ere carried out during the programming
stage itself" !ll units of Vienna%;2 &ere successfull* tested"
Integration testing :
Integration testing focuses on unit tested modules and 'uild the program
structure that is dictated '* the design phase"
%*stem testing:
%*stem testing tests the integration of each module in the s*stem" It also tests to
find discrepancies 'et&een the s*stem and it?s original o'+ective, current specification
and s*stem documentation" The primar* concern is the compati'ilit* of individual
modules" Entire s*stem is &oring properl* or not &ill 'e tested here, and specified path
O)BC connection &ill correct or not, and giving output or not are tested here these
verifications and validations are done '* giving input values to the s*stem and '*
comparing &ith e(pected output" Top:do&n testing implementing here"
!cceptance Testing:
This testing is done to verif* the readiness of the s*stem for the implementation"
!cceptance testing 'egins &hen the s*stem is complete" Its purpose is to provide the
end user &ith the confidence that the s*stem is read* for use" It involves planning and
e(ecution of functional tests, performance tests and stress tests in order to demonstrate
that the implemented s*stem satisfies its re-uirements"
Tools to special importance during acceptance testing include:
Test coverage !nal*>er _ records the control paths follo&ed for each test case"
Timing !nal*>er _ also called a profiler, reports the time spent in various regions of the
code are areas to concentrate on to improve s*stem performance"
75
Cargo Manager
Coding standards _ static anal*>ers and standard checers are used to inspect code for
deviations from standards and guidelines"
Test Cases:
Test cases are derived to ensure that all statements in the program have 'een
e(ecuted at least once during testing and that all logical conditions have 'een e(ecuted"
7sing 8hite:Bo( testing methods, the soft&are engineer can drive test cases that
Guarantee that logical decisions on their true and false sides"
E(ercise all logical decisions on their true and false sides"
E(ecute all loops at their 'oundaries and &ith in their operational 'ounds"
E(ercise internal data structure to assure their validit*"
The test case specification for s*stem testing has to 'e su'mitted for revie& 'efore
s*stem testing commences"



76
Cargo Manager
77
Cargo Manager
6ome /age
78
Cargo Manager
A.ot Us
79
Cargo Manager
Contact Us
80
Cargo Manager
Register /age
81
Cargo Manager
Login /age
82
Cargo Manager
"earc! (age
83
Cargo Manager
(rice 5in*er
84
Cargo Manager
$anne* (ro*cts
85
Cargo Manager
A*ministrator (age
86
Cargo Manager
Cstomer Detai)s )ist
87
Cargo Manager
Con#irmation Detai)s
88
Cargo Manager
Cance) Re?est)ist
89
Cargo Manager
"tats Re/ort
90
Cargo Manager
5ee*.ac% List
91
Cargo Manager
User Mo*)e
92
Cargo Manager
Cstomer Detai)s
93
Cargo Manager
3n.o@
94
Cargo Manager
"tats
95
Cargo Manager
Cance) t!e Cargo
96
Cargo Manager
5ee*.ac%
97
Cargo Manager
C!ange (ass'or*
98
Cargo Manager
(ass'or* Reco,er8
99
Cargo Manager
Status Re4/rt
100
Cargo Manager
101
Cargo Manager
CONCLUSION2
The pacage &as designed in such a &a* that future modifications can 'e
done easil*" The follo&ing conclusions can 'e deduced from the
development of the pro+ect"
Cargo Manager of the entire s*stem improves the efficienc*"
It provides a friendl* graphical user interface &hich proves to 'e 'etter
&hen compared to the e(isting s*stem"
It gives appropriate access to the authori>ed users depending on their
permissions"
It effectivel* overcomes the dela* in communications"
7pdating of information 'ecomes so easier"
%*stem securit*, data securit* and relia'ilit* are the striing features"
The %*stem has ade-uate scope for modification in future if it is
necessar*"
102
Cargo Manager
103
Cargo Manager

UTURE EN7ANCEMENTS:

This application avoids the manual &or and the pro'lems concern &ith it"
It is an eas* &a* to o'tain the information regarding the various products information
that are present in the %uper marets"
8ell I and m* team mem'ers have &ored hard in order to
present an improved &e'site 'etter than the e(isting one?s regarding the information
a'out the various activities" %till ,&e found out that the pro+ect can 'e done in a 'etter
&a*" 3rimaril*, &hen &e re-uest information a'out a particular product it +ust sho&s the
compan*, product id, product name and no" of -uantities availa'le" %o, after getting the
information &e can get access to the product compan* &e'site +ust '* a clic on the
product name "
The ne(t enhancement that &e can add the searching option"
8e can directl* search to the particular product compan* from this site "These are the
t&o enhancements that &e could thin of at present"
104
Cargo Manager
105
Cargo Manager
BB!O"#$%H&
The follo&ing 'oos &ere referred during the anal*sis and e(ecution phase of
the pro+ect
MICROSOT .NET !IT7 C<
Microsoft "net series
AS, .NET =.> ,ROESSIONAL
8ro( 3u'lishers
AS, .NET !IT7 C< =>>?
!press 3u'lications
C< COO@ BOO@
O reill* 3u'lications
,RO"RAMMIN" MICROSOT AS, .NET =.> A,,LICATION
8ro( 3rofessional Guide
BE"INNIN" AS, .NET =.> E#COMMERCE IN C< =>>?
1ovice to 3rofessional"
!EBSITES:
&&&"google"com
&&&"microsoft"com
106

You might also like