• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Software Engineering in PHP
 

Software Engineering in PHP

on

  • 2,480 views

Software Engineering in PHP - M A Hossain Tonu

Software Engineering in PHP - M A Hossain Tonu

Statistics

Views

Total Views
2,480
Views on SlideShare
1,697
Embed Views
783

Actions

Likes
0
Downloads
40
Comments
0

5 Embeds 783

http://mahtonu.wordpress.com 744
http://www.walleve.com 30
url_unknown 4
http://www.linkedin.com 3
http://translate.googleusercontent.com 2

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

    Software Engineering in PHP Software Engineering in PHP Presentation Transcript

    • M A Hossain Tonu http://mahtonu.wordpress.com <mahtonu@gmail.com> an industry perspective
    • OBJECTIVE
      • Adopting some engineering into your PHP Development
      • Quick view on enterprise PHP development process
      • Will give you concept, not complete set of details 
    • CONTENTS
      • Engineering Approach
      • Design Patterns
      • Architectural Patterns
      • PHP Development Methodology
      • PHP Development Process
      • Best Practices
      • Successful PHP Projects
      • Open source
      • Revenue Model
      • User Documentation
      • Commercial Support
    • ENGINEERING APPROACH
    • DESIGN PATTERNS
      • A general reusability solution
      • Shows relationships and interactions between classes or objects
      • Four common design patterns
        • Strategy Pattern
        • Singleton Pattern
        • Factory Pattern
        • Adapter Pattern
    • DESIGN PATTERNS : STRATEGY PATTERN
      • Enables us to make decisions on different cases
      • Example: User notification system
      class.emailnotifier.php class.faxnotifier.php class.smsnotifier.php interface.Notifier.php
    • DESIGN PATTERNS : SINGLETON PATTERN
      • Delivers a single instance of an object no matter how many times you instantiate it.
      • Example:
      Self refers to current class and $this refers to current object
    • ARCHITECTURAL PATTERNS
      • An image of a system
      • Describes software behavior
      • Common Example:
        • MVC (Model-View-Controller)
        • SOA (Service Oriented Architecture)
        • Multi-tier (Frontend, Application, Data)
    • ARCHITECTURAL PATTERNS: MVC
      • Model–View–Controller
      • Model
        • is responsible to manage the data;
        • it stores and retrieves entities used by an application, i.e. from a database
        • contains the logic implemented by the application.
      • View (presentation)
        • is responsible to display the data provided by the model
        • similar usage with the template modules present in some popular web applications, like wordpress, joomla, …
      • Controller
        • Perform as glue between Model and View
        • Helps to persist data from Model to View
    • PHP DEVELOPMENT METHODOLOGY
      • Defines development infrastructure
      • Provides a framework that is used to structure, plan, and control the process of developing
      • Common Example:
        • Water Fall
        • Agile(SCRUM, XP )
        • RAD
    • DEVELOPMENT METHODOLOGY: WATER FALL
      • Classical method
    • DEVELOPMENT METHODOLOGY: AGILE
      • Mostly used agile philosophy are XP and SCRUM
      • Generic Agile development process:
    • PHP DEVELOPMENT PROCESS
    • FOUNDATION
      • Start with a foundation
      • Use a framework
        • Provides guidelines
        • Off the shelf components 
      • Examples
        • Code Igniter http://www.codeigniter.com/
        • CakePHP http://cakephp.org/
        • Zend Framework http://framework.zend.com/
        • Symfony http://www.symfony-project.org/
    • SECURITY
      • Not a language feature
      • It is you who writes secure PHP application
      • Common security check list:
        • User input/From validation
        • XSS
        • SQL/Code Injection
        • Session hijacking
        • Error reporting
    • TESTING
      • More testing = less debugging
      • Unit Testing
        • Verify the functionality of a specific section of code
      • Integration testing
        • Verify the interfaces between components against a software design
      • Acceptance Testing
        • Verify customer acceptance
      • Tools:
        • PHPUnit http://www.phpunit.de
        • Selenium http://seleniumhq.org/
    • DEBUGGING
      • If you don’t have bugs in your code, you are not smart enough to debug
      • Checklist:
        • function call flow
        • error notification
        • variable values with a given scope
      • Debugger/Profiler Tools:
        • Xdebug http://www.xdebug.org
    • OPTIMIZATION
      • Caching
      • Op-code caching
      • {Page|Database|Module|…} caching
      • Optimized Database Design
      • Database Indexing strategy
      • Writing good SQL
    • DEPLOYMENT
      • Always automate your deployment
      • Deploy to
        • Develop env
        • Test env
        • LIVE
      • LIVE = Shared server/Cloud server/…
      • Use SVN
      • Code is just a part, don’t forget the database
      • Create a “Deployment and Release” Profile
    • PERFORMANCE
      • Consider you have bought the product worth $1k$
      • How fast system performs under a particular work load
      • Tests scalability, reliability and resource usage.
    • REFACTORING
      • Cleaning up code
      • Without changing behavior
      • Not adding new feature
      • Use unit test you ensure you don’t break anything
    • BEST PRACTICES
      • Don’t re-invent the wheel
      • Follow coding standards
      • Write reusable code
      • Use components/frameworks
      • Good communication and collaboration
      • Commitment (On time – On mark)
      • Document your application ( code comments & API docs )
    • SUCCESSFUL PHP PRODUCT
    • OPENSOURCE WWW.OPENSOURCE.ORG
      • Access to code
      • Freedom to change
      • Freedom to distribute
      • Freedom to use
      • Doesn’t mean free of cost, but may be.
      • Collaborative software engineering
      • Open source enabled business
      • Famous Examples:
    • REVENUE MODEL ( EARNING MONEY  )
      • Not traditional BUY & SELL method
      • Describes the way of business
      • Typically an online business
      • Monetizes its services
      • Example:
        • Freemium: &quot;free&quot; and &quot;premium&quot;
        • Subscription
        • Affiliate marketing
        • Ad-funded
        • Online shopping
    • USER DOCUMENTATION
      • Describes how to use the software
      • As product documentation to User
      • Way of documentation
        • Tutorials
        • Thematic
        • List of reference
    • COMMERCIAL SUPPORT
      • Maintain support system i.e. ticketing system
      • Maintain user forum
      • Maintain product blog
      • Maintain email newsletter (inform user inside scoop)
    • QUESTIONS?