120 likes | 242 Views
Web Database Systems. Term Project Presentation Advanced Personal Organizer Andreas Mueller Fall 2005 California State University Sacramento. Presentation Outline. Advanced Personal Organizer – An Introduction Design and Models The 3-tier Architecture Implementation Details Demo.
E N D
Web Database Systems Term Project Presentation Advanced Personal Organizer Andreas Mueller Fall 2005 California State University Sacramento Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 1
Presentation Outline • Advanced Personal Organizer – An Introduction • Design and Models • The 3-tier Architecture • Implementation Details • Demo Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 2
Introduction (1) – An APO web-based system for managing: • bookmarks • appointments • contacts • emails • files • notes • allows multiple users at the same time • personalized account settings Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 3
Introduction (2) Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 4
Entity-Relationship-Diagram Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 5
3-tier Architecture HTML, Javascript Presentation Logical PHP 4.0 Data MySQL-DBMS Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 6
The Data-Tier – MySQL DBMS CREATE TABLE user_profile ( id int(5) NOT NULL default '0', last_name varchar(64), first_name varchar(64), email varchar(64), fTZ int(11), sTZ int(11), popsvr varchar(80), user varchar(40), passwd varchar(40), email_add varchar(80), invite_text text, PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE bookmarks_cat ( catid int(11) NOT NULL auto_increment, user_id int(11), category varchar(64), PRIMARY KEY (catid), UNIQUE KEY user_id (user_id,category) ) TYPE=MyISAM; DB-Tables: bookmarks bookmarks_cat calendar contacts contacts_cat email files_cat notes notes_cat rss_newsreader sessionvars user_profile users CREATE TABLE bookmarks ( id int(128) NOT NULL auto_increment, user_id int(11), cat int(11), url varchar(128), name varchar(128), description varchar(128), PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE email ( id varchar(64), user_id int(11), seen tinyint(1), answered tinyint(1) , PRIMARY KEY (id) ) TYPE=MyISAM; Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 7
Implementation (1) • File-Organisation: • 2 classes for the session-management • one class for every module • config-files • language files /var/www: classes config includes styles header.php index.php login.php register.php system_XXX.php Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 8
Implementation (2) – Sending an Email function send_email($servername, $emailaddress, $username, $password, $last_name, $first_name, $to, $cc, $su, $ms){ if (!empty($cc)) $to=$to.",".$cc; $to_array=explode(",",$to); $smtp = fsockopen($servername, 25); fputs($smtp, "HELO $servername \r\n"); fputs($smtp, "AUTH LOGIN\r\n"); fputs($smtp, base64_encode($username)."\r\n"); fputs($smtp, base64_encode($password)."\r\n"); fputs($smtp, "MAIL FROM: $emailaddress \r\n"); for ($i=0;$i<count($to_array);++$i){ fputs($smtp, "RCPT TO: <$to_array[$i]> \r\n"); } fputs($smtp, "DATA \r\n"); fputs($smtp, "to: $to \r\n"); fputs($smtp, "Subject: $su \r\n"); fputs($smtp, "cc: $cc \r\n"); fputs($smtp, "From: $first_name $last_name <$emailaddress> \r\n\r\n"); fputs($smtp, "$ms \r\n\r\n"); fputs($smtp, ".\r\n"); fputs($smtp, "QUIT\r\n"); fclose($smtp); Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 9
Implementation (3) - The Language File $emails_actions_startpage_0_0 = "compose email"; $emails_actions_startpage_1_0 = "reply to sender"; $emails_actions_startpage_2_0 = "mark as read"; $emails_actions_startpage_3_0 = "mark as unread"; $emails_actions_startpage_4_0 = "delete email"; english.php global $language, ${ 'emails_actions_startpage_0_' . $language}, ${ 'emails_actions_startpage_1_' . $language}, ${ 'emails_actions_startpage_2_' . $language}, ${ 'emails_actions_startpage_3_' . $language}, ${ 'emails_actions_startpage_4_' . $language}; system_email.php <input type=“submit” name=“comp” value=“ '.${ 'emails_actions_startpage_0_' . $language}.‘ ",> Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 10
Evaluation and Conclusion • userfriendly web-based Organizer • multiple users / different views • common 3-tier Architecture • easy to maintain (Object-Oriented) • Extensible Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 11
Questions and Demo • any Questions? • ... • No? • ... • ok let‘s do the Demo! Csc122 - Term Project Presentation, Fall 2005 Advanced Personal Organizer 12