CMSC389P: Introduction to PHP, MySQL and Apache

Slides:



Advertisements
Similar presentations
© 2010, Robert K. Moniot Chapter 1 Introduction to Computers and the Internet 1.
Advertisements

The Internet Useful Definitions and Concepts About the Internet.
CIS101 Introduction to Computing
Introduction to Web Pages. Slide 2 Lecture Overview Evolution of the Internet and Web Web Protocols.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
© 2004, Robert K. Moniot Chapter 1 Introduction to Computers and the Internet.
The Internet 8th Edition Tutorial 1 Browser Basics.
CS 382 DATABASE-DRIVEN WEBSITES Instructor: Dr. Xenia Mountrouidou CS382 1.
HTML 1 Introduction to HTML. 2 Objectives Describe the Internet and its associated key terms Describe the World Wide Web and its associated key terms.
The Internet & Web Browsers Business Webpage Design Kelly Seale.
WEB DESIGN SOME FOUNDATIONS. SO WHAT IS THIS INTERNET.
Web Design Basic Concepts.
1 Introduction to Web Development. Web Basics The Web consists of computers on the Internet connected to each other in a specific way Used in all levels.
CSE 154 LECTURE 1: BASIC HTML AND CSS. The Internet Wikipedia: a connection.
The WWW Willem Visser RW334. Internet A global network of networks connecting computers using the internet protocol.
CMPT Web Programming Introduction and Basic HTML.
CSCI 323 – Web Development Chapter 1 - Setting the Scene We’re going to move through the first few chapters pretty quick since they are a review for most.
INTRODUCTION TO WEB DATABASE PROGRAMMING
IT 210 The Internet & World Wide Web introduction.
CS 299 – Web Programming and Design CS299: Web Programming and Design Instructor: Dr. Fang (Daisy) Tang.
What is Web Design?  Web design is the creation of a Web page using hypertext or hypermedia to be viewed on the World Wide Web.
CS490 Web Design, AJAX, JQuery
CS 380 WEB PROGRAMMING Instructor: Xenia Mountrouidou CS380 1.
CNIT 132 Intermediate HTML and CSS Course Overview.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Chapter 1: Introduction to Web
2013Dr. Ali Rodan 1 Handout 1 Fundamentals of the Internet.
Web Mastering Module Internet Fundamentals. What is the Internet? –Global network of networks –Communicating using same set of rules (protocols/languages)
The Internet. The Internet: A Definition  Short for Internetwork  AKA: The World Wide Web, or the Net  This is defined by the system of communications.
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
CIS 1310 – HTML & CSS 1 Introduction to the Internet.
Introduction To Internet
MySQL and PHP Internet and WWW. Computer Basics A Single Computer.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
1 Welcome to CSC 301 Web Programming Charles Frank.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
1 UNIT 13 The World Wide Web Lecturer: Kholood Baselm.
Introduction to Internet. Chapter 1 Objectives Origins of the Internet Packets and Routers TCP/IP DNS HTTP URL Client-Server.
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
Web Technologies Lecture 1 The Internet and HTTP.
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
CSE 154 LECTURE 1: BASIC HTML AND CSS. The Internet Wikipedia: a connection.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Web Browsing *TAKE NOTES*. Millions of people browse the Web every day for research, shopping, job duties and entertainment. Installing a web browser.
Chapter 1 Introduction to HTML, XHTML, and CSS HTML5 & CSS 7 th Edition.
JavaScript and Ajax (Internet Background) Week 1 Web site:
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Web Design Terminology Unit 2 STEM. 1. Accessibility – a web page or site that address the users limitations or disabilities 2. Active server page (ASP)
CS 380 WEB PROGRAMMING Instructor: Xenia Mountrouidou CS380 1.
CIS 1203 Web Technologies Introduction to the Internet and the WWW.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
CS299: Web Programming and Design Instructor: Dr. Fang (Daisy) Tang
Web fundamentals: Clients, Servers, and Communication
CISC103 Web Development Basics: Web site:
JavaScript and Ajax (Internet Background)
Chapter 1 Introduction to HTML.
Warm Handshake with Websites, Servers and Web Servers:
CNIT 131 Internet Basics & Beginning HTML
Introduction to Web Design & Publishing
CISC103 Web Development Basics: Web site:
Web Page Concept and Design :
CMPT 241 Web Programming Instructor: Tina Tian.
Introduction and Basic HTML
Internet and the world wide web (www)
The Internet and the World Wide Web WWW
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

CMSC389P: Introduction to PHP, MySQL and Apache Winter 2015 Instructor: Dr. Anwar Mamat

Course Objectives At the end of this class you will be able to: Create web pages using HTML, CSS Use PHP server programming Submit Forms Cookies and Sessions Files and Directories Relational Database and MySQL SQL queries Interacting with MySQL using PHP

Why did you take CMSC389P?

Lectures We meet at 11:30am-12:30pm, everyday, at CSI 2117 Check the schedule in the class webpage Password protected sections. User: cmsc389p, password:webprogramming Read the syllabus and policies carefully Check piazza.com for discussions and questions. Search CMSC389p, Spring 2015. No winter option.

How to get help office hours: Monday through Thursday, immediately after class. Or set an appointment with me via e-mail No textbook. Reference: “Web Programming Step by Step” by Marty Stepp, Jessica Miller, Victoria Kirst

Grading Project 1 15% Project 2 20% Project 3 25% Project 4 40% Total 100% Projects will be posted online on the class webpage

Policies You may discuss homework problems with classmates, after you have made a serious effort in trying the homework on your own. You can use ideas from the literature (with proper citation). You can use anything from the lectures/notes. The code you submit must be written completely by you.

Software Installation Alternatives for Apache, MySQL, and PHP Individual installation of packages (See Resources section, web page) Bundles (include Apace, MySQL, PHP, OpenSSL, etc.) XAMPP (Linux, Windows) http://www.apachefriends.org/en/xampp.html Mac is also supported although you may want to try MAMP(see below) MAMP Macintosh, Apache, MySQL, and PHP http://www.mamp.info/en/mamp.html We are using free version (Not MAMP PRO) Alternatives for Editors Notepad/WordPad or any other text editor  Komodo Edit http://www.activestate.com/komodo_edit/ Do not confuse with Komodo IDE (Not free) Works in Windows, Max, Linux Eclipse + PHP Plugin Instructions available at http://www.zend.com/en/community/pdt Your assignment for tomorrow Install Apache and PHP

Web Hosting As a student of the university you have a directory (folder) where you can place your html documents so they can be accessed on the web Location of your folder Machine: terpconnect.umd.edu Login by using your directoryID/Password combination Folder location: /pub/YOURDIRECTORYID To activate: Visit http://www.it.umd.edu/new/ Web Page Address: http://www.terpconnect.umd.edu/~YOURDIRECTORYID Notice there is a ~ before your directory id Software/Instructions to Transfer Data http://www.cs.umd.edu/~nelson/classes/utilities/TransferingDataToTerpconnect/ Free/Low Cost web hosting http://www.cs.umd.edu/~nelson/nicesites/SmallBusinessWebsites.html

The INTERNET… and a bit of history

What is the internet? A collection of computer networks that use a protocol to exchange data Is the World Wide Web (WWW) and the internet the same? the Web is the collection of web sites and pages around the world; the Internet is larger and also includes other services such as email, chat, online games, etc.

Brief history Began as a US Department of Defense network called ARPANET (1960s-70s) Packet switching (in the 60s) E-mail is born on 1971 TCP/IP beginning on 1974 (Vinton Cerf) USENET (1979) By 1987: Internet includes nearly 30,000 hosts The first ARPANET link was established between the University of California, Los Angeles and the Stanford Research Institute on 22:30 hours on October 29, 1969 Store and forward, i.e. packet switching Usenet is a world-wide distributed discussion system. It consists of a set of "newsgroups" with names that are classified hierarchically by subject. "Articles" or "messages" are "posted" to these newsgroups by people on computers with the appropriate software -- these articles are then broadcast to other interconnected computer systems via a wide variety of networks. Some newsgroups are "moderated"; in these newsgroups, the articles are first sent to a moderator for approval before appearing in the newsgroup. Usenet is available on a wide variety of computer systems and networks, but the bulk of modern Usenet traffic is transported over either the Internet or UUCP.

Brief history (cont.) WWW created in 1989-91 by Tim Berners-Lee Popular web browsers released: Netscape 1994 IE 1995 Amazon.com opens in 1995 Google January 1996 Wikipedia launched in 2001 MySpace opens in 2003 Facebook February 2004

Wikipedia launched in 2001 MySpace opens in 2003 Facebook February 2004 Which of these do you recognize? CS380

The future of the internet?

Key aspects of the internet Sub-networks are independent Computers can dynamically join and leave the network Built on open standards Lack of centralized control (mostly) Everyone can use it with simple, commonly available software ; anyone can create a new internet device

People and organizations Internet Engineering Task Force (IETF): internet protocol standards Internet Corporation for Assigned Names and Numbers (ICANN): decides top-level domain names World Wide Web Consortium (W3C): web standards

Layered architecture physical layer : devices such as ethernet, coaxial cables, fiber-optic lines, modems data link layer : basic hardware protocols (ethernet, wifi, DSL PPP) network / internet layer : basic software protocol (IP), switching and routing, virtual circuits transport layer : adds reliability to network layer (TCP, UDP) Session: This layer establishes, manages and terminates connections between This layer establishes, manages and terminates connections between applications Presentation: This layer provides independence from differences in data representation (e.g., encryption) by translating from application to network format, and vice versa. application layer : implements specific communication for each kind of program (HTTP, POP3/IMAP, SSH, FTP)

Internet Protocol (IP) Simple protocol for data exchange between computers IP Addresses: 32-bit for IPv5 128-bit for IPv6 find out your internet IP address: whatismyip.com find out your local IP address: in a terminal, type: ipconfig (Windows) or ifconfig (Mac/Linux Routers forward data based on tables IP is simple: no corruption check, no sequencing, no data loss assurance, no duplication CS380

Transmission Control Protocol (TCP) Adds multiplexing, guaranteed message delivery on top of IP Multiplexing: multiple programs using the same IP address Port: a number given to each program or service port 80: web browser (port 443 for secure browsing) port 25: email port 22: ssh Some programs (games, streaming media programs) use simpler UDP protocol instead of TCP ACK for guarantee data delivery, re-transmit, validity checking Multiple programs and services share the same internet connection Freedom from reliability worries UDP: unreliable but faster

Web Servers Web server: software that listens for web page requests Apache Microsoft Internet Information Server (IIS) Normal computers, just more powerful They run specialized SW

Application Server Software framework that provides an environment where applications can run Apache Glassfish WebSphere WebLogic Taking a big step back, a Web server serves pages for viewing in a Web browser, while an application server provides methods that client applications can call. A little more precisely, you can say that: A Web server exclusively handles HTTP requests, whereas an application server serves business logic to application programs through any number of protocols.

Web Browser Web browser: fetches/displays documents from web servers Mozilla Firefox Microsoft Internet Explorer (IE) Apple Safari Google Chrome Opera Explorer pain

Domain Name Server (DNS) Set of servers that map written names to IP addresses Example: umd.edu → 54.84.241.99 Many systems maintain a local cache called a hosts file Windows: C:\Windows\system32\drivers\etc\hosts Mac: /private/etc/hosts Linux: /etc/hosts What happens when you have connection but cannot download a webpage?? Mapping between numbers and human readable addresses Top level domains: .com, .org, countries

Uniform Resource Locator (URL) Identifier for the location of a document on a web site Example: http://cs.umd.edu/index.html Upon entering this URL into the browser, it would: ask the DNS server for the IP address of dept.ju.edu connect to that IP address at port 80 ask the server to GET /index.html display the resulting page on the screen

Hypertext Transport Protocol (HTTP) Set of commands understood by a web server and sent from a browser Some HTTP commands (your browser sends these internally): GET filename : download POST filename : send a web form response PUT filename : upload Exercise: simulate a browser with a terminal window telnet umd.edu GET index.html http is stateless

HTTP Error Codes When something goes wrong, the web server returns a special "error code" number Common error codes: Number Meaning 200 OK 301-303 page has moved (permanently or temporarily) 403 you are forbidden to access this page 404 page not found 500 internal server error

Internet Media (“MIME”) types file extension text/html .html text/plain .txt image/gif .gif image/jpeg .jpg video/quicktime .mov application/octet-stream .exe Sometimes when including resources in a page (style sheet, icon, multimedia object), we specify their type of data

Web Languages Hypertext Markup Language (HTML): used for writing web pages Cascading Style Sheets (CSS): stylistic info for web pages PHP Hypertext Processor (PHP): dynamically create pages on a web server JavaScript: interactive and programmable web pages

Web Languages(cont.) Asynchronous JavaScript and XML (Ajax): accessing data for web applications eXtensible Markup Language (XML): metalanguage for organizing data