• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Phpworks enterprise-php-1227605806710884-9
 

Phpworks enterprise-php-1227605806710884-9

on

  • 575 views

 

Statistics

Views

Total Views
575
Views on SlideShare
574
Embed Views
1

Actions

Likes
0
Downloads
4
Comments
0

1 Embed 1

http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

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

    Phpworks enterprise-php-1227605806710884-9 Phpworks enterprise-php-1227605806710884-9 Presentation Transcript

    • Enterprise PHP Development Ivo Jansch - ivo@ibuildings.com php|works 2008Enterprise PHP
    • What’s an Enterprise? “Any of several ships by that name in the Star Trek universe” – WikipediaEnterprise PHP
    • What’s an Enterprise? “Any of several ships by that name in the Star Trek universe” – WikipediaEnterprise PHP
    • What’s an Enterprise? “Any of several ships by that name in the Star Trek universe” – Wikipedia“A business, company or comparable organization” Enterprise PHP
    • PHP usage is changingEnterprise PHP
    • PHP usage is changing• 1998 • Personal stuff Enterprise PHP
    • PHP usage is changing• 1998 • Personal stuff• 2003 • Simple websites • Content management • Blogs Enterprise PHP
    • PHP usage is changing• 1998 • Personal stuff• 2003 • Simple websites • Content management • Blogs• 2008 • Big websites • Banks • Insurance Companies Enterprise PHP
    • PHP’s Quest so far Enterprise SME SOHOEnterprise PHP
    • Is PHP ‘enterprise ready’?Enterprise PHP
    • Is PHP ‘enterprise ready’? Big  Small Enterprise friendly  Lightweight enterpriCe  Inexpensive CS required  Easy to learn Enterprise PHP
    • A word from my girlfriend Its not the SIZE of the tool... Its how you USE it.Enterprise PHP
    • Traditional PHP metaphor PHP is like LEGO bricksEnterprise PHP
    • Improved metaphor PHP is no longer a toy Let’s use the metaphor of actual bricksEnterprise PHP
    • About Bricks• Extreme Simplicity• Easy to learn• Versatile• Inexpensive Enterprise PHP
    • Enterprise Development In 10 stepsEnterprise PHP
    • Step 1 – The Team “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.” Enterprise PHP
    • Step 1 – The Team• Be a Software Engineer• Train your skills• Study OO principles• Consider Zend Certification Enterprise PHP
    • Step 2 - Requirements• What does the customer want?• What will visitors want?• What does the customer really need? Enterprise PHP
    • Step 2 - RequirementsFunctional Design • Requirements Definition • Interaction Design / Wireframes • Flow Diagrams • Tip: Axure Enterprise PHP
    • Step 3 - ArchitectureEnterprise PHP
    • Step 3 - ArchitectureDon’t just start stacking bricks Enterprise PHP
    • Step 3 - ArchitectureDon’t just start stacking bricks Create an architecture first Enterprise PHP
    • Step 3 - ArchitectureTechnical Design • Modeling • Class Diagrams • ER Diagrams (data model) • Collaboration Diagrams • Use Cases etc. • Tools: • UML • Whiteboards Enterprise PHP
    • Step 3 - ArchitectureHigh Level Architectures: • MVC (Model, View, Controller) • SOA (Service Oriented Architecture) • Multi-tier development (Frontend, Application, BL, Data) • CBD (Component Based Development) Enterprise PHP
    • Step 4 - ToolsEnterprise PHP
    • Step 4 - ToolsYou don’t need tools… Enterprise PHP
    • Step 4 - ToolsYou don’t need tools… But they make you productive Enterprise PHP
    • Step 4 - ToolsDevelopment: • Eclipse PDT • Zend Studio • PhpEd • Vim • KomodoIDE’s versus Editors • Debugging & Profiling • Syntax Check • Cross-Referencing / Navigation Enterprise PHP
    • Step 4 - ToolsDevelopment: • Eclipse PDT • Zend Studio • PhpEd • Vim • KomodoIDE’s versus Editors • Debugging & Profiling • Syntax Check • Cross-Referencing / Navigation Enterprise PHP
    • Step 4 - ToolsEnterprise PHP
    • Step 4 - ToolsSource Control • CVS / SVN / MS VSS • Bitkeeper / GIT Enterprise PHP
    • Step 4 - ToolsSource Control • CVS / SVN / MS VSS • Bitkeeper / GITDocumentation • phpDocumentor http://phpdoc.org • PHPXRef http://phpxref.sourceforge.net • Wiki http://en.wikipedia.org/wiki/List_of_wiki_software Enterprise PHP
    • Step 5 - FoundationEnterprise PHP
    • Step 5 - FoundationStart stacking bricks? • How many bricks does it take? • What about stability? Enterprise PHP
    • Step 5 - FoundationStart stacking bricks? • How many bricks does it take? • What about stability? Start with a foundation Enterprise PHP
    • Step 5 - FoundationUse a framework • Provides guidelines (frame) • Off the shelf componentsExamples • Zend Framework – http://framework.zend.com • ezComponents – http://ez.no/ezcomponents • Symfony – http://www.symfony-project.org • ATK – http://www.atk-framework.com Enterprise PHP
    • Step 5 - FoundationThe “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 theres a good framework. But I would like to learn.” Enterprise PHP
    • Step 6 - Design Patterns Requirement 1056.4: We need to be able to look outside, but we cant make holes in the wall (rain should be kept outside). When its sunny, a hole is ok.Enterprise PHP
    • Step 6 - Design PatternsEnterprise PHP
    • Step 6 - Design Patterns• A ‘window’ is a concept • Best practice way of solving a particular problem Enterprise PHP
    • 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’ Enterprise PHP
    • 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 Enterprise PHP
    • 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|architects Guide to PHP Design Patterns - Jason E. Sweat Enterprise PHP
    • Step 7 - Testing Is your software tested after it has gone live?Enterprise PHP
    • Step 7 - TestingVarious types of testing: • Developer testing • Functional testing • Environment testing • Performance testing • Usability testing Enterprise PHP
    • Step 7 - Testing A common scenario…Enterprise PHP
    • Step 7 - Testing The user complains… MWOEHA! BUG!Enterprise PHP
    • Step 7 - Testing Developer attacks the problem… fix_bug();Enterprise PHP
    • Step 7 - Testing Problem Solved!Enterprise PHP
    • Step 7 - TestingEnterprise PHP
    • Step 7 - Testing• Solution: Unit Tests • Automated testing after each change • Prevents regressions Enterprise PHP
    • 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 Enterprise PHP
    • 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 http://cruisecontrol.sourceforge.net/ • phpUnderControl http://www.phpundercontrol.org/ Enterprise PHP
    • 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 Enterprise PHP
    • Step 8 - Optimization Users are reporting: "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."Enterprise PHP
    • Step 8 - Optimization Solution: ElevatorEnterprise PHP
    • Step 8 - OptimizationEnterprise PHP
    • Step 8 - OptimizationIn PHP, this ‘elevator’ is called an ‘accelerator’ Enterprise PHP
    • Step 8 - OptimizationIn 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 Enterprise PHP
    • Step 8 - OptimizationIn 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 Enterprise PHP
    • Step 8 - OptimizationIn 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: • APC http://pecl.php.net/package/APC • eAccelerator http://eaccelerator.net/ • Zend Platform http://www.zend.com/products/zend_platform Enterprise PHP
    • Step 8 - Optimization Users complain: “Every time I want coffee I have to go to the top floor to get some.”Enterprise PHP
    • Step 8 - OptimizationEnterprise PHP
    • Step 8 - Optimization• Solution: • Create small coffee corners on every floor so people don’t have to go to the main restaurant every time. Enterprise PHP
    • 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) Enterprise PHP
    • 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 • Zend Platform http://www.zend.com/products/zend_platform • Memcached http://danga.com/memcached/ Enterprise PHP
    • Step 9 - Deployment• Lifecycle: • Develop • Test • Deploy to staging environment • Deploy to live• Use SVN• Code is just a part, dont forget the database• Create a Deployment & Release Profile Enterprise PHP
    • Step 9 - Deployment System Architecture PHP MySQL Apache Linux From a simple single machine LAMP stack…Enterprise PHP
    • Step 9 - Deployment … to a High Availability, Scalable ArchitectureEnterprise PHP
    • Step 10 - OperationsMonitoring: • Logfiles • Monitor infrastructure (tools such as Nagios) • Monitor application (tools such as Zend Platform) • Monitor business (is the money still pouring in?) Enterprise PHP
    • Step 10 - OperationsDebugging • Ideal: “I had error x when I selected y after I clicked z” • Reality: “It doesnt work!” “What exactly doesnt work, and what did you do?” “It just ******** didnt work, FIX IT.” Enterprise PHP
    • Step 10 - OperationsSolutions: • A ‘root cause’ analysis tool • Logging • Context Capture Enterprise PHP
    • Step 10 - OperationsChange management: • Ticket system • Stick to your deployment - use the DRP • DONT TOUCH THE LIVE ENVIRONMENT. EVAH! Enterprise PHP
    • The Big Picture (We’re almost done)Enterprise PHP
    • The Big PictureEnterprise PHP
    • The Big Picture• No ‘cowboy coding’, but structured steps • Higher quality • Software will be easier to maintain (and cheaper) Enterprise PHP
    • 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) Enterprise PHP
    • 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 Enterprise PHP
    • More things to think about• Planning• Coding• Implementation• Security Enterprise PHP
    • Shameless PlugBook about this all: • php|architect’s Guide to Enterprise PHP Development • ISBN: 978-0-9738621-8-8 • Order at phparch.com or amazon.com • http://www.enterprisephp.nl Enterprise PHP
    • Questions? ivo@ibuildings.com http://www.ibuildings.com http://www.jansch.nl http://joind.in/talk/view/65Enterprise PHP