cybervoting.doc
TRANSCRIPT
-
8/9/2019 CyberVoting.doc
1/59
SYNOPSIS
The objective of the CYBERVOTE project is to develop the first completely
secure cyber voting system based on W!" W#$" %#$" &T#$ and 'ava technologies
that (ill enable European citi)ens to vote through their mobile phones and !Cs connected
to *nternet+ The CYBERVOTE design (ill be driven by solutions (hich (ill allo( the
user authentication (hile guaranteeing ballot secrecy" sanctity and integrity but also the
freedom of e,pression of the voter and the user-friendliness and the acceptability of the
system+
Trial applications (ill be conducted (ith disabled" ill and traveling people on
different pilot elections+ CYBER Vote.s objective is to implement a trust(orthy e-votingprotocol (hich can be integrated to e,isting infrastructures for identification of voters+
The e-voting system (ill be able to handle multiple and concurrent elections and different
versions of cryptographic protocols+ *t (ill also provide citi)en access to supplementary
information related to voting (ith standard bro(sers+
-
8/9/2019 CyberVoting.doc
2/59
PROJECT DESCRIPTION
Cyber Vote uses different methods of encryption" (hich ensures the security of the
data given to the system" and it ensures voters authentication+ /eparating the database
server from the Cyber Vote server gives the system another security advantage+
0urthermore" Cyber Vote follo(s the secret ballots criteria" (hich separates voter.s
identity from the ballot" (hich maintains the privacy of the voting process+
The 1222 presidential elections forced most of the organi)ations around the (orld
to thin3 of a better (ay of voting that enables as much people to cast their ballots in a
convenient (ay+ *t (as suggested to introduce a system that enables voters to use the
internet to cast their ballots" since the internet is a cheap" fast" and effective (ay to
transfer data +#any researchers have studied the benefits and threats of using internet for
voting +#ost studies raised concerns about voters authentication" security of ballots
during transfer through internet" and maintaining the secret ballot" (hich means to
separate the identity of the voter from the ballot+
Online voting is not a ne( concept +*n the last three decades" studies tried to come
up (ith a (ay to create online voting systems that enable peoples to vote (hile they are
at their homes+ *t (as not until the late 42.s (hen the idea to gro( +/tudies e,pects thatonline voting (ill replace the present voting systems sooner and later+
-
8/9/2019 CyberVoting.doc
3/59
EXISTING SYSTEM:
There are many technicals that appear (hen applying remote online voting
systems+
The first issue that can be a threat is a coordinated net(or3 flood+
nother problem that prevents the implementation of online voting is the security on the
other side of the system " the voter terminal
This is probably the toughest challenge facing the developers of those systems+
5iving secrecy of ballots" since other people can (atch the voting process from behind
the voters bac3+
&aving access to computers and internet is another important issue" since access to
internet varies from one class to another in the society (hich might not give accurate
result+
PROPOSED SYSTEM:
0looding any net(or3 can be solved by having a bac3up server that pic3s up as
soon as the other server stops (or3ing+
0urthermore"replacing major servers (ith smaller servers placed according to population
of voters in different areas (ill help stopping any 3ind of coordinate net(or3 flooding+
/ecuring all the voters terminals could be an impossible mission"simply because Voters
run multiple applications on their terminals that might be capable of changing or
manipulating the voting process+
-
8/9/2019 CyberVoting.doc
4/59
The most practical solution is to have an online scanning tools that scans the voters
6computer from potential threats before the voters get to cast their votes+
nother solution that can be more time efficient is transmission a tool to the voter.s
computer after that stops all the processes running on the machine"e,cept for the
processes the system runs+
This solution (ill reduce the ris3 of having security problems on the voters terminals"but
it does not eliminate it+
&aving ccess to the internet should not have a huge impact on the voting process if (e
3eep the old fashion (ay by going to polls (here terminals are available"located in the
areas (here computer access is not available as much as other areas+
0or more security purpose *mage !rocessing is used to recogni)e the face of the voters+
Advantages:
Online voting provides convenience" cost-saving" and saves the voters from dealing
(ith heavy traffic" bad (eather conditions" and postal services issues+ 0urthermore" it
helps millions of disabled and blind people to cast their votes (ithout any assistance+
-
8/9/2019 CyberVoting.doc
5/59
SYSTEM DESIGN
-
8/9/2019 CyberVoting.doc
6/59
INPUT DESIGN
*nput design is a part of overall system design+ The main objective during the
input desings is as given belo(7
To produce a cost-effective method of input+
To achive the highest possible level of accuracy+
To ensure that the input is acceptable and understood by the user+
INPUT STAGES
The main input stages can be listed as belo(7
8ata recording
8ata transcription
8ata conversion
8ata verification
8ata control
8ata transmission
8ata validation
8ata correction
INPUT TYPES
*t is necessary to determine the various types of inputs+ *nputs can be categori)ed
as follo(s7
E,ternal inputs" (hich are prime inputs for the system+
-
8/9/2019 CyberVoting.doc
7/59
*nternal inputs" (hich are user communications (ith the system+
Operational are computer department.s communications to the system+
OUTPUT DESIGN
Outputs from computer systems are re9uired primarily to communicate the results
of processing to users+ They are also used to provide a permanent copy of the results for
later consultation+ The various types of outputs in general are7
E,ternal Outputs" (hose destination is outside the organi)ation+
*nternal Outputs (hose destination is (ith in organisation and they are the user.s
main interface (ith the computer+
Operational outputs (hose use is purely (ith in the computer department+
*nterface outputs" (hich involve the user in communicating directly (ith
OUTPUT DEFINITION
The outputs should be defined in terms of the follo(ing points7
Type o t!e o"tp"t
Content o t!e o"tp"t
Fo#$at o t!e o"tp"t
%o&at'on o t!e o"tp"t
F#e("en&y o t!e o"tp"t
)o*"$e o t!e o"tp"t
Se("en&e o t!e o"tp"t
-
8/9/2019 CyberVoting.doc
8/59
*t is not al(ays desirable to print or display data as it is held on a computer+ *t should be
decided as (hich form of the output is the most suitable+
SOFT+ARE RE,UIREMENT
Operating /ystem 7 Windo(s %! !rofessional
Environment 7 Visual /tudio +:et 122;
+:et 0rame(or3 7 Version
Web Technology 7 ctive /erver !ages+:et
Web /erver 7 *nternet information /erver =+2
Bac3 End 7 /?$ /erver 122=
-ARD+ARE RE,UIREMENT
!rocessor 7 !entium *V
R# 7 =@1#B
#onitor si)e 7 @A/V5
&ard 8is3 7 ;2 5B
E,tra 8evice 7 C8-RO# =1,
-
8/9/2019 CyberVoting.doc
9/59
Operating /ystem 7 Windo(s %!
eyboard 7 @2D standards eyboard
A.OUT ASP/NET
INTRODUCTION OF )ISUA% STUDIO
*n 1221" Visual /tudio too3 the biggest leap in innovation since it (as released"
(ith the introduction of Visual Basic +:ET as it (as renamedF+ fter more than a
decade" Visual Basic (as overdue for a major overhaul+ But +:ET goes beyond an
overhaul+ *t changes almost every aspect of soft(are development+ 0rom integrating
*nternet functionality to creating object-oriented frame(or3s" Visual Basic +:ET
challenged traditional VB developers to learn dramatic ne( concepts and techni9ues+
122= brings us an enhanced Visual Basic language renamed this time Visual Basic
122=F+ :e( features have been added that cement this language.s position as a trueobject-oriented language+ With Visual Basic 122=" it is still going to be a challenge for the
traditional VBG developers to learn" but it is an easy road and boo3s li3e this are here to
help you on your path+ 0irst" it.s necessary to learn the differences bet(een Visual Basic
122= and the older versions+ *n some cases" the same functionality is implemented in a
different (ay+ This (as not done arbitrarilyHthere are good reasons for the changes+ But
you must be prepared to unlearn old habits and form ne( ones+ :e,t" you must be open
to the ne( concepts+ 0ull object orientation" ne( component techni9ues" ne( visual tools
for both local and *nternet interfacesHall of these and more must become part of your
s3ill+
T-E IMPORTANCE OF )ISUA% .ASIC
-
8/9/2019 CyberVoting.doc
10/59
Early in the adoption cycle of +:ET" #icrosoft.s ne( language" C>" got the lion.s
share of attention+ But as +:ET adoption has increased" Visual Basic.s continuing
importance has also been apparent+ #icrosoft has publicly stated that they consider
Visual Basic the language of choice for applications (here developer productivity is one
of the highest priorities+ 0uture development of Visual Basic is emphasi)ing capabilities
that enable access to the (hole e,panse of the +:ET 0rame(or3 in the most productive
(ay" (hile C> development is emphasi)ing the e,perience of (riting code+ That fits the
traditional role of Visual Basic as the language developer.s use in the real (orld to create
business applications as 9uic3ly as possible+ This difference is more than academic+
One of the most important advantages of the +:ET 0rame(or3 is that it allo(s
applications to be (ritten (ith dramatically less code+ *n the (orld of business
applications" the goal is to concentrate on (riting business logic and to eliminate routine
coding tas3s as much as possible+ The value in this ne( (orld is not in churning out lots
of codeHit is in (riting robust" useful applications (ith as little code as possible+
AN O)ER)IE+ OF T-E /NET FRAME+OR0
+:ET is a frame(or3 that covers all the layers of soft(are development above the
operating system level+ *t provides the richest level of integration among presentation
technologies" component Technologies and data technologies ever seen on a #icrosoft" or
perhaps any" platform+ /econd" the entire architecture has been created to ma3e it as easy
to develop *nternet applications as it is to develop for the des3top+ The +:ET 0rame(or3
actually I(raps the operating system" insulating soft(are developed (ith +:ET from
most operating system specifics such as file handling and memory allocation+ This
prepares for a possible future in (hich the soft(are developed for +:ET is portable to a
(ide variety of hard(are and operating system foundations+
V/+:ET supports Windo(s 122
-
8/9/2019 CyberVoting.doc
11/59
multiple (ays of rendering user and program interfaces+ *n bet(een" there are layers that
provide just about any system-level capability that a developer (ould need+
MICROSOFT /NET
t the base is the common language runtime" often abbreviated to C$R+ This is
the heart of the +:ET 0rame(or3 it is the engine that drives 3ey functionality+ *t includes"
for e,ample" a common system of data types+ These common types" plus a standard
interface convention" ma3e cross-language inheritance possible+ *n addition to allocation
and management of memory" the C$R also does reference trac3ing for objects and
handles garbage collection+ The middle layer includes the ne,t generation of standard
system /ervices such as classes that manage data and E,tensible #ar3up $anguage
%#$F+ These services are brought under control of the 0rame(or3" ma3ing them
universally available and ma3ing their usage consistent across languages+ The top layer
includes user and program interfaces+
Windo(s 0orms is a ne( and more advanced (ay to do standard Win
-
8/9/2019 CyberVoting.doc
12/59
FEATURES OF ASP/NET
/!+:ET is the ne,t version of ctive /erver !ages /!FJ it is a unified Web
development platform that provides the services necessary for developers to build
enterprise-class Web applications+ While /!+:ET is largely synta, compatible" it also
provides a ne( programming model and infrastructure for more secure" scalable" and
stable applications+ /!+:ET is a compiled" :ET-based environmentJ (e can author
applications in any +:ET compatible language" including Visual Basic +:ET" C>" and
'/cript+ dditionally" the entire +:ET 0rame(or3 is available to any /!+:ET
application+ 8evelopers can easily access the benefits of these technologies" (hich
include the managed common language runtime environment C$RF" type safety"
inheritance" and so on+
/!+:ET has been designed to (or3 seamlessly (ith WY/*WY5 &T#$ editors
and other programming tools" including #icrosoft Visual /tudio +:ET+ :ot only does this
ma3e Web development easier" but it also provides all the benefits that these tools have to
offer" including a 5K* that developers can use to drop server controls onto a Web page
and fully integrated debugging support+ 8evelopers can choose from the follo(ing t(o
features (hen creating an /!+:ET application+ Web 0orms and Web services" or
combine these in any (ay they see fit+ Each is supported by the same infrastructure that
allo(s you to use authentication schemesJ cache fre9uently used data" or customi)es your
applicationLs configuration" to name only a fe( possibilities+
Web 0orms allo(s us to build po(erful forms-based Web pages+ When building
these pages" (e can use /!+:ET server controls to create common K* elements" and
program them for common tas3s+ These controls allo( to rapidly building a Web 0orm
out of reusable built-in or custom components" simplifying the code of a page+ n %#$
Web service provides the means to access server functionality remotely+ Ksing Webservices" businesses can e,pose programmatic interfaces to their data or business logic"
(hich in turn can be obtained and manipulated by client and server applications+ %#$
Web services enable the e,change of data in client-server or server-server scenarios"
using standards li3e &TT! and %#$ messaging to move data across fire(alls+ %#$ Web
services are not tied to a particular component technology or object-calling convention+
-
8/9/2019 CyberVoting.doc
13/59
s a result" programs (ritten in any language" using any component model" and running
on any operating system can access %#$ Web services+ Each of these models can ta3e
full advantage of all /!+:ET features" as (ell as the po(er of the +:ET 0rame(or3
and +:ET 0rame(or3 common language runtime+
ccessing databases from /!+:ET applications is an often-used techni9ue for
displaying data to Web site visitors+ /!+:ET ma3es it easier than ever to access
databases for this purpose+ *t also allo(s us to manage the database from your code+
/!+:ET provides a simple model that enables Web developers to (rite logic that runs at
the application level+ 8evelopers can (rite this code in the global+asp, te,t file or in a
compiled class deployed as an assembly+ This logic can include application-level events"
but developers can easily e,tend this model to suit the needs of their Web application+
/!+:ET provides easy-to-use application and session-state facilities that are familiar to
/! developers and are readily compatible (ith all other +:ET 0rame(or3 !*s+
/!+:ET offers the *&ttp&andler and *&ttp#odule interfaces+ *mplementing the
*&ttp&andler interface gives you a means of interacting (ith the lo(-level re9uest and
response services of the **/ Web server and provides functionality much li3e */!*
e,tensions" but (ith a simpler programming model+ *mplementing the *&ttp#odule
interface allo(s you to include custom events that participate in every re9uest made to
your application+ /!+:ET ta3es advantage of performance enhancements found in
the +:ET 0rame(or3 and common language runtime+ dditionally" it has been designed
to offer significant performance improvements over /! and other Web development
platforms+ ll /!+:ET code is compiled" rather than interpreted" (hich allo(s early
binding" strong typing" and just-in-time '*TF compilation to native code" to name only a
fe( of its benefits+
/!+:ET is also easily factorable" meaning that developers can remove modulesa session module" for instanceF that are not relevant to the application they are
developing+ /!+:ET provides e,tensive caching services both built-in services and
caching !*sF+ /!+:ET also ships (ith performance counters that developers and
system administrators can monitor to test ne( applications and gather metrics on e,isting
applications+ Writing custom debug statements to your Web page can help immensely in
-
8/9/2019 CyberVoting.doc
14/59
troubleshooting your applicationLs code+ &o(ever" it can cause embarrassment if it is not
removed+ The problem is that removing the debug statements from your pages (hen your
application is ready to be ported to a production server can re9uire significant effort+
/!+:ET offers the Trace Conte,t class" (hich allo(s us to (rite custom debug
statements to our pages as (e develop them+ They appear only (hen you have enabled
tracing for a page or entire application+ Enabling tracing also appends details about a
re9uest to the page" or" if you so specify" to a custom trace vie(er that is stored in the root
directory of your application+
The +:ET 0rame(or3 and /!+:ET provide default authori)ation and
authentication schemes for Web applications+ We can easily remove" add to" or replace
these schemes" depending upon the needs of our application+ /!+:ET configuration
settings are stored in %#$-based files" (hich are human readable and (ritable+ Each of
our applications can have a distinct configuration file and (e can e,tend the
configuration scheme to suit our re9uirements+
T-E /NET FRAME+OR0
The +:ET 0rame(or3 is a ne( computing platform that simplifies application
development in the highly distributed environment of the *nternet+
O.JECTI)ES OF /NET FRAME+OR0
@+ To provide a consistent object-oriented programming environment (hether
object codes is stored and e,ecuted locally on *nternet-distributed" or e,ecuted remotely+
1+ To provide a code-e,ecution environment to minimi)es soft(are deployment
and guarantees safe e,ecution of code+
-
8/9/2019 CyberVoting.doc
15/59
T-E COMMON %ANGUAGE RUNTIME 1C%R2
The common language runtime is the foundation of the +:ET 0rame(or3+ *t
manages code at e,ecution time" providing important services such as memory
management" thread management" and removing and also ensures more security and
robustness+ The concept of code management is a fundamental principle of the runtime+
Code that targets the runtime is 3no(n as managed code" (hile code that does not target
the runtime is 3no(n as unmanaged code+
T-E /NET FRAME +OR0 C%ASS %I.RARY
*t is a comprehensive" object-oriented collection of reusable types used to develop
applications ranging from traditional command-line or graphical user interface 5K*F
applications to applications based on the latest innovations provided by /!+:ET" such as
Web 0orms and %#$ Web services+ The +:ET 0rame(or3 can be hosted by unmanaged
components that load the common language runtime into their processes and initiate the
e,ecution of managed code" thereby creating a soft(are environment that can e,ploit
both managed and unmanaged features+ The +:ET 0rame(or3 not only provides several
runtime hosts" but also supports the development of third-party runtime hosts+ *nternet
E,plorer is an e,ample of an unmanaged application that hosts the runtime in the form
of a #*#E type e,tensionF+ Ksing *nternet E,plorer to host the runtime to enables
embeds managed components or Windo(s 0orms controls in &T#$ documents+
FEATURES OF T-E COMMON %ANGUAGE RUNTIME
The common language runtime manages memoryJ thread e,ecution" code
e,ecution" code safety verification" compilation" and other system services these are all
run on C$R+
/ecurity+
-
8/9/2019 CyberVoting.doc
16/59
Robustness+
!roductivity+
!erformance+
SECURITY
The runtime enforces code access security+ The security features of the runtime
thus enable legitimate *nternet-deployed soft(are to be e,ceptionally featuring rich+ With
regards to security" managed components are a(arded varying degrees of trust"
depending on a number of factors that include their origin to perform file-access
operations" registry-access operations" or other sensitive functions+
RO.USTNESS
The runtime also enforces code robustness by implementing a strict type- and
code-verification infrastructure called the common type system CT/F+ The CT/ ensures
that all managed code is self-describing+ The managed environment of the runtime
eliminates many common soft(are issues+
PRODUCTI)ITY
The runtime also accelerates developer productivity+ 0or e,ample" programmers
can (rite applications in their development language of choice" yet ta3e full advantage of
the runtime" the class library" and components (ritten in other languages by other
developers+
PERFORMANCE
-
8/9/2019 CyberVoting.doc
17/59
The runtime is designed to enhance performance+ lthough the common language
runtime provides many standard runtime services" managed code is never interpreted+
feature called just-in-time '*TF compiling enables all managed code to run in the native
machine language of the system on (hich it is e,ecuting+ 0inally" the runtime can be
hosted by high-performance" server-side applications" such as #icrosoft /?$ /erverM
and *nternet *nformation /ervices **/F
DATA ACCESS +IT- ADO/NET
s you develop applications using 8O+:ET" you (ill have different
re9uirements for (or3ing (ith data+ You might never need to directly edit an %#$ file
containing data - but it is very useful to understand the data architecture in 8O+:ET+
8O+:ET offers several advantages over previous versions of 8O7
*nteroperability
#aintainability
!rogrammability
!erformance /calability
INTEROPERA.I%ITY
8O+:ET applications can ta3e advantage of the fle,ibility and broad acceptance
of %#$+ Because %#$ is the format for transmitting datasets across the net(or3" any
component that can read the %#$ format can process data+ The receiving component
need not be an 8O+:ET component+ The transmitting component can simply transmit
the dataset to its destination (ithout regard to ho( the receiving component isimplemented+ The destination component might be a Visual /tudio application or any
other application implemented (ith any tool (hatsoever+ The only re9uirement is that the
receiving component be able to read %#$+ /O" %#$ (as designed (ith e,actly this 3ind
of interoperability in mind+
-
8/9/2019 CyberVoting.doc
18/59
MAINTAINA.I%ITY
*n the life of a deployed system" modest changes are possible" but substantial"
rchitectural changes are rarely attempted because they are so difficult+ s the
performance load on a deployed application server gro(s" system resources can become
scarce and response time or throughput can suffer+ 0aced (ith this problem" soft(are
architects can choose to divide the serverLs business-logic processing and user-interface
processing onto separate tiers on separate machines+ *n effect" the application server tier
is replaced (ith t(o tiers" alleviating the shortage of system resources+ *f the original
application is implemented in 8O+:ET using datasets" this transformation is made
easier+ 8O+:ET data components in Visual /tudio encapsulate data access functionality
in various (ays that help you program more 9uic3ly and (ith fe(er mista3es+
PERFORMANCE
8O+:ET datasets offer performance advantages over 8O disconnected record
sets+ *n 8O+:ET data-type conversion is not necessary+
SCA%A.I%ITY
8O+:ET accommodates scalability by encouraging programmers to conserve
limited resources+ ny 8O+:ET application employs disconnected access to dataJ it
does not retain database loc3s or active database connections for long durations+
)ISUA% STUDIO /NET
-
8/9/2019 CyberVoting.doc
19/59
Visual /tudio +:ET is a complete set of development tools for building /! Web
applications" %#$ Web services" des3top applications" and mobile applications *n
addition to building high-performing des3top applications" you can use Visual /tudioLs
po(erful component-based development tools and other technologies to simplify team-
based design" development" and deployment of Enterprise solutions+ Visual Basic +:ET"
Visual CNN +:ET" and Visual C> +:ET all use the same integrated development
environment *8EF" (hich allo(s them to share tools and facilitates in the creation of
mi,ed-language solutions+ *n addition" these languages leverage the functionality of
the +:ET 0rame(or3 and simplify the development of /! Web applications and %#$
Web services+
Visual /tudio supports the +:ET 0rame(or3" (hich provides a common language
runtime and unified programming classesJ /!+:ET uses these components to create
/! Web applications and %#$ Web services+ lso it includes #/8: $ibrary" (hich
contains all the documentation for these development tools+ %#$ WEB /ERV*CE/
%#$ Web services are applications that can receive the re9uested data using %#$ over
&TT!+ %#$ Web services are not tied to a particular component technology or object-
calling convention but it can be accessed by any language" component model" or
operating system+ *n Visual /tudio +:ET" you can 9uic3ly create and include %#$ Web
services using Visual Basic" Visual C>" '/cript" #anaged E,tensions for CNN" or T$
/erver+
XM% SUPPORT
E,tensible #ar3up $anguage %#$F provides a method for describing structured
data+ %#$ is a subset of /5#$ that is optimi)ed for delivery over the Web+ The World
Wide Web Consortium W
-
8/9/2019 CyberVoting.doc
20/59
COMMON %ANGUAE SPEGIFICATION 1C%S2
Visual Basic+:ET is also compliant (ith C$/ Common $anguage /pecificationF
and supports structured e,ception handling+ C$/ is set of rules and constructs that are
supported by the C$R Common $anguage RuntimeF+ C$R is the runtime environment
provided by the +:ET 0rame(or3J it manages the e,ecution of the code and also ma3es
the development process easier by providing services+ Visual Basic+:ET is a C$/-
compliant language+ ny objects" classes" or components that created in Visual
Basic+:ET can be used in any other C$/-compliant language+ *n addition" (e can use
objects" classes" and components created in other C$/-compliant languages in Visual
Basic+:ET +The use of C$/ ensures complete interoperability among applications"
regardless of the languages used to create the application+
IMP%EMENTATION IN-ERITANCE
Visual Basic+:ET supports implementation inheritance+ This means that" (hile
creating applications in Visual Basic+:ET" (e can drive from another class" (hich is
3no(n as the base class that derived class inherits all the methods and properties of the
base class+ *n the derived class" (e can either use the e,isting code of the base class or
override the e,isting code+ Therefore" (ith help of the implementation inheritance" code
can be reused+
CONSTRUCTORS AND DESTRUCTORS
Constructors are used to initiali)e objects" (hereas destructors are used to destroy
them+ *n other (ords" destructors are used to release the resources allocated to the object+
*n Visual Basic+:ET the sub finali)e procedure is available+ The sub finali)e procedure is
used to complete the tas3s that must be performed (hen an object is destroyed+ The sub
finali)e procedure is called automatically (hen 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+
-
8/9/2019 CyberVoting.doc
21/59
GAR.AGE CO%%ECTION
5arbage Collection is another ne( feature in Visual Basic+:ET+ The +:ET
0rame(or3 monitors allocated resources" such as objects and variables+ *n addition"
the +:ET 0rame(or3 automatically releases memory for reuse by destroying objects that
are no longer in use+ *n Visual Basic+:ET" the garbage collector chec3s for the objects
that are not currently in use by applications+ When the garbage collector comes across an
object that is mar3ed for garbage collection" it releases the memory occupied by the
object+
O)ER%OADING
Overloading is another feature in Visual Basic+:ET+ Overloading enables us to
define multiple procedures (ith the same name" (here each procedure has a different set
of arguments+ Besides using overloading for procedures" (e can use it for constructors
and properties in a class+
MU%TIT-READING
Visual Basic+:ET also supports multithreading+ n application that supports
multithreading can handle multiple tas3s simultaneously" (e can use multithreading to
decrease the time ta3en by an application to respond to user interaction+ To decrease the
time ta3en by an application to respond to user interaction" (e must ensure that a separate
thread in the application handles user interaction+
STRUCTURED EXCEPTION -AND%ING
-
8/9/2019 CyberVoting.doc
22/59
Visual Basic+:ET supports structured handling" (hich enables us to detect and
remove errors at runtime+ *n Visual Basic+:ET" (e need to use TryCatch0inally
statements to create e,ception handlers+
A.OUT S,% 3 STRUCTURED ,UERY %ANGUAGE
FEATURES OF S,% SER)ER 4555
The O$! /ervices feature available in /?$ /erver version A+2 is no( called
/?$ /erver 1222 nalysis /ervices+ The term O$! /ervices has been replaced (ith the
term nalysis /ervices+ nalysis /ervices also includes a ne( data mining component+
The Repository component available in /?$ /erver version A+2 is no( called #icrosoft
/?$ /erver 1222 #eta 8ata /ervices+ References to the component no( use the term
#eta 8ata /ervices+ The term repository is used only in reference to the repository engine
(ithin #eta 8ata /ervices
/?$-/ERVER database consist of si, type of objects"
They are"
TB$E
?KERY
0OR#
RE!ORT
#CRO
-
8/9/2019 CyberVoting.doc
23/59
TA.%ES
*n relational database systems 8B/F data are represented using tables relationsF+
9uery issued against the 8B/ also results in a table+ table has the follo(ing structure7
Column @ Column 1 + + + Column n
table is uni9uely identified by its name and consists of ro(s that contain the
stored information" each ro( containing e,actly one tuple or recordF+ table can have
one or more columns+
column is made up of a column name and a data type" and it describes an
attribute of the tuples+ The structure of a table" also called relation schema" thus is defined
by its attributes+
The type of information to be stored in a table is defined by the data types of the
attributes at table creation time+
/?$ uses the terms table" ro(" and column for relation" tuple" and attribute"
respectively+ *n this tutorial (e (ill use the terms interchangeably+
table can have up to 1=D columns (hich may have different or same data types
and sets of values domainsF" respectively+ !ossible domains are alphanumeric data
stringsF" numbers and date formats+ /?$ offers the follo(ing basic data types7
P char nF7 0i,ed-length character data stringF" n characters long+ The ma,imum
si)e for n is 1== bytes 1222 in Oracle;F+ :ote that a string of type char is al(ays
padded on right (ith blan3s to full length of n+ N can be memory consumingF+
E,ample7 char D2F
-
8/9/2019 CyberVoting.doc
24/59
P varchar1 nF7 Variable-length character string+ The ma,imum si)e for n is 1222
D222 in Oracle;F+ Only the bytes used for a string re9uire storage+ E,ample7
varchar;2F
P :umber o" dF7 :umeric data type for integers and reals+ o Q overall number of
digits" d Q number of digits to the right of the decimal point+ #a,imum values7 o
Q
-
8/9/2019 CyberVoting.doc
25/59
Des'gn )'e6
To build or modify the structure of a table (e (or3 in the table design vie(+ We
can specify (hat 3ind of data (ill be hold+
Datas!eet )'e6
To add" edit or analyses the data itself (e (or3 in tables datasheet vie( mode+
,UERY
9uery is a 9uestion that has to be as3ed the data+ ccess gathers data that
ans(ers the 9uestion from one or more table+ The data that ma3e up the ans(er is either
dynast if you edit itF or a snapshot it cannot be editedF+Each time (e run 9uery" (e getlatest information in the dynast+ ccess either displays the dynast or snapshot for us to
vie( or perform an action on it" such as deleting or updating+
FORMS
form is used to vie( and edit information in the database record by record +
form displays only the information (e (ant to see in the (ay (e (ant to see it+ 0orms
use the familiar controls such as te,tbo,es and chec3bo,es+ This ma3es vie(ing and
entering data easy+
)'e6s o Fo#$
We can (or3 (ith forms in several primarily there are t(o vie(s"
They are"
8esign Vie(
0orm Vie(
Des'gn )'e6
-
8/9/2019 CyberVoting.doc
26/59
To build or modify the structure of a form" (e (or3 in forms design vie(+ We can
add control to the form that are bound to fields in a table or 9uery" includes te,tbo,es"
option buttons" graphs and pictures+
Fo#$ )'e6
The form vie( (hich display the (hole design of the form+
SOURCE CODE
-OME PAGE:
ADMIN %OGIN:
using /ystem+Web+K*J
using /ystem+Web+K*+&tmlControlsJ
using /ystem+Web+K*+WebControlsJ
using /ystem+Web+K*+WebControls+Web!artsJ
using /ystem+%ml+$in9J
public partial class dmin$ogin 7 /ystem+Web+K*+!age
U
protected void !age$oadobject sender" Eventrgs eF
U
protected void Button@Clic3object sender" Eventrgs eF
U
if Te,tBo,@+Te,t QQ XdminX Te,tBo,1+Te,t QQ XdminXF
U
Response+RedirectXdmin!age+asp,XFJ
-
8/9/2019 CyberVoting.doc
27/59
else
U
Response+WriteX*nvalid Kser*dXFJ
ADMIN PAGE
)OTING DATE DETAI%S
SA)ING DATE DETAI%S
using /ystemJ
using /ystem+CollectionsJ
using /ystem+ConfigurationJ
using /ystem+8ataJ
using /ystem+$in9J
using /ystem+WebJ
using /ystem+Web+/ecurityJ
using /ystem+Web+K*J
using /ystem+Web+K*+&tmlControlsJ
using /ystem+Web+K*+WebControlsJ
using /ystem+Web+K*+WebControls+Web!artsJ
using /ystem+%ml+$in9J
public partial class Voting8ate8etails 7 /ystem+Web+K*+!age
U
Cls8b$ayer Obj8b Q ne( Cls8b$ayerFJ
protected void !age$oadobject sender" Eventrgs eF
U
-
8/9/2019 CyberVoting.doc
28/59
7
CA%ENDAR
protected void Calendar@/electionChangedobject sender" Eventrgs eF
U
if Te,tBo,;+Te,t QQ XX Te,tBo,4+Te,t QQ XX Te,tBo,@2+Te,t QQ XX
Te,tBo,@@+Te,t QQ XXF
U
Te,tBo,;+Te,t Q Calendar@+/elected8ate+To/hort8ate/tringFJ
Te,tBo,4+Te,t Q XXJ
Te,tBo,@2+Te,t Q XXJ
Te,tBo,@@+Te,t Q XXJ
else
U
if Te,tBo,4+Te,t QQ XX Te,tBo,@2+Te,t QQ XX Te,tBo,@@+Te,t QQ XXF
U
Te,tBo,4+Te,t Q Calendar@+/elected8ate+To/hort8ate/tringFJ
else
U
if Te,tBo,@2+Te,t QQ XX Te,tBo,@@+Te,t QQ XXF
U
Te,tBo,@2+Te,t Q Calendar@+/elected8ate+To/hort8ate/tringFJ
else
U
if Te,tBo,@@+Te,t QQ XXF
U
Te,tBo,@@+Te,t Q Calendar@+/elected8ate+To/hort8ate/tringFJ
-
8/9/2019 CyberVoting.doc
29/59
-
8/9/2019 CyberVoting.doc
30/59
using /ystem+Web+K*J
using /ystem+Web+K*+&tmlControlsJ
using /ystem+Web+K*+WebControlsJ
using /ystem+Web+K*+WebControls+Web!artsJ
using /ystem+%ml+$in9J
using /ystem+8ata+/9lClientJ
public partial class VoterRegistration 7 /ystem+Web+K*+!age
U
Cls8b$ayer obj8b Q ne( Cls8b$ayerFJ
protected void !age$oadobject sender" Eventrgs eF
U
$abel@+Te,t Q 8ateTime+:o(+To/hort8ate/tringFJ
string ?uery Q Xselect Reg/tart8ate"RegEnd8ate from Voting8ateXJ
/9l8ataReader dr Q obj8b+/elect?ueryFJ
if dr+ReadFF
U
$abel1+Te,t Q drS2+To/tringFJ
$abel
-
8/9/2019 CyberVoting.doc
31/59
protected void Button@Clic3object sender" Eventrgs eF
U
string ?uery Q Xinsert into
VoterReg0:ame"$:ame"K:ame"!ass(ord"ddress"!hone"EmailF valuesLX N
Te,tBo,@+Te,t N XL"LX N Te,tBo,1+Te,t N XL"LX N Te,tBo,
-
8/9/2019 CyberVoting.doc
32/59
string conn Q
Configuration#anager+Connection/tringsSXEmployeeConn/tringX+Connection/tringJ
connection Q ne( /9lConnectionFJ
connection+Connection/tring Q X8ata /ourceQlocalhostJ*nitial
CatalogQCyberVoteJ*ntegrated /ecurityQTrueXJ
string s9l Q X*:/ERT *:TO Empempname"empid"im!hotoF
V$KE/[Emp:ame"[Emp*d"[*m!hotoF /E$ECT [[*8E:T*TYXJ
/9lCommand cmd Q ne( /9lCommandX/pVoterRegX" connectionFJ
cmd+CommandType Q CommandType+/tored!rocedureJ
cmd+!arameters+ddWithValueX[0:ameX" Te,tBo,@+Te,t+TrimFFJ
cmd+!arameters+ddWithValueX[$:ameX" Te,tBo,1+Te,t+TrimFFJ
cmd+!arameters+ddWithValueX[K:ameX" Te,tBo,
-
8/9/2019 CyberVoting.doc
33/59
U
connection+CloseFJ
protected void Button1Clic3object sender" Eventrgs eF
U
)OTER PAGE
)OTER %OGIN
SIGN IN
using /ystemJ
using /ystem+CollectionsJ
using /ystem+ConfigurationJ
using /ystem+8ataJ
using /ystem+$in9J
using /ystem+WebJ
using /ystem+Web+/ecurityJ
using /ystem+Web+K*J
using /ystem+Web+K*+&tmlControlsJ
using /ystem+%ml+$in9J
using /ystem+8ata+/9lClientJusing /ystem+8ra(ingJ
using /ystem+/ecurity+CryptographyJ
using /ystem+Component#odelJ
using /ystem+*OJ
-
8/9/2019 CyberVoting.doc
34/59
public partial class VoterRegistration 7 /ystem+Web+K*+!age
U
Cls8b$ayer obj8b Q ne( Cls8b$ayerFJ
byteS barray@J
byteS barray1J
protected void !age$oadobject sender" Eventrgs eF
U
protected void Button@Clic3object sender" Eventrgs eF
U
string ?uery Q Xselect K:ame"!ass(ord from VoterReg (here K:ame li3e LX N
Te,tBo,@+Te,t N XLand !ass(ord li3e LX N Te,tBo,1+Te,t N XL XJ
/9l8ataReader dr Q obj8b+/elect?ueryFJ
if dr+ReadFF
U
Te,tBo,@+Te,t Q drS2+To/tringFJ
Te,tBo,1+Te,t Q drS@+To/tringFJ
Response+RedirectXVoters!age+asp,XFJ
else
U
Response+WriteX*nvalid Kser *dXFJ
*mage@+*mageKrl Q X]^&andler+ash,_:ameQX N Te,tBo,@+Te,tJ
/essionSXaX Q *mage@+*mageKrl+To/tringFJ
P-OTO .RO+SE
-
8/9/2019 CyberVoting.doc
35/59
COMPARE
protected void Button1Clic3object sender" Eventrgs eF
U
try
U
Reading Bytes 0rom Kploaded *mages
*mage@+*mageKrl Q 0ileKpload@+!osted0ile+0ile:ameJ
*mage1+*mageKrl Q 0ileKpload1+!osted0ile+0ile:ameJ
if 0ileKpload@+&as0ile 0ileKpload1+&as0ileF
U
using BinaryReader reader@ Q ne(
BinaryReader0ileKpload@+!osted0ile+*nput/treamFF
U
using BinaryReader reader1 Q ne(
BinaryReader0ileKpload1+!osted0ile+*nput/treamFF
U
barray@ Q reader@+ReadBytes0ileKpload@+!osted0ile+Content$engthFJ
barray1 Q reader1+ReadBytes0ileKpload1+!osted0ile+Content$engthFJ
Converting Byte rray To *mage nd Then *nto Bitmap
*mageConverter ic Q ne( *mageConverterFJ
*mageConverter ic Q ne( *mageConverterFJ
-
8/9/2019 CyberVoting.doc
36/59
*mage img Q *mageFic+Convert0rombarray@FJ
Bitmap bmp@ Q ne( BitmapimgFJ
*mage img@ Q *mageFic+Convert0rombarray1FJ
Bitmap bmp1 Q ne( Bitmapimg@FJ
0ileKpload@+/aves/erver+#ap!athXimgXF+To/tringF N [X\X N
0ileKpload@+0ile:ameFJ
Calling Compare 0unction
if Class@+Comparebmp@" bmp1F QQ Class@+CompareResult+ciCompareO3F
U
$abel@+Visible Q trueJ
$abel@+Te,t Q X*mages re /ameXJ
Button
-
8/9/2019 CyberVoting.doc
37/59
$abel@+Te,t Q e,+#essage+To/tringFJ
GO TO )OTING PAGE
protected void Button
-
8/9/2019 CyberVoting.doc
38/59
U
$abel@+Te,t Q 8ateTime+:o(+To/hort8ate/tringFJ
string ?uery Q Xselect Vot/tart8ate"VotEnd8ate from Voting8ateXJ
/9l8ataReader dr Q obj8b+/elect?ueryFJ
if dr+ReadFF
U
$abel1+Te,t Q drS2+To/tringFJ
$abel
-
8/9/2019 CyberVoting.doc
39/59
%OGOUT
protected void Button
-
8/9/2019 CyberVoting.doc
40/59
U
protected void RadioButton@Chec3edChangedobject sender" Eventrgs eF
U
int iJ
if RadioButton@+Chec3ed QQ trueF
U
RadioButton1+Chec3ed Q falseJ
RadioButton
-
8/9/2019 CyberVoting.doc
41/59
if RadioButton1+Chec3ed QQ trueF
U
RadioButton@+Chec3ed Q falseJ
RadioButton
-
8/9/2019 CyberVoting.doc
42/59
if i ZQ -@F
U
Response+WriteXVoted /uccessfullyXFJ
RadioButton@+Enabled Q falseJ
RadioButton1+Enabled Q falseJ
RadioButtonD+Enabled Q falseJ
else
U
Response+WriteXErrorZTry gainXFJ
protected void RadioButtonDChec3edChangedobject sender" Eventrgs eF
U
int iJ
if RadioButtonD+Chec3ed QQ trueF
U
RadioButton@+Chec3ed Q falseJ
RadioButton1+Chec3ed Q falseJ
RadioButton
-
8/9/2019 CyberVoting.doc
43/59
else
U
Response+WriteXErrorZTry gainXFJ
)OTING RESU%T
using /ystemJ
using /ystem+CollectionsJ
using /ystem+ConfigurationJ
using /ystem+8ataJ
using /ystem+$in9J
using /ystem+WebJ
using /ystem+Web+/ecurityJ
using /ystem+Web+K*J
using /ystem+Web+K*+&tmlControlsJ
using /ystem+Web+K*+WebControlsJ
using /ystem+Web+K*+WebControls+Web!artsJ
using /ystem+%ml+$in9J
using /ystem+8ata+/9lClientJ
public partial class VotingResults 7 /ystem+Web+K*+!age
U
Cls8b$ayer obj8b Q ne( Cls8b$ayerFJ
protected void !age$oadobject sender" Eventrgs eF
U
string ?uery Q Xselect ` from CastVoteXJ
-
8/9/2019 CyberVoting.doc
44/59
8ata/et ds Q obj8b+8isplay?ueryFJ
5ridVie(@+8ata/ource Q dsJ
5ridVie(@+8ataBindFJ
protected void 5ridVie(@/elected*nde,Changedobject sender" Eventrgs eF
U
-
8/9/2019 CyberVoting.doc
45/59
SCREEN %AYOUT
-OME PAGE:
-
8/9/2019 CyberVoting.doc
46/59
8#*: !5E7
-
8/9/2019 CyberVoting.doc
47/59
)OTING REGU%ATIONS PAGE:
-
8/9/2019 CyberVoting.doc
48/59
)OTING DATE
-
8/9/2019 CyberVoting.doc
49/59
RE5*/TER !5E
-
8/9/2019 CyberVoting.doc
50/59
VOTER 6/ /*5: *: !5E7
-
8/9/2019 CyberVoting.doc
51/59
$*/T !5E
-
8/9/2019 CyberVoting.doc
52/59
RE5K$T*O: !5E7
-
8/9/2019 CyberVoting.doc
53/59
VOT*:5 !5E
-
8/9/2019 CyberVoting.doc
54/59
RE/K$T !5E
-
8/9/2019 CyberVoting.doc
55/59
S,% TA.%ES:
-
8/9/2019 CyberVoting.doc
56/59
-
8/9/2019 CyberVoting.doc
57/59
-
8/9/2019 CyberVoting.doc
58/59
CONC%USION:
0rom a proper analysis of positive points and constraints on the component" itcan be safely concluded that the *mage !rocessing is a highly efficient component+ This
application is (or3ing properly and meeting to all user re9uirements+ This component can
be easily plugged in many other systems+
-
8/9/2019 CyberVoting.doc
59/59
REFERENCE
8/ )riel Rosenfeld" !icture !rocessing by Computer" :e( Yor37 cademic !ress" @4G4
1+X/pace Technology &all of 0ame7 *nducted Technologies^@44DX+ /pace 0oundation+
@44D+ Retrieved A 'anuary 12@2+