Software Engineering In PHP

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.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

6 Favorites

Software Engineering In PHP - Presentation Transcript

  1. Software Engineering In PHP V1.0 - Prepared for Austin PHP http://php.meetup.com/42/ Ralph Schindler - Zend http://ralphschindler.com | http://zend.com Josh Butts - Vertive http://joshbutts.com | http://vertive.com Wednesday, May 13, 2009 1
  2. General Purpose • These slides are for: • Software “developers” with an interest in becoming software “engineers” • Engineers in other disciplines (Java, .NET, C#) that want to draw parallels to PHP • These slides are: • An overview only, a means to pique interest • More information can be found in the linked provided with each slide Wednesday, May 13, 2009 2
  3. Contents • Programming Languages • Design Patterns • Software Development & Best Practices • PHP Ecosystem Wednesday, May 13, 2009 3
  4. Programming Languages Language Features & Paradigms Wednesday, May 13, 2009 4
  5. Programming Languages Paradigms • Imperative vs. Declarative • Object Oriented • Class / Inheritance • Prototype based • Procedural http://en.wikipedia.org/wiki/Programming_paradigms http://en.wikipedia.org/wiki/Imperative_programming http://en.wikipedia.org/wiki/Declarative_programming http://en.wikipedia.org/wiki/Object-oriented_programming http://en.wikipedia.org/wiki/Class-based_programming http://en.wikipedia.org/wiki/Prototype-based_programming http://en.wikipedia.org/wiki/Procedural_programming Wednesday, May 13, 2009 5
  6. Programming Languages Typing • Static vs. Dynamic • Strong vs. Weak • Duck Typing http://en.wikipedia.org/wiki/Type_system Wednesday, May 13, 2009 6
  7. Programming Languages Compiled vs. Scripting • Compiled (machine code) • c, c++ • Compiled (byte-code) • Java, C# (.net) • Scripting • PHP, Ruby, Python, ECMAScript (Java / Action) http://en.wikipedia.org/wiki/Scripting_language http://en.wikipedia.org/wiki/Compiled_language http://en.wikipedia.org/wiki/Virtual_machine http://en.wikipedia.org/wiki/Just-in-time_compilation Wednesday, May 13, 2009 7
  8. Programming Languages PHP • Scripting Language • Virtual Machine: Zend Engine • Written in C • Multi-paradigm • Imperative (procedural) • Object-oriented (inheritance) • Weak dynamic typing http://en.wikipedia.org/wiki/Zend_Engine http://en.wikipedia.org/wiki/PHP Wednesday, May 13, 2009 8
  9. Design Patterns Building Blocks for Software Wednesday, May 13, 2009 9
  10. Design Patterns Overview • Applications • Model 1 • Model 2 • Programming Patterns • Architectural Patterns http://en.wikipedia.org/wiki/Model_1 http://en.wikipedia.org/wiki/Model_2 http://en.wikipedia.org/wiki/Design_pattern_(computer_science) http://en.wikipedia.org/wiki/Architectural_pattern_(computer_science) Wednesday, May 13, 2009 10
  11. Design Patterns Model 1 vs. Model 2 • Coined in the Java world • Model 1 apps are procedural applications • TypicallyJSP pagesa series of scripts, built as original • Model 2 apps arehave separation of and/or tiered applications applications that concerns http://en.wikipedia.org/wiki/Model_1 http://en.wikipedia.org/wiki/Model_2 http://en.wikipedia.org/wiki/Separation_of_concern http://en.wikipedia.org/wiki/Separation_of_presentation_and_content Wednesday, May 13, 2009 11
  12. Design Patterns Programming Patterns • Most notable source: Gang of Four • Object oriented design patterns http://en.wikipedia.org/wiki/Design_Patterns_(book) http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612/ http://en.wikipedia.org/wiki/Design_pattern_(computer_science) Wednesday, May 13, 2009 12
  13. Design Patterns / Software Patterns Example: Factory http://en.wikipedia.org/wiki/Factory_method_pattern http://en.wikipedia.org/wiki/Creational_pattern Wednesday, May 13, 2009 13
  14. Design Patterns / Software Patterns Example: Lazy Loading http://en.wikipedia.org/wiki/Lazy_initialization_pattern Wednesday, May 13, 2009 14
  15. Design Patterns / Software Patterns Example: Singleton http://en.wikipedia.org/wiki/Singleton_pattern Wednesday, May 13, 2009 15
  16. Design Patterns / Software Patterns Example: Composite http://en.wikipedia.org/wiki/Composite_pattern http://devzone.zend.com/node/view/id/7 Wednesday, May 13, 2009 16
  17. Design Patterns / Software Patterns Example: Adapter http://en.wikipedia.org/wiki/Adapter_pattern Wednesday, May 13, 2009 17
  18. Design Patterns / Software Patterns Example: Observer http://en.wikipedia.org/wiki/Observer_pattern http://www.php.net/~helly/php/ext/spl/ Wednesday, May 13, 2009 18
  19. Design Patterns Programming Patterns • Most notable source: Martin Fowler • PoEAA: Patterns of Enterprise Application Architecture http://en.wikipedia.org/wiki/Architectural_pattern_(computer_science) http://martinfowler.com/eaaCatalog/ http://www.amazon.com/Enterprise-Application-Architecture-Addison-Wesley-Signature/dp/0321127420/ Wednesday, May 13, 2009 19
  20. Design Patterns / Architectural Patterns Non-PoEAA • Presentation-abstraction-control • Service-oriented architecture (distributed) • Mulit/Three-Tier • Peer-to-Peer (distributed) http://en.wikipedia.org/wiki/Presentation-abstraction-control http://en.wikipedia.org/wiki/Service-oriented_architecture http://en.wikipedia.org/wiki/Three-tier_(computing) http://en.wikipedia.org/wiki/Peer-to-peer Wednesday, May 13, 2009 20
  21. Design Patterns / Architectural Patterns PoEAA • Logical: Domain Model & Table Module • Data: Table Row & Row Data Gateway, ActiveRecord, Data Mapper • Other: • Repository, Registry, Plugin • Model-View-Controller, Front Controller, Two-step View http://martinfowler.com/eaaCatalog/ http://en.wikipedia.org/wiki/Active_record_pattern Wednesday, May 13, 2009 21
  22. Design Patterns / Architectural Patterns Example: Domain Model http://en.wikipedia.org/wiki/Domain_Model http://martinfowler.com/eaaCatalog/ domainModel.html Wednesday, May 13, 2009 22
  23. Design Patterns / Architectural Patterns Example: Table Module http://martinfowler.com/eaaCatalog/ tableModule.html Wednesday, May 13, 2009 23
  24. Design Patterns / Architectural Patterns Example: Table Gateway http://martinfowler.com/eaaCatalog/tableDataGateway.html Wednesday, May 13, 2009 24
  25. Design Patterns / Architectural Patterns Example: Row Gateway http://martinfowler.com/eaaCatalog/rowDataGateway.html Wednesday, May 13, 2009 25
  26. Design Patterns / Architectural Patterns Example: Active Record http://martinfowler.com/eaaCatalog/activeRecord.html http://en.wikipedia.org/wiki/Active_record_pattern Wednesday, May 13, 2009 26
  27. Design Patterns / Architectural Patterns Example: Active Record http://martinfowler.com/eaaCatalog/activeRecord.html http://en.wikipedia.org/wiki/Active_record_pattern Wednesday, May 13, 2009 27
  28. Design Patterns / Architectural Patterns Example: MVC http://en.wikipedia.org/wiki/Model-view-controller http://martinfowler.com/eaaCatalog/modelViewController.html Wednesday, May 13, 2009 28
  29. Design Patterns / Architectural Patterns Example: Registry http://martinfowler.com/eaaCatalog/registry.html Wednesday, May 13, 2009 29
  30. Software Development Process Best Practices for Building Software Wednesday, May 13, 2009 30
  31. Development Process Overview • Unit Testing • Source Control • Coding Standards • Continuous Integration • Documentation http://en.wikipedia.org/wiki/Programming_style http://martinfowler.com/articles/continuousIntegration.html http://en.wikipedia.org/wiki/Unit_testing http://en.wikipedia.org/wiki/Revision_control Wednesday, May 13, 2009 31
  32. Development Process Unit Testing • Why write unit tests? • prevent regressions • ensure software meets requirements • tests help document what the software does • XUnit pattern http://en.wikipedia.org/wiki/XUnit Wednesday, May 13, 2009 32
  33. Development Process Source Control • Why use source control? • Keep track of changes you made • Light-weight backup • Great for collaboration, even if there is only one of you now • Common SCM (Source Code Management) tools http://subversion.tigris.org/ http://git-scm.com/ http://www.github.com http://en.wikipedia.org/wiki/Distributed_revision_control Wednesday, May 13, 2009 33
  34. Development Process Coding Standards • Why have coding standards? • readability for yourself and colleagues • prevents mistakes, syntax errors • Pear Coding Standards • don't write your own standards, its not worth your time http://pear.php.net/pepr/pepr-proposal-show.php?id=426 http://pear.php.net/manual/en/standards.php http://framework.zend.com/manual/en/coding-standard.html Wednesday, May 13, 2009 34
  35. Development Process Build & Deploy • Create a testable and repeatable deployment process • Run some functional tests • document your application • Code comments • API Docs http://cruisecontrol.sourceforge.net/ http://code.google.com/p/xinc/ http://www.atlassian.com/software/bamboo/ Wednesday, May 13, 2009 35
  36. PHP Ecosystem Software & Tools Wednesday, May 13, 2009 36
  37. PHP Ecosystem Application Frameworks • Application Framework • Zend Framework • toolkit / glue style: use what you want or use it all • CakePHP & CodeIgnitor • lightweight MVC frameworks with data models • Symfony • MVC, more admin and configuration features http://framework.zend.com/ http://codeigniter.com/ http://cakephp.org/ http://www.symfony-project.org/ http://en.wikipedia.org/wiki/Web_application_framework Wednesday, May 13, 2009 37
  38. PHP Ecosystem Unit Testing Frameworks • PHPUnit • Most popular, derived from NUnit pattern • Simpletest • phpt http://www.simpletest.org/ http://phpt.info/ http://en.wikipedia.org/wiki/Unit_testing http://www.phpunit.de/ Wednesday, May 13, 2009 38
  39. PHP Ecosystem IDEs & Editors • Editors • pattern matched syntax highlighting & code folding • typically multi-language • especially good at text & code manipulation • IDEs • Language introspection (code completion) • Errors / Warnings / Syntax Check • Debugging capabilities (breakpoints, watches, profiling) http://en.wikipedia.org/wiki/Comparison_of_text_editors http://en.wikipedia.org/wiki/Integrated_development_environment http://www.xdebug.org/ Wednesday, May 13, 2009 39
  40. PHP Ecosystem IDEs & Editors • Eclipse-based IDEs • Zend Studio (paid) / PDT (open source) • great PHP editing and debugging • Aptana • javascript & css editing & code completion is excellent • debugging with xdebug • Text Editors • Ultraedit on Windows • Textmate on Mac • “E” is Textmate on Windows http://www.zend.com/en/products/studio/ http://www.eclipse.org/pdt/ http://www.ultraedit.com/ http://www.aptana.com http://www.macromates.com Wednesday, May 13, 2009 40

+ Ralph SchindlerRalph Schindler, 6 months ago

custom

1871 views, 6 favs, 7 embeds more stats

Software Engineering In PHP

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 1871
    • 1539 on SlideShare
    • 332 from embeds
  • Comments 1
  • Favorites 6
  • Downloads 104
Most viewed embeds
  • 168 views on http://ralphschindler.com
  • 130 views on http://www.planet-php.net
  • 14 views on http://planet-php.org
  • 12 views on http://www.planet-php.org
  • 6 views on http://static.slideshare.net

more

All embeds
  • 168 views on http://ralphschindler.com
  • 130 views on http://www.planet-php.net
  • 14 views on http://planet-php.org
  • 12 views on http://www.planet-php.org
  • 6 views on http://static.slideshare.net
  • 1 views on file://
  • 1 views on http://xss.yandex.net

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