Upload
ramesh-gavva
View
217
Download
0
Embed Size (px)
Citation preview
8/15/2019 Ad agency.doc
1/113
Ad Agency
1
Ad Agency
8/15/2019 Ad agency.doc
2/113
Ad Agency
ABSTRACT
The main aim of this project is to provide advertisement details like
advertisement cost in various channels. Depending upon the budget the various
channels can allot different advertisements. Here the total front end is developed using
Asp.Net and backend is developed using SQ server.
!f an agenc" does not communicate or rela" its client#s goals and
creative $ishes properl" problems can occur. %ost &ull'Service Agencies $ork on a
combination of fee'based and commission based compensation. The fee is paid b" theentit" for $hich the marketing is being done. Ho$ ever an agenc" ma" have better
negotiating po$ers than "our compan" and save "ou more mone" in the long run
an"$a"s. There are far more advantages to having the right advertising agenc" than not
An advertising agency or ad agency is a (service business) dedicated to
creating* planning and handling Advertising +and sometimes other forms of promotion
for its clients. An ad agenc" is independent from the client and provides an outside
point of vie$ to the effort of selling the client,s products or services. An agenc" can
also handle overall marketing and branding strategies and Sales -romotion for its
clients.
Modules:
This project involved mainl" &our modules.
Registration
Administrator
Budget
Budget List
8/15/2019 Ad agency.doc
3/113
Ad Agency
Modules Description:
Registration:
!n this module he/she has to register himself/herself $ith the personal
details and get the ogin id. After getting the login id he/she has to specif" Ad.
0euirements of the kind of Ad he/she has to advertise on behalf of his/her compan"
Administrator:
Administrator should be able to block fraudulent users from using the s"stem.
Admin should be able to add more categories and merge categories.
Normal User:
!n this %odule users can enter into different channels of packages
like short time period or long time. The" can enter into ne$ schemes provided b" ad
agenc". Also the" can upload the videos of their compan" for advertising.
Budget:
Ne$ user#s budget is registered here. The" can 2udget on the advertising ad
$ith the ad agenc" in this module.
Budgets List:
According to budget the advertisements are allotted for specific period.
Here time period the agenc" $ill follo$ up their product is specified.
3
8/15/2019 Ad agency.doc
4/113
Ad Agency
INDE
S! No Contents
"! Introduction
#! Analysis
2.1 System Analysis
2.2 System Specifcation
$! Design Approac%
3.1 Introduction to Design
3.2 UML Diagrams
3.3 Dataow Diagrams
3. !"# Diagrams
&! 'ro(ect Modules
)! Implementation
$.1 %oncepts and &ec'nologies
$.2 &esting
$.2.1&est %ases
*! +utput Screens
,! Conclusion
-! .uture En%ancements
/! Bi0liograp%y
4
8/15/2019 Ad agency.doc
5/113
Ad Agency
5
Introduc
tion
8/15/2019 Ad agency.doc
6/113
Ad Agency
INTR+DUCTI+N
6e don#t sell a 7bo8ed# product. 9ach s"stem $e create for our clients is driven b" their
e8act speci:cations and internal processes. Too often* agencies change their creative
;o$ and processes to :t technolog". 6e believe it should be the other $a" around.
An advertising agency or ad agency is a (service business) dedicated to
creating* planning and handling Advertising +and sometimes other forms of promotion
for its clients. An ad agenc" is independent from the client and provides an outside
point of vie$ to the effort of selling the client,s products or services. An agenc" can
also handle overall marketing and branding strategies and Sales -romotion for its
clients.
!n order to avoid the above problem this project is to provide
advertisement details like advertisement cost in various channels. Depending upon the
budget the various channels can allot different advertisements. Here the total front end
is developed using Asp.Net and backend is developed using Sl server.
8/15/2019 Ad agency.doc
7/113
Ad Agency
=
Analysis
8/15/2019 Ad agency.doc
8/113
Ad Agency
ANAL1SIS
System Analysis:
E2isting System:
!f an agenc" does not communicate or rela" its client#s goals and creative
$ishes properl" problems can occur. %ost &ull'Service Agencies $ork on a
combination of fee'based and commission based compensation. The fee is paid b" the
entit" for $hich the marketing is being done. Ho$ ever an agenc" ma" have better
negotiating po$ers than "our compan" and save "ou more mone" in the long run
an"$a"s. There are far more advantages to having the right advertising agenc" than
not.
'roposed System
!n order to avoid the above problem this project is to provide
advertisement details like advertisement cost in various channels. Depending upon the
budget the various channels can allot different advertisements. Here the total front end
is developed using Asp.Net and backend is developed using SQ server.
+0(ecti3e o4 t%e System:
An advertising agency or ad agency is a (service business) dedicated to
creating* planning and handling Advertising +and sometimes other forms of promotion
for its clients. An ad agenc" is independent from the client and provides an outside
point of vie$ to the effort of selling the client,s products or services. An agenc" can
also handle overall marketing and branding strategies and Sales -romotion for its
clients.
>
8/15/2019 Ad agency.doc
9/113
Ad Agency
System Speci5cations:
6ard7are Re8uirements
• -entium'!? +-rocessor@.
• 5< %2 or 51 %2 0am
• 51 2 Bache %emor"
• Hard disk 1C 2
• %icrosoft Bompatible 1C1 or more e" 2oard
So4t7are Re8uirements
• Web Technologies : ASP.NET 2.0
• Language : C
• !atabase : S"L SE#$E# 200%
• Web Server : &&S
• '(erating Syste) : W&N!'WS *P
E
8/15/2019 Ad agency.doc
10/113
Ad Agency
1C
Design
8/15/2019 Ad agency.doc
11/113
Ad Agency
DESI9N
Introduction:
Design is the first step in the development phase for an"
techniues and principles for the purpose of defining a device* a process or s"stem in
sufficient detail to permit its ph"sical realiFation.
Gnce the soft$are reuirements have been anal"Fed and
specified the soft$are design involves three technical activities ' design* coding*
implementation and testing that are reuired to build and verif" the soft$are.
The design activities are of main importance in this phase*
because in this activit"* decisions ultimatel" affecting the success of the soft$areimplementation and its ease of maintenance are made. These decisions have the final
bearing upon reliabilit" and maintainabilit" of the s"stem. Design is the onl" $a" to
accuratel" translate the customer#s reuirements into finished soft$are or a s"stem.
Design is the place $here ualit" is fostered in
development. Soft$are design is a process through $hich reuirements are translated
into a representation of soft$are. Soft$are design is conducted in t$o steps.
-reliminar" design is concerned $ith the transformation of reuirements into data.
11
8/15/2019 Ad agency.doc
12/113
Ad Agency
UML Diagrams:
Actor: A coherent set of roles that users of use cases pla" $hen interacting $ith the use cases.
Use case:
A description of seuence of actions* including variants* that a
s"stem performs that "ields an observable result of value of an actor.
I% stands for Inified %odeling anguage. I% is a language for specif"ing*
visualiFing 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
project $hich later need to be built. The representation of the entities that are to be used
in the product being developed need to be designed.
There are various kinds of methods in soft$are designJ
The" are as follo$sJ
Ise case Diagram
Seuence Diagram
Bollaboration Diagram
Activit" Diagram
State chat Diagram
1
8/15/2019 Ad agency.doc
13/113
Ad Agency
Use case Diagrams:
Ise case diagrams model behavior $ithin a s"stem and helps the developers
understand of $hat the user reuire. The stick man represents $hat#s called an actor.
Ise case diagram can be useful for getting an overall vie$ of the s"stem and
clarif"ing that can do and more importantl" $hat the" can#t do.
Ise case diagram consists of use cases and actors and sho$s the interaction bet$een
the use case and actors.
The purpose is to sho$ the interactions bet$een the use case and actor.
To represent the s"stem reuirements from user#s perspective.
An actor could be the end'user of the s"stem or an e8ternal s"stem.
13
8/15/2019 Ad agency.doc
14/113
Ad Agency
Use case Diagram
A Ise case is a description of set of seuence of actions. raphicall" it is rendered as
an ellipse $ith solid line including onl" its name. Ise case diagram is a behavioral
diagram that sho$s a set of use cases and actors and their relationship. !t is an
association bet$een the use cases and actors. An actor represents a real'$orld object.
-rimar" Actor K Sender* Secondar" Actor 0eceiver.
14
8/15/2019 Ad agency.doc
15/113
Ad Agency
%aintenan channelsand budget
ogin
Ad Ne$ !nformation
Select Bhanneelsand 2udget
Admin
Iser
Se8uence Diagram
Seuence diagram and collaboration diagram are called !NT90ABT!GN D!A0A%S.
An interaction diagram sho$s an interaction* consisting of set of objects and their
relationship including the messages that ma" be dispatched among them.
A seuence diagram is an introduction that empathiFes the time ordering of messages.
raphicall" a seuence diagram is a table that sho$s objects arranged along the L'a8is
and messages ordered in increasing time along the M'a8is.
15
8/15/2019 Ad agency.doc
16/113
Ad Agency
Admin Iser ogin !nformation Bhannels 2udget -ermission
Bhecking
?ie$
!nformation
Add
!nformation
Select 2udget
Bhecking Select Bhannel
Add Bhannel
Add 2udget
-ermission
Add Bhannel
Acti(ity Diagram
1
8/15/2019 Ad agency.doc
17/113
Ad Agency
0egister
!nformations
Iser Admin
Bhannels 2udgets
ogout
DATA .L+ DIA9RAMS :
1=
8/15/2019 Ad agency.doc
18/113
Ad Agency
The D&D takes an input'process'output vie$ of a s"stem i.e. data objects flo$ into the
soft$are* are transformed b" processing elements* and resultant data objects flo$ out of
the soft$are.
Data objects represented b" labeled arro$s and transformation are represented
b" circles also called as bubbles. D&D is presented in a hierarchical fashion i.e. the first
data flo$ model represents the s"stem as a $hole. Subseuent D&D refine the conte8t
diagram +level C D&D@* providing increasing details $ith each subseuent level.
The D&D enables the soft$are engineer to develop models of the information
domain functional domain at the same time. As the D&D is refined into greater levels
of details* the anal"st performs an implicit functional decomposition of the s"stem. At
the same time* the D&D refinement results in a corresponding refinement of the data as
it moves through the processes that embod" the applications.
A conte8t'level D&D for the s"stem the primar" e8ternal entities produce
information for use b" the s"stem and consume information generated b" the s"stem.
The labeled arro$ represents data objects or object hierarch".
RULES .+R D.D:
1>
8/15/2019 Ad agency.doc
19/113
Ad Agency
• &i8 the scope of the s"stem b" means of conte8t diagrams.
• GrganiFe the D&D so that the main seuence of the actions
• 0eads left to right and top to bottom.
• !dentif" all inputs and outputs.
• !dentif" and label each process internal to the s"stem $ith 0ounded circles.
• A process is reuired for all the data transformation and Transfers. Therefore* never
connect a data store to a data Source or the destinations or another data store $ith just a
Data flo$ arro$.
•
Do not indicate hard$are and ignore control information.
• %ake sure the names of the processes accuratel" conve" ever"thing the process is done.
• There must not be unnamed process.
• !ndicate e8ternal sources and destinations of the data* $ith Suares.
• Number each occurrence of repeated e8ternal entities.
• !dentif" all data flo$s for each process step* e8cept simple 0ecord retrievals.
• abel data flo$ on each arro$.
• Ise details flo$ on each arro$.
• Ise the details flo$ arro$ to indicate data movements.
E;R Diagrams:
1E
8/15/2019 Ad agency.doc
20/113
Ad Agency
The 9ntit"'0elationship +90@ model $as originall" proposed b" -eter in 1E=<
OBhen=
8/15/2019 Ad agency.doc
21/113
Ad Agency
The basic t"pes of connectivit" for relations areJ one'to'one* one'to'man"* and man"'
to'man". A one-to-one +1J1@ relationship is $hen at most one instance of a entit" A is
associated $ith one instance of entit" 2. &or e8ample* emplo"ees in the compan" are
each assigned their o$n office. &or each emplo"ee there e8ists a uniue office and for
each office there e8ists a uniue emplo"ee.
A one-to-many +1JN@ relationships is $hen for one instance of entit" A* there are Fero*
one* or man" instances of entit" 2* but for one instance of entit" 2* there is onl" one
instance of entit" A. An e8ample of a 1JN relationships is
a department has man" emplo"ees
9ach emplo"ee is assigned to one department
A many-to-many +%JN@ relationship* sometimes called non'specific* is $hen for one
instance of entit" A* there are Fero* one* or man" instances of entit" 2 and for one
instance of entit" 2 there are Fero* one* or man" instances of entit" A. The connectivit"
of a relationship describes the mapping of associated
ER Notation
1
8/15/2019 Ad agency.doc
22/113
Ad Agency
There is no standard for representing data objects in 90 diagrams. 9ach
modeling methodolog" uses its o$n notation. The original notation used b" Bhen is
$idel" used in academics te8ts and journals but rarel" seen in either BAS9 tools or
publications b" non'academics. Toda"* there are a number of notations usedR among the
more common are 2achman* cro$,s foot* and !D9&!L.
All notational st"les represent entities as rectangular bo8es and relationships as
lines connecting bo8es. 9ach st"le uses a special set of s"mbols to represent the
cardinalit" of a connection. The notation used in this document is from %artin. The
s"mbols used for the basic 90 constructs areJ
• Entities are represented b" labeled rectangles. The label is the name of the entit". 9ntit"
names should be singular nouns.
• #elationshi(s are represented b" a solid line connecting t$o entities. The name of the
relationship is $ritten above the line. 0elationship names should be verbs
• Attributes* $hen included* are listed inside the entit" rectangle. Attributes $hich are
identifiers are underlined. Attribute names should be singular nouns.
• Cardinality of man" is represented b" a line ending in a cro$,s foot. !f the cro$,s foot is
omitted* the cardinalit" is one.
• E+istence is represented b" placing a circle or a perpendicular bar on the line. %andator"
e8istence is sho$n b" the bar +looks like a 1@ ne8t to the entit" for an instance is reuired.
Gptional e8istence is sho$n b" placing a circle ne8t to the entit" that is optional
8/15/2019 Ad agency.doc
23/113
Ad Agency
'R+
8/15/2019 Ad agency.doc
24/113
Ad Agency
• Administrator• Registration• Budget• Budget List
M+DULE DESCRI'TI+N
Name o4 t%e module = ": Ad)inistrator
Description:
Administrator should be able to block fraudulent users from using the s"stem.
Admin should be able to add more channels and timing#s.
Su0 modules:
Login page
%'ange password
Isers Ads
Bhannel Timings
Iser Details
?ie$ ?ideos
Registration 'age:
!n this sub module $e add the details of the user like user name* contact no*
email id* pass$ord and report b" taking the primar" constraint user id. And it also addsthese details in database.
Login 'age:
!n this sub module the user gives his login and pass$ord to enter. !f he is valid
he enters into resume $iFard. !f he is not valid he it $ants valid.
4
http://localhost:1452/Ad%20Agency/adlistnusers.aspxhttp://localhost:1452/Ad%20Agency/channlestimings.aspxhttp://localhost:1452/Ad%20Agency/User%20Details.aspxhttp://localhost:1452/Ad%20Agency/viewvideo.aspxhttp://localhost:1452/Ad%20Agency/adlistnusers.aspxhttp://localhost:1452/Ad%20Agency/channlestimings.aspxhttp://localhost:1452/Ad%20Agency/User%20Details.aspxhttp://localhost:1452/Ad%20Agency/viewvideo.aspx
8/15/2019 Ad agency.doc
25/113
Ad Agency
.orgot 'ass7ord:
!f the user forgot his pass$ord* he enter into forget pass$ord page there b"
giving details he get his pass$ord.
C%ange 'ass7ord:
!f the user $ants to change his pass$ord he can change his pass$ord b"
giving some details
Users > Ads
Admin has the rights to see users and their ad#s and has a right to accept or
reject it.
C%annel Timings
He see the timing that user had reuested to sho$ his ad according to the
channel.
User Details
He can check the user details if he $ant.
?ie7 ?ideos
He can do$nload and vie$ the video#s that user added to sho$ in channel
Name o4 t%e module ;#: User
Description:
6hen the user login t"pe#s of ads appear he can choose this t"pe. Then he gets
ne$ ad information form. He fills that form and chooses the budget and timing#s
5
http://localhost:1452/Ad%20Agency/adlistnusers.aspxhttp://localhost:1452/Ad%20Agency/channlestimings.aspxhttp://localhost:1452/Ad%20Agency/User%20Details.aspxhttp://localhost:1452/Ad%20Agency/viewvideo.aspxhttp://localhost:1452/Ad%20Agency/adlistnusers.aspxhttp://localhost:1452/Ad%20Agency/channlestimings.aspxhttp://localhost:1452/Ad%20Agency/User%20Details.aspxhttp://localhost:1452/Ad%20Agency/viewvideo.aspx
8/15/2019 Ad agency.doc
26/113
Ad Agency
Su0 modules:
Slides
Animation
)ideo*s
Name o4 t%e module ;$: ,-!ET
Description:
Ne$ user#s budget is registered here. The" can 2udget on the advertising ad
$ith the ad agenc" in this module.
Name o4 t%e module ;&: ,udget List
Description:
According to budget the advertisements are allotted for specific period.Here
time period the agenc" $ill follo$ up their product is specified
8/15/2019 Ad agency.doc
27/113
Ad Agency
=
Implementation
8/15/2019 Ad agency.doc
28/113
Ad Agency
>
8/15/2019 Ad agency.doc
29/113
Ad Agency
E
Concepts and
Tec%ni8ues
8/15/2019 Ad agency.doc
30/113
Ad Agency
Overview of Technologies Used
$!" .ront End Tec%nology
Microso4t !NET .rame7or@
The .N9T &rame$ork is a ne$ computing platform that simplifies application
development in the highl" distributed environment of the !nternet. The .N9T
&rame$ork is designed to fulfill the follo$ing objectivesJ
• To provide a consistent object'oriented programming environment $hether object
code is stored and e8ecuted locall"* e8ecuted locall" but !nternet'distributed* or
e8ecuted remotel".
• To provide a code'e8ecution environment that minimiFes soft$are deplo"ment and
versioning conflicts.
• To provide a code'e8ecution environment that guarantees safe e8ecution of code*
including code created b" an unkno$n or semi'trusted third part".
• To provide a code'e8ecution environment that eliminates the performance problems
of scripted or interpreted environments.
• To make the developer e8perience consistent across $idel" var"ing t"pes of
applications* such as 6indo$s'based applications and 6eb'based applications.
• To build all communication on industr" standards to ensure that code based on the
.N9T &rame$ork can integrate $ith an" other code.
The .N9T &rame$ork has t$o main componentsJ the common language runtime and
the .N9T &rame$ork class librar". The common language runtime is the foundation of
the .N9T &rame$ork. Mou can think of the runtime as an agent that manages code at
e8ecution 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 robustness. !n fact* the concept of code
management is a fundamental principle of the runtime. Bode that targets the runtime is
kno$n as managed code* $hile code that does not target the runtime is kno$n as
unmanaged code.
3C
8/15/2019 Ad agency.doc
31/113
Ad Agency
The class librar"* the other main component of the .N9T &rame$ork* is a
comprehensive* object'oriented collection of reusable t"pes that "ou can use to develop
applications ranging from traditional command'line or graphical user interface +I!@
applications to applications based on the latest innovations provided b" AS-.N9T* such
as 6eb &orms and L% 6eb services.
The .N9T &rame$ork can be hosted b" unmanaged components that load the common
language runtime into their processes and initiate the e8ecution of managed code*
thereb" creating a soft$are environment that can e8ploit both managed and unmanaged
features. The .N9T &rame$ork not onl" provides several runtime hosts* but also
supports the development of third'part" runtime hosts.
&or e8ample* AS-.N9T hosts the runtime to provide a scalable* server'side environment
for managed code. AS-.N9T $orks directl" $ith the runtime to enable 6eb &orms
applications and L% 6eb services* both of $hich are discussed later in this topic.
!nternet 98plorer is an e8ample of an unmanaged application that hosts the runtime +in
the form of a %!%9 t"pe e8tension@. Ising !nternet 98plorer to host the runtime
enables "ou to embed managed components or 6indo$s &orms controls in HT%
documents. Hosting the runtime in this $a" makes managed mobile code +similar to
%icrosoft ActiveL controls@ possible* but $ith significant improvements that onl"
managed code can offer* such as semi'trusted e8ecution and secure isolated file storage.
The follo$ing illustration sho$s the relationship of the common language runtime and
the class librar" to "our applications and to the overall s"stem. The illustration also
sho$s ho$ managed code operates $ithin a larger architecture.
31
8/15/2019 Ad agency.doc
32/113
Ad Agency
.eatures o4 t%e Common Language Runtime
The common language runtime manages memor"* thread e8ecution* code e8ecution*
code safet" verification* compilation* and other s"stem services. These features are
intrinsic to the managed code that runs on the common language runtime.
6ith regards to securit"* managed components are a$arded var"ing degrees of trust*
depending on a number of factors that include their origin +such as the !nternet*
enterprise net$ork* or local computer@. This means that a managed component might or
might not be able to perform file'access operations* registr"'access operations* or other
sensitive functions* even if it is being used in the same active application.
The runtime enforces code access securit". &or e8ample* users can trust that an
e8ecutable embedded in a 6eb page can pla" an animation on screen or sing a song*
but cannot access their personal data* file s"stem* or net$ork. The securit" features of
the runtime thus enable legitimate !nternet'deplo"ed soft$are to be e8ceptionall"
featuring rich.
The runtime also enforces code robustness b" implementing a strict t"pe' and code'
verification infrastructure called the common t"pe s"stem +BTS@. The BTS ensures thatall managed code is self'describing. The various %icrosoft and third'part" language
compilers generate managed code that conforms to the BTS. This means that managed
code can consume other managed t"pes and instances* $hile strictl" enforcing t"pe
fidelit" and t"pe safet".
!n addition* the managed environment of the runtime eliminates man" common
soft$are issues. &or e8ample* the runtime automaticall" handles object la"out andmanages references to objects* releasing them $hen the" are no longer being used. This
automatic memor" management resolves the t$o most common application errors*
memor" leaks and invalid memor" references.
3
8/15/2019 Ad agency.doc
33/113
Ad Agency
The runtime also accelerates developer productivit". &or e8ample* programmers can
$rite applications in their development language of choice* "et take full advantage of
the runtime* the class librar"* and components $ritten in other languages b" other
developers. An" compiler vendor $ho chooses to target the runtime can do so.
anguage compilers that target the .N9T &rame$ork make the features of the .N9T
&rame$ork available to e8isting code $ritten in that language* greatl" easing the
migration process for e8isting applications.
6hile the runtime is designed for the soft$are of the future* it also supports soft$are of
toda" and "esterda". !nteroperabilit" bet$een managed and unmanaged code enables
developers to continue to use necessar" BG% components and Ds.
The runtime is designed to enhance performance. Although the common language
runtime provides man" standard runtime services* managed code is never interpreted. A
feature called just'in'time +!T@ compiling enables all managed code to run in the native
machine language of the s"stem on $hich it is e8ecuting. %ean$hile* the memor"
manager removes the possibilities of fragmented memor" and increases memor"
localit"'of'reference to further increase performance.
&inall"* the runtime can be hosted b" high'performance* server'side applications* such
as %icrosoft SQ ServerU and !nternet !nformation Services +!!S@. This
infrastructure enables "ou to use managed code to $rite "our business logic* $hile still
enjo"ing the superior performance of the industr",s best enterprise servers that support
runtime hosting.
33
8/15/2019 Ad agency.doc
34/113
Ad Agency
!NET .rame7or@ Class Li0rary
The .N9T &rame$ork class librar" is a collection of reusable t"pes that tightl" integrate
$ith the common language runtime. The class librar" is object oriented* providing
t"pes from $hich "our o$n managed code can derive functionalit". This not onl"
makes the .N9T &rame$ork t"pes eas" to use* but also reduces the time associated $ith
learning ne$ features of the .N9T &rame$ork. !n addition* third'part" components can
integrate seamlessl" $ith classes in the .N9T &rame$ork.
&or e8ample* the .N9T &rame$ork collection classes implement a set of interfaces that
"ou can use to develop "our o$n collection classes. Mour collection classes $ill blend
seamlessl" $ith the classes in the .N9T &rame$ork.
As "ou $ould e8pect from an object'oriented class librar"* the .N9T &rame$ork t"pes
enable "ou to accomplish a range of common programming tasks* including tasks such
as string management* data collection* database connectivit"* and file access. !n
addition to these common tasks* the class librar" includes t"pes that support a variet" of
specialiFed development scenarios. &or e8ample* "ou can use the .N9T &rame$ork to
develop the follo$ing t"pes of applications and servicesJ
• Bonsole applications.
• Scripted or hosted applications.
• 6indo$s I! applications +6indo$s &orms@.
• AS-.N9T applications.
• L% 6eb services.
• 6indo$s services.
&or e8ample* the 6indo$s &orms classes are a comprehensive set of reusable t"pes that
vastl" simplif" 6indo$s I! development. !f "ou $rite an AS-.N9T 6eb &orm
application* "ou can use the 6eb &orms classes.
34
8/15/2019 Ad agency.doc
35/113
Ad Agency
Client Application De3elopmentBlient applications are the closest to a traditional st"le of application in 6indo$s'based
programming. These are the t"pes of applications that displa" $indo$s or forms on the
desktop* enabling a user to perform a task. Blient applications include applications such
as
6ord processors and spreadsheets* as $ell as custom business applications such as
data'entr" tools* reporting tools* and so on. Blient applications usuall" emplo"
$indo$s* menus* buttons* and other I! elements* and the" likel" access local
resources such as the file s"stem and peripherals such as printers.
Another kind of client application is the traditional ActiveL control +no$ replaced b"
the managed 6indo$s &orms control@ deplo"ed over the !nternet as a 6eb page. This
application is much like other client applicationsJ it is e8ecuted nativel"* has access to
local resources* and includes graphical elements.
!n the past* developers created such applications using B/BVV in conjunction $ith the
%icrosoft &oundation Blasses +%&B@ or $ith a rapid application development +0AD@
environment such as %icrosoft ?isual 2asic. The .N9T &rame$ork incorporates
aspects of these e8isting products into a single* consistent development environment
that drasticall" simplifies the development of client applications. The 6indo$s &orms
classes contained in the .N9T &rame$ork are designed to be used for I!
development. Mou can easil" create command $indo$s* buttons* menus* toolbars* and
other screen elements $ith the fle8ibilit" necessar" to accommodate shifting business
needs.
&or e8ample* the .N9T &rame$ork provides simple properties to adjust visual attributes
associated $ith forms. !n some cases the underl"ing operating s"stem does not support
changing these attributes directl"* and in these cases the .N9T &rame$ork
automaticall" recreates the forms.
35
8/15/2019 Ad agency.doc
36/113
Ad Agency
This is one of man" $a"s in $hich the .N9T &rame$ork integrates the developer
interface* making coding simpler and more consistent.
Inlike ActiveL controls* 6indo$s &orms controls have semi'trusted access to a user,s
computer. This means that binar" or nativel" e8ecuting code can access some of the
resources on the user,s s"stem +such as I! elements and limited file access@ $ithout
being able to access or compromise other resources. 2ecause of code access securit"*
man" applications that once needed to be installed on a user,s s"stem can no$ be safel"
deplo"ed through the 6eb. Mour applications can implement the features of a local
application $hile being deplo"ed like a 6eb page.
Ser3er Application De3elopment
Server'side applications in the managed $orld are implemented through runtime hosts.
Inmanaged applications host the common language runtime* $hich allo$s "our
custom managed code to control the behavior of the server. This model provides "ou
$ith all the features of the common language runtime and class librar" $hile gaining
the performance and scalabilit" of the host server.
The follo$ing illustration sho$s a basic net$ork schema $ith managed code running
in different server environments. Servers such as !!S and SQ Server can perform
standard operations $hile "our application logic e8ecutes through the managed code.
Ser3er;side managed code
AS-.N9T is the hosting environment that enables developers to use the .N9T
&rame$ork to target 6eb'based applications. Ho$ever* AS-.N9T is more than just a
runtime hostR it is a complete architecture for developing 6eb sites and !nternet'
distributed objects using managed code. 2oth 6eb &orms and L% 6eb services use
!!S and AS-.N9T as the publishing mechanism for applications* and both have a
collection of supporting classes in the .N9T &rame$ork.
3
8/15/2019 Ad agency.doc
37/113
Ad Agency
L% 6eb services* an important evolution in 6eb'based technolog"* are distributed*
server'side application components similar to common 6eb sites. Ho$ever* unlike
6eb'based applications* L% 6eb services components have no I! and are not
targeted for bro$sers such as !nternet 98plorer and Netscape Navigator. !nstead* L%
6eb services consist of reusable soft$are components designed to be consumed b"
other applications* such as traditional client applications* 6eb'based applications* or
even other L% 6eb services. As a result* L% 6eb services technolog" is rapidl"
moving application development and deplo"ment into the highl" distributed
environment of the !nternet.
!f "ou have used earlier versions of AS- technolog"* "ou $ill immediatel" notice the
improvements that AS-.N9T and 6eb &orms offers. &or e8ample* "ou can develop
6eb &orms pages in an" language that supports the .N9T &rame$ork. !n addition* "our
code no longer needs to share the same file $ith "our HTT- te8t +although it can
continue to do so if "ou prefer@. 6eb &orms pages e8ecute in native machine language
because* like an" other managed application* the" take full advantage of the runtime. !n
contrast* unmanaged AS- pages are al$a"s scripted and interpreted. AS-.N9T pages
are faster* more functional* and easier to develop than unmanaged AS- pages because
the" interact $ith the runtime like an" managed application.
The .N9T &rame$ork also provides a collection of classes and tools to aid in
development and consumption of L% 6eb services applications. L% 6eb services
are built on standards such as SGA- +a remote procedure'call protocol@* L% +an
e8tensible data format@* and 6SD +the 6eb Services Description anguage@. The
.N9T &rame$ork is built on these standards to promote interoperabilit" $ith non'
%icrosoft solutions.
&or e8ample* the 6eb Services Description anguage tool included $ith the .N9T
&rame$ork SD can uer" an L% 6eb service published on the 6eb* parse its
6SD description* and produce BW or ?isual 2asic source code that "our application
can use to become a client of the L% 6eb service.
3=
8/15/2019 Ad agency.doc
38/113
Ad Agency
The source code can create classes derived from classes in the class librar" that handle
all the underl"ing communication using SGA- and L% parsing. Although "ou can
use the class librar" to consume L% 6eb services directl"* the 6eb Services
Description anguage tool and the other tools contained in the SD facilitate "our
development efforts $ith the .N9T &rame$ork.
!f "ou develop and publish "our o$n L% 6eb service* the .N9T &rame$ork provides
a set of classes that conform to all the underl"ing communication standards* such as
SGA-* 6SD* and L%. Ising those classes enables "ou to focus on the logic of "our
service* $ithout concerning "ourself $ith the communications infrastructure reuired
b" distributed soft$are development.
&inall"* like 6eb &orms pages in the managed environment* "our L% 6eb service
$ill run $ith the speed of native machine language using the scalable communication
of !!S.
Acti3e Ser3er 'ages!NET
AS-.N9T is a programming frame$ork built on the common language runtime that can be used on a server to build po$erful 6eb applications. AS-.N9T offers several
important advantages over previous 6eb development modelsJ
• !n'anced +er,ormance- AS-.N9T is compiled common language runtime
code running on the server. Inlike its interpreted predecessors* AS-.N9T can take
advantage of earl" binding* just'in'time compilation* native optimiFation* and caching
services right out of the bo8. This amounts to dramaticall" better performance before
"ou ever $rite a line of code.
• orld"%lass &ool Support. The AS-.N9T frame$ork is complemented b" a
rich toolbo8 and designer in the ?isual Studio integrated development environment.
6MS!6M editing* drag'and'drop server controls* and automatic deplo"ment are
just a fe$ of the features this po$erful tool provides.
3>
8/15/2019 Ad agency.doc
39/113
Ad Agency
• +ower and /le0iility- 2ecause AS-.N9T is based on the common language
runtime* the po$er and fle8ibilit" of that entire platform is available to 6eb
application developers. The .N9T &rame$ork class librar"* %essaging* and Data
Access solutions are all seamlessl" accessible from the 6eb. AS-.N9T is alsolanguage'independent* so "ou can choose the language that best applies to "our
application or partition "our application across man" languages. &urther* common
language runtime interoperabilit" guarantees that "our e8isting investment in BG%'
based development is preserved $hen migrating to AS-.N9T.
• Simplicity. AS-.N9T makes it eas" to perform common tasks* from simple form
submission and client authentication to deplo"ment and site configuration. &or
e8ample* the AS-.N9T page frame$ork allo$s "ou to build user interfaces thatcleanl" separate application logic from presentation code and to handle events in a
simple* ?isual 2asic ' like forms processing model. Additionall"* the common
language runtime simplifies development* $ith managed code services such as
automatic reference counting and garbage collection.
• Manageaility. AS-.N9T emplo"s a te8t'based* hierarchical configuration
s"stem* $hich simplifies appl"ing settings to "our server environment and 6eb
applications. 2ecause configuration information is stored as plain te8t* ne$ settings
ma" be applied $ithout the aid of local administration tools. This Fero local
administration philosoph" e8tends to deplo"ing AS-.N9T &rame$ork applications as
$ell. An AS-.N9T &rame$ork application is deplo"ed to a server simpl" b" cop"ing
the necessar" files to the server. No server restart is reuired* even to deplo" or
replace running compiled code.
• Scalaility and A(ailaility. AS-.N9T has been designed $ith scalabilit" in
mind* $ith features specificall" tailored to improve performance in clustered and
multiprocessor environments. &urther* processes are closel" monitored and managed
b" the AS-.N9T runtime* so that if one misbehaves +leaks* deadlocks@* a ne$ process
can be created in its place* $hich helps keep "our application constantl" available to
handle reuests.
•
3E
8/15/2019 Ad agency.doc
40/113
Ad Agency
• %ustomiaility and !0tensiility. AS-.N9T delivers a $ell'factored
architecture that allo$s developers to plug'in their code at the appropriate level. !n
fact* it is possible to e8tend or replace an" subcomponent of the AS-.N9T runtime
$ith "our o$n custom'$ritten component. !mplementing custom authentication or state services has never been easier.
• Security. 6ith built in 6indo$s authentication and per'application configuration*
"ou can be assured that "our applications are secure.
Language Support
The %icrosoft .N9T -latform currentl" offers built'in support for three languagesJ BW*
?isual 2asic* and Script.
%at is AS'!NET e0 .orms
The AS-.N9T 6eb &orms page frame$ork is a scalable common language
runtime programming model that can be used on the server to d"namicall" generate
6eb pages.
!ntended as a logical evolution of AS- +AS-.N9T provides s"nta8
compatibilit" $ith e8isting pages@* the AS-.N9T 6eb &orms frame$ork has been
specificall" designed to address a number of ke" deficiencies in the previous model.
!n particular* it providesJ
• The abilit" to create and use reusable I! controls that can encapsulate common
functionalit" and thus reduce the amount of code that a page developer has to $rite.
•The abilit" for developers to cleanl" structure their page logic in an orderl" fashion
+not spaghetti code@.
• The abilit" for development tools to provide strong 6MS!6M design support for
pages +e8isting AS- code is opaue to tools@.
4C
8/15/2019 Ad agency.doc
41/113
Ad Agency
AS-.N9T 6eb &orms pages are te8t files $ith an .asp8 file name e8tension. The" can
be deplo"ed throughout an !!S virtual root director" tree. 6hen a bro$ser client
reuests .asp8 resources* the AS-.N9T runtime parses and compiles the target file into a
.N9T &rame$ork class. This class can then be used to d"namicall" process incoming
reuests. +Note that the .asp8 file is compiled onl" the first time it is accessedR the
compiled t"pe instance is then reused across multiple reuests@.
An AS-.N9T page can be created simpl" b" taking an e8isting HT% file and
changing its file name e8tension to .asp8 +no modification of code is reuired@. &or
e8ample* the follo$ing sample demonstrates a simple HT% page that collects a user,s
name and categor" preference and then performs a form post back to the originating
page $hen a button is clickedJ
AS-.N9T provides s"nta8 compatibilit" $ith e8isting AS- pages. This includes support
for XY YZ code render blocks that can be intermi8ed $ith HT% content $ithin an
.asp8 file. These code blocks e8ecute in a top'do$n manner at page render time.
Code/,ehind Web or)s
AS-.N9T 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 .asp8 file. An alternative approach''kno$n as the code'behind method''enables the
page code to be more cleanl" separated from the HT% content into an entirel" separate file.
Introduction to AS'!NET Ser3er Controls
!n addition to +or instead of@ using XY YZ code blocks to program d"namic content*AS-.N9T page developers can use AS-.N9T server controls to program 6eb pages.
Server controls are declared $ithin an .asp8 file using custom tags or intrinsic HT%
tags that contain a runat1server attributes value. !ntrinsic HT% tags are handled
b" one of the controls in the Syste).Web.-&.3t)lControls namespace.
41
8/15/2019 Ad agency.doc
42/113
Ad Agency
An" tag that doesn,t e8plicitl" map to one of the controls is assigned the t"pe of
Syste).Web.-&.3t)lControls.3t)lenericControl . Server controls automaticall"
maintain an" client'entered values bet$een round trips to the server. This control state
is not stored on the server +it is instead stored $ithin an 4in(ut ty(e1hidden5 form
field that is round'tripped bet$een reuests@. Note also that no client'side script is
reuired.
!n addition to supporting standard HT% input controls* AS-.N9T enables developers
to utiliFe richer custom controls on their pages. &or e8ample* the follo$ing sample
demonstrates ho$ the 4as(:adrotator5 control can be used to d"namicall" displa"
rotating ads on a page.
• AS-.N9T 6eb &orms provide an eas" and po$erful $a" to build d"namic 6eb I!.
• AS-.N9T 6eb &orms pages can target an" bro$ser client +there are no script librar"
or cookie reuirements@.
• AS-.N9T 6eb &orms pages provide s"nta8 compatibilit" $ith e8isting AS- pages.
• AS-.N9T server controls provide an eas" $a" to encapsulate common functionalit".
• AS-.N9T ships $ith 45 built'in server controls. Developers can also use controls built
b" third parties.
• AS-.N9T server controls can automaticall" project both up level and do$n level
HT%.
• AS-.N9T templates provide an eas" $a" to customiFe the look and feel of list server
controls.
• AS-.N9T validation controls provide an eas" $a" to do declarative client or server
data validation.
Crystal Reports
4
8/15/2019 Ad agency.doc
43/113
Ad Agency
Br"stal 0eports for ?isual 2asic .N9T is the standard reporting tool for ?isual
2asic.N9TR it brings the abilit" to create interactive* presentation'ualit" content [
$hich has been the strength of Br"stal 0eports for "ears [ to the .N9T platform.
6ith Br"stal 0eports for ?isual 2asic.N9T* "ou can host reports on 6eb and 6indo$s
platforms and publish Br"stal reports as 0eport 6eb Services on a 6eb server.
To present data to users* "ou could $rite code to loop through record sets and print
them inside "our 6indo$s or 6eb application. Ho$ever* an" $ork be"ond basic
formatting can be complicatedJ consolidations* multiple level totals* charting* and
conditional formatting are difficult to program.
6ith Br"stal 0eports for ?isual Studio .N9T* "ou can uickl" create comple8 and
professional'looking reports. !nstead of coding* "ou use the Br"stal 0eport Designer
interface to create and format the report "ou need. The po$erful 0eport 9ngine
processes the formatting* grouping* and charting criteria "ou specif".
Report E2perts
Ising the Br"stal 0eport 98perts* "ou can uickl" create reports based on "our development needsJ
• Bhoose from report la"out options ranging from standard reports to form letters* or
build "our o$n report from scratch.
• Displa" charts that users can drill do$n on to vie$ detailed report data.
• Balculate summaries* subtotals* and percentages on grouped data.
•
Sho$ TopN or 2ottomN results of data.• Bonditionall" format te8t and rotate te8t objects.
BAC END TEC6N+L+91:
43
8/15/2019 Ad agency.doc
44/113
Ad Agency
A0out Microso4t SL Ser3er #
%icrosoft SQ Server is a Structured Quer" anguage +SQ@ based* client/server
relational database. 9ach of these terms describes a fundamental part of the architecture
of SQ Server.
Data0ase
A database is similar to a data file in that it is a storage place for data. ike a data file* a
database does not present information directl" to a userR the user runs an application
that accesses data from the database and presents it to the user in an understandable
format.
A database t"picall" has t$o componentsJ the files holding the ph"sical database and
the database management s"stem +D2%S@ soft$are that applications use to access data.
The D2%S is responsible for enforcing the database structure* includingJ
• %aintaining the relationships bet$een data in the database.
• 9nsuring that data is stored correctl" and that the rules defining data relationships are
not violated.
• 0ecovering all data to a point of kno$n consistenc" in case of s"stem failures.
Relational Data0ase
There are different $a"s to organiFe data in a database but relational databases are one
of the most effective. 0elational database s"stems are an application of mathematical
set theor" to the problem of effectivel" organiFing data. !n a relational database* data iscollected into tables +called relations in relational theor"@.
44
8/15/2019 Ad agency.doc
45/113
Ad Agency
6hen organiFing data into tables* "ou can usuall" find man" different $a"s to define
tables. 0elational database theor" defines a process* normaliFation* $hich ensures that
the set of tables "ou define $ill organiFe "our data effectivel".
ClientSer3er:;
!n a client/server s"stem* the server is a relativel" large computer in a central location
that manages a resource used b" man" people. 6hen individuals need to use the
resource* the" connect over the net$ork from their computers* or clients* to the server.
98amples of servers areJ !n client/server database architecture* the database files and
D2%S soft$are reside on a server. A communications component is provided so
applications can run on separate clients and communicate to the database server over a
net$ork. The SQ Server communication component also allo$s communication
bet$een an application running on the server and SQ Server.
Server applications are usuall" capable of $orking $ith several clients at the same
time. SQ Server can $ork $ith thousands of client applications simultaneousl". The
server has features to prevent the logical problems that occur if a user tries to read or
modif" data currentl" being used b" others.
6hile SQ Server is designed to $ork as a server in a client/server net$ork* it is also
capable of $orking as a stand'alone database directl" on the client. The scalabilit" and
ease'of'use features of SQ Server allo$ it to $ork efficientl" on a client $ithout
consuming too man" resources.
45
8/15/2019 Ad agency.doc
46/113
Ad Agency
Structured uery Language FSLG
To $ork $ith data in a database* "ou must use a set of commands and statements
+language@ defined b" the D2%S soft$are. There are several different languages that
can be used $ith relational databasesR the most common is SQ. 2oth the American
National Standards !nstitute +ANS!@ and the !nternational Standards GrganiFation +!SG@
have defined standards for SQ. %ost modern D2%S products support the 9ntr" evel
of SQ'E* the latest SQ standard +published in 1EE@.
SL Ser3er .eatures
%icrosoft SQ Server supports a set of features that result in the follo$ing benefitsJ
Ease o4 installationH deploymentH and use
SQ Server includes a set of administrative and development tools that improve "our
abilit" to install* deplo"* manage* and use SQ Server across several sites.
Scalaility
The same database engine can be used across platforms ranging from laptop computers
running %icrosoft 6indo$s E5/E> to large* multiprocessor servers running %icrosoft
6indo$s NT* 9nterprise 9dition.
Data ware'ousing
SQ Server includes tools for e8tracting and anal"Fing summar" data for online
anal"tical processing +GA-@. SQ Server also includes tools for visuall" designingdatabases and anal"Fing data using 9nglish'based uestions.
System integration wit' ot'er ser(er so,tware
SQ Server integrates $ith e'mail* the !nternet* and 6indo$s.
4
8/15/2019 Ad agency.doc
47/113
Ad Agency
Data0ases
A database in %icrosoft SQ Server consists of a collection of tables that contain data*
and other objects* such as vie$s* inde8es* stored procedures* and triggers* defined to
support activities performed $ith the data. The data stored in a database is usuall"
related to a particular subject or process* such as inventor" information for a
manufacturing $arehouse.
SQ Server can support man" databases* and each database can store either interrelated
data or data unrelated to that in the other databases. &or e8ample* a server can have one
database that stores personnel data and another that stores product'related data.
Alternativel"* one database can store current customer order data* and anotherR related
database can store historical customer orders that are used for "earl" reporting. 2efore
"ou create a database* it is !mportant to understand the parts of a database and ho$ to
design these parts to ensure that the database performs $ell after it is implemented.
Normaliation t%eory:
0elations are to be normaliFed to avoid anomalies. !n insert* update and delete
operations. NormaliFation theor" is built around the concept of normal forms. A
relation is said to be in a particular form if it satisfies a certain specified set if
constraints. To decide a suitable logical structure for given database design the concept
of normaliFation* $hich are briefl" described belo$.
1. 1 st Normal &orm +1 N.&@J A relation is said to be in 1 N& 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.
. nd Normal &orm + N.&@ J A relation is said to be in N& is and onl" if it is
in 1 N& and ever" non ke" attribute is full" dependent on primar" ke". This
normal takes care of functional dependencies on non'ke" attributes.
4=
8/15/2019 Ad agency.doc
48/113
Ad Agency
3. 3 rd Normal &orm +3 N.&@ J A relation is said to be in 3 N& is and onl" if it is
in N& and ever" non ke" attribute is non transitivel" dependent on the
primar" ke". This normal form avoids the transitive dependencies on the
primar" ke".
4. 2o"ce code Normal &orm +2BN&@ J This is a stronger definition than that of
N&. A relation is said to be in 2BN& if and onl" if ever" determinant is a
Bandidate ke".
5. 4 th Normal &orm +4 N&@ J A relation is said to be in 4 N& if and onl" if
$henever there e8ists a multi valued dependenc" in a relation sa" A'Z'Z2
then all of the relation are also functionall" dependent on A+i.e. A'ZL for all
attributes 8 of the relation.@.
8/15/2019 Ad agency.doc
49/113
Ad Agency
Mou can think of the Dataset as an al$a"s disconnected record set that kno$s nothing
about the source or destination of the data it contains. !nside a Dataset* much like in a
database* there are tables* columns* relationships* constraints* vie$s* and so forth.
A Data Adapter is the object that connects to the database to fill the Dataset. Then* it
connects back to the database to update the data there* based on operations performed
$hile the Dataset held the data. !n the past* data processing has been primaril"
connection'based. No$* in an effort to make multi'tiered apps more efficient* data
processing is turning to a message'based approach that revolves around chunks of
information. At the center of this approach is the Data Adapter* $hich provides a bridge
to retrieve and save data bet$een a Dataset and its source data store. !t accomplishes
this b" means of reuests to the appropriate SQ commands made against the data
store.
The L%'based Dataset object provides a consistent programming model that $orks
$ith all models of data storageJ flat* relational* and hierarchical. !t does this b" having
no ,kno$ledge, of the source of its data* and b" representing the data that it holds as
collections and data t"pes. No matter $hat the source of the data $ithin the Dataset is*
it is manipulated through the same set of standard A-!s e8posed through the Dataset
and its subordinate objects.
6hile the Dataset has no kno$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 Dataset to and from data stores. The G9 D2 and SQ Server .N9T
Data -roviders +S"stem.Data.GleDb and S"stem.Data.SlBlient@ that are part of the
.Net &rame$ork provide four basic objectsJ the Bommand* Bonnection* Data 0eader
and Data Adapter. !n the remaining sections of this document* $e,ll $alk through each
part of the Dataset and the G9 D2/SQ Server .N9T Data -roviders e8plaining $hat
the" are* and ho$ to program against them. The follo$ing sections $ill introduce "ou
to some objects that have evolved* and some that are ne$. These objects areJ
4E
8/15/2019 Ad agency.doc
50/113
Ad Agency
• Bonnections. &or connection to and managing transactions against a database.
• Bommands. &or issuing SQ commands against a database.
• Data 0eaders. &or reading a for$ard'onl" stream of data records from a SQ
Server data source.
• Datasets. &or storing* removing and programming against flat data* L% data and
relational data.
• Data Adapters. &or pushing data into a Dataset* and reconciling data against a
database.
6hen dealing $ith connections to a database* there are t$o different optionsJ SQ
Server .N9T Data -rovider +S"stem.Data.SlBlient@ and G9 D2 .N9T Data -rovider
+S"stem.Data.GleDb@. !n these samples $e $ill use the SQ Server .N9T Data
-rovider. These are $ritten to talk directl" to %icrosoft SQ Server. The G9 D2
.N9T Data -rovider is used to talk to an" G9 D2 provider +as it uses G9 D2
underneath@.
%onnections
Bonnections are used to ,talk to, databases* and are represented b" provider'specific
classes such as SQBonnection. Bommands travel over connections and result sets are
returned in the form of streams $hich can be read b" a Data 0eader object* or pushed
into a Dataset object.
%ommands
Bommands contain the information that is submitted to a database* and are represented
b" provider'specific classes such as SQBommand. A command can be a stored
procedure call* an I-DAT9 statement* or a statement that returns results. Mou can also
use input and output parameters* and return values as part of "our command s"nta8.The e8ample belo$ sho$s ho$ to issue an !NS90T statement against the North $ind
database.
5C
8/15/2019 Ad agency.doc
51/113
Ad Agency
Data #eaders
The Data 0eader object is some$hat s"non"mous $ith a read'onl"/for$ard'onl" cursor
over data. The Data 0eader A-! supports flat as $ell as hierarchical data. A Data
0eader object is returned after e8ecuting a command against a database. The format of
the returned Data 0eader object is different from a record set. &or e8ample* "ou might
use the Data 0eader to sho$ the results of a search list in a $eb page.
Datasets
The Dataset object is similar to the ADG 0ecord set object* but more po$erful* and
$ith one other important distinctionJ the Dataset is al$a"s disconnected. The Dataset
object represents a cache of data* $ith database'like structures such as tables* columns*
relationships* and constraints. Ho$ever* though a Dataset can and does behave much
like a database* it is important to remember that Dataset objects do not interact directl"
$ith databases* or other source data. This allo$s the developer to $ork $ith a
programming model that is al$a"s consistent* regardless of $here the source data
resides. Data coming from a database* an L% file* from code* or user input can all be
placed into Dataset objects. Then* as changes are made to the Dataset the" can be
tracked and verified before updating the source data. The et Bhanges method of the
Dataset object actuall" creates a second Dataset that contains onl" the changes to the
data. This Dataset is then used b" a Data Adapter +or other objects@ to update the
original data source. The Dataset has man" L% characteristics* including the abilit"
to produce and consume L% data and L% schemas. L% schemas can be used to
describe schemas interchanged via 6eb Services. !n fact* a Dataset $ith a schema can
actuall" be compiled for t"pe safet" and statement completion.
Data Adapters 4L!D56S7L8
The Data Adapter object $orks as a bridge bet$een the Dataset and the source data.
Ising the provider'specific SlDataAdapter +along $ith its associated SlBommand
and SlBonnection@ can increase overall performance $hen $orking $ith a %icrosoft
SQ Server databases.
51
8/15/2019 Ad agency.doc
52/113
Ad Agency
&or other G9 D2'supported databases* "ou $ould use the GleDbDataAdapter object
and its associated GleDbBommand and GleDbBonnection objects. The Data Adapter
object uses commands to update the data source after changes have been made to the
Dataset. Ising the &ill method of the Data Adapter calls the S99BT commandR using
the Ipdate method calls the !NS90T* I-DAT9 or D99T9 command for each
changed ro$. Mou can e8plicitl" set these commands in order to control the statements
used at runtime to resolve changes* including the use of stored procedures. &or ad'hoc
scenarios* a Bommand 2uilder object can generate these at run'time based upon a
select statement. Ho$ever* this run'time generation reuires an e8tra round'trip to the
server in order to gather reuired metadata* so e8plicitl" providing the !NS90T*
I-DAT9* and D99T9 commands at design time $ill result in better run'time
performance.
1. ADG.N9T is the ne8t evolution of ADG for the .Net &rame$ork.
. ADG.N9T $as created $ith n'Tier* statelessness and L% in the forefront. T$o ne$
objects* the Dataset and Data Adapter* are provided for these scenarios. ADG.N9T
can be used to get data from a stream* or to store data in a cache for updates.
3. There is a lot more information about ADG.N9T in the documentation.
4. 0emember* "ou can e8ecute a command directl" against the database in order to do
inserts* updates* and deletes. Mou don,t need to first put data into a Dataset in order to
insert* update* or delete it.
5. Also* "ou can use a Dataset to bind to the data* move through the data* and navigate
data relationships
Client;side Script F
8/15/2019 Ad agency.doc
53/113
Ad Agency
9a(aScript-
avaScript is a ne$ scripting language for 6eb-ages. Scripts $ritten $ith java script
can be embedded into "our HT% pages. 6ith java script "ou have man" possibilities
for enhancing "our HT% page $ith interesting elements. &or e8ample "ou are able to
respond to user'initiated events uite easil". Some effects that are no$ possible $ith
java script $ere some time ago onl" possible $ith B!. So "ou can create reall"
sophisticated pages $ith the helps of java script on the !nternet.
:ow can 9a(a Script scripts run;
The first bro$ser to support java script $as the Netscape Navigator .C of course the
higher versions do have java script as $ell. Mou might kno$ that java does not run on
all Netscape Navigators .C +or higher versions@ versions. 2ut this is not true for java
script 'although there are some problems $ith the different versions.
The %ac version for e8ample seems to have man" bugs. !n the near future there are
going to be some other bro$sers* $hich support java script. The %icrosoft !nternet
e8plorer 3.C is going to support java script. avaScript enabled bro$sers are going to
spread soon ' it is $orth learning this ne$ techniue no$. Mou might realiFe that is
reall" eas" to $rite ava Script scripts. 6e have to kno$ is some basic techniues and
some $ork'around for problems "ou might encounter. Gf course $e need a basic.
Inderstanding HT% before reading this tutorial "ou can find man" reall" good online
resources about HT%. 2est "ou make an online search about 7html# at "ahoo if "ou
$ant to get informed about HT%. No$ ! $ant to sho$ some small scripts so "ou can
learn ho$ the" are implemented into HT%'documents and to sho$ $hich
possibilities "ou have $ith the ne$ scripting language. The follo$ing is a ver" small
script* $hich $ill onl" print a te8t into an HT% document.
XhtmlZ
53
8/15/2019 Ad agency.doc
54/113
Ad Agency
XheadZ
%" first avaScript
X/headZ
Xbod"ZXbrZ
This is a normal HT% document
XbrZ
Xscript language\)avaScript)Z
Document.$rite +(this is a java script)@
X/scriptZXb rZ
2acking HT% again
X/bod"Z
X/htmlZ
!f "ou are using a java script enabled'bro$ser at the moment then "ou $ill have the
possibilit" to see this script $orking. !f "our bro$ser doesn#t support ava Script then
this output might be some kind of strange]
This is a normal HT% document
This is java script^
2ack in HT% again.
.unctions
54
8/15/2019 Ad agency.doc
55/113
Ad Agency
&unctions are bet declared bet$een the XHeadZ tag of HT% page. &unctions are
called b" user'initiated events. Seems reasonable to keep the functions bet$een the
XHeadZ tags. The" are loaded first before a user can do an"thing that might call a
function. Scripts can be placed bet$een inside comment fields to ensure that older
bro$ser do not displa" the script itself.
XhtmlZ
XheadZ
Xscript language\)avaScript)Z
function pushbutton +@
_
alert +(Hello^)@R
`
X/scriptZ
X/headZ
Xbod"Z
XformZ
Xinput t"pe\)button) name\)2utton1) value\)push me) onclick\)pushbutton +@)Z
X/formZ
X/bod"Z
X/htmlZ
!f $e $ant to test this one immediatel" and "ou are using a ava Script enabled
bro$ser then please go ahead and push the button.
This script $ill create a button and $hen "ou press it a $indo$ $ill pop up sa"ing
(hello^) !n fact $e have a lot of possibilities just b" adding functions to our scripts.
The common bro$sers transmit the form information b" either methodJ here#s the
complete tag including the 9T transmission method attribute for the previous form
!0ample
55
8/15/2019 Ad agency.doc
56/113
Ad Agency
X&orm method \9T action\httpJ//$$$.m"compan".com/cgi'bin/upfdate.plZ
]]]
X/formZ
Input elements!
Ise the XinputZ tag to define an" one of a number of common form elements
including te8t fields multiple choice lists click able images and submission buttons.
There are man" attributers for this tag onl" that t"pes and name attributes are reuired
for each element* each t"pe of input element uses onl" a subset of the follo$ed
attributes. Additional XinputZ attributes ma" be reuired based upon $hich t"pe of the
form element "ou specif".
Sumit utton-
The submit button +Xinput t"pe\submitZ@ does $hat its name implies* settings in
motion the form#s submission to the server from the bro$ser. 6e man" have more than
submit buttons $ill be added to the parameter list the bro$ser sends along to the server.
!0ample
X !nput t"pe \)submit)Z
X!nput t"pe\)submit) value\)submit) name\)name)Z
#eset utton-
The reset button if firm XinputZ button is nearl" self' e8planator"R it lets the user
reset erase or set to some default value all elements in the form. 2" default the bro$ser
displa"s a reset button $orth the label (reset). 6e can change that b" specif"ing a
value attribute $ith tour o$n button label.
DATABASE M+DELS
5
8/15/2019 Ad agency.doc
57/113
Ad Agency
ADG.N9T and accessing the database through applets and ADG.N9T A-! via an
intermediate server resulted server resulted in a ne$ t"pe of database model $hich is
different from the client'server model. 2ased on number of intermediate server through
the reuest should go it is named as single tire* t$o tire and multi tire architecture
Single &ier
!n 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 possible in
java* in case flat files are used to store the data. Ho$ever this is useful onl" in case of
small applications. The advantage $ith this is the simplicit" and portabilit" of the
application developed.
Database
&wo &ier client"ser(er8
!n t$o tier architecture the database resides in one machine and client in different
machine the" are connected through the net$ork. !n this t"pe of architecture a databasemanagement takes control of the database and provides access to clients in a net$ork.
This soft$are bundle is also called as the server. Soft$are in different machines*
reuesting for information are called as the clients.
5=
Server and
client
Server
Blient
Blient
8/15/2019 Ad agency.doc
58/113
Ad Agency
Database
&'ree &ier and
8/15/2019 Ad agency.doc
59/113
Ad Agency
C +pronounced B Sharp@ is a multi'paradigm programming language that encompasses
functional* imperative* generic* object'oriented +class'based@* and component'oriented
programming disciplines. !t $as developed b" %icrosoft as part of the .N9T initiative
and later approved as a standard b" 9B%A +EC6A/778@ and !SG +&S'9&EC 2720@.
BW is one of the 44 programming languages supported b" the .N9T &rame$ork ,s
Bommon anguage 0untime.
BW is intended to be a simple* modern* general'purpose* object'oriented programming
language. Anders Hejlsberg* the designer of Delphi* leads the team $hich is developing
BW. !t has an object'oriented s"nta8 based on BVV and is heavil" influenced b" other programming languages such as Delphi and ava. !t $as initiall" named Bool* $hich
stood for B like Gbject Griented anguage. Ho$ever* in ul" CCC* $hen %icrosoft
made the project public* the name of the programming language $as given as BW. The
most recent version of the language is BW 3.C $hich $as released in conjunction $ith
the .N9T &rame$ork 3.5 in CC=. The ne8t proposed version* BW 4.C* is in
development.
6istory
!n 1EE
8/15/2019 Ad agency.doc
60/113
Ad Agency
During the development of .N9T* the class libraries $ere originall" $ritten in a
language/compiler called Simple %anaged B +S%B@. !n anuar" 1EEE* Anders
Hejlsberg formed a team to build a ne$ language at the time called Bool* $hich stood
for B like Gbject Griented anguage.%icrosoft had considered keeping the name
Bool as the final name of the language* but chose not to do so for trademark reasons.
2" the time the .N9T project $as publicl" announced at the ul" CCC -rofessional
Developers Bonference* the language had been renamed BW* and the class libraries and
AS-.N9T runtime had been ported to BW.
BW,s principal designer and lead architect at %icrosoft is Anders Hejlsberg* $ho $as
previousl" involved $ith the design of ?isual VV* 2orland Delphi* and Turbo -ascal.
!n intervie$s and technical papers he has stated that fla$s in most major programming
languages +e.g. BVV* ava* Delphi* and Smalltalk @ drove the fundamentals of the
Bommon anguage 0untime +B0@* $hich* in turn* drove the design of the BW
programming language itself. Some argue that BW shares roots in other languages.
.eatures o4 CJ:;
2" design* BW is the programming language that most directl" reflects the underl"ing
Bommon anguage !nfrastructure +B!@. %ost of BW,s intrinsic t"pes correspond to
value't"pes implemented b" the B! frame$ork. Ho$ever* the BW language
specification does not state the code generation reuirements of the compilerJ that is* it
does not state that a BW compiler must target a Bommon anguage 0untime +B0@* or
generate Bommon !ntermediate anguage +B!@* or generate an" other specific format.
Theoreticall"* a BW compiler could generate machine code like traditional compilers of
BVV or &G0T0ANR in practice* all e8isting BW implementations target B!.
Some notable BW distinguishing features areJ
• There are no global variables or functions. All methods and members must be
declared $ithin classes. !t is possible* ho$ever* to use static methods/variables $ithin
public classes instead of global variables/functions.
8/15/2019 Ad agency.doc
61/113
Ad Agency
• ocal variables cannot shado$ variables of the enclosing block* unlike B and BVV.
?ariable shado$ing is often considered confusing b" BVV te8ts.
• BW supports a strict 2oolean data t"pe* bool. Statements that take conditions* such as
while and if* reuire an e8pression of a boolean t"pe. 6hile BVV also has a booleant"pe* it can be freel" converted to and from integers* and e8pressions such as if (a)
reuire onl" that a is convertible to bool* allo$ing a to be an int* or a pointer. BW
disallo$s this integer meaning true or false approach on the grounds that forcing
programmers to use e8pressions that return e8actl" bool can prevent certain t"pes of
programming mistakes such as if (a = b) +use of = instead of ==@.
• !n BW* memor" address pointers can onl" be used $ithin blocks specificall" marked
as unsafe* and programs $ith unsafe code need appropriate permissions to run. %ost
object access is done through safe object references* $hich are al$a"s either pointing
to a valid* e8isting object* or have the $ell'defined null valueR a reference to a
garbage'collected object* or to random block of memor"* is impossible to obtain. An
unsafe pointer can point to an instance of a value't"pe* arra"* string* or a block of
memor" allocated on a stack. Bode that is not marked as unsafe can still store and
manipulate pointers through the System.IntPtr t"pe* but cannot dereference them.
•
%anaged memor" cannot be e8plicitl" freed* but is automaticall" garbage collected.arbage collection addresses memor" leaks. BW also provides direct support for
deterministic finaliFation $ith the using statement +supporting the 0esource
Acuisition !s !nitialiFation idiom@.
• %ultiple inheritance is not supported* although a class can implement an" number of
interfaces. This $as a design decision b" the language,s lead architect to avoid
complication* avoid dependenc" hell and simplif" architectural reuirements
throughout B!.
• BW is more t"pe safe than BVV. The onl" implicit conversions b" default are those
$hich are considered safe* such as $idening of integers and conversion from a
8/15/2019 Ad agency.doc
62/113
Ad Agency
derived t"pe to a base t"pe. This is enforced at compile'time* during !T* and* in some
cases* at runtime. There are no implicit conversions bet$een booleans and integers*
nor bet$een enumeration members and integers +e8cept for literal C* $hich can be
implicitl" converted to an" enumerated t"pe@. An" user'defined conversion must be
e8plicitl" marked as e8plicit or implicit* unlike BVV cop" constructors +$hich are
implicit b" default@ and conversion operators +$hich are al$a"s implicit@.
• 9numeration members are placed in their o$n scope.
• BW provides s"ntactic sugar for a common pattern of a pair of methods* accessor
+getter@ and mutator +setter@ encapsulating operations on a single attribute of a class*
in form of properties.
•
&ull t"pe reflection and discover" is available.
• BW currentl" +as of 3 une CC>@ has == reserved $ords.
Common Type system FCTSG
BW has a unified type system. This unified t"pe s"stem is called Co))on Ty(e Syste)
;CTS
8/15/2019 Ad agency.doc
63/113
Ad Agency
the corresponding operators are overloaded. ?alue t"pes are derived from
System.ValueType * al$a"s have a default value* and can al$a"s be created and
copied. Some other limitations on value t"pes are that the" cannot derive from each
other +but can implement interfaces@ and cannot have a default +parameterless@
constructor. 98amples of value t"pes are some primitive t"pes* such as int +a signed
3'bit integer@* float +a 3'bit !999 floating'point number@* char +a 1
8/15/2019 Ad agency.doc
64/113
Ad Agency
Unboxing is the operation of converting a value of a reference t"pe +previousl" bo8ed@
into a value of a value t"pe.
!0ample-
int foo \ 4R // ?alue t"pe.
object bar \ fooR // foo is bo8ed to bar.
int foo \ +int@barR // Inbo8ed back to value t"pe.
.eatures o4 CJ #!
Ne$ features in BW for the .N9T SD .C +corresponding to the 3rd edition of the
9B%A'334 standard@ isJ
'artial class
-artial classes allo$ implementation of a class to be spread bet$een several files* $ith
each file containing one or more class members. !t is primar" useful $hen parts of a
class are automaticall" generated. &or e8ample* the feature is heavil" used b" code'
generating user interface designers in ?isual Studio.
file1.csJ
public partial class %"Blass
_
public void %"%ethod1+@
_
// %anuall" $ritten code
`
`
file.csJ
public partial class %"Blass
_
8/15/2019 Ad agency.doc
65/113
Ad Agency
public void %"%ethod+@
_
// Automaticall" generated code
`
`
9enerics
enerics* or parameteriFed t"pes* or parametric pol"morphism is a .N9T .C feature
supported b" BW. Inlike BVV templates* .N9T parameteriFed t"pes are instantiated at
runtime rather than b" the compilerR hence the" can be cross'language $hereas BVVtemplates cannot. The" support some features not supported directl" b" BVV templates
such as t"pe constraints on generic parameters b" use of interfaces. Gn the other hand*
BW does not support non't"pe generic parameters. Inlike generics in ava* .N9T
generics use reification to make parameteriFed t"pes first'class objects in the B!
?irtual %achine* $hich allo$s for optimiFations and preservation of the t"pe
information.
Static classes
Static classes are classes that cannot be instantiated or inherited from* and that onl"
allo$ static members. Their purpose is similar to that of modules in man" procedural
languages.
A ne7 4orm o4 iterator pro3iding generator4unctionality
8/15/2019 Ad agency.doc
66/113
Ad Agency
A ne$ form of iterator that provides generator functionalit"* using a yiel# return
construct similar to yiel# in -"thon.
// %ethod that takes an iterable input +possibl" an arra"@// and returns all even numbers.
public static !9numerableXintZ et9ven+!9numerableXintZ numbers@
_
foreach +int i in numbers@
_
if +i Y \\ C@ "ield return iR
`
`
Anonymous delegates
Anon"mous delegates provide closure functionalit" in BW. Bode inside the bod" of an
anon"mous delegate has full read/$rite access to local variables* method parameters*
and class members in scope of the delegate* e8cepting out and ref parameters. &or
e0ample-"
int SumGfArra"9lements+intOP arra"@
_
int sum \ CR
Arra".&or9ach+
arra"*
delegate+int 8@
_
sum V\ 8R
`
@R
return sumR
`
Delegate co3ariance and contra3ariance
8/15/2019 Ad agency.doc
67/113
Ad Agency
Bonversions from method groups to delegate t"pes are covariant and contravariant in
return and parameter t"pes* respectivel".
T%e accessi0ility o4 property accessors can 0e set
independently
!0ample-
string status \ string.9mpt"R
public string Status
_
get _ return statusR ` // an"one can get value of this propert"*
protected set _ status \ valueR ` // but onl" derived classes can change it
`
Nulla0le types
Nullable value t"pes +denoted b" a uestion mark* e.g. int$ i = null%@ $hich add
null to the set of allo$ed values for an" value t"pe. This provides improved
interaction $ith SQ databases* $hich can have nullable columns of t"pes
corresponding to BW primitive t"pesJ an SQ I&T'' &*++ column t"pe directl"
translates to the BW int$.
Nullable t"pes received an eleventh'hour improvement at the end of August CC5* mere
$eeks before the official launch* to improve their bo8ing characteristicsJ a nullable
variable $hich is assigned null is not actuall" a null reference* but rather an instance of
struct &ullable,T- $ith propert" asValue eual to false. 6hen bo8ed* the
&ullable instance itself is bo8ed* and not the value stored in it* so the resulting
reference $ould al$a"s be non'null* even for null values. The follo$ing code illustrates
the corrected fla$J
8/15/2019 Ad agency.doc
68/113
Ad Agency
int i \ nullR
object o \ iR
if +o \\ null@
Bonsole.6riteine+Borrect behaviour ' runtime version from September CC5 or
later@R
else
Bonsole.6riteine+!ncorrect behaviour ' pre'release runtime +from before
September CC5@@R
6hen copied into objects* the official release bo8es values from &ullable instances* so
null values and null references are considered eual. The late nature of this fi8 caused
some controvers" * since it reuired core'B0 changes affecting not onl" .N9T* but
all dependent technologies +including BW* ?2* SQ Server CC5 and ?isual Studio
CC5@.
DATABASE TABLES:
Admin Register Ta0le:
8/15/2019 Ad agency.doc
69/113
Ad Agency
Na)e Null9Not Null Ty(e =ey
uid Not Null int !dentit"+1CCC*1@
name Null varchar+4C@
p$d Null varchar+4C@
cp$d Null varchar+5C@
phone Null varchar+C@email Null varchar+5C@ -rimar" e"
address Null varchar+5C@
cit" Null varchar+5C@
petsname Not Null varchar+3C@
groupname Null varchar+3C@
User Registration Ta0le
Na)e Null9Not Null Ty(e =ey
uid Not Null int !dentit"+1CCC*1@
name Null varchar+4C@
p$d Null varchar+4C@
cp$d Null varchar+5C@
phone Null varchar+C@
email Null varchar+5C@ -rimar" e"
address Null varchar+5C@
cit" Null varchar+5C@
petsname Not Null varchar+3C@groupname Null varchar+3C@
Budget ?ideoKs Ta0le
Na)e Null9Not Null Ty(e =ey
channelname Null varchar+5C@
categor" Null varchar+5C@
adspan Null varchar+5C@
8/15/2019 Ad agency.doc
70/113
Ad Agency
timea Null varchar+5C@
timeb Null varchar+5C@
timec Null varchar+5C@
timed Null varchar+5C@
timee Null varchar+5C@
Budget Animated Ta0le
Na)e Null9Not Null Ty(e =ey
channelname Null varchar+5C@
categor" Null varchar+5C@
adspan Null varchar+5C@
timea Null varchar+5C@
timeb Null varchar+5C@timec Null varchar+5C@
timed Null varchar+5C@
timee Null varchar+5C@
Budget Slides Ta0le
Na)e Null9Not Null Ty(e =ey
channelname Null varchar+5C@categor" Null varchar+5C@
adspan Null varchar+5C@
timea Null varchar+5C@
timeb Null varchar+5C@
timec Null varchar+5C@
timed Null varchar+5C@
timee Null varchar+5C@
C%annel Time Ta0le
Na)e Null9Not Null Ty(e =ey
uid Null int
name Null varchar+C@
adname Null varchar+1CC@
channel Null varchar+C@
timings Null varchar+1CC@
=C
8/15/2019 Ad agency.doc
71/113
Ad Agency
User Ne7 ADKs Ta0le
Na)e Null9Not Null Ty(e =ey
uid Null intname Null varchar+C@
email Null varchar+5C@
adname Null varchar+1CC@
rdate Null varchar+C@
censor Null varchar+C@
director Null varchar+C@
address Null varchar+C@
video Not Null varchar+1CC@
Su0(ect s Ta0le
Na)e Null9Not Null Ty(e =ey
Subjectid Null int -rimar" e"
Subjectname Null varchar+C@
Bountr" Null varchar+C@
State Null varchar+C@
location Null varchar+C@
?ie7 ?ideoKs Ta0le
Na)e Null9Not Null Ty(e =ey
uid Null int
name Null varchar+C@
email Null varchar+5C@
adname Null varchar+1CC@
rdate Null varchar+C@
censor Null varchar+C@
permission Null varchar+C@
.EASIBILIT1 STUD1:
&easibilit" stud" is conducted once the problem is clearl" understood.
&easibilit" stud" is a high level capsule version of the entire s"stem anal"sis and design
process. The objective is to determine uickl" at a minimum e8pense ho$ to solve a
=1
8/15/2019 Ad agency.doc
72/113
Ad Agency
problem. The purpose of feasibilit" is not to solve the problem but to determine if the
problem is $orth solving.
The s"stem has been tested for feasibilit" in the follo$ing points.
1. Technical &easibilit"
. 9conomical &easibilit"
3. Gperational &easibilit".
Tec%nical .easi0ility
The project entitles Bourier Service S"stem) is technicall" feasibilit"
because of the belo$ mentioned feature. The project $as developed in ava $hichraphical Iser !nterface.
!t provides the high leve