Presentation is loading. Please wait.

Presentation is loading. Please wait.

Vending Machine FSM Benjamin Welton 03/20/2010 CS 480.

Similar presentations

Presentation on theme: "Vending Machine FSM Benjamin Welton 03/20/2010 CS 480."— Presentation transcript:

1 Vending Machine FSM Benjamin Welton 03/20/2010 CS 480

2 Overview System Overview  Design Considerations  Development methods Architecture  Architecture Strategy's  System Architecture System Design Overview

3 System Overview Build a FSM that mimics the functionality of a standard vending machine (such as a coke machine) Web based interface that is portable and does not require a full web server (such as apache) to run Database used for storage of states of the vending machine

4 Design Considerations Need for multiplatform support to allow for cross platform development and testing Distributed version control Ability to demonstrat the web interface without access to the internet (self contained)

5 Dependencies  Python 2.x line (2.5+ required)  Django web framework  Web-browser with AJAX and Javascript support

6 Development Methods Bazaar / Launchpad for version control Python Enhancement Proposal 8  Used for coding style guidelines  Comment guidelines / ect

7 Architecture Strategies Python  Large standard library  Multi-platform support  Allows for focus on application logic instead of implementation issues. Django  MVC Structure  Simple database integration  Out of the box development web server

8 Architecture Strategies (cont) AJAX  Allows for communication with Django without page refreshes  Does not rely on external dependencies on the client machine (such as java or silverlight)  Smaller and more dynamic code base

9 System Architecture Functionality broken up into two pieces Front end  Consists of the user interface  Handles interaction with the user and displays balance / selection of products Back end  Handles the programming logic  Communicates with the front end via AJAX / XML Request's

10 System Design Overview XML DTD Database scheme Django Function / Web API URL's

11 XML DTD Communicates user actions and responses between django and the web interface Transaction XML DTD  Handles transaction request (purchase, balance change, balance inquery, ect) Response XML DTD  Handles the response to the transaction DTD request (after the business logic has been preformed)

12 Transaction DTD

13 Response XML DTD

14 Django Database Modes  Products  Users

15 Django (cont) Database Models (cont)  State


17 Example FSM Diagram 555550

18 Django (cont) Views  GetIndex  ajax

19 AJAX Functions  AJAX : Sends and receives ajax request from django  Product_Selected : Generates an AJAX Request when a user selects a product  Insert_Money : Handles when a coin/bill is inserted  Dandle_Response : Handles the response from django (callback function)

20 References Python  Django  Style guide for python code PEP 8: 

21 Questions

Download ppt "Vending Machine FSM Benjamin Welton 03/20/2010 CS 480."

Similar presentations

Ads by Google