Last Update:
Software Architecture with C++, Book Review
In April, we got a new book - from two Polish authors - Piotr and Adrian - on C++ Software Architecture. This one is fascinating and refreshing. While it won’t teach you all the latest C++ features or low-level tricks in our favorite language, it will move you to a higher level with architecture, building, patterns, design, and development for the cloud.
Let’s see what’s inside.
Disclaimer: I asked the authors and got a print copy for the review.
The book
The book on Amazon:
The book page at Packt:
https://www.packtpub.com/product/software-architecture-with-c/9781838554590
Github repository with all samples:
https://github.com/PacktPublishing/Software-Architecture-with-Cpp
Authors
Adrian Ostrowski
Adrian Ostrowski is a modern C++ enthusiast interested in the development of both the C++ language itself and the high-quality code written in it. A lifelong learner with over a decade of experience in the IT industry and more than 8 years of experience with C++ specifically, he’s always eager to share his knowledge. His past projects range from parallel computing, through fiber networking, to working on a commodity exchange’s trading system. Currently, he’s one of the architects of Intel and Habana’s integration with machine learning frameworks.
In his spare time, Adrian used to promote music bands together with Piotr and has learned how to fly a glider. Currently, he likes riding his bicycle, going to music events, and browsing memes.
Piotr Gaczkowski
Piotr Gaczkowski has more than 10 years of experience in programming and practicing DevOps and uses his skills to improve people’s lives. He likes building simple solutions to human problems, organizing cultural events, and teaching fellow professionals. Piotr is keen on automating boring activities and using his experience to share knowledge by conducting courses and writing articles about personal growth and remote work.
He has worked in the IT industry both in full-time positions and as a freelancer, but his true passion is music. When not making his skills useful at work, you can find him building communities.
Let’s see what’s inside.
The Structure
In the book, you can find 15 core chapters (plus an appendix):
1. Importance of Software Architecture and Principles of Great Design
2. Architectural Styles
3. Functional and Nonfunctional Requirements
4. Architectural and System Design Patterns
Those four chapters above guide you through the core principles of design. It’s a quick refresher on the most critical aspects like SOLID, DRY, Coupling, and Cohesion - each with a description and a code sample. You’ll also compare state-full vs stateless architectures and SOA in general.
5. Leveraging C++ Language Features
6. Design Patterns and C++
Those were probably the most interesting chapters for me, as they touch core C++. Some of the topics are advanced - for example, a bit about nebloids and hidden friends. Review of C++20 feature and much more. These sections are concise, but at the same, they are convenient for intermediate/advanced C++ programmers that want to get up to speed with recent C++ changes. For example, I like how they introduce std::optional
and std::variant
(showing a finite state machine, see my post on a similar topic in How To Use std::visit With Multiple Variants and Parameters - C++ Stories)
7. Building and Packaging
Conan, CMake, and other handy tools. It’s good to see that those topics can now be found in a C++ Book. So far, I haven’t seen any book teaching those tools.
8. Testability
9. Continuous Integration and Continuous Deployment
10. Security
11. Performance
In the security chapter, you’ll learn several good techniques to make your code safer and, what’s more important, how to leverage various tools. We have coding guidelines, sanitizers, static analysis, and other scanners. You’ll also learn the most common vulnerabilities.
For example, with the performance chapter, I like that it doesn’t copy and paste material from tons of other books, but instead, it teaches you how to use tools to capture data and then decide what should be optimized. So authors try to keep the same overview level which is helpful and makes it consistent across the whole book.
12. Service-Oriented Architecture
13. Microservices
14. Containers
15. Cloud Native Design
And the last four chapters are essential for anyone interested in writing services and software for the cloud, from SOAP to Dockers, Kubernetes, REST, and monitoring.
My View
Let’s be clear. Each chapter of this text can form a separate book! While you won’t learn all the details on how to write a microservice in C++ from a single chapter, you’ll get essential knowledge on the core topics and how to look for more material.
What’s more, the book is not for beginners; you need to understand C++ and have some background to make the best use of the content. In short: this text can move you forward in your career as you’ll get a lot of knowledge not just about coding.
It’s visible that the authors have massive experience in those modern techniques and have good skills to teach others how to do it. You’ll see lots of diagrams, small examples, and descriptions of how things work. It’s also essential to mention that there’s not much “waffling,” and authors keep the discussion to the point and cover each topic in a condensed style.
The content is structured in an easy-to-follow way. You go from a top-level overview of the application design: Architectural styles, collecting requirements. And then, you reveal more and more techniques to achieve the final result, like leveraging modern C++ tools for building and deploys. Sometimes I could feel that the number of tools for managing applications is even larger than the number of new JavaScript libraries, but the authors said that it’s not that bad :)
I think that after reading this book, you’ll be more “aware” of what’s happening in the area of architecture and software design, specifically for the cloud and servers. The landscape of programming tools and services changes and makes it a moving target for anyone who wants to stay up-to-date.
One key factor for my review is that I’m not a cloud/server/service developer. Several topics pictured in the book were relatively new and a bit “detached” from what I’m currently doing in my projects (especially those related to clouds). Still, the book contains high-level concepts for general C++ apps, and I benefited a lot from those sections.
Summary
Final mark: 4.5+/5
Pros:
- Practical
- Lots of material covered
- Delivers its goal: “the overview”, not too shallow, not too deep.
- Engaging - each dev will find something interesting
- Very good quality of text, diagrams, images, examples
- Questions and answers at the end of each chapter that can help you with exercises.
Cons:
- It’s tough to find any issues here!
- You might sometimes be overwhelmed by lots of topics and feel a “mix” of technologies described.
- It would be nice to see even more C++ there :)
Overall I like the book, and I’ve found several topics for me to explore further. (Even though I’m not currently developing code directly in the cloud or using services…)
I've prepared a valuable bonus for you!
Learn all major features of recent C++ Standards on my Reference Cards!
Check it out here: