• Save
Enterprise PHP (PHP London Conference 2008)
Upcoming SlideShare
Loading in...5
×
 

Enterprise PHP (PHP London Conference 2008)

on

  • 20,424 views

My presentation on 'Enterprise PHP' at the PHP London Conference 2008 (http://www.phpconference.co.uk)

My presentation on 'Enterprise PHP' at the PHP London Conference 2008 (http://www.phpconference.co.uk)

Statistics

Views

Total Views
20,424
Views on SlideShare
19,419
Embed Views
1,005

Actions

Likes
47
Downloads
0
Comments
3

36 Embeds 1,005

http://warunglobak.blogspot.com 323
http://www.coderholic.com 219
http://www.blogdopedro.net 136
http://web20vn.com 97
http://amiworks.co.in 51
http://phpmalayalam.blogspot.com 37
http://phpmalayalam.blogspot.in 23
http://me.sor 21
http://livebuzz.com.br 17
http://www.slideshare.net 15
http://asklife.info 11
http://fearsomegrue.blogspot.com 9
http://localhost 7
http://fearsomegrue.blogspot.co.uk 5
http://www.techgig.com 4
http://slidestudy.jp 3
http://void.perand.com 2
http://kurataka.com 2
http://www.khongtuoc.co.cc 2
http://myvirtualagency.com 2
http://zeta 2
http://www.dowling.me.uk 2
http://haind.byethost10.com 2
http://translate.yandex.net 1
http://10.150.200.57 1
http://www.yijee.com 1
http://utctic.wordpress.com 1
http://www.nexen.net 1
http://www.web20vn.com 1
http://www.floorrobots.com 1
http://moleculemanufacturing.com 1
http://applysocialsecuritydisability.com 1
http://handsfreephoneaccessories.com 1
http://www.fachak.com 1
http://webcache.googleusercontent.com 1
http://warunglobak.blogspot.sg 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Enterprise PHP (PHP London Conference 2008) Enterprise PHP (PHP London Conference 2008) Presentation Transcript

  • Enterprise PHP development Ivo Jansch <ivo@ibuildings.com> PHPLondon Conference, February 29, 2008
  • About me
    • CTO at Ibuildings
      • Development using PHP (websites, applications)
      • Big projects (high traffic, multi-tier, clusters, high availability, large teams)
      • Consultancy (training, audits)
      • Partner of Zend Technologies
      • 9 years in NL, 3 months in UK
    • Geek!
      • Author of several Open Source projects
      • Interested in PHP, Web 2.0, Science
      • Nervous in front of audiences bigger than 5 ;-)
  • What's an enterprise?
    • Wikipedia:
      • “ Any of several ships by that name in the Star Trek fictional universe”
      • “ A business, company, or comparable organization”
  • Is PHP Enterprise ready?
    • CIO Magazine:
    • “ PHP works well for prototyping because it is easy to get a site up and running. Use PHP to design the site [...] but when it comes time for development, tell the team you want the 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)
  • Is PHP Enterprise ready?
    • Small
    • Lightweight
    • Cheap
    • Easy to learn
    • Big
    • Enterprise friendly
    • enterpriCe
    • CS required
  • A word from my girlfriend
    • It's not the SIZE of the tool...
    • It's how you USE it.
  • PHP is changing...
    • 1998
      • Personal stuff
    • 2003
      • Simple websites
      • Content management
      • Blogs
    • 2008
      • Big websites
      • Banks
      • Insurance Companies
      • ...
  • PHP is changing...
    • Traditional metaphor
      • PHP is like Lego bricks
      • Bricks allowing you to build anything
  • PHP is changing...
    • PHP is no longer a toy
      • Let’s use the metaphor of actual bricks
      • Because we’re building actual buildings now
  • About Bricks
    • Extreme simplicity
    • Easy to learn
    • Versatile
    • Cheap
    • ... so building a skyscraper must be peanuts, right?
  • Enterprise development in 10 steps
  • 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.”
  • Step 1 – The Team
    • Be a software engineer
    • Train your skills
    • Study OO principles
    • Consider Zend Certification
  • Step 2 - Requirements
    • What does the customer need?
    • What do visitors want?
  • Step 2 - Requirements
    • Functional Design
      • Requirements definition
      • Interaction Design / Wireframes
      • Flow diagrams
  • Step 3 - Architecture
    • Don’t just start stacking bricks
    • Create an architecture first
  • Step 3 - Architecture
    • Technical Design
      • Modelling
        • Class diagrams
        • ER diagram (data model)
        • Colaboration diagrams
        • Use cases
        • etc.
      • Tools: UML, whiteboards
  • Step 3 - Architecture
    • High Level Architectures:
      • MVC (Model View Controller)
      • SOA (Service Oriented Architecture)
      • Multi-tier development (Frontend, Application, Data)
      • CBD (Component Based Development)
  • Step 4 - Tools
    • You don’t need tools...
    • But they make you productive
  • Step 4 - Tools
    • Development:
      • Eclipse (PDT)
      • PhpED
      • Vim
      • Zend Studio
    • IDE's vs Editors
      • Debugging
      • Profiling
      • Navigation / cross references
      • Inspection
  • Step 4 - Tools
    • Source Control
      • CVS / SVN
      • Bitkeeper / GIT
      • Branching
      • Tagging
  • Step 5 - Foundation
    • Start stacking bricks?
      • How many bricks does it take..
      • What about stability?
    • Start with a foundation
  • 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
  • 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.”
  • 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.
  • 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
  • Step 7 - Testing
    • Is your software tested after it has gone live?
  • Step 7 - Testing
    • Various types of testing
      • Developer testing
      • Functional testing
      • Environment testing
      • Performance testing
      • Usability testing
  • Step 7 - Testing
    • Common scenario
  • Step 7 - Testing
    • User complains...
    MWOEHA! BUG!
  • Step 7 - Testing
    • Developer attacks the problem
    fix_bug();
  • Step 7 - Testing
    • Problem solved!
  • 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:
      • Xinc http://code.google.com/p/xinc/
  • 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
  • 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;
  • Step 8 - Optimization
    • Solution: Elevator
  • 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
  • Step 8 - Optimization
    • Users complain:
    • “Every time I need coffee I have to go
    • to the top floor to get some.”
  • Step 8 - Optimization
    • Solution: Create small coffee corners on every floor so people don’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 http://danga.com/memcached/
  • 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'
  • Step 9 - Deployment
    • System Architecture
    PHP Apache Linux MySQL From a simple LAMP stack on a single machine...
  • Step 9 - Deployment
    • System Architecture
    ... to a High Availability, Horizontally Scalable architecture
  • 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?)
  • 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.”
  • Step 10 - Operations
    • Solution
      • A 'root cause analysis' tool
  • 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! I MEAN IT! :-)
  • The Big Picture
    • No ‘cowboy coding’, but structured steps
      • Higher quality
      • Software will be easier to maintain (and cheaper)
    • Development methodology
      • Waterfall
      • Agile (DSDM, XP, Scrum)
    • Software Development Life Cycle (SDLC)
      • Adapt from existing methods, learn from experts
      • Document it properly
      • Make it the cornerstone of your development efforts
  • More things to think about?
    • Development
    • Implementation
    • Documentation
    • Security
  • Before I finish
    • Dutch PHP Conference 2008
      • http://www.phpconference.nl
      • Call for Ideas
        • see your favorite guru
        • hear your favorite topic
    • Buy my book
      • “php|architect's Enterprise PHP Development”
      • Should be available in a few months
    • Talk to us
      • Visit our booth
      • We are still hiring
      • We have stuff to sell you ;-)
  • Questions? http://www.ibuildings.com http://www.jansch.nl [email_address]