Home » , » Download PDF Modern C++ Design: Generic Programming and Design Patterns Applied By Andrei Alexandrescu

Download PDF Modern C++ Design: Generic Programming and Design Patterns Applied By Andrei Alexandrescu



Sinopsis

Software engineering, maybe more than any other engineering discipline, exhibits a rich multiplicity: You can do the same thing in many correct ways, and there are infinite nuances between right and wrong. Each path opens up a new world. Once you choose a solution, a host of possible variants appears, on and on at all levels—from the system architecture level down to the smallest coding detail. The design of a software system is a choice of solutions out of a combinatorial solution space.
 
Let's think of a simple, low-level design artifact: a smart pointer (Chapter 7). A smart pointer class can be single threaded or multithreaded, can use various ownership strategies, can make various trade-offs between safety and speed, and may or may not support automatic conversions to the underlying raw pointer type. All these features can be combined freely, and usually exactly one solution is best suited for a given area of your application.
 
The multiplicity of the design space constantly confuses apprentice designers. Given a software design problem, what's a good solution to it? Events? Objects? Observers? Callbacks? Virtuals? Templates? Up to a certain scale and level of detail, many different solutions seem to work equally well.
 
The most important difference between an expert software architect and a beginner is the knowledge of what works and what doesn't. For any given architectural problem, there are many competing ways of solving it. However, they scale differently and have distinct sets of advantages and disadvantages, which may or may not be suitable for the problem at hand. A solution that appears to be acceptable on the whiteboard might be unusable in practice.
 
Designing software systems is hard because it constantly asks you to choose. And in program design, just as in life, choice is hard.



Content

  1. Policy-Based Class Design
  2. Techniques
  3. Typelists
  4. Small-Object Allocation
  5. Generalized Functors
  6. Implementing Singletons
  7. Smart Pointers
  8. Object Factories
  9. Abstract Factory
  10. Visitor
  11. Multimethods



0 komentar:

Posting Komentar