Creating Databases for Web Applications Library diagrams Continue with diagrams for video clip archive and for (Flash) grid design. General and specific comments on interfaces. Homework: Finish exercises. Look at Flash video archive program.
Caution The word 'design' may refer to Design (plan, structure, organization, definition) of the database and the application The look of an application One of my examples: the design of a grid using pre-defined units.
Library design homework What are entities? What are processes?
Class exercises Application: database for CD collection kept in various places (home, office, car) Tables: artists/groups; CDs; ??? –addition: keep track of CDs on loan to friends? This probably requires a friends table. Write down fields for each table What are relationships? What processes would you want? –what maintenance functions do you want to have? –what questions would you want to ask?
Class exercises Now, let's agree on a new application (more than one table)
Video clips DFD Select by category Clip viewer Select by tag Clip info (two tables) DB administrator Video clips Add (edit) clips A different type of data store
Reflection Some may argue with my diagram. NO one right way to do this. What I want to convey: –The viewer requests a video clip using information from the database. –The db administrator is the only one changing information in the database –The actual playing of the videos is a distinct operation of the two processes
Storyboard for video project: housekeeping maketable2.phpmaketagtable2.phpdeleteall.php showtable2.php showtagtable2.php addclip2t.html addtotableform2t.php removeclip.htmlremovefromtable.php
Storyboard for video archive: operation Choosevideo.fla Video3.as getgroups.php getgroupclips.php tagdisplay.fla Tags.as gettags.php gettagclips.php
Comments Tags were an after-thought. There were more housekeeping functions –Both before the addition of the second table –For trying things out: inputing a single, specific clip record Names are … okay, but could be better. –More consistent
DFD for grid design Design program (FLASH) Designer Local storage (shared object) Web storage (database) Company producing design produce designs
What diagram says Designer works with one program Designs can be stored locally or centrally This was demonstration application. The company production part is not implemented. The diagram indicates the potential presence of this other agent.
Storyboard for grid design makedesign (Flash) storedesign (php) fetchdesign (php)
Notes Diagram doesn't convey asynchronous nature of the Flash-php connection Diagram doesn't convey anything about the local storage using SharedObject –Option: block indicating browser? Diagram DOES convey code that I intended to write and did write…
Interface: Video clip archive html to php: form data ($_GET, $_POST, or $_Request php back to browser: html! Flash program to php: form data php back to the Flash program: my own invention: string with commas and :
Interface: grid design Flash program to php: form data, including a string that is XML converted to string php back to Flash: string that will be converted to XML
Interfaces Interfaces between your own programs are your choice! ActionScript 3.0 has facilities for handling XML and Functions such as split for breaking up strings into arrays
Homework [Catch up for Library] –Book store –Election ballot information –IPOD [Catch up regular expressions] GET SIMPLE EXAMPLES WORKING and then make them your own Look over ActionScript coding for video archive. Will review [some] details next class.