1 / 20

Code Integration Strategies

Code Integration Strategies. Integrating the Code during the Development. Alexander Vakrilov. Telerik Corporation. www.telerik.com. Why we need integration?. Faster bug detection Less bugs Improved code quality Shorter release cycle Accurate status quo Better customer relations

Télécharger la présentation

Code Integration Strategies

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Code Integration Strategies Integrating the Code during the Development Alexander Vakrilov Telerik Corporation www.telerik.com

  2. Why we need integration? • Faster bug detection • Less bugs • Improved code quality • Shorter release cycle • Accurate status quo • Better customer relations • Improved morale Source: http://news.bbc.co.uk/cbbcnews/hi/newsid_6410000/newsid_6411100/6411145.stm

  3. Integration frequency Phased or Incremental Source: http://www.dpchallenge.com/image.php?IMAGE_ID=303123

  4. Phased integration • Steps • Develop unit by unit • Combine all units into the big system • Test and debug the whole system • Hope everything will worktogether

  5. Phased integration problems “Big bang” integration • Phased integration comes late to the project • Problems might come from every unit or from combination of some units • Some typical problems: • Shared global state • Weak encapsulation • Poorly documented interfaces

  6. Incremental integration • Integrate one unit at a time • Steps • Start with a small functional part of the system. It will a skeleton for the project • Develop a single unit (code, test, debug…) • Integrate the unit into the skeleton and verify its behavior

  7. Incremental integration benefits • Errors surface immediately • You always have something working • Better customer relations • Improved team confidence • Improved progress monitoring • More robust unit testing • Shorter development schedule Source: http://www.flickr.com/photos/mcbeth/2224754533/

  8. Incremental Integration Strategies Integrate “your way” Source: http://www.flickr.com/photos/benheine/3529694787/

  9. Top-down integration • Write classes on the top of the hierarchy first • Main Module / Main Window first • Benefits: • Control flow logic is tested early on • Conceptual problems are exposed quickly • Postpone design of low-level details • Disadvantages • Tricky integration parts are exposed last • There maybe no top component • Requires large number of stubs Source: http://www.flickr.com/photos/mareknim/2414682400/

  10. Bottom-up integration • Write classes on the bottom of the hierarchy first • Benefits: • Troublesome low level integration problems are found quickly • Disadvantages • The big picture is blurry • High level integration starts later on • The whole system before must be designed before you start integration. Source: http://www.flickr.com/photos/darijuss/2020975929/

  11. Sandwich integration • Steps • Write classes on the top of the hierarchy first • Write low level integration pieces after that • Write middle level components last • Benefits: • Combines benefits of both top-down and bottom-up approaches Source: http://www.flickr.com/photos/_sk/2891543025/

  12. Risk-oriented integration • Steps • Identify problematic (risky) areas • Start from most difficult and uncertain parts first • Benefits: • Problematic areas are exposed early on • Disadvantages • Initial progress is slow Source: http://www.flickr.com/photos/7308152@N07/3168909738/

  13. Feature oriented integration • Steps • Develop one feature at a time • Integrate this feature back to the skeleton when its done • Benefits: • Removes scaffolding • Progress monitoring • Works well with Object-Orientation Source: http://www.flickr.com/photos/robdurfee/181881853/

  14. Your own integration • All mention approaches have benefits and draw back • Use what works for you and your team for this specific project • Don’t be afraid to mix and match them • Golden mean is the key to success Source: http://www.flickr.com/photos/blix613/2680646992/

  15. Daily (CI) Build and Smoke Test Keep your project healthy Source: http://www.flickr.com/photos/_mad_/2963537283/

  16. What is a CI Build? • Code is checked-in to the source repository • A build is triggered on a separate build machine • Source is compiled and tests are executed • The build either succeeded or failed Source: http://www.flickr.com/photos/hindrik/3331515368/

  17. CI Benefits • Build is healthy all the time • Easy defect diagnostics and bug hunting • Constant availability of a "current" build for testing, demo, or release purposes • Early warning ofbroken/incompatible code Source: http://www.guidespark.com/blog/wp-content/uploads/2010/06/Financial-Health_Small.jpg

  18. CI Best Practices • Build often • Fixing a broken build is top priority • Create a penalty for breaking the build • Tests are part of the build • Automate the CI Build as much as possible Source: http://www.flickr.com/photos/iancowe/4254566515/

  19. CI Best Practices (2) • Establish a build group • Do CI at any cost, even under pressure • Setup a nightly build Source: http://www.flickr.com/photos/asbo_allstar/3831718858/

  20. Code Integration Strategies ? Questions? ? ? ? ? ? ? ? ? ? http://academy.telerik.com

More Related