SlideShare uma empresa Scribd logo
1 de 47
Enterprise PHP development


Ivo Jansch <ivo@ibuildings.com>




Dutch PHP Conference, June 14, 2008


                                      Ibuildings - http://www.ibuildings.com
What's an enterprise?
 •  Wikipedia:
        “Any of several ships by that name in the Star Trek
         fictional universe”




        “A business, company, or comparable organization”
 Tuesday, February 26, 2008                                    2
Is PHP Enterprise ready?
 •  CIO Magazine:




 “ H w r s w l f r pooy i g b c ue i i e s t g t a se u a d r n i g Ue P P t d s n
 P P ok e o r t t p ea s t s ay o e i p n u n . s H o ei
                          n                         t            n              g
    the site [...] but when it comes time for development, tell the team you want
    t
    he result to look and act like this PHP site...but in Java”

    (Or: “great, this is exactly what I need! now do it again, at twice the cost!”)‫‏‬


    http://www.cio.com/article/176250 (skip the article, read the comments)‫‏‬




 Tuesday, February 26, 2008                                                            3
Is PHP Enterprise ready?




            Big                     Small
            Enterprise friendly     Lightweight
            enterpriCe              Cheap
            CS required             Easy to learn


 Tuesday, February 26, 2008                           4
A word from my girlfriend

      It's not the


                          SIZE

                              of the tool...




      It's how you USE it.


 Tuesday, February 26, 2008                    5
PHP is changing...
 •  1998
        Personal stuff


 •  2003
        Simple websites
        Content management
        Blogs


 •  2008
        Big websites
        Banks
        Insurance Companies
        ...

 Tuesday, February 26, 2008    6
PHP is changing...
 •  Traditional metaphor
         PHP is like Lego bricks




                                      Bricks allowing you to build
                                       anything




 Tuesday, February 26, 2008                                           7
PHP is changing...
 •  PHP is no longer a toy
         Let’s use the metaphor of actual bricks


                                          Because we’re building
                                           actual buildings now




 Tuesday, February 26, 2008                                         8
About Bricks

 •  Extreme simplicity
 •  Easy to learn
 •  Versatile
 •  Cheap




    ... so building a skyscraper must be peanuts, right?



 Tuesday, February 26, 2008                                9
Enterprise development in 10 steps




                        Ibuildings - http://www.ibuildings.com
Step 1 – The Team
     “Dear Mr. Businessman,

     I have read about your plans to build a new
     skyscraper and I am applying for a job.

     I have a lot of experience with Bricks. I taught
     myself how to use them and have been
     maintaining our family shed for a few years now.”




 Tuesday, February 26, 2008                          11
Step 1 – The Team
 •  Be a software engineer

 •  Train your skills

 •  Study OO principles

 •  Consider Zend Certification




 Tuesday, February 26, 2008       12
Step 2 - Requirements
 •  What does the customer need?
 •  What do visitors want?




 Tuesday, February 26, 2008        13
Step 2 - Requirements
 •  Functional Design
         Requirements definition

         Interaction Design /
           Wireframes




                                      Flow diagrams


 Tuesday, February 26, 2008                            14
Step 3 - Architecture
 •  Don’t just start stacking bricks




                              •  Create an architecture first

 Tuesday, February 26, 2008                                15
Step 3 - Architecture
 •  Technical Design
         Modelling
              •  Class diagrams
              •  ER diagram (data model)‫‏‬
              •  Colaboration diagrams
              •  Use cases
              •  etc.

         Tools: UML, whiteboards




 Tuesday, February 26, 2008                 16
Step 3 - Architecture
 •  High Level Architectures:

        MVC (Model View Controller)

        SOA (Service Oriented Architecture)

        Multi-tier development (Frontend, Application, Data)

        CBD (Component Based Development)‫‏‬




 Tuesday, February 26, 2008                                     17
Step 4 - Tools
 •  You don’t need tools...




                              •  But they make you productive

 Tuesday, February 26, 2008                                18
Step 4 - Tools
 •  Development:
           Eclipse (PDT)‫‏‬
           PhpED
           Vim
           Zend Studio
           Komodo



 •  IDE's vs Editors
         Debugging
         Profiling
         Navigation / cross references
         Syntax Checking

 Tuesday, February 26, 2008               19
Step 4 - Tools
 •  Source Control
         CVS / SVN
         Bitkeeper / GIT




         Branching
         Tagging




 Tuesday, February 26, 2008   20
Step 5 - Foundation
 •  Start stacking bricks?
         How many bricks does it take..
         What about stability?




                                  •  Start with a foundation



 Tuesday, February 26, 2008                                21
Step 5 - Foundation
 •  Use a framework
         Provides guidelines (frame)‫‏‬
         Off the shelf components


 •  Examples
           Zend Framework    http://framework.zend.com
           CakePHP           http://http://www.cakephp.org
           ezComponents      http://ez.no/ezcomponents
           Symfony           http://www.symfony-project.org
           ATK               http://www.achievo.org/atk




 Tuesday, February 26, 2008                                    22
Step 5 - Foundation
 •  The “Not Invented Here” Syndrome

        “The existing frameworks are no good.
             I can do this better.”

        “This framework is no good.
              It can do A through Y but I need Z.”

        “This framework is too big.
              It provides A-Z but we only need A and B.”

        “I know there's a good framework.
              But I would like to learn.”



 Tuesday, February 26, 2008                                23
Step 6 – Design Patterns



                              Requirement 1056.4:

           We need to be able to look outside, but we
          can't make holes in the wall (rain should be
          kept outside). When it's sunny, a hole is ok.




 Tuesday, February 26, 2008                               24
Step 6 – Design Patterns
 •  A ‘window’ is a concept
         Best practice way of solving a particular problem


 •  In IT, we call this a ‘design pattern’

 •  Popular patterns in PHP:
         MVC, Factory, Singleton, Registry, Decorator

 •  Good read:
         php|architect's Guide to
          PHP Design Patterns
           - Jason E. Sweat



 Tuesday, February 26, 2008                                   25
Step 7 - Testing
 •  Is your software tested after it has gone live?




 Tuesday, February 26, 2008                           26
Step 7 - Testing
 •  Various types of testing

         Developer testing

         Functional testing

         Environment testing

         Performance testing

         Usability testing




 Tuesday, February 26, 2008     27
Step 7 - Testing
 •  Common scenario




 Tuesday, February 26, 2008   28
Step 7 - Testing
 •  User complains...




                              MWOEHA!
                               BUG!




 Tuesday, February 26, 2008             29
Step 7 - Testing
 •  Developer attacks the problem




                              fix_bug();




 Tuesday, February 26, 2008                30
Step 7 - Testing
 •  Problem solved!




 Tuesday, February 26, 2008   31
Step 7 - Testing
 •  Solution: Unit Tests
         Automated testing after each change
         Prevents regressions



 •  Testing for PHP applications:
         PHPUnit             http://www.phpunit.de/
         SimpleTest          http://www.lastcraft.com/simple_test.php



 •  Continuous Integration:
         CruiseControl with phpUnderControl
         Xinc    http://code.google.com/p/xinc/



 Tuesday, February 26, 2008                                              32
Step 7 - Testing
 •  Test Driven Development
      1. Define functionality
      2. Create testcase
      3. Run test -> test fails
      4. Implement functionality
             •  Test succeeds? Done
             •  Test fails? Refactor

      Repeat step 4 until finished




 Tuesday, February 26, 2008            33
Step 8 - Optimization


                              Users are reporting:




             quot;I work on the 197th floor. Every day I
            have to walk the stairs for 2 hours, then I
              have only 4 hours left to do my job.quot;




 Tuesday, February 26, 2008                               34
Step 8 - Optimization
 •  Solution: Elevator




 Tuesday, February 26, 2008   35
Step 8 - Optimization
 In PHP, this ‘elevator’ is called an ‘accelerator’

         This is how PHP works (pseudo-ish code):

           read index.php;                 // enter the building
           compile index.php;                // go to floor 197
           echo “Hello World”;               // get the job done

         An accelerator improves the first 2 steps

         Accelerators for PHP:
              •  eAccelerator    http://eaccelerator.net/
              •  APC             http://pecl.php.net/package/APC
              •  Zend Platform   http://www.zend.com/products/zend_platform



 Tuesday, February 26, 2008                                                   36
Step 8 - Optimization


                              Users complain:



                “Every time I need coffee I have to go
                    to the top floor to get some.”




 Tuesday, February 26, 2008                              37
Step 8 - Optimization
 •  Solution: Create small coffee corners on every floor so
    people
    d
    o
    n’t have to go to the main restaurant every time.

 •  In PHP we call this caching
       Don’t query the database everytime you need data
       Use locally stored copy (file or memory)‫‏‬


 •  PHP Caching solutions:
         Zend_Cache          http://framework.zend.com
         Smarty              http://smarty.php.net
         Zend Platform       http://www.zend.com/products/zend_platform
         Memcached
 Tuesday, February 26, 2008
                              http://danga.com/memcached/                  38
Step 9 - Deployment
 •  Lifecycle:
        Develop
        Test
        Deploy to acceptance test environment
        Deploy to live



 •  Use SVN


 •  Code is just a part, don't forget the database

 •  Create a 'Deployment & Release Profile'

 Tuesday, February 26, 2008                          39
Step 9 - Deployment
 •  System Architecture




                                 PHP
                                               MySQL
                               Apache

                                       Linux




                 From a simple LAMP stack on a single machine...




 Tuesday, February 26, 2008                                        40
Step 9 - Deployment
 •  System Architecture




        ... to a High Availability, Horizontally Scalable architecture


 Tuesday, February 26, 2008                                              41
Step 10 - Operations
 •  Monitoring
        Logfiles
        Monitor infrastructure (tools such as Nagios)‫‏‬
        Monitor application (tools such as Zend Platform)‫‏‬
        Monitor business (is the money still pouring in?)




 Tuesday, February 26, 2008                                   42
Step 10 - Operations
 •  Debugging

        Ideal:

          “I had error x when I selected y after I clicked z”


        Reality:

          “It doesn't work!”
          “What exactly doesn't work, and what did you do?”
          “It just ******** didn't work, FIX IT.”




 Tuesday, February 26, 2008                                     43
Step 10 - Operations
 •  Solution

        A 'root cause
         analysis' tool




 Tuesday, February 26, 2008   44
Step 10 - Operations
 •  Change management
        Ticket system
        Stick to your deployment - use the DRP


        DON'T TOUCH THE LIVE ENVIRONMENT.



        But I absolutely have to...

                   DON'T!

        but...

            NO! IF YOU TOUCH IT, YOU WILL LOSE ALL GURU POINTS.


 Tuesday, February 26, 2008                                       45
Shameless self-promotion
 •  php|architect's
    Guide to Enterprise PHP Development

 •  PDF: June 12, Print: June 26

 •  ISBN: 978-0-9738621-8-8

 •  Order via http://phparch.com


 •  http://www.enterprisephp.nl




                                          46
Questions?

 http://www.jansch.nl
 http://www.enterprisephp.nl
 http://www.ibuildings.com

 ivo@ibuildings.com


                               Ibuildings - http://www.ibuildings.com

Mais conteúdo relacionado

Destaque

SASPAC 2011 and beyond - BURISA Conference 13.05.11
SASPAC 2011 and beyond - BURISA Conference 13.05.11SASPAC 2011 and beyond - BURISA Conference 13.05.11
SASPAC 2011 and beyond - BURISA Conference 13.05.11alewis
 
50 anni mamma
50 anni mamma50 anni mamma
50 anni mammaaldamith
 
IoF National Convention 2010 - the role of Twitter in fundraising
IoF National Convention 2010 - the role of Twitter in fundraisingIoF National Convention 2010 - the role of Twitter in fundraising
IoF National Convention 2010 - the role of Twitter in fundraisingJonathan Waddingham
 
4/5 Performance measurment and balanced scorecard in government organizations
4/5 Performance measurment and balanced scorecard in government organizations4/5 Performance measurment and balanced scorecard in government organizations
4/5 Performance measurment and balanced scorecard in government organizationsMohamed Moustafa
 
Ict4volunteering Mm
Ict4volunteering MmIct4volunteering Mm
Ict4volunteering Mmhavs
 
Social media and local government
Social media and local governmentSocial media and local government
Social media and local governmentsimonwakeman
 
2011 Census OWG - 2001 Census lessons (21.07.09)
2011 Census OWG - 2001 Census lessons (21.07.09)2011 Census OWG - 2001 Census lessons (21.07.09)
2011 Census OWG - 2001 Census lessons (21.07.09)alewis
 
Gas In Beeld Harkstede
Gas In Beeld  HarkstedeGas In Beeld  Harkstede
Gas In Beeld HarkstedeKennisland
 
Agiler without a schema @forward
Agiler without a schema @forwardAgiler without a schema @forward
Agiler without a schema @forwardAntonio Terreno
 
Achievo ATK, an Open Source project
Achievo ATK, an Open Source projectAchievo ATK, an Open Source project
Achievo ATK, an Open Source projectIvo Jansch
 
PHP and the Cloud
PHP and the CloudPHP and the Cloud
PHP and the CloudIvo Jansch
 
Presentatie masterclass Lizzy Jongma
Presentatie masterclass Lizzy JongmaPresentatie masterclass Lizzy Jongma
Presentatie masterclass Lizzy JongmaKennisland
 
互联网商品设计
互联网商品设计互联网商品设计
互联网商品设计easychen
 

Destaque (20)

SASPAC 2011 and beyond - BURISA Conference 13.05.11
SASPAC 2011 and beyond - BURISA Conference 13.05.11SASPAC 2011 and beyond - BURISA Conference 13.05.11
SASPAC 2011 and beyond - BURISA Conference 13.05.11
 
50 anni mamma
50 anni mamma50 anni mamma
50 anni mamma
 
IoF National Convention 2010 - the role of Twitter in fundraising
IoF National Convention 2010 - the role of Twitter in fundraisingIoF National Convention 2010 - the role of Twitter in fundraising
IoF National Convention 2010 - the role of Twitter in fundraising
 
Fruits
FruitsFruits
Fruits
 
4/5 Performance measurment and balanced scorecard in government organizations
4/5 Performance measurment and balanced scorecard in government organizations4/5 Performance measurment and balanced scorecard in government organizations
4/5 Performance measurment and balanced scorecard in government organizations
 
Ict4volunteering Mm
Ict4volunteering MmIct4volunteering Mm
Ict4volunteering Mm
 
Verim v boha_otca
Verim v boha_otcaVerim v boha_otca
Verim v boha_otca
 
Judska Pust
Judska PustJudska Pust
Judska Pust
 
Spaziorientappt
SpaziorientapptSpaziorientappt
Spaziorientappt
 
Up學
Up學Up學
Up學
 
Social media and local government
Social media and local governmentSocial media and local government
Social media and local government
 
2011 Census OWG - 2001 Census lessons (21.07.09)
2011 Census OWG - 2001 Census lessons (21.07.09)2011 Census OWG - 2001 Census lessons (21.07.09)
2011 Census OWG - 2001 Census lessons (21.07.09)
 
Gas In Beeld Harkstede
Gas In Beeld  HarkstedeGas In Beeld  Harkstede
Gas In Beeld Harkstede
 
IoF South West Conference
IoF South West ConferenceIoF South West Conference
IoF South West Conference
 
Agiler without a schema @forward
Agiler without a schema @forwardAgiler without a schema @forward
Agiler without a schema @forward
 
Achievo ATK, an Open Source project
Achievo ATK, an Open Source projectAchievo ATK, an Open Source project
Achievo ATK, an Open Source project
 
úVod do kréda ppt
úVod do kréda pptúVod do kréda ppt
úVod do kréda ppt
 
PHP and the Cloud
PHP and the CloudPHP and the Cloud
PHP and the Cloud
 
Presentatie masterclass Lizzy Jongma
Presentatie masterclass Lizzy JongmaPresentatie masterclass Lizzy Jongma
Presentatie masterclass Lizzy Jongma
 
互联网商品设计
互联网商品设计互联网商品设计
互联网商品设计
 

Semelhante a Enterprise PHP Development (Dutch PHP Conference 2008)

Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My SpacecomConSanFrancisco123
 
Enterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo JanschEnterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo Janschdpc
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Libraryjeresig
 
Migrating from PHP4 To PHP5 - Zend Webinar
Migrating from PHP4 To PHP5 - Zend WebinarMigrating from PHP4 To PHP5 - Zend Webinar
Migrating from PHP4 To PHP5 - Zend WebinarIvo Jansch
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Atlassian
 
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityHigh-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityAtlassian
 
Beginner Series 5 2009 Final
Beginner Series  5 2009 FinalBeginner Series  5 2009 Final
Beginner Series 5 2009 FinalFroemke
 
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008Ivo Jansch
 
The Tantric Team: Getting Your Automated Build Groove On
The Tantric Team: Getting Your Automated Build Groove OnThe Tantric Team: Getting Your Automated Build Groove On
The Tantric Team: Getting Your Automated Build Groove OnAtlassian
 
Building and Working With Static Sites in Ruby on Rails
Building and Working With Static Sites in Ruby on RailsBuilding and Working With Static Sites in Ruby on Rails
Building and Working With Static Sites in Ruby on RailsViget Labs
 
Learning jQuery @ MIT
Learning jQuery @ MITLearning jQuery @ MIT
Learning jQuery @ MITjeresig
 
Pstrong Cybera 29 Sept 2008
Pstrong Cybera 29 Sept 2008Pstrong Cybera 29 Sept 2008
Pstrong Cybera 29 Sept 2008Cybera Inc.
 
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)jjhuff
 
The Lean Startup at Web 2.0 Expo
The Lean Startup at Web 2.0 ExpoThe Lean Startup at Web 2.0 Expo
The Lean Startup at Web 2.0 ExpoVenture Hacks
 
Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)Ivo Jansch
 
My History with Atlassian Tools, and Why I'm Moving to Studio
My History with Atlassian Tools, and Why I'm Moving to StudioMy History with Atlassian Tools, and Why I'm Moving to Studio
My History with Atlassian Tools, and Why I'm Moving to StudioAtlassian
 
Desktop Applications with NetBeans
Desktop Applications with NetBeansDesktop Applications with NetBeans
Desktop Applications with NetBeansHuu Bang Le Phan
 
How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08kingsfleet
 
Conquering Gef Part 1: Effectively creating a well designed graphical editor
Conquering Gef Part 1: Effectively creating a well designed graphical editorConquering Gef Part 1: Effectively creating a well designed graphical editor
Conquering Gef Part 1: Effectively creating a well designed graphical editorVineet Sinha
 

Semelhante a Enterprise PHP Development (Dutch PHP Conference 2008) (20)

Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My Spacecom
 
Enterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo JanschEnterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo Jansch
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Library
 
Migrating from PHP4 To PHP5 - Zend Webinar
Migrating from PHP4 To PHP5 - Zend WebinarMigrating from PHP4 To PHP5 - Zend Webinar
Migrating from PHP4 To PHP5 - Zend Webinar
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
 
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityHigh-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
 
Beginner Series 5 2009 Final
Beginner Series  5 2009 FinalBeginner Series  5 2009 Final
Beginner Series 5 2009 Final
 
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008
 
Symfony for non-techies
Symfony for non-techiesSymfony for non-techies
Symfony for non-techies
 
The Tantric Team: Getting Your Automated Build Groove On
The Tantric Team: Getting Your Automated Build Groove OnThe Tantric Team: Getting Your Automated Build Groove On
The Tantric Team: Getting Your Automated Build Groove On
 
Building and Working With Static Sites in Ruby on Rails
Building and Working With Static Sites in Ruby on RailsBuilding and Working With Static Sites in Ruby on Rails
Building and Working With Static Sites in Ruby on Rails
 
Learning jQuery @ MIT
Learning jQuery @ MITLearning jQuery @ MIT
Learning jQuery @ MIT
 
Pstrong Cybera 29 Sept 2008
Pstrong Cybera 29 Sept 2008Pstrong Cybera 29 Sept 2008
Pstrong Cybera 29 Sept 2008
 
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
 
The Lean Startup at Web 2.0 Expo
The Lean Startup at Web 2.0 ExpoThe Lean Startup at Web 2.0 Expo
The Lean Startup at Web 2.0 Expo
 
Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)
 
My History with Atlassian Tools, and Why I'm Moving to Studio
My History with Atlassian Tools, and Why I'm Moving to StudioMy History with Atlassian Tools, and Why I'm Moving to Studio
My History with Atlassian Tools, and Why I'm Moving to Studio
 
Desktop Applications with NetBeans
Desktop Applications with NetBeansDesktop Applications with NetBeans
Desktop Applications with NetBeans
 
How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08
 
Conquering Gef Part 1: Effectively creating a well designed graphical editor
Conquering Gef Part 1: Effectively creating a well designed graphical editorConquering Gef Part 1: Effectively creating a well designed graphical editor
Conquering Gef Part 1: Effectively creating a well designed graphical editor
 

Mais de Ivo Jansch

Own Your Apps
Own Your Apps Own Your Apps
Own Your Apps Ivo Jansch
 
PHP Development In The Cloud (php|tek edition)
PHP Development In The Cloud (php|tek edition)PHP Development In The Cloud (php|tek edition)
PHP Development In The Cloud (php|tek edition)Ivo Jansch
 
Mobile for PHP developers
Mobile for PHP developersMobile for PHP developers
Mobile for PHP developersIvo Jansch
 
Building an SSO platform in PHP (Zend Webinar Edition)
Building an SSO platform in PHP (Zend Webinar Edition)Building an SSO platform in PHP (Zend Webinar Edition)
Building an SSO platform in PHP (Zend Webinar Edition)Ivo Jansch
 
The Business Case For Telecommuting
The Business Case For TelecommutingThe Business Case For Telecommuting
The Business Case For TelecommutingIvo Jansch
 
Php Development In The Cloud
Php Development In The CloudPhp Development In The Cloud
Php Development In The CloudIvo Jansch
 
PHP in a mobile ecosystem
PHP in a mobile ecosystem PHP in a mobile ecosystem
PHP in a mobile ecosystem Ivo Jansch
 
27 Ways To Be A Better Developer (PHPBenelux 2011)
27 Ways To Be A Better Developer (PHPBenelux 2011)27 Ways To Be A Better Developer (PHPBenelux 2011)
27 Ways To Be A Better Developer (PHPBenelux 2011)Ivo Jansch
 
Building an SSO platform in php (Zendcon 2010)
Building an SSO platform in php (Zendcon 2010)Building an SSO platform in php (Zendcon 2010)
Building an SSO platform in php (Zendcon 2010)Ivo Jansch
 
PHP in a Mobile Ecosystem (Zendcon 2010)
PHP in a Mobile Ecosystem (Zendcon 2010)PHP in a Mobile Ecosystem (Zendcon 2010)
PHP in a Mobile Ecosystem (Zendcon 2010)Ivo Jansch
 
PHP and the Cloud (phpbenelux conference)
PHP and the Cloud (phpbenelux conference)PHP and the Cloud (phpbenelux conference)
PHP and the Cloud (phpbenelux conference)Ivo Jansch
 
Content Management Selection and Strategy
Content Management Selection and StrategyContent Management Selection and Strategy
Content Management Selection and StrategyIvo Jansch
 
PHP in the Real World
PHP in the Real WorldPHP in the Real World
PHP in the Real WorldIvo Jansch
 
Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Ivo Jansch
 
Hello Enterprise, my name is PHP
Hello Enterprise, my name is PHPHello Enterprise, my name is PHP
Hello Enterprise, my name is PHPIvo Jansch
 
Introduction to PHP (Casino Affiliate Convention 2008)
Introduction to PHP (Casino Affiliate Convention 2008)Introduction to PHP (Casino Affiliate Convention 2008)
Introduction to PHP (Casino Affiliate Convention 2008)Ivo Jansch
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Ivo Jansch
 
Maatwerk Software
Maatwerk SoftwareMaatwerk Software
Maatwerk SoftwareIvo Jansch
 
Introductie Web 2.0
Introductie Web 2.0Introductie Web 2.0
Introductie Web 2.0Ivo Jansch
 
Wat is Open Source?
Wat is Open Source?Wat is Open Source?
Wat is Open Source?Ivo Jansch
 

Mais de Ivo Jansch (20)

Own Your Apps
Own Your Apps Own Your Apps
Own Your Apps
 
PHP Development In The Cloud (php|tek edition)
PHP Development In The Cloud (php|tek edition)PHP Development In The Cloud (php|tek edition)
PHP Development In The Cloud (php|tek edition)
 
Mobile for PHP developers
Mobile for PHP developersMobile for PHP developers
Mobile for PHP developers
 
Building an SSO platform in PHP (Zend Webinar Edition)
Building an SSO platform in PHP (Zend Webinar Edition)Building an SSO platform in PHP (Zend Webinar Edition)
Building an SSO platform in PHP (Zend Webinar Edition)
 
The Business Case For Telecommuting
The Business Case For TelecommutingThe Business Case For Telecommuting
The Business Case For Telecommuting
 
Php Development In The Cloud
Php Development In The CloudPhp Development In The Cloud
Php Development In The Cloud
 
PHP in a mobile ecosystem
PHP in a mobile ecosystem PHP in a mobile ecosystem
PHP in a mobile ecosystem
 
27 Ways To Be A Better Developer (PHPBenelux 2011)
27 Ways To Be A Better Developer (PHPBenelux 2011)27 Ways To Be A Better Developer (PHPBenelux 2011)
27 Ways To Be A Better Developer (PHPBenelux 2011)
 
Building an SSO platform in php (Zendcon 2010)
Building an SSO platform in php (Zendcon 2010)Building an SSO platform in php (Zendcon 2010)
Building an SSO platform in php (Zendcon 2010)
 
PHP in a Mobile Ecosystem (Zendcon 2010)
PHP in a Mobile Ecosystem (Zendcon 2010)PHP in a Mobile Ecosystem (Zendcon 2010)
PHP in a Mobile Ecosystem (Zendcon 2010)
 
PHP and the Cloud (phpbenelux conference)
PHP and the Cloud (phpbenelux conference)PHP and the Cloud (phpbenelux conference)
PHP and the Cloud (phpbenelux conference)
 
Content Management Selection and Strategy
Content Management Selection and StrategyContent Management Selection and Strategy
Content Management Selection and Strategy
 
PHP in the Real World
PHP in the Real WorldPHP in the Real World
PHP in the Real World
 
Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)
 
Hello Enterprise, my name is PHP
Hello Enterprise, my name is PHPHello Enterprise, my name is PHP
Hello Enterprise, my name is PHP
 
Introduction to PHP (Casino Affiliate Convention 2008)
Introduction to PHP (Casino Affiliate Convention 2008)Introduction to PHP (Casino Affiliate Convention 2008)
Introduction to PHP (Casino Affiliate Convention 2008)
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 
Maatwerk Software
Maatwerk SoftwareMaatwerk Software
Maatwerk Software
 
Introductie Web 2.0
Introductie Web 2.0Introductie Web 2.0
Introductie Web 2.0
 
Wat is Open Source?
Wat is Open Source?Wat is Open Source?
Wat is Open Source?
 

Último

Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insightsseribangash
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in managementchhavia330
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Delhi Call girls
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsApsara Of India
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaShree Krishna Exports
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessAggregage
 
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Tina Ji
 
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...noida100girls
 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdftbatkhuu1
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurSuhani Kapoor
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetDenis Gagné
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Roland Driesen
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfOnline Income Engine
 

Último (20)

Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insights
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in management
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in India
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for Success
 
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
 
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...
 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdf
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdf
 

Enterprise PHP Development (Dutch PHP Conference 2008)

  • 1. Enterprise PHP development Ivo Jansch <ivo@ibuildings.com> Dutch PHP Conference, June 14, 2008 Ibuildings - http://www.ibuildings.com
  • 2. What's an enterprise? •  Wikipedia:   “Any of several ships by that name in the Star Trek fictional universe”   “A business, company, or comparable organization” Tuesday, February 26, 2008 2
  • 3. Is PHP Enterprise ready? •  CIO Magazine: “ H w r s w l f r pooy i g b c ue i i e s t g t a se u a d r n i g Ue P P t d s n P P ok e o r t t p ea s t s ay o e i p n u n . s H o ei n t n g the site [...] but when it comes time for development, tell the team you want t he result to look and act like this PHP site...but in Java” (Or: “great, this is exactly what I need! now do it again, at twice the cost!”)‫‏‬ http://www.cio.com/article/176250 (skip the article, read the comments)‫‏‬ Tuesday, February 26, 2008 3
  • 4. Is PHP Enterprise ready?   Big   Small   Enterprise friendly   Lightweight   enterpriCe   Cheap   CS required   Easy to learn Tuesday, February 26, 2008 4
  • 5. A word from my girlfriend It's not the SIZE of the tool... It's how you USE it. Tuesday, February 26, 2008 5
  • 6. PHP is changing... •  1998   Personal stuff •  2003   Simple websites   Content management   Blogs •  2008   Big websites   Banks   Insurance Companies   ... Tuesday, February 26, 2008 6
  • 7. PHP is changing... •  Traditional metaphor   PHP is like Lego bricks   Bricks allowing you to build anything Tuesday, February 26, 2008 7
  • 8. PHP is changing... •  PHP is no longer a toy   Let’s use the metaphor of actual bricks   Because we’re building actual buildings now Tuesday, February 26, 2008 8
  • 9. About Bricks •  Extreme simplicity •  Easy to learn •  Versatile •  Cheap ... so building a skyscraper must be peanuts, right? Tuesday, February 26, 2008 9
  • 10. Enterprise development in 10 steps Ibuildings - http://www.ibuildings.com
  • 11. Step 1 – The Team “Dear Mr. Businessman, I have read about your plans to build a new skyscraper and I am applying for a job. I have a lot of experience with Bricks. I taught myself how to use them and have been maintaining our family shed for a few years now.” Tuesday, February 26, 2008 11
  • 12. Step 1 – The Team •  Be a software engineer •  Train your skills •  Study OO principles •  Consider Zend Certification Tuesday, February 26, 2008 12
  • 13. Step 2 - Requirements •  What does the customer need? •  What do visitors want? Tuesday, February 26, 2008 13
  • 14. Step 2 - Requirements •  Functional Design   Requirements definition   Interaction Design / Wireframes   Flow diagrams Tuesday, February 26, 2008 14
  • 15. Step 3 - Architecture •  Don’t just start stacking bricks •  Create an architecture first Tuesday, February 26, 2008 15
  • 16. Step 3 - Architecture •  Technical Design   Modelling •  Class diagrams •  ER diagram (data model)‫‏‬ •  Colaboration diagrams •  Use cases •  etc.   Tools: UML, whiteboards Tuesday, February 26, 2008 16
  • 17. Step 3 - Architecture •  High Level Architectures:   MVC (Model View Controller)   SOA (Service Oriented Architecture)   Multi-tier development (Frontend, Application, Data)   CBD (Component Based Development)‫‏‬ Tuesday, February 26, 2008 17
  • 18. Step 4 - Tools •  You don’t need tools... •  But they make you productive Tuesday, February 26, 2008 18
  • 19. Step 4 - Tools •  Development:   Eclipse (PDT)‫‏‬   PhpED   Vim   Zend Studio   Komodo •  IDE's vs Editors   Debugging   Profiling   Navigation / cross references   Syntax Checking Tuesday, February 26, 2008 19
  • 20. Step 4 - Tools •  Source Control   CVS / SVN   Bitkeeper / GIT   Branching   Tagging Tuesday, February 26, 2008 20
  • 21. Step 5 - Foundation •  Start stacking bricks?   How many bricks does it take..   What about stability? •  Start with a foundation Tuesday, February 26, 2008 21
  • 22. Step 5 - Foundation •  Use a framework   Provides guidelines (frame)‫‏‬   Off the shelf components •  Examples   Zend Framework http://framework.zend.com   CakePHP http://http://www.cakephp.org   ezComponents http://ez.no/ezcomponents   Symfony http://www.symfony-project.org   ATK http://www.achievo.org/atk Tuesday, February 26, 2008 22
  • 23. Step 5 - Foundation •  The “Not Invented Here” Syndrome   “The existing frameworks are no good. I can do this better.”   “This framework is no good. It can do A through Y but I need Z.”   “This framework is too big. It provides A-Z but we only need A and B.”   “I know there's a good framework. But I would like to learn.” Tuesday, February 26, 2008 23
  • 24. Step 6 – Design Patterns Requirement 1056.4: We need to be able to look outside, but we can't make holes in the wall (rain should be kept outside). When it's sunny, a hole is ok. Tuesday, February 26, 2008 24
  • 25. Step 6 – Design Patterns •  A ‘window’ is a concept   Best practice way of solving a particular problem •  In IT, we call this a ‘design pattern’ •  Popular patterns in PHP:   MVC, Factory, Singleton, Registry, Decorator •  Good read:   php|architect's Guide to PHP Design Patterns - Jason E. Sweat Tuesday, February 26, 2008 25
  • 26. Step 7 - Testing •  Is your software tested after it has gone live? Tuesday, February 26, 2008 26
  • 27. Step 7 - Testing •  Various types of testing   Developer testing   Functional testing   Environment testing   Performance testing   Usability testing Tuesday, February 26, 2008 27
  • 28. Step 7 - Testing •  Common scenario Tuesday, February 26, 2008 28
  • 29. Step 7 - Testing •  User complains... MWOEHA! BUG! Tuesday, February 26, 2008 29
  • 30. Step 7 - Testing •  Developer attacks the problem fix_bug(); Tuesday, February 26, 2008 30
  • 31. Step 7 - Testing •  Problem solved! Tuesday, February 26, 2008 31
  • 32. Step 7 - Testing •  Solution: Unit Tests   Automated testing after each change   Prevents regressions •  Testing for PHP applications:   PHPUnit http://www.phpunit.de/   SimpleTest http://www.lastcraft.com/simple_test.php •  Continuous Integration:   CruiseControl with phpUnderControl   Xinc http://code.google.com/p/xinc/ Tuesday, February 26, 2008 32
  • 33. Step 7 - Testing •  Test Driven Development 1. Define functionality 2. Create testcase 3. Run test -> test fails 4. Implement functionality •  Test succeeds? Done •  Test fails? Refactor Repeat step 4 until finished Tuesday, February 26, 2008 33
  • 34. Step 8 - Optimization Users are reporting: quot;I work on the 197th floor. Every day I have to walk the stairs for 2 hours, then I have only 4 hours left to do my job.quot; Tuesday, February 26, 2008 34
  • 35. Step 8 - Optimization •  Solution: Elevator Tuesday, February 26, 2008 35
  • 36. Step 8 - Optimization In PHP, this ‘elevator’ is called an ‘accelerator’   This is how PHP works (pseudo-ish code): read index.php; // enter the building compile index.php; // go to floor 197 echo “Hello World”; // get the job done   An accelerator improves the first 2 steps   Accelerators for PHP: •  eAccelerator http://eaccelerator.net/ •  APC http://pecl.php.net/package/APC •  Zend Platform http://www.zend.com/products/zend_platform Tuesday, February 26, 2008 36
  • 37. Step 8 - Optimization Users complain: “Every time I need coffee I have to go to the top floor to get some.” Tuesday, February 26, 2008 37
  • 38. Step 8 - Optimization •  Solution: Create small coffee corners on every floor so people d o n’t have to go to the main restaurant every time. •  In PHP we call this caching   Don’t query the database everytime you need data   Use locally stored copy (file or memory)‫‏‬ •  PHP Caching solutions:   Zend_Cache http://framework.zend.com   Smarty http://smarty.php.net   Zend Platform http://www.zend.com/products/zend_platform   Memcached Tuesday, February 26, 2008 http://danga.com/memcached/ 38
  • 39. Step 9 - Deployment •  Lifecycle:   Develop   Test   Deploy to acceptance test environment   Deploy to live •  Use SVN •  Code is just a part, don't forget the database •  Create a 'Deployment & Release Profile' Tuesday, February 26, 2008 39
  • 40. Step 9 - Deployment •  System Architecture PHP MySQL Apache Linux From a simple LAMP stack on a single machine... Tuesday, February 26, 2008 40
  • 41. Step 9 - Deployment •  System Architecture ... to a High Availability, Horizontally Scalable architecture Tuesday, February 26, 2008 41
  • 42. Step 10 - Operations •  Monitoring   Logfiles   Monitor infrastructure (tools such as Nagios)‫‏‬   Monitor application (tools such as Zend Platform)‫‏‬   Monitor business (is the money still pouring in?) Tuesday, February 26, 2008 42
  • 43. Step 10 - Operations •  Debugging   Ideal: “I had error x when I selected y after I clicked z”   Reality: “It doesn't work!” “What exactly doesn't work, and what did you do?” “It just ******** didn't work, FIX IT.” Tuesday, February 26, 2008 43
  • 44. Step 10 - Operations •  Solution   A 'root cause analysis' tool Tuesday, February 26, 2008 44
  • 45. Step 10 - Operations •  Change management   Ticket system   Stick to your deployment - use the DRP   DON'T TOUCH THE LIVE ENVIRONMENT.   But I absolutely have to... DON'T!   but... NO! IF YOU TOUCH IT, YOU WILL LOSE ALL GURU POINTS. Tuesday, February 26, 2008 45
  • 46. Shameless self-promotion •  php|architect's Guide to Enterprise PHP Development •  PDF: June 12, Print: June 26 •  ISBN: 978-0-9738621-8-8 •  Order via http://phparch.com •  http://www.enterprisephp.nl 46
  • 47. Questions? http://www.jansch.nl http://www.enterprisephp.nl http://www.ibuildings.com ivo@ibuildings.com Ibuildings - http://www.ibuildings.com