0
Why Architecture matters
           Lars Jankowfsky, swoodoo.com




Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      Lars Jankowfsky

       • CTO swoodoo...
Architecture
Freitag, 20. März 2009
Freitag, 20. März 2009
Zend Framework


                         symfony
                                        cakePHP
         ezComponents

F...
Why Architecture matters                                PHPCon Italia 2009




      long project lifetime




           ...
Why Architecture matters                                PHPCon Italia 2009




      long project lifetime
       • code a...
Why Architecture matters                                PHPCon Italia 2009




      long project lifetime
       • code a...
Why Architecture matters                                PHPCon Italia 2009




      continuous maintenance




          ...
Why Architecture matters                                PHPCon Italia 2009




      continuous maintenance
       • stron...
Why Architecture matters                                PHPCon Italia 2009




      continuous maintenance
       • stron...
Why Architecture matters                                PHPCon Italia 2009




      continuous maintenance
       • stron...
Why Architecture matters                                             PHPCon Italia 2009




      Blaine Cook, Twitter's l...
Success

Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      Success




                         ...
Why Architecture matters                                PHPCon Italia 2009




      Success
       • D.R.Y. == Do Not Rep...
Why Architecture matters                                PHPCon Italia 2009




      Success
       • D.R.Y. == Do Not Rep...
Why Architecture matters                                PHPCon Italia 2009




      Single responsibility principle




 ...
Why Architecture matters                                PHPCon Italia 2009




      Single responsibility principle
     ...
Why Architecture matters                                PHPCon Italia 2009




      Single responsibility principle
     ...
Why Architecture matters                                PHPCon Italia 2009




      Success
       • D.R.Y. == Do Not Rep...
Why Architecture matters                                PHPCon Italia 2009




      K.I.S.S.




                        ...
Why Architecture matters                                PHPCon Italia 2009




      K.I.S.S.
       • think in advance bu...
Why Architecture matters                                PHPCon Italia 2009




      K.I.S.S.
       • think in advance bu...
Why Architecture matters                                PHPCon Italia 2009




      K.I.S.S.
       • think in advance bu...
Developing
Freitag, 20. März 2009
Art
Freitag, 20. März 2009
Evolution

Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      Evolving Architecture




           ...
Why Architecture matters                                PHPCon Italia 2009




      Evolving Architecture
       • Y.A.G....
Why Architecture matters                                PHPCon Italia 2009




      Evolving Architecture
       • Y.A.G....
Principle of
                     „bad smell“
Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      Bad smells?




                     ...
Why Architecture matters                                PHPCon Italia 2009




      Bad smells?
       • Do maintenance c...
Why Architecture matters                                PHPCon Italia 2009




      Bad smells?
       • Do maintenance c...
Why Architecture matters                                PHPCon Italia 2009




      Bad smells?
       • Do maintenance c...
Freitag, 20. März 2009
dead code



Freitag, 20. März 2009
dead code
            data classes

Freitag, 20. März 2009
comments „what not why“



                                       dead code
            data classes

Freitag, 20. März 20...
comments „what not why“


                  long methods
                                       dead code
            data...
Why Architecture matters                                PHPCon Italia 2009




      Bad Smells
       • http://martinfowl...
Separation

Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      Layered Architecture




            ...
Why Architecture matters                                PHPCon Italia 2009




      Layered Architecture
       • separat...
Why Architecture matters                                PHPCon Italia 2009




      Layered Architecture
       • separat...
Why Architecture matters                                PHPCon Italia 2009




      Layered Architecture
       • separat...
Why Architecture matters                                PHPCon Italia 2009




      Layered Architecture
       • separat...
Why Architecture matters                                PHPCon Italia 2009




      Layered Architecture
       • separat...
Why Architecture matters                                PHPCon Italia 2009




      SOA




                         Lars...
Why Architecture matters                                PHPCon Italia 2009




      SOA
       • Pro: makes scaling very ...
Why Architecture matters                                PHPCon Italia 2009




      SOA
       • Pro: makes scaling very ...
Why Architecture matters                                PHPCon Italia 2009




      SOA
       • Pro: makes scaling very ...
Why Architecture matters                                PHPCon Italia 2009




      SOA
       • Pro: makes scaling very ...
Why Architecture matters                                PHPCon Italia 2009




      SOA
       • Pro: makes scaling very ...
Database

Freitag, 20. März 2009
Freitag, 20. März 2009
ZendDb


                            PDO
                                           ADOdb
                         propel
...
Why Architecture matters                                PHPCon Italia 2009




      Database




                        ...
Why Architecture matters                                PHPCon Italia 2009




      Database
       • you need a database...
Why Architecture matters                                PHPCon Italia 2009




      Database
       • you need a database...
Why Architecture matters                                PHPCon Italia 2009




      Database
       • you need a database...
Why Architecture matters                                PHPCon Italia 2009




      Database
       • you need a database...
Db Abstraction Layer   PDO, ADOdb, ZendDb....




Freitag, 20. März 2009
Db Abstraction Layer   PDO, ADOdb, ZendDb....




                            Object Layer        Table Data Gateway Patte...
Db Abstraction Layer   PDO, ADOdb, ZendDb....




                            Object Layer        Table Data Gateway Patte...
Db Abstraction Layer   PDO, ADOdb, ZendDb....




                            Object Layer        Table Data Gateway Patte...
MVC

Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      Controller




                      ...
Why Architecture matters                                PHPCon Italia 2009




      Controller
       • Common mistake: b...
Why Architecture matters                                PHPCon Italia 2009




      Controller
       • Common mistake: b...
Why Architecture matters                                PHPCon Italia 2009




      Controller
       • Common mistake: b...
Why Architecture matters                                PHPCon Italia 2009




      Controller
       • Common mistake: b...
Why Architecture matters                                PHPCon Italia 2009




      View




                         Lar...
Why Architecture matters                                PHPCon Italia 2009




      View
       • Use a template engine. ...
Why Architecture matters                                PHPCon Italia 2009




      View
       • Use a template engine. ...
Why Architecture matters                                PHPCon Italia 2009




      View
       • Use a template engine. ...
TDD

Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      TDD
       • enforces layered Archite...
Freitag, 20. März 2009
Freitag, 20. März 2009
Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      TDD
       • enforces layered Archite...
Unit Tests


Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      Unit Tests




                      ...
Why Architecture matters                                PHPCon Italia 2009




      Unit Tests
       • test a single cla...
Why Architecture matters                                PHPCon Italia 2009




      Unit Tests
       • test a single cla...
Why Architecture matters                                PHPCon Italia 2009




      Unit Tests
       • test a single cla...
Why Architecture matters                                PHPCon Italia 2009




      Unit Tests
       • test a single cla...
Why Architecture matters                                PHPCon Italia 2009




      Unit Tests
       • test a single cla...
Why Architecture matters                                PHPCon Italia 2009




      Unit Tests
       • test a single cla...
Why Architecture matters                                PHPCon Italia 2009




      Unit Tests
       • test a single cla...
Integration Tests

                            Unit Tests


Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      Integration Tests




               ...
Why Architecture matters                                PHPCon Italia 2009




      Integration Tests
       • test sever...
Why Architecture matters                                PHPCon Italia 2009




      Integration Tests
       • test sever...
Why Architecture matters                                PHPCon Italia 2009




      Integration Tests
       • test sever...
Acceptance Tests

                         Integration Tests

                            Unit Tests


Freitag, 20. März 2...
Why Architecture matters                                PHPCon Italia 2009




      Acceptance Tests




                ...
Why Architecture matters                                PHPCon Italia 2009




      Acceptance Tests
       • test functi...
Why Architecture matters                                PHPCon Italia 2009




      Acceptance Tests
       • test functi...
Why Architecture matters                                PHPCon Italia 2009




      Acceptance Tests
       • test functi...
what if fixture/mock preparation
   are much larger than tests?


Freitag, 20. März 2009
what if your tests run for hours ?



Freitag, 20. März 2009
framework !== software architecture



Freitag, 20. März 2009
evolve your architecture



Freitag, 20. März 2009
split your application into layers



Freitag, 20. März 2009
enforce proper usage of MVC



Freitag, 20. März 2009
wrap database access



Freitag, 20. März 2009
utilize test driven development



Freitag, 20. März 2009
Why Architecture matters                                     PHPCon Italia 2009




                         Thank you for...
Upcoming SlideShare
Loading in...5
×

Why Architecture Matters

3,466

Published on

Choosing the right software architecture for your project is very important. Besides the framework decision there are many other key issues you need to take into account and which have an impact on such things like maintainability, scalability and also the frequency of possible deployments. In this session you will to learn why you have to remove Co-dependency in your source code, which patterns there are for successful scaling and how the choosen framework influences your architecture.

Published in: Technology, Education

Transcript of "Why Architecture Matters"

  1. 1. Why Architecture matters Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  2. 2. Why Architecture matters PHPCon Italia 2009 Lars Jankowfsky • CTO swoodoo.com • XP, agile development fanatic • developing since 15+ years • php since php/fi • Software Architect > 10 years Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  3. 3. Architecture Freitag, 20. März 2009
  4. 4. Freitag, 20. März 2009
  5. 5. Zend Framework symfony cakePHP ezComponents Freitag, 20. März 2009
  6. 6. Why Architecture matters PHPCon Italia 2009 long project lifetime Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  7. 7. Why Architecture matters PHPCon Italia 2009 long project lifetime • code aging Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  8. 8. Why Architecture matters PHPCon Italia 2009 long project lifetime • code aging • big ball of mud Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  9. 9. Why Architecture matters PHPCon Italia 2009 continuous maintenance Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  10. 10. Why Architecture matters PHPCon Italia 2009 continuous maintenance • strong dependency -> „co-dependency“ Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  11. 11. Why Architecture matters PHPCon Italia 2009 continuous maintenance • strong dependency -> „co-dependency“ • deployment Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  12. 12. Why Architecture matters PHPCon Italia 2009 continuous maintenance • strong dependency -> „co-dependency“ • deployment • scaling Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  13. 13. Why Architecture matters PHPCon Italia 2009 Blaine Cook, Twitter's lead architect: „For us, it’s really about scaling horizontally - to that end, Rails and Ruby haven’t been stumbling blocks, compared to any other language or framework. The performance boosts associated with a “faster” language would give us a 10-20% improvement, but thanks to architectural changes that Ruby and Rails happily accommodated, Twitter is 10000% faster than it was in January.“ Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  14. 14. Success Freitag, 20. März 2009
  15. 15. Why Architecture matters PHPCon Italia 2009 Success Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  16. 16. Why Architecture matters PHPCon Italia 2009 Success • D.R.Y. == Do Not Repeat Yourself Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  17. 17. Why Architecture matters PHPCon Italia 2009 Success • D.R.Y. == Do Not Repeat Yourself • Single responsibility principle Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  18. 18. Why Architecture matters PHPCon Italia 2009 Single responsibility principle Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  19. 19. Why Architecture matters PHPCon Italia 2009 Single responsibility principle • quot;if it generates XML then it should not generate HTMLquot; Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  20. 20. Why Architecture matters PHPCon Italia 2009 Single responsibility principle • quot;if it generates XML then it should not generate HTMLquot; • quot;if you want to serialize to xml do not create quot;toxmlquot; Method, instead pass $this to the XMLExporterquot; Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  21. 21. Why Architecture matters PHPCon Italia 2009 Success • D.R.Y. == Do Not Repeat Yourself • Single responsibility principle • K.I.S.S. Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  22. 22. Why Architecture matters PHPCon Italia 2009 K.I.S.S. Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  23. 23. Why Architecture matters PHPCon Italia 2009 K.I.S.S. • think in advance but don‘t think too complex Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  24. 24. Why Architecture matters PHPCon Italia 2009 K.I.S.S. • think in advance but don‘t think too complex • before making any generalisation have at least two cases Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  25. 25. Why Architecture matters PHPCon Italia 2009 K.I.S.S. • think in advance but don‘t think too complex • before making any generalisation have at least two cases • the more abstractions the easier you can change it later Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  26. 26. Developing Freitag, 20. März 2009
  27. 27. Art Freitag, 20. März 2009
  28. 28. Evolution Freitag, 20. März 2009
  29. 29. Why Architecture matters PHPCon Italia 2009 Evolving Architecture Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  30. 30. Why Architecture matters PHPCon Italia 2009 Evolving Architecture • Y.A.G.N.I. == You Ain‘t Gonna Need it Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  31. 31. Why Architecture matters PHPCon Italia 2009 Evolving Architecture • Y.A.G.N.I. == You Ain‘t Gonna Need it • Without refactoring there is no evolution Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  32. 32. Principle of „bad smell“ Freitag, 20. März 2009
  33. 33. Why Architecture matters PHPCon Italia 2009 Bad smells? Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  34. 34. Why Architecture matters PHPCon Italia 2009 Bad smells? • Do maintenance cost keep increasing? Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  35. 35. Why Architecture matters PHPCon Italia 2009 Bad smells? • Do maintenance cost keep increasing? • Simple features need too long to be implemented Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  36. 36. Why Architecture matters PHPCon Italia 2009 Bad smells? • Do maintenance cost keep increasing? • Simple features need too long to be implemented • Small changes ripple through your system Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  37. 37. Freitag, 20. März 2009
  38. 38. dead code Freitag, 20. März 2009
  39. 39. dead code data classes Freitag, 20. März 2009
  40. 40. comments „what not why“ dead code data classes Freitag, 20. März 2009
  41. 41. comments „what not why“ long methods dead code data classes Freitag, 20. März 2009
  42. 42. Why Architecture matters PHPCon Italia 2009 Bad Smells • http://martinfowler.com/bliki/CodeSmell.html • http://www.codinghorror.com/blog/archives/000589.html Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  43. 43. Separation Freitag, 20. März 2009
  44. 44. Why Architecture matters PHPCon Italia 2009 Layered Architecture Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  45. 45. Why Architecture matters PHPCon Italia 2009 Layered Architecture • separation of concerns Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  46. 46. Why Architecture matters PHPCon Italia 2009 Layered Architecture • separation of concerns • If they can live without each other - why to couple them? Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  47. 47. Why Architecture matters PHPCon Italia 2009 Layered Architecture • separation of concerns • If they can live without each other - why to couple them? • Find the boundaries and cut mercilessly. Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  48. 48. Why Architecture matters PHPCon Italia 2009 Layered Architecture • separation of concerns • If they can live without each other - why to couple them? • Find the boundaries and cut mercilessly. • Do not bypass any layer! Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  49. 49. Why Architecture matters PHPCon Italia 2009 Layered Architecture • separation of concerns • If they can live without each other - why to couple them? • Find the boundaries and cut mercilessly. • Do not bypass any layer! • Separate modules/classes or go SOA Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  50. 50. Why Architecture matters PHPCon Italia 2009 SOA Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  51. 51. Why Architecture matters PHPCon Italia 2009 SOA • Pro: makes scaling very easy Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  52. 52. Why Architecture matters PHPCon Italia 2009 SOA • Pro: makes scaling very easy • Pro: clear defined boundaries, no violations possible Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  53. 53. Why Architecture matters PHPCon Italia 2009 SOA • Pro: makes scaling very easy • Pro: clear defined boundaries, no violations possible • Pro: perfect for refactoring Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  54. 54. Why Architecture matters PHPCon Italia 2009 SOA • Pro: makes scaling very easy • Pro: clear defined boundaries, no violations possible • Pro: perfect for refactoring • Pro: Deployment benefits Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  55. 55. Why Architecture matters PHPCon Italia 2009 SOA • Pro: makes scaling very easy • Pro: clear defined boundaries, no violations possible • Pro: perfect for refactoring • Pro: Deployment benefits • Con: integration testing gets more difficult Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  56. 56. Database Freitag, 20. März 2009
  57. 57. Freitag, 20. März 2009
  58. 58. ZendDb PDO ADOdb propel Freitag, 20. März 2009
  59. 59. Why Architecture matters PHPCon Italia 2009 Database Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  60. 60. Why Architecture matters PHPCon Italia 2009 Database • you need a database access layer Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  61. 61. Why Architecture matters PHPCon Italia 2009 Database • you need a database access layer • go ORM if possible (performance!) Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  62. 62. Why Architecture matters PHPCon Italia 2009 Database • you need a database access layer • go ORM if possible (performance!) • Active Record has business logic Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  63. 63. Why Architecture matters PHPCon Italia 2009 Database • you need a database access layer • go ORM if possible (performance!) • Active Record has business logic • business layer - not abstraction layer Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  64. 64. Db Abstraction Layer PDO, ADOdb, ZendDb.... Freitag, 20. März 2009
  65. 65. Db Abstraction Layer PDO, ADOdb, ZendDb.... Object Layer Table Data Gateway Pattern Freitag, 20. März 2009
  66. 66. Db Abstraction Layer PDO, ADOdb, ZendDb.... Object Layer Table Data Gateway Pattern Active Record Business Layer Freitag, 20. März 2009
  67. 67. Db Abstraction Layer PDO, ADOdb, ZendDb.... Object Layer Table Data Gateway Pattern Active Record Business Layer function giveMeMyData() Freitag, 20. März 2009
  68. 68. MVC Freitag, 20. März 2009
  69. 69. Why Architecture matters PHPCon Italia 2009 Controller Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  70. 70. Why Architecture matters PHPCon Italia 2009 Controller • Common mistake: business logic in controller Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  71. 71. Why Architecture matters PHPCon Italia 2009 Controller • Common mistake: business logic in controller • Keep it out! Otherwise you will end with SQL in controller Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  72. 72. Why Architecture matters PHPCon Italia 2009 Controller • Common mistake: business logic in controller • Keep it out! Otherwise you will end with SQL in controller • I/O mapping to the model and view only Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  73. 73. Why Architecture matters PHPCon Italia 2009 Controller • Common mistake: business logic in controller • Keep it out! Otherwise you will end with SQL in controller • I/O mapping to the model and view only • Kick Ass! Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  74. 74. Why Architecture matters PHPCon Italia 2009 View Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  75. 75. Why Architecture matters PHPCon Italia 2009 View • Use a template engine. Watch performance! Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  76. 76. Why Architecture matters PHPCon Italia 2009 View • Use a template engine. Watch performance! • No business logic in the template/html Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  77. 77. Why Architecture matters PHPCon Italia 2009 View • Use a template engine. Watch performance! • No business logic in the template/html • Kick Ass! Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  78. 78. TDD Freitag, 20. März 2009
  79. 79. Why Architecture matters PHPCon Italia 2009 TDD • enforces layered Architecture Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  80. 80. Freitag, 20. März 2009
  81. 81. Freitag, 20. März 2009
  82. 82. Freitag, 20. März 2009
  83. 83. Why Architecture matters PHPCon Italia 2009 TDD • enforces layered Architecture • use continuous integration (e.g. cruise control) Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  84. 84. Unit Tests Freitag, 20. März 2009
  85. 85. Why Architecture matters PHPCon Italia 2009 Unit Tests Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  86. 86. Why Architecture matters PHPCon Italia 2009 Unit Tests • test a single class Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  87. 87. Why Architecture matters PHPCon Italia 2009 Unit Tests • test a single class • do not touch: Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  88. 88. Why Architecture matters PHPCon Italia 2009 Unit Tests • test a single class • do not touch: - database Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  89. 89. Why Architecture matters PHPCon Italia 2009 Unit Tests • test a single class • do not touch: - database - network Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  90. 90. Why Architecture matters PHPCon Italia 2009 Unit Tests • test a single class • do not touch: - database - network - (files) Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  91. 91. Why Architecture matters PHPCon Italia 2009 Unit Tests • test a single class • do not touch: - database - network - (files) • use mocks/stubs Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  92. 92. Why Architecture matters PHPCon Italia 2009 Unit Tests • test a single class • do not touch: - database - network - (files) • use mocks/stubs • provide fast feedback Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  93. 93. Integration Tests Unit Tests Freitag, 20. März 2009
  94. 94. Why Architecture matters PHPCon Italia 2009 Integration Tests Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  95. 95. Why Architecture matters PHPCon Italia 2009 Integration Tests • test several classes Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  96. 96. Why Architecture matters PHPCon Italia 2009 Integration Tests • test several classes • test communication between classes/modules Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  97. 97. Why Architecture matters PHPCon Italia 2009 Integration Tests • test several classes • test communication between classes/modules • they test full components Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  98. 98. Acceptance Tests Integration Tests Unit Tests Freitag, 20. März 2009
  99. 99. Why Architecture matters PHPCon Italia 2009 Acceptance Tests Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  100. 100. Why Architecture matters PHPCon Italia 2009 Acceptance Tests • test functionality from „outside“ Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  101. 101. Why Architecture matters PHPCon Italia 2009 Acceptance Tests • test functionality from „outside“ • often build from „user stories“ Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  102. 102. Why Architecture matters PHPCon Italia 2009 Acceptance Tests • test functionality from „outside“ • often build from „user stories“ • usually done with Selenium Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  103. 103. what if fixture/mock preparation are much larger than tests? Freitag, 20. März 2009
  104. 104. what if your tests run for hours ? Freitag, 20. März 2009
  105. 105. framework !== software architecture Freitag, 20. März 2009
  106. 106. evolve your architecture Freitag, 20. März 2009
  107. 107. split your application into layers Freitag, 20. März 2009
  108. 108. enforce proper usage of MVC Freitag, 20. März 2009
  109. 109. wrap database access Freitag, 20. März 2009
  110. 110. utilize test driven development Freitag, 20. März 2009
  111. 111. Why Architecture matters PHPCon Italia 2009 Thank you for your interest! http://joind.in/talk/view/232 Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×