LAB: WEB-301 Building a Website from a Template

Slides:



Advertisements
Similar presentations
WordPress Installation for Beginners Sheila Bergman
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizards Guide to PHP by David Lash.
Create a website with Google Sites
BUS311 Website Development Lab. The world Web Hosting Site WEBSITE DEVELOPMENT BASICS Web browser URL Web pages (HTML) WebPage/Site development tools.
Sample School Website Sydney Region ITSU School Support
Dynamic Web site With PHP and MySQL. MySQL The combination of MySQL database and PHP scripting language is optimum for building dynamic websites. MySQL.
ECA 228 Internet/Intranet Design I Intro to the Web.
Simple Web SQLite Manager/Form/Report
Wordpress Tutorial 22 – 24 April Table of Contents Introduction Designing blog Writing and Publishing blog Pages Posts Categories Tags Links Comments.
BUS311: Website Development Lab. The world Web hosting site WEBSITE DEVELOPMENT BASICS Web browser URL Web pages (HTML) Web site development tools Web.
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
A detailed guide on how to set-up your printing storefront. Please Note: Storefronts are compatible with all browsers, however for optimal use of the admin.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
WordPress Web. WordPress Blogging system with full content management Personal publishing system Built on PHP scripting language and MySQL relational.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
INTERNET APPLICATION DEVELOPMENT For More visit:
Create an online booking system (login/registration)
Get more out of 11i with Oracle ADI Richard Byrom Oracle Applications Consultant Appsworld January 2003.
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizard’s Guide to PHP by David Lash.
Web Based Inventory Site Building Room Asset Number Category Type Description Serial Number Manufacturer Model Vendor Name Acquired Date P O Number Budget.
Creating Databases with MySQL Workbench Build the Forums database in Ullman’s Chapter 6.
Introduction.  What does this course mean to VGP?  Creating persistent worlds  Offline multiplayer games  Save/retrieve data from the Web  What does.
© 2003 By Default! A Free sample background from Slide 1 Week 2  Free PHP Hosting Setup  PHP Backend  Backend Security 
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Introduction to MySQL Lab no. 10 Advance Database Management System.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
SYST Web Technologies SYST Web Technologies Databases & MySQL.
Intro to Web Programming Presented by Blaine Hilton.
Training Guide for Inzalo SOP Users. This guide has been prepared to demonstrate the use of the Inzalo Intranet based SOP applications. The scope of this.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Plant Accession Application Maintenance Manual. Accession Application Website Environment Overview WinHost.com ASP Pages VBScript Procs Constants Style.
CIS166AE : PHP Web Scripting Rob Loy. Tonight’s Agenda Housekeeping items Housekeeping items PHP basics PHP basics Student connection to server Student.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Sample School Website. What is wrong with the existing School Webspace Site? Can only host static pages – no dynamic content possible. Can not be edited.
GOAL User Interactive Web Interface Update Pages by Club Officers Two Level of Authentication.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
PHP “Personal Home Page Hypertext Pre-processor” (a recursive acronym) Allows you to create dynamic web pages and link web pages to a database.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
WHAT IS SERVER SIDE SCRIPTING? Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the.
CHAPTER 10 PHP MySQL Database
Class 3Intro to Databases Class 4 Simple Example of a Database We’re going to build a simple example of a database, which will allow us to register users.
1.Switch on the computer and wait for loading. 2.Select the Windows 7 OS at the end of the list. 3.Click on the link ‘Administrator’ 4.Enter the administrator.
Joomla Awdhesh Kumar Singsys Pte Ltd. What is Joomla? Joomla is an award-winning content management system (CMS), which enables you to build Web sites.
1.Switch on the computer and wait for loading. 2.Select the Windows 7 OS at the end of the list. 3.Click on the link ‘Administrator’ 4.Enter the administrator.
visit or call to enroll now..
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
PHP using MySQL Database for Web Development (part II)
2nd year Computer Science & Engineer
Intro to WordPress (Using XAMPP)
WordPress Introduction
Introduction to Dynamic Web Programming
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
CS320 Web and Internet Programming SQL and MySQL
Pinterest Clone Features
Introduction and Principles
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
Web Design and Development
PHP & MySQL Introduction.
Website Development Basics with PHP MySQL
ISC440: Web Programming 2 Server-side Scripting PHP 3
Title: Tech Training Certificate: Ace of Initiative Program
SiteBuilder 2 Introduction.
Web Programming Language
Tutorial 6 PHP & MySQL Li Xu
CS3220 Web and Internet Programming SQL and MySQL
CS3220 Web and Internet Programming SQL and MySQL
PHP By Prof. B.A.Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference and.
Create, Upload and Use Data Extensions (Lists)
Presentation transcript:

LAB: WEB-301 Building a Website from a Template Professor Charles Kaplan

Agenda Overview Demonstration Analysis Design LAB Setup Coding & Testing Wrap Up © 2017, Charles Kaplan WEB-301 - Website Template LAB

Overview © 2017, Charles Kaplan WEB-301 - Website Template LAB

Overview Using a Template, we are going design and implement a “My Twitter” website. Website Features Home Page Logon/Logoff/Registration View Tweets Send Tweets Subscribe to (Follow) Tweeters © 2017, Charles Kaplan WEB-301 - Website Template LAB

Template Construction Website Construction is like Building Construction The Template is like a pre-fab building with the heating/cooling, electricity and plumbing already installed. The developer only needs to provide some furnishing and decorate. © 2017, Charles Kaplan WEB-301 - Website Template LAB

Development Environment Windows Laptop WAMPServer – Apache, MySQL, PHP, PHPAdmin Notepad++ MAC or LINUX XAMPP © 2017, Charles Kaplan WEB-301 - Website Template LAB

Client/Server Environment PHP Programs PHP/MySQL WebServer (Apache) Operating System (LINUX) Hardware I N T E R Client Browser (IE, Firefox, Opera, etc.) Operating System (Windows 7, 10) Hardware ©2013 - BCS350 Fall 2014 Review - 1st Half

WAMPServer Environment Client PHP Programs  Notepad++ PHP/MySQL Apache Web Server  Browser Operating System (Windows 7, 10) Hardware (Your Laptop) Charles Kaplan, Barsa Consulting Group LLC March, 2009 Page 8 ©2017 - BCS350 Fall 2017 Review 2nd Half

© 2017, Charles Kaplan WEB-301 - Website Template LAB

Demonstration © 2017, Charles Kaplan WEB-301 - Website Template LAB

The Template © 2017, Charles Kaplan WEB-301 - Website Template LAB

Template Landing Page – Website Control and Structure LOGON/LOGOFF/Registration scripts Public and Restricted (LOGON required) webpages User Table Header/Navigation Bar/Footer Customization is only needed to the Content area of each webpage Since all source code is provided, Website appearance can also be customized – logo, colors, structure © 2017, Charles Kaplan WEB-301 - Website Template LAB

Landing Page Review Code Start Session INCLUDE website variables and functions Website Offline Determine Page Content Show Page – Header, Navigation Bar, Content, Footer © 2017, Charles Kaplan WEB-301 - Website Template LAB

Public Pages Determine if page called from Landing Page Show Content © 2017, Charles Kaplan WEB-301 - Website Template LAB

Restricted Pages Determine if page called from Landing Page Determine if LOGON Show Content © 2017, Charles Kaplan WEB-301 - Website Template LAB

Analysis © 2017, Charles Kaplan WEB-301 - Website Template LAB

Requirements Website Features Data © 2017, Charles Kaplan WEB-301 - Website Template LAB

Definitions Tweet - 140 character or less text message Registered User - Someone with website LOGON credentials Tweeter - A registered user who SEND’s a Tweet Subscriber - A registered user who Follows a Tweeter © 2017, Charles Kaplan WEB-301 - Website Template LAB

Website Features Home Page Public Logon/Logoff/Registration Public View Tweets Restricted Send Tweets Restricted Subscribe to (Follow) Tweeters Restricted © 2017, Charles Kaplan WEB-301 - Website Template LAB

Data Requirements Tables Users Tweets Subscribers © 2017, Charles Kaplan WEB-301 - Website Template LAB

Users Firstname Lastname Email Userid Password © 2017, Charles Kaplan WEB-301 - Website Template LAB

Tweets Sender Tweet © 2017, Charles Kaplan WEB-301 - Website Template LAB

Subscribers Subscriber Tweeter © 2017, Charles Kaplan WEB-301 - Website Template LAB

Design © 2017, Charles Kaplan WEB-301 - Website Template LAB

Website Website Name - My Twitter Webpages - 5 Website Provider - 1and1.com DNS Registration - 1and1.com (1 included) FTP credentials and FTP Client - FileZilla Operations Schedule – Backups and other maintenance - TBD © 2017, Charles Kaplan WEB-301 - Website Template LAB

Database Tables Data Elements and Attributes Relationships © 2017, Charles Kaplan WEB-301 - Website Template LAB

Users rowid Integer, Unsigned, AI, Primary Key firstname Varchar(20) lastname Varchar(20) email Varchar(80) userid Varchar(20) password Varchar(20) © 2017, Charles Kaplan WEB-301 - Website Template LAB

ROWID Every table needs a unique Primary Key (Updates & Deletes queries) Cannot change the Primary Key (Delete & Add, messes up relational) ROWID used if there isn’t a natural Primary Key (ie: SS#, CUSTID, etc.) Attributes – Integer, Unsigned (positive), AI (Auto Increment), Primary Key Easily used as a foreign key in other tables © 2017, Charles Kaplan WEB-301 - Website Template LAB

Tweets rowid Integer, Unsigned, AI, Primary Key timestamp Integer, Unsigned tweeter Integer, Unsigned, Foreign Key tweet Varchar(140) Relationships Sender is Primary Key from User Profile © 2017, Charles Kaplan WEB-301 - Website Template LAB

Subscribers rowid Integer, Unsigned, AI, Primary Key subscriber Integer, Unsigned, Foreign Key tweeter Integer, Unsigned, Foreign Key Relationships Subscriber is Primary Key from User Profile Sender is Primary Key from User Profile © 2017, Charles Kaplan WEB-301 - Website Template LAB

Data Structure Subscribers Rowid Subscriber Tweeter User Profile Rowid Firstname Lastname Userid Password Tweets Rowid Tweet Tweeter © 2017, Charles Kaplan WEB-301 - Website Template LAB

Database Implementation Start WAMPServer Start PHPMyAdmin Logon: Userid: Root, no password Create Database mt (for My Twitter) Create Tables and Elements Copy exactly, lowercase names © 2017, Charles Kaplan WEB-301 - Website Template LAB

LAB Setup © 2017, Charles Kaplan WEB-301 - Website Template LAB

Notepad++ Open Source (FREE) program editor Recognizes PHP (and other) language syntax © 2017, Charles Kaplan WEB-301 - Website Template LAB

WAMPServer Open Source (FREE) stack for Windows of Apache, MySQL and PHP Includes other utility programs, including PHPMyAdmin which is used for MySQL database administration © 2017, Charles Kaplan WEB-301 - Website Template LAB

Browser Any browser will do. IE has certain issues, recommend Chrome or Firefox © 2017, Charles Kaplan WEB-301 - Website Template LAB

Template TEMPLATE subdirectory has unedited template MT subdirectory is a copy of TEMPLATE that we will work on Copy both to: WAMP64/WWW © 2017, Charles Kaplan WEB-301 - Website Template LAB

Coding & Testing © 2017, Charles Kaplan WEB-301 - Website Template LAB

Using MySQL in PHP Connect to MySQL and a database (Landing Page) $mysqli = new mysqli($hostname, $userid, $password, $database); Create a Query $query = “SELECT firstname, lastname FROM users WHERE rowid = ‘1’”; Execute Query $result = mysqli_query($mysqli, $query); Process Query Results while (list($firstname, $lastname) = mysqli_fetch_row($result)) echo “$firstname $lastname<br>”; © 2017, Charles Kaplan WEB-301 - Website Template LAB

Page Layout - Content Determine if called from Landing Page Determined if LOGON, if restricted Page Setup Resources needed for this webpage Get input, verify and cleanse Determine what to do Do it Output page © 2017, Charles Kaplan WEB-301 - Website Template LAB

Home Page Display content Hello $username (if LOGON or Guest) Explain what website is about Registration/LOGON required © 2017, Charles Kaplan WEB-301 - Website Template LAB

Member Page (View Tweets) Show 20 most recent tweets Tweeter Timestamp Tweet © 2017, Charles Kaplan WEB-301 - Website Template LAB

Member Page - Query SELECT tweets.timestamp, tweets.tweet, users.firstname, users.lastname FROM tweets JOIN users ON tweets.tweeter = users.rowid JOIN subscribers ON subscribers.subscriber = users.rowid WHERE subscribers.subscriber = ‘$suser’ ORDER BY tweets.timestamp DESC LIMIT 20 © 2017, Charles Kaplan WEB-301 - Website Template LAB

Send a Tweet HTML FORM Show list of Subscribers INPUT FIELD – Tweet INPUT FIELD – Send Button Show list of Subscribers © 2017, Charles Kaplan WEB-301 - Website Template LAB

Send a Tweet – Queries Insert a Tweet $query = “INSERT INTO tweets SET timestamp = ‘$timestamp’, // $timestamp = time(); tweeter = ‘$suser’, // from session.php tweet = ‘$tweet’”; // from HTML Form © 2017, Charles Kaplan WEB-301 - Website Template LAB

Send a Tweet – Queries List of Subscribers $query = “ SELECT users.firstname, users.lastname FROM subscribers JOIN users ON subscribers.subscriber = users.rowid WHERE subscribers.tweeter = ‘$suser’ ORDER BY users.lastname, users.firstname © 2017, Charles Kaplan WEB-301 - Website Template LAB

Subscribe To Show list of users already subscribed, with REMOVE option Show dropdown list of available tweeters to subscribe to (not already subscribed to) FORM INPUT – Subscribe button © 2017, Charles Kaplan WEB-301 - Website Template LAB

Subscribe To - Queries Show list of users already subscribed SELECT users.rowid, users.firstname, users.lastname FROM subscribers JOIN users ON subscribers.tweeter = users.rowid WHERE subscriber.subscriber = ‘$suser’ ORDER BY users.lastname, users.firstname *create array with rowids of each user subscribed to* © 2017, Charles Kaplan WEB-301 - Website Template LAB

Subscribe To - Queries Dropdown List of available tweeters SELECT users.rowid, users.firstname, users.lastname FROM users ORDER BY users.lastname, users.firstname © 2017, Charles Kaplan WEB-301 - Website Template LAB

Subscribe To - Queries Create Subscription INSERT INTO subscribers SET subscriber = ‘$suser’, // From: sessions tweeter = ‘$tweeter’”; // From: FORM © 2017, Charles Kaplan WEB-301 - Website Template LAB

Subscribe To - Queries Create Subscription INSERT INTO subscribers SET subscriber = ‘$suser’, // From: sessions tweeter = ‘$tweeter’”; // From: FORM © 2017, Charles Kaplan WEB-301 - Website Template LAB

Subscribe To - Queries Remove Subscription DELETE FROM subscribers WHERE rowid = ‘$rowid’ // From: $_GET[‘r’] © 2017, Charles Kaplan WEB-301 - Website Template LAB

Website - Go Live Get website from ISP (1and1.com has 1st year specials, starting at $0.99/month) Register domain name – 1 usually included with website FTP code and other files from PC to website Backup MySQL database on PC with PHPMyAdmin Restore MySQL to website with PHPMyAdmin GO LIVE! © 2017, Charles Kaplan WEB-301 - Website Template LAB

Future Website Enhancements © 2017, Charles Kaplan WEB-301 - Website Template LAB

Enhancements Attach viewable file (image, video, pdf, etc.) to a tweet Allow users to mark tweets READ or DELETE a tweet Allow upload of member pictures with registration and show when viewing tweets Registrations go to PENDING status, admin script to change to ACTIVE or REJECTED Script to allow members to update their profile © 2017, Charles Kaplan WEB-301 - Website Template LAB

Wrap Up © 2017, Charles Kaplan WEB-301 - Website Template LAB