John Lakos: Applied Hierarchical Reuse: Capitalizing on Bloomberg's Foundation Libraries
Channel: CppNow
Date: 15/06/2013

Designing one library is hard; designing an open-ended collection of interoperable libraries is harder. Partitioning functionality across multiple libraries presents its own unique set of challenges: Functionality must be easy to discover, redundancy must be eliminated, and interface and contract relationships across components and libraries should be easy to explore without advanced IDE capabilities. Further, dependencies among libraries must be carefully managed -- the libraries must function as a coherent whole, defining and using a curated suite of vocabulary types, but clients should pay in compile time, link time, and executable size only for the functionality they need.

Creating a unified suite of multiple interoperable libraries also has many challenges in common with creating individual ones. The software should be easy to understand, easy to use, highly performant, portable, and reliable. Moreover, all of these libraries should adhere to a uniform physical structure, be devoid of gratuitous variation in rendering, and use consistent terminology throughout. By achieving such a high-level of consistency, performance, and reliability across all of the libraries at once, the local consistency within each individual library becomes truly exceptional. Moreover, even single-library projects that leverage such principles will derive substantial benefit.

There are many software methodologies appropriate for small- and medium-sized projects, but most simply do not scale to larger development efforts. In this talk we will explore problems associated with very large scale development, and the cohesive techniques we have found to address those problems culminating in a proven component-based methodology, refined through practical application at Bloomberg. The real-world application of this methodology -- including three levels of aggregation, acyclic dependencies, nominal cohesion, fine-grained factoring, class categories, narrow contracts, and thorough component-level testing -- will be demonstrated using the recently released open-source distribution of Bloomberg's foundation libraries.
---

*--*

---