Mother Nature likes object-oriented development! C++ programmers often can’t afford the luxury of creating a universe of objects; our platforms are intrinsically limited. However, the flyweight design pattern provides an elegant means of sharing objects, with a small price in terms of storage and retrieval. Stephen Morris describes C++ code that uses the flyweight design pattern to solve a knotty problem in networking. Also on the same web site, “Mastering the Requirements Process“.
This is appropriately titled with “For IT Management.” The article is a bit too rudimentary for programmers, but it does cover the topic reasonably including code examples.
I’m not sure that an IT manager would be too interested in code, however. Perhaps using something with a “nicer” syntax would be better for management, or perhaps no code at all. I can’t see a manager of programmers knowing a specific implementation as a good thing. It might have been better for the article to use UML for its targetted managerial audience. Even that is a bit dangerous, as I wouldn’t want a manager reviewing my design, but rather a technical lead or architect. Perhaps the article should just be titled “Intro to Flyweight”. Just my 2 cents.
The guy is focussing on C++ and he has been sending many articles on C++ design pattern. So using UML here is not his goal.
As you say, however, it is a bit rudimentary for programer. And honestly I don’t find it’s implementation of design pattern very good, neither his programing exemples. For me it doesn’t look like “good C++ code”.
It looks like he did enough articles (or he plans to do enough) so that eventually he could write a book. Honestly I will not buy it.