Online Voting System A ASP Net Project
Online Voting System A ASP Net Project
Online Voting System A ASP Net Project
Abstract : The project "Voting Software" aims at making the voting process easy in cooperative societies. Presently voting is performed using ballot paper and the counting is done manually, hence it consumes a lot of time. There can be possibility of invalid votes. ll these makes election a tedious task. !n our proposed system voting and counting is done with the help of computer. !t saves time, avoid error in counting and there will be no invalid votes. !t makes the election process easy Functional Requirements : "To count the total number of votes. "To calculate the percentage of total votes. "To calculate votes for each candidate. "To calculate percentage of votes for each candidate. "To check for duplication. "To #ind the winning persons in each section. " ll the process above mentioned should be done fast Details : $odules %e have devised the following modules according to the re&uirements of the organi'ation. " dministrator $odule "(ser $odule dministrator has the whole authority of the organi'ation .)e is the one who maintains all the aspects of voters and candidates. )is functionalities include insertion, updation ,deletion of both the voter and the candidate. )e is responsible for allowing persons to vote. (ser*s have the provision to view the list of voters candidates and results and to vote for their desired candidate.
2. SYSTEM STUDY
The feasibility of the project is analy'ed in this phase and business proposal is put forth with a very general plan for the project and some cost estimates. +uring system analysis the feasibility study of the proposed system is to be carried out. This is to ensure that the proposed system is not a burden to
the company. #or feasibility analysis, some understanding of the major re&uirements for the system is essential.
ECONOMICAL FEASIBILITY
This st!dy is carried o!t to check the econo"ic i"#act that the syste" $ill have on the or%ani&ation' The a"o!nt of f!nd that the co"#any can #o!r into the research and develo#"ent of the syste" is li"ited' The e(#endit!res "!st be )!stified' Th!s the develo#ed syste" as $ell $ithin the b!d%et and this $as achieved beca!se "ost of the technolo%ies !sed are freely available' Only the c!sto"i&ed #rod!cts had to be #!rchased'
This st!dy is carried o!t to check the technical feasibility* that is* the technical re+!ire"ents of the syste"' Any syste" develo#ed "!st not have a hi%h de"and on the available technical reso!rces' This $ill lead to hi%h de"ands on the available technical reso!rces' This $ill lead to hi%h de"ands bein% #laced on the client' The develo#ed syste" "!st have a "odest re+!ire"ent* as only "ini"al or n!ll chan%es are re+!ired for i"#le"entin% this syste"'
SOCIAL FEASIBILITY
The as#ect of st!dy is to check the level of acce#tance of the syste" by the !ser' This incl!des the #rocess of trainin% the !ser to !se the syste" efficiently' The !ser "!st not feel threatened by the syste"* instead "!st acce#t it as a necessity' The level of acce#tance by the !sers solely de#ends on the "ethods that are e"#loyed to ed!cate the !ser abo!t the syste" and to "ake hi" fa"iliar $ith it' is level of confidence "!st be
raised so that he is also able to "ake so"e constr!ctive criticis"* $hich is $elco"ed* as he is the final !ser of the syste"'
System Specification
System Re !i"ements#
$a"%&a"e Re !i"ements#
" " Syste" ard 2isk , -enti!" I. /'0 1 &' , 03 1B'
Flo##y 2rive , 4'00 Mb' Monitor Mo!se 6a" , 45 .1A Colo!r' , Lo%itech' , 54/ Mb'
Soft&a"e Re !i"ements#
" " " O#eratin% syste" Codin% Lan%!a%e 2ata Base , 7 8indo$s 9-' , AS-'Net $ith C: , S;L Server /335
SYSTEM DESI'N Data F(o& Dia)"am * Use Case Dia)"am * F(o& Dia)"am
The 2F2 is also called as b!bble chart' It is a si"#le %ra#hical for"alis" that can be !sed to re#resent a syste" in ter"s of the in#!t data to the syste"* vario!s #rocessin% carried o!t on these data* and the o!t#!t data is %enerated by the syste"'
Use"
4'3 -rocess
Syste"
1+Le,el DFD
+e"son 4'3'3 -ollin% -rocess Lo%in
(ser,ogin
A%min
Lo%in
(ser ,ogin
2+Le,el DFD
6e%istrati on
(ser ,ogin Poll nswer
TotalCandidateof. ote
=ser 2etails
Candidate na"e
A%min
TotalCandidateof. ote
dmin
=ser 2etails
$ollaboration .ia(ram
Admin
<<<<<<<<<<<<
Admin Interface
<<<<<<<<<<<<<<<<<<<<<<<<
Admin database
<<<<<<<<<<<<<<<
equencial .ia(ram
AD0IN TRATOR
6e%istrati on
Total 8umber Votes 2esult of .adidate-ercenta%e Vote -ercenta%e of All .otes candidat
Ad"in
1ive all details of Candidate
Can%i%ate
Lo%in -oolin%
Candidat
Syste
ADMINSTRATOR
2egistration
Percentage of ll Votes
A2MINST6ATO
Syste
Soft&a"e En,i"onment
technolo%ies for ra#idly b!ildin% and inte%ratin% 9ML 8eb 8indo$s7based a##lications* sol!tions' The 'NET Fra"e$ork is a lan%!a%e7ne!tral #latfor" for $ritin% #ro%ra"s that can easily and sec!rely intero#erate' ThereAs no lan%!a%e barrier $ith 'NET, there are n!"ero!s lan%!a%es available to the develo#er incl!din% Mana%ed CBB* C:* .is!al Basic and Cava Scri#t' The 'NET fra"e$ork #rovides the fo!ndation for co"#onents to interact sea"lessly* $hether locally or re"otely on different #latfor"s' It standardi&es co""on data ty#es and co""!nications #rotocols so that co"#onents created in different lan%!a%es can easily intero#erate'
D'NETE is also the collective na"e %iven to vario!s soft$are co"#onents b!ilt !#on the 'NET #latfor"' These $ill be both #rod!cts >.is!al St!dio'NET and 8indo$s'NET Server* for instance? and services >like -ass#ort* 'NET My Services* and so on?'
4' The Co""on Lan%!a%e 6!nti"e >CL6?' /' A hierarchical set of class libraries'
The CL6 is described as the De(ec!tion en%ineE of 'NET' It #rovides the environ"ent $ithin $hich #ro%ra"s r!n' The "ost i"#ortant feat!res are
Conversion fro" a lo$7level asse"bler7style lan%!a%e* called Inter"ediate Lan%!a%e >IL?* into code native to the #latfor" bein% e(ec!ted on' Me"ory collection' Checkin% and enforcin% sec!rity restrictions on the r!nnin% code' Loadin% and e(ec!tin% #ro%ra"s* $ith version control and other s!ch feat!res' The follo$in% feat!res of the 'NET fra"e$ork are also $orth descri#tion, "ana%e"ent* notably incl!din% %arba%e
Mana)e% Co%e The code that tar%ets 'NET* and $hich contains certain e(tra Infor"ation 7 D"etadataE 7 to describe itself' 8hilst both "ana%ed and !n"ana%ed code can r!n in the r!nti"e* only "ana%ed code contains the infor"ation that allo$s the CL6 to %!arantee* for instance* safe e(ec!tion and intero#erability'
Mana)e% Data 8ith Mana%ed Code co"es Mana%ed 2ata' CL6 #rovides "e"ory allocation and 2eal location facilities* and %arba%e collection' So"e 'NET lan%!a%es !se Mana%ed 2ata by defa!lt* s!ch as C:* .is!al Basic'NET and CScri#t'NET* $hereas others* na"ely CBB* do not' Tar%etin% CL6 can* de#endin% on the lan%!a%e yo!Are !sin%* i"#ose certain constraints on the feat!res available' As $ith "ana%ed and !n"ana%ed code* one can have
both "ana%ed and !n"ana%ed data in 'NET a##lications 7 data that doesnAt %et %arba%e collected b!t instead is looked after by !n"ana%ed code'
Common Type System The CL6 !ses so"ethin% called the Co""on Ty#e Syste" >CTS? to strictly enforce ty#e7safety' This ens!res that all classes are co"#atible $ith each other* by describin% ty#es in a co""on $ay' CTS define ho$ ty#es $ork $ithin the r!nti"e* $hich enables ty#es in one lan%!a%e to intero#erate $ith ty#es in another lan%!a%e* incl!din% cross7lan%!a%e e(ce#tion handlin%' As $ell as ens!rin% that ty#es are only !sed in a##ro#riate $ays* the r!nti"e also ens!res that code doesnAt atte"#t to access "e"ory that hasnAt been allocated to it'
Common Lan)!a)e Specification The CL6 #rovides b!ilt7in s!##ort for lan%!a%e
intero#erability' To ens!re that yo! can develo# "ana%ed code that can be f!lly !sed by develo#ers !sin% any #ro%ra""in% lan%!a%e* a set of lan%!a%e feat!res and r!les for !sin% the" called the Co""on Lan%!a%e S#ecification >CLS? has been defined' Co"#onents that follo$ these r!les and e(#ose only CLS feat!res are considered CLS7co"#liant'
T$E CLASS LIBRARY 'NET #rovides a sin%le7rooted hierarchy of classes* containin% over F333 ty#es' The root of the na"es#ace is called Syste"G this contains basic ty#es like Byte* 2o!ble* Boolean* and Strin%* as $ell as Ob)ect' All ob)ects derive fro" Syste"' Ob)ect' As $ell as ob)ects* there are val!e ty#es' .al!e ty#es can be
allocated on the stack* $hich can #rovide !sef!l fle(ibility' There are also efficient "eans of convertin% val!e ty#es to ob)ect ty#es if and $hen necessary'
The set of classes is #retty co"#rehensive* #rovidin% collections* file* screen* and net$ork IHO* threadin%* and so on* as $ell as 9ML and database connectivity' The class library is s!bdivided into a n!"ber of sets >or na"es#aces?* each #rovidin% distinct areas of f!nctionality* $ith de#endencies bet$een the na"es#aces ke#t to a "ini"!"'
The "!lti7lan%!a%e ca#ability of the 'NET Fra"e$ork and .is!al St!dio 'NET enables develo#ers to !se their e(istin% #ro%ra""in% skills to b!ild all ty#es of a##lications and 9ML 8eb services' The 'NET fra"e$ork s!##orts ne$ versions of MicrosoftAs old favorites .is!al Basic and CBB >as .B'NET and Mana%ed CBB?* b!t there are also a n!"ber of ne$ additions to the fa"ily'
.is!al Basic 'NET has been !#dated to incl!de "any ne$ and i"#roved lan%!a%e feat!res that "ake it a #o$erf!l ob)ect7oriented #ro%ra""in% lan%!a%e' These feat!res incl!de inheritance* interfaces* and overloadin%* a"on% others' .is!al Basic also no$ s!##orts str!ct!red e(ce#tion handlin%* c!sto" attrib!tes and also s!##orts "!lti7threadin%' .is!al Basic 'NET is also CLS co"#liant* $hich "eans that any CLS7co"#liant lan%!a%e can !se the classes* ob)ects* and co"#onents yo! create in .is!al Basic 'NET' Mana%ed E(tensions for CBB and attrib!ted
B lan%!a%e' Mana%ed E(tensions si"#lify the task of "i%ratin% e(istin% CBB a##lications to the ne$ 'NET Fra"e$ork' C: is MicrosoftAs ne$ lan%!a%e' ItAs a C7style lan%!a%e that is essentially DCBB for 6a#id A##lication 2evelo#"entE' =nlike other lan%!a%es* its s#ecification is )!st the %ra""ar of the lan%!a%e' It has no standard library of its o$n* and instead has been desi%ned $ith the intention of !sin% the 'NET libraries as its o$n'
Microsoft .is!al C: 'NET #rovides the easiest transition for Cava7lan%!a%e develo#ers into the $orld of 9ML 8eb Services and dra"atically i"#roves the intero#erability of Cava7lan%!a%e #ro%ra"s $ith e(istin% soft$are $ritten in a variety of other #ro%ra""in% lan%!a%es'
Active State has created .is!al -erl and .is!al -ython* $hich enable 'NET7a$are a##lications to be b!ilt in either -erl or -ython' Both #rod!cts can be inte%rated into the .is!al St!dio 'NET environ"ent' .is!al -erl incl!des s!##ort for Active StateAs -erl 2ev Iit'
8indo$s
.9.8:T is also compliant with .,S /.ommon ,anguage Specification0 and supports structured e;ception handling. .,S is set of rules and constructs that are supported by the .,2 /.ommon ,anguage 2untime0. .,2 is the runtime environment provided by the .8:T #ramework< it manages the e;ecution of the code and also makes the development process easier by providing services. .9.8:T is a .,S=compliant language. ny objects, classes, or components that created in .9.8:T can be used in any other .,S=compliant language. !n addition, we can use objects, classes, and components created in other .,S= compliant languages in .9.8:T .The use of .,S ensures complete interoperability among applications, regardless of the languages used to create the application.
$ON TR#$TOR AND DE TR#$TOR : .onstructors are used to initiali'e objects, whereas destructors are used to destroy them. !n other words, destructors are used to release the resources allocated to the object. !n .9.8:T the sub finali'e procedure is available. The sub finali'e procedure is used to complete the tasks that must be performed when an object is destroyed. The sub finali'e procedure is called automatically when an object is destroyed. !n addition, the sub finali'e procedure can be called only from the class it belongs to or from derived classes. GAR!AGE $OLLE$TION >arbage .ollection is another new feature in .9.8:T. The .8:T #ramework monitors allocated resources, such as objects and variables. !n addition, the
.8:T #ramework automatically releases memory for reuse by destroying objects that are no longer in use. !n .9.8:T, the garbage collector checks for the objects that are not currently in use by applications. %hen the garbage collector comes across an object that is marked for garbage collection, it releases the memory occupied by the object. OVERLOADING ?verloading is another feature in .9. ?verloading enables us to define multiple procedures with the same name, where each procedure has a different set of arguments. @esides using overloading for procedures, we can use it for constructors and properties in a class.
0#LTIT%READING: .9.8:T also supports multithreading. n application that supports multithreading can handle multiple tasks simultaneously, we can use multithreading to decrease the time taken by an application to respond to user interaction. TR#$T#RED E2$E3TION %ANDLING .9.8:T supports structured handling, which enables us to detect and remove errors at runtime. !n .9.8:T, we need to use TryA.atchA#inally statements to create e;ception handlers. (sing TryA.atchA#inally statements, we can create robust and effective e;ception handlers to improve the performance of our application.
T%E .NET FRA0E4OR5 The .8:T #ramework is a new computing platform that simplifies application development in the highly distributed environment of the !nternet.
O!6E$TIVE OF. NET FRA0E4OR5 -. To provide a consistent object=oriented programming environment whether object codes is stored and e;ecuted locally on !nternet=distributed, or e;ecuted remotely. 4. To provide a code=e;ecution environment to minimi'es software deployment and guarantees safe e;ecution of code. 1. :liminates the performance problems. There are different types of application, such as %indows=based applications and %eb=based applications.
F"ont en% !se% # Microsoft .is!al St!dio' Net !sed as front end tool' The reason for selectin% .is!al St!dio dot Net as front end tool as follo$s,
.is!al St!dio 'Net has fle(ibility * allo$in% allo$s to do #ro)ect at faster rate'
intero#erate to #rovide the sol!tion' This Cross Lan%!a%e Co"#atibility .is!al St!dio' Net has Co""on Lan%!a%e 6!nti"e * that allo$s all the co"#onent to conver%e into one inter"ediate for"at and then can interact' .is!al St!dio' Net has #rovide e(cellent sec!rity $hen yo!r a##lication is e(ec!ted in the syste" .is!al St!dio'Net has fle(ibility* allo$in% !s to confi%!re the $orkin% environ"ent to best s!it o!r individ!al style' 8e can choose bet$een a sin%le and "!lti#le doc!"ent interfaces* and $e can ad)!st the si&e and #ositionin% of the vario!s I2E ele"ents'
.is!al St!dio' Net has Intelli%ence feat!re that "ake the codin% easy and also 2yna"ic hel# #rovides very less codin% ti"e' The $orkin% environ"ent in .is!al St!dio'Net is often referred to as Inte%rated 2evelo#"ent Environ"ent beca!se it inte%rates "any different f!nctions s!ch as desi%n* editin%* co"#ilin% and deb!%%in% $ithin a co""on environ"ent' In "ost traditional develo#"ent tools* each of se#arate #ro%ra"* each $ith its o$n interface' The .is!al St!dio'Net lan%!a%e is +!ite #o$erf!l J if $e can i"a%ine a #ro%ra""in% task and acco"#lished !sin% .is!al Basic 'Net' After creatin% a .is!al St!dio' Net a##lication* if $e $ant to distrib!te it to others $e can freely distrib!te any a##lication to anyone $ho !ses Microsoft $indo$s' 8e can distrib!te o!r a##lications on disk* on C2s* across net$orks* or over an intranet or the internet' Toolbars #rovide +!ick access to co""only !sed co""ands in the #ro%ra""in% environ"ent' 8e click a b!tton on the toolbar once to carry o!t the action re#resented by that b!tton' By defa!lt* the standard toolbar is dis#layed $hen $e start .is!al Basic' Additional toolbars for editin%* for" desi%n* and deb!%%in% can be to%%led on or off fro" the toolbars co""and on the vie$ "en!' Many #arts of .is!al St!dio are conte(t sensitive' Conte(t sensitive "eans $e can %et hel# on these #arts directly $itho!t havin% to %o thro!%h the hel# "en!' For e(a"#le* to %et hel# on any key$ord in the .is!al Basic lan%!a%e* #lace the insertion #oint on that key$ord in the code $indo$ and #ress F4' .is!al St!dio inter#rets o!r code as $e enter it* catchin% and hi%hli%htin% "ost synta( or s#ellin% errors on the fly' ItAs al"ost like havin% an e(#ert $atchin% over o!r sho!lder as $e enter o!r code'
47at is .NET8
%hen .8:T was announced in late -BBB, $icrosoft positioned the technology as a platform for building and consuming :;tensible $arkup ,anguage /C$,0 %eb services. C$, %eb services allow any type of application, be it a %indows= or browser=based application running on any type of computer system, to consume data from any type of server over the !nternet. The reason this idea is so great is the way in which the C$, messages are transferredD over established standard protocols that e;ist today. (sing protocols such as S? P, )TTP, and S$TP, C$, %eb services make it possible to e;pose data over the wire with little or no modifications to your e;isting code. Since the initial announcement of the .8:T #ramework, it*s taken on many new and different meanings to different people. To a developer, .8:T means a great environment for creating robust distributed applications. To an !T manager, .8:T means simpler deployment of applications to end users, tighter security, and simpler management. To a .T? or .!?, .8:T means happier developers using state=of=the=art development technologies and a smaller bottom line. To understand why all these statements are true, you need to get a grip on what the .8:T #ramework consists of, and how it*s truly a revolutionary step forward for application architecture, development, and deployment.
.NET Frame'or9 8ow that you are familiar with the major goals of the .8:T #ramework, let*s briefly e;amine its architecture. The .8:T #ramework sits on top of the operating system, which can be a few different flavors of %indows and consists of a number of components .8:T is essentially a system application that runs on %indows.
Conce#t!ally* the CL6 and the C.M are si"ilar in that they are both r!nti"e infrastr!ct!res that abstract the !nderlyin% #latfor" differences' o$ever* $hile the C.M officially s!##orts only the Cava lan%!a%e* the CL6 s!##orts any lan%!a%e that can be re#resented in its Co""on Inter"ediate Lan%!a%e >CIL?' The C.M e(ec!tes bytecode* so it can* in #rinci#le* s!##ort "any lan%!a%es* too' =nlike CavaKs bytecode* tho!%h* CIL is never inter#reted' Another conce#t!al difference bet$een the t$o infrastr!ct!res is that Cava code r!ns on any #latfor" $ith a C.M* $hereas 'NET code r!ns only on #latfor"s that s!##ort the CL6' In A#ril /33L* the International Or%ani&ation for Standardi&ation and the International Electrotechnical Co""ittee >ISOHIEC? reco%ni&ed a f!nctional s!bset of the CL6* kno$n as the Co""on Lan%!a%e Interface >CLI?* as an international standard' This develo#"ent* initiated by Microsoft and develo#ed by ECMA International* a E!ro#ean standards or%ani&ation* o#ens the $ay for third #arties to i"#le"ent their o$n versions of the CL6 on other #latfor"s* s!ch as Lin!( or Mac OS 9' For infor"ation on third7#arty and o#en so!rce #ro)ects $orkin% to i"#le"ent the ISOHIEC CLI and C: s#ecifications'
The layer on top of the .,2 is a set of framework base classes. This set of classes is similar to the set of classes found in ST,, $#., input and output functionality, string T,, or Eava. These classes support rudimentary security management, network manipulation,
communications, thread management, te;t management, reflection functionality, collections functionality, as well as other functions.
?n top of the framework base classes is a set of classes that e;tend the base classes to support data management and C$, manipulation. These classes, called +?.8:T, support persistent data managementFdata that is stored on backend databases. longside the data classes, the .8:T #ramework supports a number of classes to let you manipulate C$, data and perform C$, searching and C$, translations. .lasses in three different technologies /including web services, %eb #orms, and %indows #orms0 e;tend the framework base classes and the data and C$, classes. %eb services include a number of classes that support the development of lightweight distributed components, which work even in the face of firewalls and 8 T software. These components support plug=and=play across the !nternet, because web services employ standard )TTP and S? P. %eb #orms, the key technology behind SP.8:T, include a number of classes that allow
you to rapidly develop web >raphical (ser !nterface />(!0 applications. !f you*re currently developing web applications with Visual !nterdev, you can think of %eb #orms as a facility that allows you to develop web >(!s using the same drag=and=drop approach as if you were developing the >(!s in Visual @asic. Simply drag=and=drop controls onto your %eb #orm, double=click on a control, and write the code to respond to the associated event. %indows #orms support a set of classes that allow you to develop native %indows >(! applications. Gou can think of these classes collectively as a much better version of the $#. in .H H because they support easier and more powerful >(! development and provide a common, consistent interface that can be used in all languages. T7e $ommon Lan(ua(e Runtime t the heart of the .8:T #ramework is the common language runtime. The common language runtime is responsible for providing the e;ecution environment that code written in a .8:T language runs under. The common language runtime can be compared to the Visual @asic 6 runtime, e;cept that the common language runtime is designed to handle all .8:T languages, not just one, as the Visual @asic 6 runtime did for Visual @asic 6. The following list describes some of the benefits the common language runtime gives youD
.ross=language e;ception handling #ull support for component versioning ccess to legacy .?$ components C.?PG deployment 2obust security model Gou might e;pect all those features, but this has never been possible using $icrosoft
development tools. The common language runtime fits into the .8:T #ramework.
Note, Code $ritten !sin% a 'NET lan%!a%e is kno$n as "ana%ed code' Code that !ses anythin% b!t the co""on lan%!a%e r!nti"e is kno$n as !n"ana%ed code' The co""on lan%!a%e r!nti"e #rovides a "ana%ed e(ec!tion environ"ent for 'NET
code* $hereas the individ!al r!nti"es of non7'NET lan%!a%es #rovide an !n"ana%ed e(ec!tion environ"ent'
Insi%e t0e Common Lan)!a)e R!ntime The co""on lan%!a%e r!nti"e enables code r!nnin% in its e(ec!tion environ"ent to have feat!res s!ch as sec!rity* versionin%* "e"ory "ana%e"ent and e(ce#tion handlin% beca!se of the $ay 'NET code act!ally e(ec!tes' 8hen yo! co"#iled .is!al Basic M for"s a##lications* yo! had the ability to co"#ile do$n to native node or #7code' .is!al Basic M co"#iler o#tions dialo% sho!ld refresh yo!r "e"ory of $hat the .is!al Basic M o#tions dialo% looked like'
8hen yo! co"#ile yo!r a##lications in 'NET* yo! arenKt creatin% anythin% in native code' 8hen yo! co"#ile in 'NET* yo!Kre convertin% yo!r codeNno "atter $hat 'NET lan%!a%e yo!Kre !sin%Ninto an asse"bly "ade !# of an inter"ediate lan%!a%e called Microsoft Inter"ediate Lan%!a%e >MSIL or )!st IL* for short?' The IL contains all the infor"ation abo!t yo!r a##lication* incl!din% "ethods* #ro#erties* events* ty#es* e(ce#tions* sec!rity ob)ects* and so on* and it also incl!des "etadata abo!t $hat ty#es in yo!r code can or cannot be e(#osed to other a##lications' This $as called a ty#e library in .is!al Basic M or an I2L >interface definition lan%!a%e? file in CBB' In 'NET* itKs si"#ly the "etadata that the IL contains abo!t yo!r asse"bly' Note The file for"at for the IL is kno$n as -E >#ortable e(ec!table? for"at* $hich is a standard for"at for #rocessor7s#ecific e(ec!tion' 8hen a !ser or another co"#onent e(ec!tes yo!r code* a #rocess occ!rs called )!st7in7ti"e >CIT? co"#ilation* and itKs at this #oint that the IL is converted into the s#ecific "achine lan%!a%e of the #rocessor itKs e(ec!tin% on' This "akes it very
easy to #ort a 'NET a##lication to any ty#e of o#eratin% syste" on any ty#e of #rocessor beca!se the IL is si"#ly $aitin% to be cons!"ed by a CIT co"#iler' Note The first ti"e an asse"bly is called in 'NET* the CIT #rocess occ!rs' S!bse+!ent calls donKt re7CIT the ILG the #"e,io!s(y 3ITte% IL re"ains in cache and is !sed over and over a%ain' 8hen yo! learn abo!t A##lication Center Test* yo! also see ho$ the $ar"7!# ti"e of the CIT #rocess can affect a##lication #erfor"ance'
(nderstanding the process of compilation in .8:T is very important because it makes clear how features such as cross=language debugging and e;ception handling are possible. Gou*re not actually compiling to any machine=specific codeFyou*re simply compiling down to an intermediate language that*s the same for all .8:T languages. The !, produced by E9 .8:T and .9 looks just like the !, created by the Visual @asic .8:T compiler. These instructions are the same, only how you type them in Visual Studio .8:T is different, and the power of the common language runtime is apparent. %hen the !, code is E!Tted into machine=specific language, it does so on an as=needed basis. !f your assembly is -I$@ and the user is only using a fraction of that -I$@, only the re&uired !, and its dependencies are compiled to machine language. This makes for a very efficient e;ecution process. @ut during this e;ecution, how does the common language runtime make sure that the !, is correctJ @ecause the compiler for each language creates its own !,, there must be a process that makes sure what*s compiling won*t corrupt the system. The process that validates the !, is known as verification. #igure -.3 demonstrates the process the !, goes through before the code actually e;ecutes.
%hen code is E!T compiled, the common language runtime checks to make sure that the !, is correct. The rules that the common language runtime uses for verification are set forth in the .ommon ,anguage Specification /.,S0 and the .ommon Type System /.TS0. T7e .NET Frame'or9 $lass Librar= The second most important piece of the .8:T #ramework is the .8:T #ramework class library /#.,0. s you*ve seen, the common language runtime handles the dirty work of actually running the code you write. @ut to write the code, you need a foundation of available classes to access the resources of the operating system, database server, or file server. The #., is made up of a hierarchy of namespaces that e;pose classes, structures, interfaces, enumerations, and delegates that give you access to these resources. The namespaces are logically defined by functionality. #or e;ample, the System.Data namespace contains all the functionality available to accessing databases. This namespace is further broken down into System.Data.SqlClient, which e;poses functionality specific to SK, Server, and System.Data.OleDb, which e;poses specific functionality for accessing ?,:+@ data sources.
Specific assemblies within the #., donLt necessarily define the bounds of a namespace< rather, they*re focused on functionality and logical grouping. !n total, there are more than 4I,III classes in the #.,, all logically grouped in a hierarchical manner. #igure -.M shows where the #., fits into the .8:T #ramework and the logical grouping of namespaces. Fi)!"e 4.5. T0e .NET F"ame&o"1 c(ass (i6"a"y.
To use an #., class in your application, you use the Imports statement in Visual @asic .8:T or the using statement in .9. %hen you reference a namespace in Visual @asic .8:T or .9, you also get the convenience of auto=complete and auto=list members when you access the objects* types using Visual Studio .8:T. This makes it very easy to determine what types are available for each class in the namespace you*re using. to start coding in Visual Studio .8:T. s you*ll see over the ne;t several weeks, it*s very easy
T7e tructure o< a .NET A;;lication To understand how the common language runtime manages code e;ecution, you must e;amine the structure of a .8:T application. The primary unit of a .8:T application is the assembly. n assembly is a self=describing collection of code, resources, and metadata. The assembly manifest contains information about what is contained within the assembly. The assembly manifest providesD
!dentity information, such as the assemblyLs name and version number list of all types e;posed by the assembly list of other assemblies re&uired by the assembly list of code access security instructions, including permissions re&uired by the assembly and permissions to be denied the assembly
:ach assembly has one and only one assembly manifest, and it contains all the description information for the assembly. )owever, the assembly manifest can be contained in its own file or within one of the assemblyLs modules. n assembly contains one or more modules. module contains the code that makes up your
application or library, and it contains metadata that describes that code. %hen you compile a project into an assembly, your code is converted from high=level code to !,. @ecause all managed code is first converted to !, code, applications written in different languages can easily interact. #or e;ample, one developer might write an application in Visual .9 that accesses a +,, in Visual @asic .8:T. @oth resources will be converted to !, modules before being e;ecuted, thus avoiding any language=incompatibility issues.
:ach module also contains a number of types. Types are templates that describe a set of data encapsulation and functionality. There are two kinds of typesD reference types /classes0 and value types /structures0. These types are discussed in greater detail in ,esson 4 of this chapter.
:ach type is described to the common language runtime in the assembly manifest.
type can
contain fields, properties, and methods, each of which should be related to a common functionality. #or e;ample, you might have a class that represents a bank account. !t contains fields, properties, and methods related to the functions needed to implement a bank account. field represents storage of a particular type of data. ?ne field might store the name of an account holder, for e;ample. Properties are similar to fields, but properties usually provide some kind of validation when data is set or retrieved. Gou might have a property that represents an account balance. %hen an attempt is made to change the value, the property can check to see if the attempted change is greater than a predetermined limit. !f the value is greater than the limit, the property does not allow the change. $ethods represent behavior, such as actions taken on data stored within the class or changes to the user interface. .ontinuing with the bank account e;ample, you might have a Transfer method that transfers a balance from a checking account to a savings account, or an method that warns users when their balances fall below a predetermined level. $om;ilation an. E-ecution o< a .NET A;;lication %hen you compile a .8:T application, it is not compiled to binary machine code< rather, it is converted to !,. This is the form that your deployed application takesFone or more assemblies consisting of e;ecutable files and +,, files in !, form. t least one of these assemblies will contain an e;ecutable file that has been designated as the entry point for the application. %hen e;ecution of your program begins, the first assembly is loaded into memory. t this point, the common language runtime e;amines the assembly manifest and determines the re&uirements to run the program. !t e;amines security permissions re&uested by the assembly and compares them with the systemLs security policy. !f the systemLs security policy does not allow the re&uested permissions, the application will not run. !f the application passes the systemLs security policy, the common language runtime e;ecutes the code. !t creates a process for the application to run in and begins application e;ecution. %hen e;ecution starts, the first bit of code that needs to be e;ecuted is loaded into lert
memory and compiled into native binary code from !, by the common language runtimeLs Eust=!n= Time /E!T0 compiler. ?nce compiled, the code is e;ecuted and stored in memory as native code. Thus, each portion of code is compiled only once when an application e;ecutes. %henever program e;ecution branches to code that has not yet run, the E!T compiler compiles it ahead of e;ecution and stores it in memory as binary code. This way, application performance is ma;imi'ed because only the parts of a program that are e;ecuted are compiled. The .8:T #ramework base class library contains the base classes that provide many of the services and objects you need when writing your applications. The class library is organi'ed into namespaces. namespace is a logical grouping of types that perform related functions. #or e;ample, the System.%indows.#orms namespace contains all the types that make up %indows forms and the controls used in those forms. 8amespaces are logical groupings of related classes. The namespaces in the .8:T base class library are organi'ed hierarchically. The root of the .8:T #ramework is the System namespace. ?ther namespaces can be accessed with the period operator. appears as followsD typical namespace construction
Na"es#ace
2escri#tion
This namespace is the root for many of the low=level types re&uired System by the .8:T #ramework. !t is the root for primitive data types as well, and it is the root for all the other namespaces in the .8:T base System..omponent$odel class library. This namespace contains classes involved in component creation and containment, such as attributes, type converters, and license System. +ata System.+ata..ommon System.+ata.?le+b System.+ata.SK,.lient System. +rawing System.!? System. $ath System. 2eflection System. Security System. Threading System.%indows.#orms providers. This namespace contains classes re&uired for database access and manipulations, as well as additional namespaces used for data access. This namespace contains a set of classes that are shared by the .8:T managed data providers. This namespace contains classes that make up the managed data provider for ?,: +@ data access. This namespace contains classes that are optimi'ed for interacting with $icrosoft SK, Server. This namespace e;poses >+!H functionality and provides classes that facilitate graphics rendering. !n this namespace, you will find types for handling file system !N?. This namespace is home to common mathematics functions such as e;tracting roots and trigonometry. This namespace provides support for obtaining information and dynamic creation of types at runtime. This namespace is home to types dealing with permissions, cryptography, and code access security. This namespace contains classes that facilitate the implementation of multithreaded applications. This namespace contains types involved in creating standard %indows applications. .lasses that represent forms and controls reside here as well.
The OLA- Services feat!re available in S;L Server version F'3 is no$ called S;L Server /333 Analysis Services' The ter" OLA- Services has been re#laced $ith the ter" Analysis Services' Analysis Services also incl!des a ne$ data "inin% co"#onent' The 6e#ository co"#onent available in S;L Server version F'3 is no$ called Microsoft S;L Server /333 Meta 2ata Services' 6eferences to the co"#onent no$ !se the ter" Meta 2ata Services' The ter" re#ository is !sed only in reference to the re#ository en%ine $ithin Meta 2ata Services S;L7SE6.E6 database consist of si( ty#e of ob)ects* They are* 4' TABLE /' ;=E6Y L' FO6M 0' 6E-O6T 5' MAC6O
Desi)n /ie& To b!ild or "odify the str!ct!re of a table $e $ork in the table desi%n vie$' 8e can s#ecify $hat kind of data $ill be hold'
Datas0eet /ie& To add* edit or analyses the data itself $e $ork in tables datasheet vie$ "ode'
8UERY# A +!ery is a +!estion that has to be asked the data' Access %athers data that ans$ers the +!estion fro" one or "ore table' The data that "ake !# the ans$er is either dynaset >if yo! edit it? or a sna#shot >it cannot be edited?'Each ti"e $e r!n +!ery* $e %et latest infor"ation in the dynaset' Access either dis#lays the dynaset or sna#shot for !s to vie$ or #erfor" an action on it* s!ch as deletin% or !#datin%'
Co%in)
The #!r#ose of testin% is to discover errors' Testin% is the #rocess of tryin% to discover every conceivable fa!lt or $eakness in a $ork #rod!ct' It #rovides a $ay to check the f!nctionality of co"#onents* s!b asse"blies* asse"blies andHor a finished
#rod!ct It is the #rocess of e(ercisin% soft$are $ith the intent of ens!rin% that the Soft$are syste" "eets its re+!ire"ents and !ser e(#ectations and does not fail in an !nacce#table "anner' There are vario!s ty#es of test' Each test ty#e addresses a s#ecific testin% re+!ire"ent'
T"3E OF TE T
#nit testin(
=nit testin% involves the desi%n of test cases that validate that the internal #ro%ra" lo%ic is f!nctionin% #ro#erly* and that #ro%ra" in#!ts #rod!ce valid o!t#!ts' All decision branches and internal code flo$ sho!ld be validated' It is the testin% of individ!al soft$are !nits of the a##lication 'it is done after the co"#letion of an individ!al !nit before inte%ration' This is a str!ct!ral testin%* that relies on kno$led%e of its constr!ction and is invasive' =nit tests #erfor" basic tests at co"#onent level and test a s#ecific b!siness #rocess* a##lication* andHor syste" confi%!ration' =nit tests ens!re that each !ni+!e #ath of a b!siness res!lts' #rocess #erfor"s acc!rately to the doc!"ented s#ecifications and contains clearly defined in#!ts and e(#ected
Inte(ration testin(
Inte%ration tests are desi%ned to test inte%rated soft$are co"#onents to deter"ine if they act!ally r!n as one #ro%ra"' Testin% is event driven and is "ore concerned $ith the basic o!tco"e of screens or fields' Inte%ration tests de"onstrate that altho!%h the co"#onents $ere individ!ally satisfaction* as sho$n by s!ccessf!lly !nit testin%* the co"bination of co"#onents is correct and consistent' Inte%ration testin% is s#ecifically ai"ed at e(#osin% the #roble"s that arise fro" the co"bination of co"#onents'
Functional test
F!nctional tests #rovide syste"atic de"onstrations that f!nctions tested are available as s#ecified by the b!siness and technical "an!als' re+!ire"ents* syste" doc!"entation* and !ser
F!nctional testin% is centered on the follo$in% ite"s, .alid In#!t acce#ted' Invalid In#!t re)ected' F!nctions O!t#!t be e(ercised' Syste"sH-roced!res, interfacin% syste"s or #roced!res "!st be invoked' , identified f!nctions "!st be e(ercised' , identified classes of a##lication o!t#!ts "!st , identified classes of invalid in#!t "!st be , identified classes of valid in#!t "!st be
Or%ani&ation and #re#aration of f!nctional tests is foc!sed on re+!ire"ents* key f!nctions* or s#ecial test cases' In addition* syste"atic covera%e #ertainin% to identify B!siness #rocess flo$sG data fields* #redefined #rocesses* and s!ccessive #rocesses "!st be considered for testin%' Before f!nctional testin% is co"#lete* additional tests are identified and the effective val!e of c!rrent tests is deter"ined'
=stem Test
Syste" testin% ens!res that the entire inte%rated soft$are syste" "eets re+!ire"ents' It tests a confi%!ration to ens!re kno$n and #redictable res!lts' An e(a"#le of syste" testin% is
the confi%!ration oriented syste" inte%ration test' Syste" testin% is based on #rocess descri#tions and flo$s* e"#hasi&in% #re7 driven #rocess links and inte%ration #oints'
=nit testin% is !s!ally cond!cted as #art of a co"bined code and !nit test #hase of the soft$are lifecycle* altho!%h it is not !nco""on for codin% and !nit testin% to be cond!cted as t$o distinct #hases'
Test strategy and approach #ield testing will be performed manually and functional tests will be written in detail. Test obAecti,es ll field entries must work properly. Pages must be activated from the identified link. The entry screen, messages and responses must not be delayed. Features to be teste. Verify that the entries are of the correct format 8o duplicate entries should be allowed ll links should take the user to the correct page.
Test Res!(ts# All the test cases "entioned above #assed s!ccessf!lly' No defects enco!ntered'
Test Res!(ts# All the test cases "entioned above #assed s!ccessf!lly' No defects enco!ntered'