IPC13 Munich: Planning the Unplannable

1,198 views

Published on

Long running projects, be it software or city planning, have something in common: the constant change to their environment. The problems to solve in one, two, or even five years from now will be different from those at hand now – and they are yet unknown. Thus dealing with uncertainty is one of the key issues and a well-planned architecture can help with that.

Published in: Technology, Real Estate
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,198
On SlideShare
0
From Embeds
0
Number of Embeds
29
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

IPC13 Munich: Planning the Unplannable

  1. 1. Planning for the unplannable
  2. 2. project founder of TYPO3 Flow 
 and TYPO3 Neos co-founder of the TYPO3 Association software architect at TechDivision 37 years old lives in Lübeck, Germany 1 wife, 2 daughters, 1 espresso machine likes drumming !
  3. 3. Experience
  4. 4. „Architecture”
  5. 5. Loose Coupling
  6. 6. High Cohesion
  7. 7. Law of Demeter -each unit should have only limited knowledge about other units: only units "closely" related to the current unit.
 -each unit should only talk to its friends; don't talk to strangers.
 -only talk to your immediate friends.
  8. 8. Dependency Injection
  9. 9. ! class IsbnLookupService { protected static $instance; public function getInstance() { if (self::$instance === NULL) { self::$instance = new self; } return self::$instance; } } ! ! class BookSearchController { public function action() { $service = IsbnLookupService::getInstance(); … } }
  10. 10. class ServiceLocator { protected static $services = array(); public function getInstance($name) { return self::$service[$name]; } ! } ! ! class BookSearchService { public function action() { $service = ServiceLocater::getInstance("IsbnLookupService"); … } }
  11. 11. class BookSearchController extends ActionController { ! /** * @var IsbnLookupService */ protected $isbnLookupService; /** * @param IsbnLookupService $isbnLookupService */ public function __construct(IsbnLookupService $service) { $this->isbnLookupService = $service; } }
  12. 12. class BookSearchController extends ActionController { ! /** * @var IsbnLookupService */ protected $isbnLookupService; /** * @param IsbnLookupService $isbnLookupService */ public function injectLookupService(IsbnLookupService $service) { $this->isbnLookupService = $service; } }
  13. 13. class BookSearchController extends ActionController { ! /** * @FlowInject * @var IsbnLookupService */ protected $isbnLookupService; ! }
  14. 14. class BookSearchController extends ActionController { ! /** * @FlowInject * @var IsbnLookupServiceInterface */ protected $isbnLookupService; ! }
  15. 15. AcmeControllerBookSearchController: properties: isbnLookupService: className: AmazonServiceIsbnLookupService
  16. 16. Design Patterns
  17. 17. Reinvent the Wheel!
  18. 18. Planned and Unplanned Extensibility
  19. 19. Configuration
  20. 20. Signal-Slot Pattern
  21. 21. Observer, Dispatcher, PublishSubsribe, Event-Notifier, …
  22. 22. Define a public API with @api
  23. 23. Code against interfaces
  24. 24. DI + Interfaces
  25. 25. AOP
  26. 26. Dependency Management: Composer, requirejs, …
  27. 27. Unit Tests
  28. 28. Functional Tests
  29. 29. System Tests
  30. 30. Understanding other’s code
  31. 31. Code Ownership
  32. 32. Software Rot
  33. 33. Remove unused code
  34. 34. Write code because it adds value (not because you can)
  35. 35. But maybe we need it (YAGNI)
  36. 36. Be canny with configuration
  37. 37. Reviews
  38. 38. Change your perspective
  39. 39. Be picky!
 Fix broken windows!
  40. 40. Readable Code
  41. 41. TP 3 lwCd gGi l e o o e a e YO F o o i u e ns n n p g n di N m sae t twt vno nm a epc s r i edr a e as h fl w d y akg ky nm ) n o o e b pcae e (a e ad l sbata nee upr s edd s O e s s t et e le n ue t e n pri . am n O e s s t et e nm sae n ue t e n pr a epc. am Odrt e eta hbtay re s t ns l ae cl. am p il D n iprnm sae ul s o o' m ot a epcs n s yu t e ue hm s te . N e pyi bten oCm et o m t le e e D co m n n w ad l sm m e vr r e o. n c s e br a o m t d a, h Ue a t . pi ads i i s @vra O t nl ecp o g o rtn g e ite ito m n le osn h fscm eti r n fl w d y b n cm eti . o o e b a l k o m n le l a n Pe re te a epcsul s r e r a v nm sae,n s f li e Fl Q afd a epc im r uy uli N m saes oe l i e r db e al a e <pp ?h n m s a e Ametakg ; a e p c ceTsPcae / * *Ti srp blnst teTP3Fo pcae" ceTsPcae . hs cit eog o h YO lw akg Am.etakg " * *I i fe sfwr;yucnrdsrbt i ado mdf i udr t s re otae o a eitiue t n/r oiy t ne *tetrso teGUGnrlPbi Lcne ete vrin3o te h em f h N eea ulc ies, ihr eso f h *Lcne o (tyu oto)ayltrvrin ies, r a or pin n ae eso. * *TeTP3poet-isiigpol t sae h YO rjc nprn epe o hr! * * * * * * * * * * / Cpue h j o cd g s o atr teo foi a yu y n c a ecln w b o t n. r t xeet e sl i s ee l uo Ej cd gEj F w n y oi .n y l . o n o o u e AmetakgevcoGnrtr s ceTsPcaeSrieFoeeao ; u e TP3Fonoain a Fo; s YOlwAnttos s lw /* * *Hr ge tedsrpino tecas I sol epanwa temi ee os h ecito f h ls. t hud xli ht h an *proeo ti casi.. ups f hs ls s. * *@ l w S o e ”igeo” F o c p (snltn ) * / c a s UiesAaye e t n s BsCasi p e e t SmItrae { l s nvrenlzr x e d aels m l m n s oenefc /* * *Sm ijce dpnec oe netd eedny * *@ l w I j c Fonet *@ a Foeeao v r oGnrtr * / p o e t d $oeeedny= N L ; r t c e smDpnec UL /* * *Sosi yuaeadce t TP3Fo hw f o r ditd o YO lw * *@ a boen v r ola * / s a i p o e t d $ditdolw = T U ; t t c r t c e adceTFo RE Dsr t n fh c s M k ia ecpi o te l s aet s io a. l g s eddf lr t ep i o a nee, ef e o xln n e e a hwt uet o o si . U pr m l s c s nm .l s peC e ae l s a eC s a C a a nm s hu b nus a e sol e on. d I ohr akgsipr n te pcae, ot m c e et cae n e enl e Am s akg i r Aa zr T P Uvs y ad e rot s n esAa e n r e t ia U i r nl r f v e y. L t l bfr ohras i @F w* e e te t : s o o g @vr aa , e r, ho s a @prm @r un@trw , , t @ai i e@dpeae p @s c, er t , n c d http://rlmk.me/flowcgl /* * *Sosi yuae afno TP3Fo hw f o r a f YO lw * *@ a boen v r ola * / p o e t d $aO Fo ; r t c e fnflw /* * *Agetmto wihsoshwt idn cnrlsrcue. ra ehd hc hw o o net oto tutrs Dsr t n fh m to. aet ecpi o te e dM k i io h a l g s edd so a nee. n M to nm s hu b vrs e d a e sol e eb. h d
  42. 42. Naming
  43. 43. ! ! ! ! ! ! ! $path! $pathAndFilename! $filename! $directory! $directoryName! $class! $className
  44. 44. The pragmatic programmer Code complete All Martin Fowler Books (PoEAA)
  45. 45. @robertlemke robertlemke.com

×