Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi,

Similar presentations


Presentation on theme: "Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi,"— Presentation transcript:

1 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi, Ph.D., MBA

2 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC PHP In Brief PHP is a –Server-Side, HTML-embedded, Cross-platform Scripting Language –Provides a Means for Developers to Put Instructions in HTML Files to Create Dynamic Content

3 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Example Web Clock Changes from one viewing to another

4 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Example Simple Survey

5 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Example Simple Game

6 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Example Quiz

7 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Example Database access

8 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Explanations Server-Side –PHP Code is Executed on the Server HTML-Embedded –PHP Code is Inserted Directly in HTML Cross-Platform –PHP Runs on Several Different (Server) OSes Scripting Language –Difference Between Scripting & Programming Languages is Increasingly Small More Semantic than Significant –Script is Not Compiled

9 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC PHP in Less Brief PHP Provides a Means for Developers –To Put Instructions in HTML Files –The Instructions are Read & Parsed by Server They Never Make It to the Browser –The Server Replaces PHP Code with Content HTML etc. –Forerunner Technology is Server Side Includes (SSI)

10 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Server Side Includes Directives Placed Into HTML Document to –Execute Other Programs or –Emit Data Such As Environment Variables As With PHP: –The Result is Still an HTML Page –Viewer's Browser Just Sees HTML –SSI Interaction is "behind the scenes"

11 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Server Side Includes Operation is as Follows: –Client Requests a Document –Server Retrieves Document –Server Recognizes That Document Contains SSI Requires ".shtml" suffix –Or Other as Set Up by Webmaster –Server Parses Document –Server Replaces SSI With Requested Data –Server Returns Document to Client –Client Renders Document

12 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Standard HTTP Interaction

13 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC SSI Interaction

14 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC SSI Environment Variables Welcome! Greetings from Dear user from,

15 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC SSI External Program Access Welcome! Greetings from Dear user from, The current time is

16 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC SSI Include Welcome! Greetings from Dear user from, The current time is

17 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Server Side Includes SSI is a Great Tool –Adds Dynamic Content Date, Last Modified, etc. –Relatively Simple to Use –Eases Development #include file="footer.html" –Sophisticated Tool Hide links from external users Internal Documents Where 1.2.3 is the IP address prefix of the local domain

18 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Server Side Includes There are Serious Disadvantages: –No Official Standard Web Server is Free to Support Different Commands Many Commands Are De Facto Standards –#include, #echo, #exec –Costly for Server to Parse Documents SSI Isn't Very Efficient to Execute Each SSI Program on a Page –Launches a Separate Process –Doubles the Server Load for Viewing That Page –Significant Security Risk Too Easy to Allow Commands to Be Executed on Server

19 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Other Developments Need for HTML-Embedded Server-Side Scripting Technology was Apparent to Others Microsoft went after this need with ASP –Active Server Pages ASP Has Become Quite Popular –In Microsoft Shops Many Developers Sought More Stable & Less Proprietary Solution –Enter PHP, an Open-Source Server-Parsed HTML-Embedded Scripting Language

20 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC PHP Benefits PHP's Primary Strength –Rapid Development of Dynamic Web Pages Developers Without Heavy Programming Experience –Leverage PHP to Complete Tasks otherwise cryptic or obtuse in alternative languages Pulling Records From a Database & Inserting Them Into an HTML Table

21 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC PHP Benefits PHP Language Architecture –Simple but Powerful –Includes an Extremely Wide Variety of Functions Suited for Many Tasks –Traditional Data Processing –Web-Oriented Functions

22 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC PHP Example Welcome!

23 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC PHP Weaknesses PHP Remains an Immature Language –Without the Architectural Strengths or Extensibility of More Established Languages Embedded Scripting –Program Code is Mixed With HTML Some Developers Are Empowered By This Others Find It Disorganized & Error-Prone –Prefer Separate Development Environments For Each Web Component

24 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC PHP Weaknesses Developers with Experience in Perl & Especially mod_perl Environments –May Find Little Reason to Spend Time with PHP –And This May be Entirely Justified

25 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC PHP Strengths Developers have literally flocked to PHP –Modest Learning Curve –Free & Open Development –Native Database Connectivity –Stability –Availability for a Variety of Server Platforms

26 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Still, it is Important to Understand That PHP is not a Unique Solution to Web Development –We're Fortunate to Enjoy a Potpourri of Possible Web Development Tools Many Tasks can be Performed with a Wide Variety of Technologies –Developers Must Weigh Many Factors in Choosing a Development Path Previous & Current Experience Platform Requirements & Support Time-to-Market Requirements

27 Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC PHP Example PHP Test Page Create page on linus named "test.php"


Download ppt "Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi,"

Similar presentations


Ads by Google