Server Side Programming Overview And file system basics

Slides:



Advertisements
Similar presentations
IS 6116 Introduction – 10 Jan Lecturer Details Aonghus Sugrue Website: aonghussugrue.wordpress.com
Advertisements

Lecture 11 Server Side Interaction
Creating WordPress Websites. Creating a site on your computer Local server Local WordPress installation Setting Up Dreamweaver.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
ITM352 PHP and Dynamic Web Pages: Server Side Processing.
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
Java CGI Lecture notes by Theodoros Anagnostopoulos.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
CSU - DEO Introduction to CGI - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to the Common Gateway Interface (CGI) Instructor: Joseph DiVerdi,
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
 Before you continue you should have a basic understanding of the following:  HTML  CSS  JavaScript.
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
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.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
PHP using MySQL Database for Web Development (part II)
Distributed Control and Measurement via the Internet
CS 330 Class 7 Comments on Exam Programming plan for today:
Introduction to Dynamic Web Programming
ITM352 PHP and Dynamic Web Pages: Server Side Processing 1.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Chapter 5 Scripting Language
Introduction to web development concepts
Introduction and Principles
CF101: Welcome to ColdFusion
Server-Side Application and Data Management IT IS 3105 (Spring 2010)
Introduction to Web programming
Introduction to Programming the WWW I
Developing Web-Based Applications
Chapter 5 Scripting Language
Server-Side Application and Data Management IT IS 3105 (Spring 2010)
PHP Introduction.
Intro to PHP & Variables
Web Systems Development (CSC-215)
* Lecture 26 Manifest Asynchrony
Introduction to Databases with MAMP/LAMP/WAMP thrown in!
Intro to PHP at Winthrop
CT Web Development, Colorado State University
* Lecture 12 Mapping, Map Reduction Summing integers,
Handling Files In particular, uploading files.
Tables from Arrays of Objects Exploding Strings
Content Management and WordPress
Web Browser server client 3-Tier Architecture Apache web server PHP
HTML Basics & Context & IDEs & Server Basics & Online Notes
Chapter 27 WWW and HTTP.
Introduction to AJAX and the migration toward applications
MySQL Tables and Relations 101
* Lecture 5 PHP Basics * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Querying Client Information Forms and Passing Data,
* jQuery * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Module 1 Introduction to PHP 11/30/2018 CS346 PHP.
Authentication Stepped Up Persistent User Data Protected Content.
PHP.
JavaScript.
IntroductionToPHP Static vs. Dynamic websites
Intro to PHP.
Server Side Programming Overview And file system basics
Introduction to PHP.
PHP an introduction.
Loops and Conditionals Generating , Reading files.
Information Retrieval and Web Design
Web Application Development Using PHP
XAMPP.
Presentation transcript:

Server Side Programming Overview And file system basics * Lecture 04a/05 Server Side Programming Overview And file system basics * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz About Document Root The document root is established in the apache httpd.conf file. In the CS department it is “public_html” in your home folder. 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz File Permissions All HTML and CSS files must be world readable, as must images, etc. PHP files are special on CS server! They may be restricted to owner. Rant 1: View your files with ‘ls –al’ so you get in the habit of reading file permissions – always! Rant 2: You must master the unix command chmod! 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

Academic Integrity Note You cannot protect HTML/CSS/image files and have them display properly. see the previous slide. You can and must protect your PHP files. 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz WWW in the Beginning Type HTML/CSS by hand! A necessary skill still today, But … Impractical! HTML/CSS production is generally: Automated. Interaction. Data service. From Wikimedia Commons 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

Client-Server Starting Point A Brief Review Client Computer Web Server (Apache) Static Files (index.html) 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

Add Client/Server Scripting Client Computer Web Server (Apache) File System /cgi-bin Native Code (enter.exe) Server Side cgi, Perl, PHP, … Client Side (JavaScript) 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

A Brief Preview Client Computer Web Server (Apache) + PHP Interpreter File System (enter.php) MySQL Database 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz Context/History CGI: Common Gateway Interface 1993. Callout to native applications. CGI + Perl Applications written in Perl. Lead to built in Apache Perl Module. Java Possible as Server Side Language. Not typically built into server as module. 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

Context/History Continued Coldfusion Dynamic html generation environment Tied to Macromedia - now Adobe Microsoft .NET Framework Key modern component of Windows Includes infrastructure for web development JavaScript Typically run on the client side. Now there is node.js (start 2011) Security/Sandboxing a concern. And very widely used - PHP … 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

Warning Language Train Wreck is Coming! So far we’ve covered: HTML CSS Now we introduce Server Side Programs Specifically, PHP Keep your head on … Four syntaxes, Client vs. Server view, All interdependent, Wikimedia Commons: Train wreck at Montparnasse 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz PHP resources The source - the PHP Group (www.php.net). The PHP Group Tutorial and Manual. Our Textbook – Learning PHP, MySQL & JavaScript, by Robin Nixon. Refsnes Data W3 School W3 School PHP Tutorial. 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz Basics Server runs all *.php files through PHP interpreter before sending to client Special language constructs pretend to be functions These include print, echo, include, require, return, exit, array <?php print “Hello World!”; ?> Vs. <? 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz Echo, Print, Comments echo and print both output strings echo allows for multiple parameters to be passed print acts more like a function and only allows one // and # comment out single lines /* blah blah */ comment out blocks of text 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz Example – 00 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz What the Client Sees! PHP code NEVER leaves the server. Paying attention to how another person will see the source is like? Keeping your house clean. Cleaning behind the refrigerator. 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz An Aside - Enabling PHP is already turned on for CS Dept. On your own machine you may need. 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz

More about Your Machine Looking ahead to PHP and MySQL Chapter 2 of text on LAMP, MAMP, WAMP 11/11/2018 CSU CT 310 Web Development ©Ross Beveridge & Jaime Ruiz