Introduction to Server-Side Development with PHP

Introduction To Server Side Development With PHP-ppt Download

  • Date:05 Aug 2020
  • Views:14
  • Downloads:0
  • Size:5.53 MB

Share Presentation : Introduction To Server Side Development With PHP

Download and Preview : Introduction To Server Side Development With PHP

Report CopyRight/DMCA Form For : Introduction To Server Side Development With PHP


Transcription:

Introduction toServer SideDevelopment withRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentTextbook to be published by Pearson .
Randy Connolly and Ricardo Hoar Fundamentals of Web Developmenthttp www funwebdev com Objectives1 Server SideDevelopment 2 Web Server s.
Responsabilitie3 Quick Tour ofPHP 4 Program5 FunctionsRandy Connolly and Ricardo Hoar Fundamentals of Web Development.
Section 1 of 5WHAT IS SERVER SIDE DEVELOPMENTRandy Connolly and Ricardo Hoar Fundamentals of Web Development What is Server Side Development The basic hosting of your files is achieved through a web.
Server side development is much more than web hosting it involves the use of a programming technology like PHP orASP NET to create scripts that dynamically generate content The fundamental difference between client and serverscripts is that in a client side script like JavaScript and.
jQuery the code is executed on the client browser Whereas in a server side script it is executed on the webserver The server side source code remains hidden fromthe client as it is processed on the server Randy Connolly and Ricardo Hoar Fundamentals of Web Development.
Comparing Client and Server ScriptsRandy Connolly and Ricardo Hoar Fundamentals of Web Development Server Side ScriptSo many tools in your kitRandy Connolly and Ricardo Hoar Fundamentals of Web Development.
Web Development TechnologiesRandy Connolly and Ricardo Hoar Fundamentals of Web Development Comparing Server Side Technologies ASP Active Server Pages ASP NET Python.
Ruby on Rails Node js JSP Java Server Pages Randy Connolly and Ricardo Hoar Fundamentals of Web Development Market Share.
Of web development environmentsRandy Connolly and Ricardo Hoar Fundamentals of Web Development Section 2 of 5WEB SERVER S RESPONSIBILITIESRandy Connolly and Ricardo Hoar Fundamentals of Web Development.
A Web Server s ResponsibilitiesA web server has many responsibilities handling HTTP connections responding to requests for static and dynamic managing permissions and access for certain resources.
encrypting and compressing data managing multiple domains and URLs managing database connections managing cookies and state uploading and managing files.
Randy Connolly and Ricardo Hoar Fundamentals of Web Development LAMP stackWAMP MAMP You will be using the LAMP software stack Linux operating system.
Apache web server MySQL DBMS PHP scripting languageRandy Connolly and Ricardo Hoar Fundamentals of Web Development Apache and Linux.
Consider the Apache web server as theintermediary that interprets HTTP requeststhat arrive through a network port and decideshow to handle the request which oftenrequires working in conjunction with PHP .
Randy Connolly and Ricardo Hoar Fundamentals of Web Development Apache runs as a daemon on the server A daemon is an executing instance of a program also calleda process that runs in the background waiting for a specificevent that will activate it .
When a request arrives Apache then uses modules todetermine how to respond to the request In Apache a module is a compiled extension usuallywritten in the C programming language to Apache thathelps it handle requests .
For this reason these modules are also sometimes referred to asRandy Connolly and Ricardo Hoar Fundamentals of Web Development Installing LAMP locallyTurn this key The easiest and quickest way to do so is to use the.
XAMPP For Windows installation package MAMP for Mac installation package Both of these installation packages install andconfigure Apache PHP and MySQL Later we can come back and configure these.
systems in more detail Randy Connolly and Ricardo Hoar Fundamentals of Web Development XAMPP Control PanelTurn this keyRandy Connolly and Ricardo Hoar Fundamentals of Web Development.
XAMPP SettingsDefaults are PHP requests in your browser will need to use thelocalhost domain 127 0 0 1 By default PHP files will have to be saved.
somewhere within the C xampp htdocs folderRandy Connolly and Ricardo Hoar Fundamentals of Web Development Section 3 of 5QUICK TOUR OF PHPRandy Connolly and Ricardo Hoar Fundamentals of Web Development.
Quick TourSimilarities and Differences with JavaScript Syntax PHP like JavaScript is a dynamically typed language i e variable types do not need to be declared It is also loosely typed like JavaScript A variable can be.
assigned different data types over time It uses classes and functions in a way consistent with otherobject oriented languages such as C C and Java The syntax for loops conditionals and assignment is almostidentical to JavaScript.
Differs when you get to functions classes and in how youdefine variablesRandy Connolly and Ricardo Hoar Fundamentals of Web Development PHP TagsThe most important fact about PHP is that the.
programming code can be embedded directly withinan HTML file A PHP file will usually have the extension php Programming code must be contained within anopening php tag and a matching closing tag.
Any code outside the tags is echoed directly out tobe processed by the client typically the browser Randy Connolly and Ricardo Hoar Fundamentals of Web Development PHP TagsRandy Connolly and Ricardo Hoar Fundamentals of Web Development.
HTML and PHPTwo approachesRandy Connolly and Ricardo Hoar Fundamentals of Web Development HTML and PHPTwo approaches.
Randy Connolly and Ricardo Hoar Fundamentals of Web Development PHP CommentsThe types of comment styles in PHP are Single line comments Lines that begin with a are comment lines and will not be executed .
Multiline block comments These commentsbegin with a and encompass everything thatis encountered until a closing tag is found End of line comments Whenever isencountered in code everything up to the end.
of the line is considered a comment Randy Connolly and Ricardo Hoar Fundamentals of Web Development PHP Comments single line commentThis is a multiline comment .
They are a good way to document functions or complicated blocks of code artist readDatabase end of line commentRandy Connolly and Ricardo Hoar Fundamentals of Web Development Variables To declare a variable you must preface the variable.
name with the dollar symbol count 42 As variables in PHP are dynamically typed the PHPengine makes a best guess as to the intended typebased on what it is being assigned .
While PHP is loosely typed it still does have data types which describe the type of content that a variable canRandy Connolly and Ricardo Hoar Fundamentals of Web Development Data TypesData Type Description.
Boolean A logical true or false valueInteger Whole numbersFloat Decimal numbersString LettersArray A collection of data of any type covered in the.
next chapter Object Instances of classesRandy Connolly and Ricardo Hoar Fundamentals of Web Development Constants A constant is somewhat similar to a variable except a.
constant s value never changes and stays constant Typically defined near the top of a PHP file via thedefine function Once a constant is defined it can be referenced withoutthe symbol.
Randy Connolly and Ricardo Hoar Fundamentals of Web Development Writing to OutputHello World To output something that will be seen by the browser you can use the echo function .
echo hello long formecho hello shortcut Notice that you can use either the single quotesymbol or double quote symbol for string literals echo h1 .
echo h1 Randy Connolly and Ricardo Hoar Fundamentals of Web Development String Concatenation Strings can easily be appended together usingthe concatenate operator which is the period.
symbol The code below will output Hello World username World echo Hello username Randy Connolly and Ricardo Hoar Fundamentals of Web Development.
String Concatenation Notice that you can reference PHP variables within a stringliteral defined with double quotes The resulting output forboth lines is em Pablo Picasso em .
These two lines are equivalent firstName Pablo lastName Picasso echo em firstName lastName echo em firstName lastName em .
Randy Connolly and Ricardo Hoar Fundamentals of Web Development String escape Sequences These two lines are also equivalent echo img src 23 jpg echo img src 23 jpg .
In the second example the escape character thebackslash is used to embed a double quote withina string literal defined within double quotes String escape SequencesSequence Description.
n Line feed t Horizontal tab Backslash Dollar sign Double quote.
Randy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentGood ol printf As an alternative to echo you can use the printf Takes at least one parameter which is a string and thatstring optionally references parameters which are then.
integrated into the first string by placeholder substitution Can also apply special formatting for instance specificdate time formats or number of decimal placesRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentType specifiers.
Each placeholder requires the percent symbol in the firstparameter string followed by a type specifier b for binary d for signed integer f for float.
o for octal x for hexadecimal Precision allows for control over how many decimal places areshown and displays calculated numbers to the user in a pretty Precision is achieved in the string with a period followed by a.
number specifying how many digits should be displayed forfloating point numbers Randy Connolly and Ricardo Hoar Fundamentals of Web Development Section 4 of 5PROGRAM CONTROL.
Randy Connolly and Ricardo Hoar Fundamentals of Web Development If elseThe syntax for conditionals in PHP is almost identical tothat of JavaScriptRandy Connolly and Ricardo Hoar Fundamentals of Web Development.
If elseAlternate syntaxRandy Connolly and Ricardo Hoar Fundamentals of Web Development Switch caseNearly identical.
Randy Connolly and Ricardo Hoar Fundamentals of Web Development While and Do whileIdentical to other languagesRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentIdentical to other languages.
Randy Connolly and Ricardo Hoar Fundamentals of Web Development Alternate syntax for Control Structures PHP has an alternative syntax for most of its controlstructures In this alternate syntax the colon replaces the opening curly bracket .
while the closing brace is replaced with endif endwhile endfor endforeach or endswitch Randy Connolly and Ricardo Hoar Fundamentals of Web Development Include FilesOrganize your code.
PHP does have one important facility that is generallyunlike other nonweb programming languages namelythe ability to include or insert content from one fileinto another Randy Connolly and Ricardo Hoar Fundamentals of Web Development.
Include FilesOrganize your code PHP provides four different statements for including files include somefile php include once somefile php .
require somefile php require once somefile php The difference between include and require lies in whathappens when the specified file cannot be included With include a warning is displayed and then execution.
continues With require an error is displayed andexecution stops The statements work just like include and require but if therequested file has already been included once then it will notbe included again .
Randy Connolly and Ricardo Hoar Fundamentals of Web Development Include Files Include files are the equivalent of copying and Variables defined within an include file will havethe scope of the line on which the include occurs.
Any variables available at that line in the calling filewill be available within the called file If the include occurs inside a function then all ofthe code contained in the called file will behave asthough it had been defined inside that function.
Randy Connolly and Ricardo Hoar Fundamentals of Web Development Section 5 of 5Randy Connolly and Ricardo Hoar Fundamentals of Web Development Functions A function in PHP contains a small bit of code.
that accomplishes one thing In PHP there aretwo types of function user defined functionsand built in functions A user defined function is one that you.
PHP Comments. The types of comment styles in PHP are: Single-line comments. Lines that begin with a # are comment lines and will not be executed. Multiline (block) comments. These comments begin with a /* and encompass everything that is encountered until a closing */ tag is found. End-of-line comments

Related Presentations

From client side to server side programming

What does PHP stand for? PHP Hypertext Processor PHP Hypertext Processor PHP Hypertext Processor Recursive acronym! PHP Hypertext Processor Not Personal Home Page

12 Views0 Downloads

The SAT amp ACT A Side by Side Comparison

SAT Writing-language ACT( English) 44 questions=35 minutes (writing/language) Easiest section to repair. Added to the reading score only for total 1 R/W/L score. Charts or graphs. 75 questions= 45 minutes (English) Easiest section to repair. Averaged with the R/M/S scores for 1 composite score . No charts or graphs . More emphasis on Punctuation

19 Views0 Downloads

AIAA 2002 3298 AERODYNAMICS OF TWO SIDE BY SIDE PLATES IN

Influence of the Helium and Nitrogen Mass Blowing Factor Gw DWC, March 24, 2012 Vladimir V. Riabov: Hypersonic Rarefied Aerothermodynamics * Hypersonic Hydrogen Combustion in Thin Viscous Shock Layer (TVSL) Combustion of air-hydrogen mixture (11 components, 35 chemical reactions); Two-dimensional flow in thin viscous shock layer (TVSL) near ...

26 Views0 Downloads

Supply Side amp the Demand Side Disability IN

The webinar platform is under license to the Great Lakes ADA Center and technical support is available via email [email protected] and/or by calling 877-232-1990 V/TTY) ... social and governance factors impact their management, culture, brand and financial well-being. ... Supply Side & the Demand Side

22 Views0 Downloads

By your side and on your side Wesleyan University

Your costs and coverage may change by the time you fill your prescription at the pharmacy, and medication costs at individual pharmacies can vary. For example, your pharmacy’s retail cash price for a specific medication may be less than the price shown in the Drug Cost tool. Coverage and pricing may change.

7 Views0 Downloads

Web Servers amp Server side Programming

Intro. to Server-Side Programming. Application Architecture Evolution. Three distinct era’s of application architecture. ... without needing to reload/refresh the page. ... Java 2 Enterprise Edition (J2EE) platform supporting objects, parallel processing across multiple application servers, etc ...

30 Views0 Downloads

Browsers Server side Programming Java Servlets

Java EE applications use a different approach. The session ID is placed in a matrix parameter in the last path segment (or directory) in the URL. The keyword used is: JSESSIONID

23 Views0 Downloads

Server side Verification of Client Behavior in Online Games

Expand notes tab! ... and have someone wire it all together, and connect it to a good Internet connect, power, power backup systems, cooling systems, etc. Oh and by the way, it would have to be sufficient for the peak anticipated usage. ... networks, and other fundamental computing resources; consumer cannot manage or control the underlying ...

29 Views0 Downloads

Server Side Scripting with JSP 2

Define Date Format. Letter Date or Time Component Presentation ExamplesG Era designator Text ADy Year Year 1996; 96M Month in year Month July; Jul; 07w Week in year Number 27W Week in month Number 2D Day in year Number 189d Day in month Number 10F Day of week in month Number 2E Day in week Text Tuesday; Tuea Am/pm marker Text PMH Hour in day (0-23) Number 0k Hour in day (1-24) Number 24K Hour ...

18 Views0 Downloads

Server side Computing Application Programming Interface API

Server-side Computing: Application Programming Interface (API) Jason Boutte. Lawrence Livermore National Laboratory. 2017 Triennial Project Review, Potomac, MD. June 8 – 9, 2017. This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DEAC52-07NA27344.

16 Views0 Downloads

Radiatus a Shared Nothing Server Side Web Architecture

research in securing web . applications. Most of these techniques are compatible, represent a defense in depth solution to security. Service Isolation: Break. apart a web app into many isolated services (e.g. search, shopping cart) Already done today in service-oriented architectures. IFC – limit flow of information. Encryption – hide contents,

15 Views0 Downloads

JumpStart Server Virtualization with Windows Server Hyper

Corey is also the owner and lead technical architect for holSystems, an online VM hosting engine for training and demo providers which hosts thousands of VM instances in a custom, thin-provisioning engine, and is the platform used for hands-on labs, instructor-led labs, and on-demand virtual labs worldwide. Contact. @holsystems. Corey Hynes

27 Views0 Downloads