Managing modular software for your nu get, c++ and java development

  • 683 views
Uploaded on



Binary repository is one of the cornerstones of building modular software. In this session we will demonstrate how it can be used to support modular development in Java, C++ and the .NET platform (using NuGet).

Next, we will show how to take the binary repository one step forward to support Continuous Deployment and Release Management by using build integration features which allow full traceability and automation of staging and release procedures.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
683
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
7
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Definition for wikipedia, don’t read it
  • Scary? We won’t read it.
  • Module is a black box
  • Used smart term!
  • This is also smart term.
  • A very smart term
  • Modules force API. That’s good thing.
  • Various modules and packages standards
  • Confused?
  • Why it is important to develop in modular way?
  • Working with smaller modules is good - faster
  • Module boundaries is a good place for applying securty
  • Different locations, time zones, internet latency etc.
  • Modules must have well define APIs
  • Module become dependency when it is needed in another build
  • Let’s see what it takes to build a software
  • We need to take the sources
  • Ok, here are our sources, we just wrote them
  • Next, we need to find the dependencies for those sources
  • Where from? (answer later)
  • Next, we build (compile, test, etc.)
  • Ok, that’s what build tool does
  • But next?
  • What we should do with the built binaries? (answer later)
  • Now let’s see how CI servers play with modules
  • Simple. CI servers just run the build tools we dicussed earlier.
  • But is it all? No, CI servers can do much more
  • For example, cascading builds – building different modules can trigger the build of defendant modules
  • Another example – per module results
  • Explain what is single source of truth
  • We are the experts 
  • Remember the question where the dependencies come form?
  • Who guessed?
  • Hint in the title – from binary repository
  • Remember the question what to do with the built binaries?
  • You guessed it again – deploy to binary repository
  • TODO why not VCS
  • TODO why not VCS
  • But binary repository is much more than dependencies source and deployment target!
  • While CI server is the single SOURCE of truth,
  • Binary repository is the single TARGET of truth
  • Truth should be saved…with the binaries… in binaries storage!
  • Bill of MaterialsJSONREST accessibleAPI accessibleAPLv2 on GitHub
  • TODO add image
  • This isn’t how tools should behave, beware of those which do.
  • Why it is not good as module
  • Fragmentation

Transcript

  • 1. Managing ModularSoftwarefor your NuGet, C++ and JavaDevelopment
  • 2. Agenda• Modular software – why?• Building modular software…• … in Java• … in C++• … in .NET
  • 3. Who’s talking?3
  • 4. WTF IS MODULE?
  • 5. ModuleModular programming (also called"top-down design" and "stepwiserefinement") is a software designtechnique that emphasizes separatingthe functionality of a program intoindependent, interchangeablemodules, such that each containseverything necessary to execute onlyone aspect of the desiredfunctionality.
  • 6. TL;DR
  • 7. Module
  • 8. Module FormulaData+Metadata=
  • 9. Unit of code
  • 10. Encapsulated
  • 11. Encapsulated
  • 12. Discrete
  • 13. Discrete
  • 14. Discrete
  • 15. Reusable
  • 16. Exposed via APIs
  • 17. Packages
  • 18. Modules or Packages?Technology Package Module
  • 19. Modules or Packages?Technology Package ModuleJava package keyword semantics *.jar files, OSGi bundles
  • 20. Modules or Packages?Technology Package ModuleJava package keyword semantics *.jar files, OSGi bundlesC++ namespace keyword semantics *.dll files, *.so files
  • 21. Modules or Packages?Technology Package ModuleJava package keyword semantics *.jar files, OSGi bundlesC++ namespace keyword semantics *.dll files, *.so filesC# namespace keyword semantics *.dll files, NuGet packages
  • 22. Modular Software – why?
  • 23. Discrete Units Are Smaller
  • 24. Modular Security Control
  • 25. Multi-Team Agility
  • 26. Code Sharing
  • 27. Forcing API
  • 28. Module  Dependency
  • 29. HOW STUFF PLAYS WITHMODULES
  • 30. Build Tools andDependencies
  • 31. Recipe1. Take sources
  • 32. Recipe1. Take sources – OK
  • 33. Recipe1. Take sources – OK2. Bring dependencies
  • 34. Recipe1. Take sources – OK2. Bring dependencies – where from?
  • 35. Recipe1. Take sources – OK2. Bring dependencies – where from?3. Build binaries
  • 36. Recipe1. Take sources – OK2. Bring dependencies – where from?3. Build binaries – OK
  • 37. Recipe1. Take sources – OK2. Bring dependencies – where from?3. Build binaries – OK4. …
  • 38. Recipe1. Take sources – OK2. Bring dependencies – where from?3. Build binaries – OK4. … - now what?
  • 39. CI Servers and Modules
  • 40. CI servers run build tools.
  • 41. CI servers run build tools.
  • 42. We can do better!
  • 43. Cascading Builds
  • 44. Per module results
  • 45. Wait, while on the CIServers…
  • 46. BINARY REPOSITORY AND…
  • 47. What is Binary Repository
  • 48. Said who?
  • 49. Binary Repository Experts
  • 50. Binary Repositoryas Modules Source
  • 51. Binary Repositoryas Modules Source
  • 52. Binary Repositoryas Modules Source
  • 53. Binary Repositoryas Deployment Target
  • 54. Binary Repositoryas Deployment Target
  • 55. Wait a Minute,What’s Wrong With MySource Control System?!
  • 56. Sources vs. BinariesSources Binaries
  • 57. Sources vs. BinariesSources BinariesText Blob
  • 58. Sources vs. BinariesSources BinariesText BlobDiffable Not diffable
  • 59. Sources vs. BinariesSources BinariesText BlobDiffable Not diffableVersioned bycontentVersioned byname
  • 60. Sources vs. BinariesSources BinariesText BlobDiffable Not diffableVersioned bycontentVersioned bynameStored byoverrideShould neveroverride
  • 61. Versioning By ContentTextMyPoem.txt(rev. 01)
  • 62. Versioning By ContentTextMoreTextMyPoem.txt(rev. 02)
  • 63. Versioning By ContentTextMoreTextMoreTextMyPoem.txt(rev. 03)
  • 64. Versioning By ContentTextMoreTextMoreMyPoem.txt(HEAD)
  • 65. MismatchTextMoreTextMoreTextMyPoem.txt010011010100110110101010011010011011011010101001110100110110101MyBook-1.0.zipMyBook-1.1.zipMyBook-2.0.zip
  • 66. Git is a Distributed System
  • 67. R U SURE U WANT 2 CLONE IT ALL?
  • 68. OK Then, ButWhat’s Wrong With MyFile Server?!
  • 69. It’s Fine if it knows how to:
  • 70. It’s Fine if it knows how to:
  • 71. It’s Fine if it knows how to:
  • 72. It’s Fine if it knows how to:
  • 73. It’s Fine if it knows how to:
  • 74. It’s Fine if it knows how to:
  • 75. It’s Fine if it knows how to:
  • 76. It’s Fine if it knows how to:
  • 77. BTW, How Many Years ItTook?
  • 78. Binary Repository andCI/CD
  • 79. CI Server isthe Single Source of Truth
  • 80. Binary Repository isThe Single Target of Truth
  • 81. Save the Truth!
  • 82. Make Strange Binary Love
  • 83. Standard of Truth
  • 84. How Everything FitsTogether
  • 85. How Everything FitsTogether
  • 86. How Everything FitsTogether
  • 87. How Everything FitsTogether
  • 88. How Everything FitsTogether
  • 89. How Everything FitsTogether
  • 90. How Everything FitsTogether
  • 91. Perfect…
  • 92. You Liked it, didn’t you?
  • 93. Things to Consider
  • 94. Lock-in?
  • 95. Technology Specific?
  • 96. Features to Look ForNot only MavenNot only JavaBroad CI tools matrixBuild toolsCI ServersExtensive REST supportEasy to extend
  • 97. MODULES IN… JAVA
  • 98. Java package
  • 99. Fragmentation
  • 100. The options are:• OSGi• Jigsaw• Build systems managed– Maven, Gradle, Ivy
  • 101. Project JigsawFirst promise: Java 7 (2008)Current promise: Java 9 (2015)
  • 102. Project JigsawFirst promise: Java 7 (2008)Current promise: Java 9 (2015)
  • 103. Back to plain old
  • 104. Modular Build in Java
  • 105. Modular Build in Java
  • 106. Modular Build in Java
  • 107. Modular Build in Java
  • 108. Modular Build in Java
  • 109. Modular Build in Java
  • 110. Modular Build in Java
  • 111. Modular Build in Java
  • 112. Modular Build in Java
  • 113. Modular Build in Java
  • 114. MODULES IN… C++
  • 115. Module BinariesLibrary OS File typeStatic Win *.lib*nix *.aDynamic Win *.dll*nix *.so
  • 116. Managing Dependencies inC++
  • 117. Managing Dependencies inC++
  • 118. Make?
  • 119. Make?
  • 120. Make?
  • 121. CMake?
  • 122. Java-Like (and Java) tools?
  • 123. Groovy tool!
  • 124. Modular Build in C++
  • 125. Modular Build in C++
  • 126. Modular Build in C++
  • 127. Modular Build in C++
  • 128. Modular Build in C++
  • 129. Modular Build in C++
  • 130. MODULES IN… .NET
  • 131. From C++ to C#Library OS File typeStatic Win *.lib*nix *.aDynamic Win *.dll*nix *.so
  • 132. From C++ to C#Library Win File typeStatic Win *.libDynamic Win *.dll
  • 133. Library Win File typeStatic Win *.libDynamic Win *.dllBut is it the Only Change?
  • 134. , Baby!
  • 135. Modular Build in .NET
  • 136. Modular Build in .NET+
  • 137. Modular Build in .NET+
  • 138. Modular Build in .NET+
  • 139. DEMO TIME!
  • 140. The Common Factor+