SlideShare a Scribd company logo
1 of 111
Download to read offline
Why Architecture matters
           Lars Jankowfsky, swoodoo.com




Freitag, 20. März 2009
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
Architecture
Freitag, 20. März 2009
Freitag, 20. März 2009
Zend Framework


                         symfony
                                        cakePHP
         ezComponents

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




      long project lifetime




                         Lars Jankowfsky, swoodoo.com

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




      long project lifetime
       • code aging




                         Lars Jankowfsky, swoodoo.com

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




      long project lifetime
       • code aging
       • big ball of mud




                         Lars Jankowfsky, swoodoo.com

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




      continuous maintenance




                         Lars Jankowfsky, swoodoo.com

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




      continuous maintenance
       • strong dependency -> „co-dependency“




                         Lars Jankowfsky, swoodoo.com

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




      continuous maintenance
       • strong dependency -> „co-dependency“
       • deployment




                         Lars Jankowfsky, swoodoo.com

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




      continuous maintenance
       • strong dependency -> „co-dependency“
       • deployment
       • scaling




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
Success

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




      Success




                         Lars Jankowfsky, swoodoo.com

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




      Success
       • D.R.Y. == Do Not Repeat Yourself




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
Why Architecture matters                                PHPCon Italia 2009




      Single responsibility principle




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
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
Why Architecture matters                                PHPCon Italia 2009




      K.I.S.S.




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
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
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




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
Principle of
                     „bad smell“
Freitag, 20. März 2009
Why Architecture matters                                PHPCon Italia 2009




      Bad smells?




                         Lars Jankowfsky, swoodoo.com

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




      Bad smells?
       • Do maintenance cost keep increasing?




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
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 2009
comments „what not why“


                  long methods
                                       dead code
            data classes

Freitag, 20. März 2009
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
Separation

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




      Layered Architecture




                         Lars Jankowfsky, swoodoo.com

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




      Layered Architecture
       • separation of concerns




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
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
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
Why Architecture matters                                PHPCon Italia 2009




      SOA




                         Lars Jankowfsky, swoodoo.com

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




      SOA
       • Pro: makes scaling very easy




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
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
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
Database

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


                            PDO
                                           ADOdb
                         propel

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




      Database




                         Lars Jankowfsky, swoodoo.com

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




      Database
       • you need a database access layer




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
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
Db Abstraction Layer   PDO, ADOdb, ZendDb....




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




                            Object Layer        Table Data Gateway Pattern




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




                            Object Layer        Table Data Gateway Pattern




                                                 Active Record
                            Business Layer




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




                            Object Layer        Table Data Gateway Pattern




                                                 Active Record
                            Business Layer       function giveMeMyData()




Freitag, 20. März 2009
MVC

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




      Controller




                         Lars Jankowfsky, swoodoo.com

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




      Controller
       • Common mistake: business logic in controller




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
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
Why Architecture matters                                PHPCon Italia 2009




      View




                         Lars Jankowfsky, swoodoo.com

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




      View
       • Use a template engine. Watch performance!




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
TDD

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




      TDD
       • enforces layered Architecture




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
Freitag, 20. März 2009
Freitag, 20. März 2009
Freitag, 20. März 2009
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
Unit Tests


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




      Unit Tests




                         Lars Jankowfsky, swoodoo.com

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




      Unit Tests
       • test a single class




                         Lars Jankowfsky, swoodoo.com

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




      Unit Tests
       • test a single class
       • do not touch:




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
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
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
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
Integration Tests

                            Unit Tests


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




      Integration Tests




                         Lars Jankowfsky, swoodoo.com

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




      Integration Tests
       • test several classes




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
Acceptance Tests

                         Integration Tests

                            Unit Tests


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




      Acceptance Tests




                         Lars Jankowfsky, swoodoo.com

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




      Acceptance Tests
       • test functionality from „outside“




                         Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009
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
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
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 your interest!

                             http://joind.in/talk/view/232




                          Lars Jankowfsky, swoodoo.com

Freitag, 20. März 2009

More Related Content

Similar to Why Architecture Matters

Howdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
Howdah - An Application using Pylons, PostgreSQL, Simpycity and ExceptableHowdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
Howdah - An Application using Pylons, PostgreSQL, Simpycity and ExceptableCommand Prompt., Inc
 
Pylons - An Overview: Rapid MVC Web Development with WSGI
Pylons - An Overview: Rapid MVC Web Development with WSGIPylons - An Overview: Rapid MVC Web Development with WSGI
Pylons - An Overview: Rapid MVC Web Development with WSGIChes Martin
 
Made by Many: On Collaborative Design
Made by Many: On Collaborative DesignMade by Many: On Collaborative Design
Made by Many: On Collaborative DesignMemi Beltrame
 
Memi Beltrame Collaborative Design
Memi Beltrame Collaborative DesignMemi Beltrame Collaborative Design
Memi Beltrame Collaborative DesignGrUSP
 
Joi's talk at the QRCE
Joi's talk at the QRCEJoi's talk at the QRCE
Joi's talk at the QRCEJoi Ito
 
Webhooks - glue for the web
Webhooks - glue for the webWebhooks - glue for the web
Webhooks - glue for the webStoyan Zhekov
 
HTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCHTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCMayflower GmbH
 
Cloudify your applications with Amazon Web Services
Cloudify your applications with Amazon Web ServicesCloudify your applications with Amazon Web Services
Cloudify your applications with Amazon Web ServicesFederico Feroldi
 
eIFL General Assembly
eIFL General AssemblyeIFL General Assembly
eIFL General Assemblyguest22cf88
 
Dynamic Design for the Web
Dynamic Design for the WebDynamic Design for the Web
Dynamic Design for the WebJonathan Lackey
 
Angrybirds - Overview for a High Performance Shop
Angrybirds - Overview for a High Performance ShopAngrybirds - Overview for a High Performance Shop
Angrybirds - Overview for a High Performance ShopAOE
 
Lowering IT Costs with a Standards-based Platform for Web 2.0 Initiatives: A...
Lowering IT Costs with a Standards-based Platform for Web 2.0 Initiatives:  A...Lowering IT Costs with a Standards-based Platform for Web 2.0 Initiatives:  A...
Lowering IT Costs with a Standards-based Platform for Web 2.0 Initiatives: A...Day Software
 
OSGi Users' Forum Meeting 4 - 19 Jan 2010
OSGi Users' Forum Meeting 4 - 19 Jan 2010OSGi Users' Forum Meeting 4 - 19 Jan 2010
OSGi Users' Forum Meeting 4 - 19 Jan 2010mfrancis
 
User-friendly Multimeda Authoring with Pachyderm
User-friendly Multimeda Authoring with PachydermUser-friendly Multimeda Authoring with Pachyderm
User-friendly Multimeda Authoring with Pachydermscottsayre
 
Mobile Monday Atlanta Aug10 2009v2 Short
Mobile Monday Atlanta Aug10 2009v2 ShortMobile Monday Atlanta Aug10 2009v2 Short
Mobile Monday Atlanta Aug10 2009v2 ShortEd Pimentel
 
Frameworks Are The Future of Design
Frameworks  Are The Future of DesignFrameworks  Are The Future of Design
Frameworks Are The Future of DesignJoe Lamantia
 

Similar to Why Architecture Matters (20)

Howdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
Howdah - An Application using Pylons, PostgreSQL, Simpycity and ExceptableHowdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
Howdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
 
Profibus, Profinet and IO-Link seminar update - Bob Squirrell
Profibus, Profinet and IO-Link seminar update - Bob SquirrellProfibus, Profinet and IO-Link seminar update - Bob Squirrell
Profibus, Profinet and IO-Link seminar update - Bob Squirrell
 
Pylons - An Overview: Rapid MVC Web Development with WSGI
Pylons - An Overview: Rapid MVC Web Development with WSGIPylons - An Overview: Rapid MVC Web Development with WSGI
Pylons - An Overview: Rapid MVC Web Development with WSGI
 
Made by Many: On Collaborative Design
Made by Many: On Collaborative DesignMade by Many: On Collaborative Design
Made by Many: On Collaborative Design
 
Memi Beltrame Collaborative Design
Memi Beltrame Collaborative DesignMemi Beltrame Collaborative Design
Memi Beltrame Collaborative Design
 
Joi's talk at the QRCE
Joi's talk at the QRCEJoi's talk at the QRCE
Joi's talk at the QRCE
 
Webhooks - glue for the web
Webhooks - glue for the webWebhooks - glue for the web
Webhooks - glue for the web
 
HTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCHTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPC
 
Cloudify your applications with Amazon Web Services
Cloudify your applications with Amazon Web ServicesCloudify your applications with Amazon Web Services
Cloudify your applications with Amazon Web Services
 
eIFL General Assembly
eIFL General AssemblyeIFL General Assembly
eIFL General Assembly
 
Dynamic Design for the Web
Dynamic Design for the WebDynamic Design for the Web
Dynamic Design for the Web
 
Angrybirds - Overview for a High Performance Shop
Angrybirds - Overview for a High Performance ShopAngrybirds - Overview for a High Performance Shop
Angrybirds - Overview for a High Performance Shop
 
The Future Of Dm
The Future Of DmThe Future Of Dm
The Future Of Dm
 
Human APIs
Human APIsHuman APIs
Human APIs
 
Spring Integration
Spring IntegrationSpring Integration
Spring Integration
 
Lowering IT Costs with a Standards-based Platform for Web 2.0 Initiatives: A...
Lowering IT Costs with a Standards-based Platform for Web 2.0 Initiatives:  A...Lowering IT Costs with a Standards-based Platform for Web 2.0 Initiatives:  A...
Lowering IT Costs with a Standards-based Platform for Web 2.0 Initiatives: A...
 
OSGi Users' Forum Meeting 4 - 19 Jan 2010
OSGi Users' Forum Meeting 4 - 19 Jan 2010OSGi Users' Forum Meeting 4 - 19 Jan 2010
OSGi Users' Forum Meeting 4 - 19 Jan 2010
 
User-friendly Multimeda Authoring with Pachyderm
User-friendly Multimeda Authoring with PachydermUser-friendly Multimeda Authoring with Pachyderm
User-friendly Multimeda Authoring with Pachyderm
 
Mobile Monday Atlanta Aug10 2009v2 Short
Mobile Monday Atlanta Aug10 2009v2 ShortMobile Monday Atlanta Aug10 2009v2 Short
Mobile Monday Atlanta Aug10 2009v2 Short
 
Frameworks Are The Future of Design
Frameworks  Are The Future of DesignFrameworks  Are The Future of Design
Frameworks Are The Future of Design
 

More from Lars Jankowfsky

Caching, sharding, distributing - Scaling best practices
Caching, sharding, distributing - Scaling best practicesCaching, sharding, distributing - Scaling best practices
Caching, sharding, distributing - Scaling best practicesLars Jankowfsky
 
Agile Development with PHP in Practice
Agile Development with PHP in PracticeAgile Development with PHP in Practice
Agile Development with PHP in PracticeLars Jankowfsky
 
Agile Entwicklung OXID Commons
Agile Entwicklung OXID CommonsAgile Entwicklung OXID Commons
Agile Entwicklung OXID CommonsLars Jankowfsky
 
Why Architecture in Web Development matters
Why Architecture in Web Development mattersWhy Architecture in Web Development matters
Why Architecture in Web Development mattersLars Jankowfsky
 
So gelingt der Umstieg von PHP4 auf PHP5: Erneuerung von Geschäftsanwendung...
So gelingt der Umstieg von PHP4 auf  PHP5: Erneuerung von  Geschäftsanwendung...So gelingt der Umstieg von PHP4 auf  PHP5: Erneuerung von  Geschäftsanwendung...
So gelingt der Umstieg von PHP4 auf PHP5: Erneuerung von Geschäftsanwendung...Lars Jankowfsky
 
Agile Softwareentwicklung Bei Geschäftsanwendungen
Agile Softwareentwicklung Bei GeschäftsanwendungenAgile Softwareentwicklung Bei Geschäftsanwendungen
Agile Softwareentwicklung Bei GeschäftsanwendungenLars Jankowfsky
 
Theory and practice – migrating your legacy code into our modern test drive...
Theory and practice – migrating your  legacy code into our modern test  drive...Theory and practice – migrating your  legacy code into our modern test  drive...
Theory and practice – migrating your legacy code into our modern test drive...Lars Jankowfsky
 

More from Lars Jankowfsky (9)

Caching, sharding, distributing - Scaling best practices
Caching, sharding, distributing - Scaling best practicesCaching, sharding, distributing - Scaling best practices
Caching, sharding, distributing - Scaling best practices
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
Agile Development with PHP in Practice
Agile Development with PHP in PracticeAgile Development with PHP in Practice
Agile Development with PHP in Practice
 
Agile Entwicklung OXID Commons
Agile Entwicklung OXID CommonsAgile Entwicklung OXID Commons
Agile Entwicklung OXID Commons
 
Why Architecture in Web Development matters
Why Architecture in Web Development mattersWhy Architecture in Web Development matters
Why Architecture in Web Development matters
 
So gelingt der Umstieg von PHP4 auf PHP5: Erneuerung von Geschäftsanwendung...
So gelingt der Umstieg von PHP4 auf  PHP5: Erneuerung von  Geschäftsanwendung...So gelingt der Umstieg von PHP4 auf  PHP5: Erneuerung von  Geschäftsanwendung...
So gelingt der Umstieg von PHP4 auf PHP5: Erneuerung von Geschäftsanwendung...
 
Monitor Your Business
Monitor Your BusinessMonitor Your Business
Monitor Your Business
 
Agile Softwareentwicklung Bei Geschäftsanwendungen
Agile Softwareentwicklung Bei GeschäftsanwendungenAgile Softwareentwicklung Bei Geschäftsanwendungen
Agile Softwareentwicklung Bei Geschäftsanwendungen
 
Theory and practice – migrating your legacy code into our modern test drive...
Theory and practice – migrating your  legacy code into our modern test  drive...Theory and practice – migrating your  legacy code into our modern test  drive...
Theory and practice – migrating your legacy code into our modern test drive...
 

Recently uploaded

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Why Architecture Matters

  • 1. Why Architecture matters Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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
  • 5. Zend Framework symfony cakePHP ezComponents Freitag, 20. März 2009
  • 6. Why Architecture matters PHPCon Italia 2009 long project lifetime Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 7. Why Architecture matters PHPCon Italia 2009 long project lifetime • code aging Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. Why Architecture matters PHPCon Italia 2009 continuous maintenance Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 10. Why Architecture matters PHPCon Italia 2009 continuous maintenance • strong dependency -> „co-dependency“ Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 11. Why Architecture matters PHPCon Italia 2009 continuous maintenance • strong dependency -> „co-dependency“ • deployment Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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
  • 15. Why Architecture matters PHPCon Italia 2009 Success Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. Why Architecture matters PHPCon Italia 2009 Single responsibility principle Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. 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. Why Architecture matters PHPCon Italia 2009 K.I.S.S. Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. 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
  • 29. Why Architecture matters PHPCon Italia 2009 Evolving Architecture Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. Principle of „bad smell“ Freitag, 20. März 2009
  • 33. Why Architecture matters PHPCon Italia 2009 Bad smells? Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 34. Why Architecture matters PHPCon Italia 2009 Bad smells? • Do maintenance cost keep increasing? Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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
  • 39. dead code data classes Freitag, 20. März 2009
  • 40. comments „what not why“ dead code data classes Freitag, 20. März 2009
  • 41. comments „what not why“ long methods dead code data classes Freitag, 20. März 2009
  • 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
  • 44. Why Architecture matters PHPCon Italia 2009 Layered Architecture Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 45. Why Architecture matters PHPCon Italia 2009 Layered Architecture • separation of concerns Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. 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. 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. Why Architecture matters PHPCon Italia 2009 SOA Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 51. Why Architecture matters PHPCon Italia 2009 SOA • Pro: makes scaling very easy Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. 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. 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
  • 58. ZendDb PDO ADOdb propel Freitag, 20. März 2009
  • 59. Why Architecture matters PHPCon Italia 2009 Database Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 60. Why Architecture matters PHPCon Italia 2009 Database • you need a database access layer Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. 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. Db Abstraction Layer PDO, ADOdb, ZendDb.... Freitag, 20. März 2009
  • 65. Db Abstraction Layer PDO, ADOdb, ZendDb.... Object Layer Table Data Gateway Pattern Freitag, 20. März 2009
  • 66. Db Abstraction Layer PDO, ADOdb, ZendDb.... Object Layer Table Data Gateway Pattern Active Record Business Layer Freitag, 20. März 2009
  • 67. Db Abstraction Layer PDO, ADOdb, ZendDb.... Object Layer Table Data Gateway Pattern Active Record Business Layer function giveMeMyData() Freitag, 20. März 2009
  • 69. Why Architecture matters PHPCon Italia 2009 Controller Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 70. Why Architecture matters PHPCon Italia 2009 Controller • Common mistake: business logic in controller Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. 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. Why Architecture matters PHPCon Italia 2009 View Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 75. Why Architecture matters PHPCon Italia 2009 View • Use a template engine. Watch performance! Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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
  • 79. Why Architecture matters PHPCon Italia 2009 TDD • enforces layered Architecture Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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
  • 85. Why Architecture matters PHPCon Italia 2009 Unit Tests Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 86. Why Architecture matters PHPCon Italia 2009 Unit Tests • test a single class Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. 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. 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. 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. 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. Integration Tests Unit Tests Freitag, 20. März 2009
  • 94. Why Architecture matters PHPCon Italia 2009 Integration Tests Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 95. Why Architecture matters PHPCon Italia 2009 Integration Tests • test several classes Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. Acceptance Tests Integration Tests Unit Tests Freitag, 20. März 2009
  • 99. Why Architecture matters PHPCon Italia 2009 Acceptance Tests Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 100. Why Architecture matters PHPCon Italia 2009 Acceptance Tests • test functionality from „outside“ Lars Jankowfsky, swoodoo.com Freitag, 20. März 2009
  • 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. 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. what if fixture/mock preparation are much larger than tests? Freitag, 20. März 2009
  • 104. what if your tests run for hours ? Freitag, 20. März 2009
  • 105. framework !== software architecture Freitag, 20. März 2009
  • 107. split your application into layers Freitag, 20. März 2009
  • 108. enforce proper usage of MVC Freitag, 20. März 2009
  • 109. wrap database access Freitag, 20. März 2009
  • 110. utilize test driven development Freitag, 20. März 2009
  • 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