Presentation is loading. Please wait.

Presentation is loading. Please wait.

Title Carolina First Steering Committee October 9, 2010 Online Voting System Design Yinpeng Li and Tian Cao May 3, 2011.

Similar presentations


Presentation on theme: "Title Carolina First Steering Committee October 9, 2010 Online Voting System Design Yinpeng Li and Tian Cao May 3, 2011."— Presentation transcript:

1 Title Carolina First Steering Committee October 9, 2010 Online Voting System Design Yinpeng Li and Tian Cao May 3, 2011

2 Outline  System Description  System Logic Explanations  User Stories  Use Case Diagram  System Design  System Architecture  Design Pattern  Discussion

3 System Logic Explanations  Inside of the system, a Voter is not allowed to participate in any election until he/she has registered as an Electorate. An Election officer is in charge of system maintenance, voter registration approval, election creation, etc.  An election can be at different levels and be of different topics. It can either be a voting of political referendums, or a voting of candidates for a government position. Depending on the type of an election, the Ballot can contain different kind of options.

4 User Stories  Four Roles  Voter  Electorate  Candidate  Election Officer

5 Use Case Diagram

6 Flowchart  See the webpage See the webpage

7 System Architecture  The system is designed to comply with the MVC (Model–View–Controller) architecture.

8 System Architecture  Both Server and Client have their own Model, View and Controller.  In Server-Side, the View generates a representation of a interface. This representation is downloaded to the Client which displays it. The Controller on the Server interprets the information from Client and routes the request to the View, which update the interface. The Model on the Server manages the database system.  In Client-Side, the View renders the interface to the screen, and the Controller interprets the keyboard and mouse events. The Model on Client deals with the data received from Server.

9 Overall System Design  See the webpage See the webpage

10 Design Patterns  Composite  Factory Method  Decorator  Flyweight  Observer  Proxy  Command  Iterator and Strategy  Memento  Facade and Singleton  State

11 Composite Pattern  The Composite pattern is used at the client side to organize the elements on the interface. In the system, all the information display and all the inputs are done through forms, which are similar to the concept in Web that's under the same name. A form can contain both data output elements such as Image Displays and Text Displays and data input elements such as Radios, Checkboxes and Text Inputs. The forms can be saved on the server for future continuation or be submitted directly.

12 Composite Pattern

13 Factory Method Pattern  The Factory Method pattern is used at the client side to defer the instantiation of Client to its subclasses.

14 Factory Method Pattern

15 Decorator Pattern  The Decorator pattern is used at the client side to control the appearances of the Interface Elements.

16 Decorator Pattern

17 Flyweight Pattern  The Flyweight pattern is used at the server side to reduce repetitive data storage. The options in ballots are stored as objects on the server, and they are organized as flyweights in the system. Some of the registration info of the voters, such as the zip codes, are also stored as flyweights.

18 Flyweight Pattern

19 Observer Pattern  The Observer pattern is implemented over the client-server connection to perform real-time update of election results.

20 Observer Pattern

21 Proxy Pattern  The Proxy pattern is used at the client side. It controls the access to the server, and implements security mechanisms such as connection timeouts.

22 Proxy Pattern

23 Command Pattern  The Command pattern is used both at the client side and at the server side. It encapsulate the requests and responds in the system, and let the system queue or log them. It also supports undoable operations.

24 Command Pattern

25 Iterator and Strategy Patterns  The Iterator and Strategy patterns are applied in the vote tally logic components. The Strategy pattern is used to encapsulate different statistical algorithms for election result computation. The Iterator pattern is used to encapsulate different methods to iterate over the BallotList.

26 Iterator and Strategy Patterns

27 Memento Pattern  The Memento pattern is implemented to realize the "save for later" functionality. When an electorate clicks the "save for later" button on the form, the form (ballot) he/she is working on will create a memento and save it on the server. This way, the form can be restored later. The client side can also take advantage of this feature to implement a mechanism to deal with power-outage problems.

28 Memento Pattern

29 Facade and Singleton Patterns  The Facade pattern provides a interface to a set of database interfaces in a database subsystem. Facade defines a higher-level interface that makes the database subsystem easier to use for the server. The Singleton pattern is used to ensure the Database Interface only has one instance.

30 Facade and Singleton Patterns

31 State Pattern  The State pattern is applied in the system to implement different command processing strategy for the client depending on the identity of the client. The identity is regarded as the state of the client.

32 State Pattern

33 Discussion  Although the system is designed to comply with the MVC architecture, since the View and the Controller at the client side share the same visual components, these two parts and their logics are not separated explicitly during the design process.

34 Discussion  We used Command pattern to do server-client communication, instead of using Interpreter pattern, as is the case in real-world Web system. This is due to the fact that the Command pattern gives more flexibility when processing the commands. For example, with the Command pattern, commands can be queued before processed, which is hard for the Interpreter pattern to realize.

35 Discussion  The Flyweight pattern could also be used on the ballots submitted by the electorates to reduce storage cost. For example, for a ballot consists of 10 items, with each item featuring 4 options, there are a total of 410=1048576 possible submitted ballots. However, if the election is intended for all the people in the U.S., there could be more than 100 million votes in total, and using this simple enumeration will dramatically improve the storage efficiency.

36 Section divider here Thank you for your attention.


Download ppt "Title Carolina First Steering Committee October 9, 2010 Online Voting System Design Yinpeng Li and Tian Cao May 3, 2011."

Similar presentations


Ads by Google