1 17-214 Principles of So3ware Construc9on: Objects, Design, and Concurrency So3ware engineering in prac9ce Configura9on management and version control systems Josh Bloch Charlie Garrod Darya Melicher
1 17-214
PrinciplesofSo3wareConstruc9on: Objects,Design,andConcurrencySo3wareengineeringinprac9ceConfigura9onmanagementandversioncontrolsystemsJoshBlochCharlieGarrodDaryaMelicher
2 17-214
Administrivia
• Homework6duenextWednesday– CheckpointdeadlineMondaynight
3 17-214
KeyconceptsfromThanksgiving
4 17-214
KeyconceptsfromlastTuesday
5 17-214
Streamsdesigndiscussion
• RecallthefundamentalAPIdesignprinciples…
6 17-214
Majortopicsin17-313(Founda9onsofSE)
• Processconsidera9onsforso3waredevelopment• Requirementselicita9on,documenta9on,andevalua9on• Designforqualitya[ributes• Strategiesforqualityassurance• Empiricalmethodsinso3wareengineering• Timeandteammanagement• Economicsofso3waredevelopment
7 17-214
Test-drivendevelopment(TDD),informally
8 17-214
Empiricalmethodsinso3wareengineering
• Howdowestudytheeffec9venessoftest-drivendevelopmentcomparedtoothermethodologies?
9 17-214
Thisweek:DevOps(Developmentopera9ons)
• Introduc9ontodevops• Configura9onmanagementandversioncontrol
10 17-214
Consider:9melinesoftradi9onalso3waredevelopment
Source:ByPaulire-Ownwork,CCBY-SA4.0,h[ps://commons.wikimedia.org/w/index.php?curid=46634740
e.g.,theMicroso3*OSdevelopmenthistory
11 17-214
ComparetotheUbuntureleasecycle
12 17-214
ComparetotheFacebookreleasecycle
13 17-214
DevOps:Development/Opera9ons
14 17-214
DevOpstoolchain
• Code:codedevelopmentandreview,sourcecodemanagementtools
• Build:con9nuousintegra9ontools,buildstatus• Test:con9nuoustes9ngtoolsprovidefeedback• Package:ar9factrepository,applica9onpre-deploymentstaging
15 17-214
DevOpsecosystems…
16 17-214
Consider:Con9nuousintegra9on(CI)
• AdvantagesanddisadvantagesofCI?
17 17-214
Real-worldso3waredevelopmentchallenges
• Imagine:Youdiscoverabuginversion8.2.4ofyourso3ware– Youwanttodiscover,fix,anddeployupdatestooldversions– Youwanttofixthebugfornewversionsinongoingdevelopment
18 17-214
Configura9onmanagement(CM)
• Defini9on(Pressman):Configura*onmanagement“isasetoftrackingandcontrolac*vi*esthatareini*atedwhenaso9wareengineeringprojectsbeginsandterminateswhenso9wareistakenoutofopera*on.”
19 17-214
Reasonsforconfigura9onmanagement
• So3wareevolu9on• Separatedevelopment• Audits(legal,regulatory)• Productlines• Marketvaria9on(e.g.,U.S.,Europe,Asia)• Plaformvaria9on(e.g.,Android,iOS)
20 17-214
Configura9onmanagementinthemodernworld
Version control
+ workflows
Build managers
Package managers
App markets
+ update
managers
Deployment managers
+ VMs/
containers
21 17-214
Aside:Seman9cversioningforreleases
• GivenaversionnumberMAJOR.MINOR.PATCH,incrementthe:– MAJORversionwhenyoumakeincompa9bleAPIchanges,– MINORversionwhenyouaddfunc9onalityinabackwards-compa9ble
manner,and– PATCHversionwhenyoumakebackwards-compa9blebugfixes.
• Addi9onallabelsforpre-releaseandbuildmetadataareavailableasextensionstotheMAJOR.MINOR.PATCHformat.
h[p://semver.org/
22 17-214
Brancheswithinso3warerepositories
23 17-214
Centralizedversioncontrol
• Singleservercontainsalltheversionedfiles
• Clientscheckout/infilesfromthatcentralplace
• E.g.,CVS,SVN(Subversion),andPerforce
https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control
24 17-214
Distributedversioncontrol
• Clientsfullymirrortherepository– Everycloneisafullbackupof
allthedata
• E.g.,Git,Mercurial,Bazaar
https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control
25 17-214
SVN(le3)vs.Git(right)
• SVNstoreschangestoabaseversionofeachfile
• Versionnumbers(1,2,3,…)areincreasedbyonea3ereachcommit
• Gitstoreseachversionasasnapshot
• Iffileshavenotchanged,onlyalinktothepreviousfileisstored
• EachversionisreferredbytheSHA-1hashofthecontents
https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control
26 17-214
Aside:Gitfilestatus
© Scott Chacon “Pro Git”
27 17-214
Aside:Gitinternals
© Scott Chacon “Pro Git”
28 17-214
Aside:Gitobjectgraph
© Scott Chacon “Pro Git”
29 17-214
Aside:Whichfilestomanage?
• Allcodeandnoncodefiles– Javacode– Buildscripts– Documenta9on
• Exclude:generatedfiles(.class,…)– Mostversioncontrolsystemshaveamechanismtoexcludefiles
(e.g.,.gi9gnore)
30 17-214
Next9me…
• Prac9calGit