integrating the code during the development alexander vakrilov telerik corporation
DESCRIPTION
Phased or Incremental Source:TRANSCRIPT
![Page 1: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/1.jpg)
Code Integration Strategies
Integrating the Code during the Development
Alexander VakrilovTelerik Corporationwww.telerik.
com
![Page 2: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/2.jpg)
Why we need integration?
Faster bug detection Less bugs Improved code quality Shorter release cycle Accurate status quo Better customer relations Improved morale
2
Source: http://news.bbc.co.uk/cbbcnews/hi/newsid_6410000/newsid_6411100/6411145.stm
![Page 3: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/3.jpg)
Integration frequency
Phased or Incremental
Source: http://www.dpchallenge.com/image.php?IMAGE_ID=303123
![Page 4: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/4.jpg)
Phased integration Steps
Develop unit by unit Combine all units into the big
system Test and debug the whole system Hope everything will work
together
4
![Page 5: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/5.jpg)
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
5
![Page 6: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/6.jpg)
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
6
![Page 7: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/7.jpg)
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
7
Source: http://www.flickr.com/photos/mcbeth/2224754533/
![Page 8: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/8.jpg)
Incremental Integration StrategiesIntegrate “your way”
Source: http://www.flickr.com/photos/benheine/3529694787/
![Page 9: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/9.jpg)
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
9Source:
http://www.flickr.com/photos/mareknim/2414682400/
![Page 10: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/10.jpg)
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.
10
Source: http://www.flickr.com/photos/darijuss/2020975929/
![Page 11: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/11.jpg)
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 11
Source: http://www.flickr.com/photos/_sk/2891543025/
![Page 12: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/12.jpg)
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
12
Source: http://www.flickr.com/photos/7308152@N07/3168909738/
![Page 13: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/13.jpg)
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-Orientation13
Source: http://www.flickr.com/photos/robdurfee/181881853/
![Page 14: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/14.jpg)
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
14
Source: http://www.flickr.com/photos/blix613/2680646992/
![Page 15: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/15.jpg)
Daily (CI) Build and
Smoke TestKeep your project healthy
Source: http://www.flickr.com/photos/_mad_/2963537283/
![Page 16: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/16.jpg)
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
16
Source: http://www.flickr.com/photos/hindrik/3331515368/
![Page 17: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/17.jpg)
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
17
Source: http://www.guidespark.com/blog/wp-content/uploads/2010/06/Financial-Health_Small.jpg
![Page 18: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/18.jpg)
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
18
Source: http://www.flickr.com/photos/iancowe/4254566515/
![Page 19: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/19.jpg)
CI Best Practices (2) Establish a build group Do CI at any cost, even under pressure
Setup a nightly build
19
Source: http://www.flickr.com/photos/asbo_allstar/3831718858/
![Page 20: Integrating the Code during the Development Alexander Vakrilov Telerik Corporation](https://reader035.vdocuments.us/reader035/viewer/2022062401/5a4d1b757f8b9ab0599b6ead/html5/thumbnails/20.jpg)
Code Integration Strategies
Questions? ??
? ? ??
??
?http://academy.telerik.com