PHP 5 - The Year After

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    3 Favorites

    PHP 5 - The Year After - Presentation Transcript

    1. PHP 5 The Year After Sebastian Bergmann October, 18 th 2005
    2. Who I Am
      • Sebastian Bergmann.
      • Born 1978.
      • CS Student in Bonn, Germany.
      • Committer: PHP, PEAR, Gentoo Linux, ...
      • Author of Open Source PHP projects like PHPUnit or phpOpenTracker.
      • Author for online and print media.
    3. Who Are You?
      • Who of you uses PHP 5?
      • Who of you have heard of
        • PHPUnit2?
        • Phing?
        • Propel?
        • Agavi?
    4. Happy Birthday, PHP!
      • PHP is 10 years, 4 months, and 10 days old.
      From: rasmus@io.org (Rasmus Lerdorf) Subject: Announce: Personal Home Page Tools (PHP Tools) Date: 1995/06/08 Message-ID: <3r7pgp$aa1@ionews.io.org>#1/1 X-Deja-AN: 104053006 organization: none newsgroups: comp.infosystems.www.authoring.cgi Announcing the Personal Home Page Tools (PHP Tools) version 1.0. These tools are a set of small tight cgi binaries written in C. They perform a number of functions including: . . . The tools are in the public domain distributed under the GNU Public License. Yes, that means they are free!
    5. A Look Back
      • PHP 3
        • Released on June 6, 1998.
        • Very rudimentary support for object-oriented programming.
        • No session management.
      • PHPLIB
        • Possibly the most important library for PHP 3.
        • Developed by Kristian Köhntopp, Ulf Wendel et al. at NetUSE AG in Kiel, Germany.
        • Sascha Schumann's code for serialization of PHP variables and session management, which was part of PHPLIB, was the de-facto standard for PHP 3.
    6. A Look Back
      • PHP 4
        • Released on May 22, 2000.
        • Rudimentary support for object-oriented programming.
        • Sascha Schumann rewrote his serialization and session management code (which was part of PHPLIB) in C and it became (as ext/session) part of PHP.
      • PEAR
        • Repository of reusable classes and components written in PHP.
        • Infrastructure (PEAR Installer) to install and maintain packages.
    7. Today
      • PHP 5
        • Released on July 13, 2004.
        • Good support for object-oriented programming.
          • Language Features.
          • Standard PHP Library (SPL).
          • Extensions like DOM and MySQLi offer APIs for OOP.
        • Good support for working with XML technologies and Web Services.
      • PECL
        • PHP Extension Community Library.
        • Extensions to PHP written in C.
        • Not commonly used extensions (for example dio, fam, yp, ...) are unbundled from the standard PHP distribution and moved to PECL.
        • Commonly used PECL extensions (for example SQLite) are bundled with the PHP standard distribution.
    8. Today
      • PHP 5.1
        • To be released in a couple of weeks.
        • Optimized Virtual Machine (VM).
          • Up to 40% better performance compared to PHP 5.0 and PHP 4.4.
        • PHP Data Objects (PDO)
          • Built-In Database Abstraction Layer on the API level.
            • Unified new PDO(...) instead of mysql_connect(...) , pg_connect(....) , ...
        • XMLReader API for XML processing.
        • Improved
          • Date and Time Processing.
          • Standard PHP Library (SPL).
          • Support for IBM DB2 (developed by IBM).
          • Support for Oracle (developed by Oracle, Zend and OmniTI).
    9. Today
      • PEAR 1.4
        • Released on September 18, 2005.
        • Most important update to the PEAR/PECL infrastructure to date.
          • Channels.
          • Mirroring.
          • Binary PECL packages.
          • New package.xml 2.0 format.
          • Self-Installing PEAR from a single file (thanks to PHP_Archive).
    10. A Look Ahead
      • PHP 6
        • To be released in 2006.
        • Full support for Unicode.
          • Based upon IBM's International Components for Unicode (ICU).
        • Input Filtering.
        • Default Bytecode Cache / Optimizer?
        • Namespaces?
        • Removal of
          • register_globals ?
          • magic_quotes_* ?
          • safe_mode ?
          • „stuff“ that has been deprecated since PHP 3 / 4 ?
    11. Projects that use PHP 5
      • PHPUnit2
        • Framework for Unit Tests, PHP port of JUnit.
      • Phing
        • Project build system that follows the design of Apache Ant.
      • Propel
        • Full-Service object persistence and query toolkit that follows the design of Apache Torque.
      • Agavi
        • Framework for building PHP applications based on the Model-View-Controller design pattern.
    12. PHPUnit2
      • Framework for Unit Testing.
      • Features include
        • Complete port of JUnit 3.8.1 for PHP 5.
        • Support for Agile Documentation (TestDox).
        • Support for Code Coverage analysis with Xdebug.
        • Support for Incomplete Tests.
        • Support for Mock Objects ( under development ).
        • Integration with Phing.
        • Skeleton Generator for test classes.
        • Logging to PEAR::Log sinks and in XML format.
    13. PHPUnit2
    14. PHPUnit2
      • Conventions
        • Tests for class Class in class ClassTest .
        • Tests written as methods with prefix test .
    15. PHPUnit2
    16. PHPUnit2
    17. PHPUnit2
    18. Phing
      • Project build system following the design of Apache Ant.
      • Features include
        • file transformations,
          • e.g. token replacement, XSLT transformation, Smarty template transformations
        • file system operations,
        • SQL execution,
        • CVS and Subversion operations,
        • tools for creating PEAR packages,
        • running PHPUnit2 tests and generating test reports.
      • Installation
        • pear install http://phing.info/pear/phing-current.tgz
    19. Phing <?xml version=&quot;1.0&quot;?> <project name=&quot;FooBar&quot; default=&quot;dist&quot; basedir=&quot;.&quot;> <target name=&quot;prepare&quot;> <echo msg=&quot;Preparing build...&quot; /> <mkdir dir=&quot;./build&quot; /> </target> <target name=&quot;build&quot; depends=&quot;prepare&quot;> <echo>Building...</echo> <copy file=&quot;./src/File.php&quot; to=&quot;./build/File.php&quot;/> <copy file=&quot;./src/File2.php&quot; to=&quot;./build/File2.php&quot;/> </target> <target name=&quot;dist&quot; depends=&quot;build&quot;> <echo message=&quot;Creating archive...&quot; /> <tar outfile=&quot;furbee.tar.gz&quot; basedir=&quot;./build&quot;/> </target> <target name=&quot;clean&quot;> <echo msg=&quot;Cleaning up...&quot;/> <delete file=&quot;./build&quot;/> </target> </project>
    20. Object-Relational Mapping
      • Mapping from classes to tables in an RDBMS.
        • Storing of objects in a database.
        • Encapsulating database entities in objects.
      • An object-relational mapper is a bridge between the database and the application.
        • The programmer does not need to formulate SQL queries.
        • When the data model gets changed the corresponding classes are automatically updated.
        • When the application gets migrated to another RDBMS only the configuration needs to be changed.
    21. Propel
      • Propel is such a bridge for PHP 5.
        • Follows the design of Apache Torque.
      • Two components:
        • Propel Generator (uses Phing)
          • Input: XML specification for the data model.
          • Output: Database Schema and PHP classes.
        • Propel Runtime (uses Creole)
          • Runtime Environment.
          • Framework for the use of the classes generated by the Propel Generator.
      • Installation
        • pear install http://propel.phpdb.org/pear/propel_runtime-current.tgz
        • pear install http://propel.phpdb.org/pear/propel_generator-current.tgz
    22. Data Model
    23. Data Model
    24. Propel Generator
    25. Object Model
      • Table author
        • Abstract base class BaseAuthor .
          • Methods like
            • getFirstName() or
            • setFirstName($v) .
        • Concrete class Author extends BaseAuthor .
          • Empty.
          • Will not be overwritten if the Propel Generator is run again.
    26. Creating a Book
    27. Agavi
      • Framework for building PHP applications based on the Model-View-Conrtroller design pattern.
        • Think „PHP on Rails“.
      • Uses Phing.
      • Can use Propel for the Model.
      • Installation
        • pear install http://propel.phpdb.org/pear/propel_runtime-current.tgz
        • pear install http://propel.phpdb.org/pear/propel_generator-current.tgz
    28. Agavi
    29. Conclusion
      • „PHP is like the Borg in Star Trek – it adds the skills of others to its own feature set to attain perfection.“ (Kristian Köhntopp)
      • PHP is designed to integrate libraries easily and make their functionality available in the language.
      • With the new language features of version 5, PHP has now reached a level that allows for the „assimilation of paradigms“ in addition to the „assimilation of functionality“.
    30. Conclusion
      • Java
        • „Lean core, rich library“.
        • Rather tool-centric development.
          • Code Generators, Frameworks, ...
      • PHP
        • „Rich core, lean infrastructure“.
        • Many convenience functions.
          • Even peripheral functionality is available as native functions (that wrap libraries, for instance).
        • Supports tool-centric approach in PHP 5.
    31. Conclusion
      • Developer-Centric Approach
        • Example: PDO and Session Management.
          • Database Abstraction and Session Management as core components of the interpreter (and thus integral parts of the language).
      • Tool-Centric Approach
        • Example: Propel
          • Abstraction through Code Generation.
        • Example: Agavi
          • Code Generation faciliates rapid application development.
    32. Commercial
      • PHPUnit Pocket Guide.
      • O'Reilly Media, 2005.
      • ISBN: 0-596-10103-1.
    33. License
      • These slides are available under the Creative Commons Attribution-NoDerivs-NonCommercial 2.0 license.
      • You are free to copy, distribute, display, and perform the work under the following conditions:
        • Attribution: You must give the original author credit.
        • Noncommercial: You may not use this work for commercial purposes.
        • No Derivative Works: You may not alter, transform, or build upon this work.
        • For any reuse or distribution, you must make clear to others the license terms of this work.
        • Any of these conditions can be waived if you get permission from the author.
      • Your fair use and other rights are in no way affected by the above.
      „ PHP 5 – The Year After“ Sebastian Bergmann http://www.sebastian-bergmann.de/talks/

    + Sebastian BergmannSebastian Bergmann, 4 years ago

    custom

    2794 views, 3 favs, 0 embeds more stats

    More info about this document

    CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

    Go to text version

    • Total Views 2794
      • 2794 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 3
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories