Download presentation
Presentation is loading. Please wait.
1
Software Freedom Day 2007 14th September 2007 Asia Pacific Institute of Information Technology Colombo, Sri Lanka. Nazly Ahmed Scripting The Web
2
Agenda What is PHP? History Getting Started Features Extensions Frameworks
3
What is PHP? PHP : Hypertext Preprocessor PHP is a Server-side Scripting Language which can be embedded into HTML Any PHP tag will be replaced by the Server before its sent back to the client browser Can be used to collect form data, generate dynamic page content, send and receive cookies and much more It’s Open Source – Apache like BSD-style license
4
Server-side
5
If the PHP file contains What the end user would get
6
History of PHP PHP/FI : Personal Home Page / Forms Interpreter Created by Rasmus Lerdorf in 1995 Perl like syntax Was able to connect with databases Enabled users to develop simple Dynamic Web Applications Code was released for everybody to see
7
History of PHP PHP/FI 2.0 Released in November 1997 Several people contributing bits of code to this project but still a one-man project. Several thousand users around the world 50,000 domains reported to have been installed.
8
History of PHP PHP 3.0 Created by Andi Gutmans and Zeev Suraski in 1997 as a complete rewrite Solid infrastructure for lots of different databases, protocols and APIs Contains strong extensibility features Object oriented syntax support Powerful and consistent language syntax It was named plain 'PHP', with the meaning being a recursive acronym - PHP: Hypertext Preprocessor Officially released in June 1998 Installed on 10% of the Web Servers on the Internet
9
History of PHP PHP 4.0 Officially released in May 2000. Rewrite of PHP's core to improve performance of complex applications, and improve the modularity of PHP's code base. The new engine, named 'Zend Engine' Support for many more Web servers, HTTP sessions, output buffering, more secure ways of handling user input and several new language constructs Installed on 20% of the Web Servers on the Internet
10
History of PHP PHP 5.0 Officially released in July 2004. Mainly driven by its core, the Zend Engine 2.0 with a new object model and dozens of other new features Allows the developers to use the full set of object-oriented features Installed on 34% of the Web Servers on the Internet PHP 5.2.4 is the latest stable release.
11
PHP Usage PHP: 20,016,421 domains, 1,208,663 IP addresses
12
Who uses PHP?
13
Projects Powered by PHP
14
Getting Started For Server-side Scripting o The PHP parser (CGI or server module) o A Web Server o A Web Browser Supports all major Operating Systems Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, Mac OS X Supports most of the Web Servers Apache, Microsoft IIS, Netscape and iPlanet servers, Oreilly Website Pro server, Caudium, Xitami, OmniHTTPd, and many others. Download the latest stable release of PHP from http://www.php.net/downloads Online Manual : http://www.php.net/manual/
15
Features of PHP (5.0) Long list of internal (built-in) functions Full set of OOP features Allows the developers to use the full set of object-oriented features which lacked in PHP4. Improved MySQL support MySQLi, the MySQL Improved extension offers prepared statements, bound parameters and SSL connections. It also takes advantage of PHP5's new object-oriented support to provide an object-oriented interface to MySQL.
16
Features of PHP (5.0) Easy handling of XML with SimpleXML The SimpleXML extension provides a very simple and easily usable toolset to convert XML to an object which can be easily processed. Sessions support Session support in PHP consists of a way to preserve certain data across subsequent accesses. Bundled SQLite SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine
17
Features of PHP (5.0) Error handling using exceptions PHP 5 offers a completely different model of error checking than what's available in PHP 4. It's called exception handling. With exceptions you can separate programming logic from error handling and place them in adjoining blocks of code Streams and Filters A way of generalizing file, network, data compression, and other operations which share a common set of functions and uses A filter is a final piece of code which may perform operations on data as it is being read from or written to a stream. php:// http://, https://, ftp://, ftps:// compression.gzip://, compression.bz2:// php://filter
18
Reusable PHP Components PEAR : PHP Extension and Application Repository PEAR is a framework and distribution system for reusable PHP components. Consists reusable components for Database, Encryption, Images, Web Services, Authentication, Date and Time, Mail and much more. http://pear.php.net
19
Extensions PECL : PHP Extension Community Library PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions. Consists extension for Database, Encryption, Images, Web Services, Authentication, Date and Time, Mail and much more. http://pecl.php.net
20
PHP Frameworks A structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. Compatibility with PHP4 and PHP5 Integrated CRUD for database Interaction and simplified queries Application Scaffolding Model View Controller (MVC) Architecture Custom URLs Fast and flexible templating View Helpers for AJAX, Javascript, HTML Forms and more http://www.cakephp.org/
21
PHP Frameworks Few other PHP Frameworks that are available http://framework.zend.com/ http://www.symfony-project.com/ http://www.codeigniter.com/
22
Resources PHP : http://www.php.net MySQL : http://www.mysql.com SQLite : http://www.sqlite.org PEAR : http://pear.php.net PECL : http://pecl.php.net
23
Questions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.