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
 
Memi Beltrame Collaborative Design
Memi Beltrame Collaborative DesignMemi Beltrame Collaborative Design
Memi Beltrame Collaborative DesignGrUSP
 
Made by Many: On Collaborative Design
Made by Many: On Collaborative DesignMade by Many: On Collaborative Design
Made by Many: On Collaborative DesignMemi Beltrame
 
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
 
Memi Beltrame Collaborative Design
Memi Beltrame Collaborative DesignMemi Beltrame Collaborative Design
Memi Beltrame Collaborative Design
 
Made by Many: On Collaborative Design
Made by Many: On Collaborative DesignMade by Many: On Collaborative Design
Made by Many: On 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

Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governanceWSO2
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxFIDO Alliance
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 

Recently uploaded (20)

Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 

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