Home :: Books :: Computers & Internet  

Arts & Photography
Audio CDs
Audiocassettes
Biographies & Memoirs
Business & Investing
Children's Books
Christianity
Comics & Graphic Novels
Computers & Internet

Cooking, Food & Wine
Entertainment
Gay & Lesbian
Health, Mind & Body
History
Home & Garden
Horror
Literature & Fiction
Mystery & Thrillers
Nonfiction
Outdoors & Nature
Parenting & Families
Professional & Technical
Reference
Religion & Spirituality
Romance
Science
Science Fiction & Fantasy
Sports
Teens
Travel
Women's Fiction
Modern C++ Design: Generic Programming and Design Patterns Applied

Modern C++ Design: Generic Programming and Design Patterns Applied

List Price: $44.99
Your Price: $38.54
Product Info Reviews

<< 1 2 3 4 .. 6 >>

Rating: 4 stars
Summary: Templatized Design Patterns in C++
Review: Like the original Design Patterns book that this book is designed to supplement this book is split into two sections. The first section covers C++ fundamentals that apply to the patterns in the second section of the book. It's the second section, which implements many of the Gang of Four's design patterns in C++ using templates that is the heart of this small book.

The C++ templates are designed well and the code is out of the box usable. The graphics are good, but somewhat sparse. If there is anything I could fault the book for it is it's length. More expository time could be spent on the templates and the relationships between each of the templates, classes and code fragments. Templates, at least to me, are confusing at the best of times. So I would have appreciated some more time spent in explaining their function.

For the hard-core C++ coder this is an excellent book, particular in conjunction with the Gang of Four's Design Patterns book.

Rating: 5 stars
Summary: An instant classic
Review: This is a concise but very informative book about the powerful features of C++ and how to use them. This book covers some of the same areas as the "Generative Programming" book, and then some. In particular, the chapter on Typelists provides a powerful demonstration of the compile-time functional programming style afforded by the C++ template system. There is also an extensive coverage of how to implement some of the classic GoF patterns -- Command, Singleton, Factory, AbstractFactory, Visitor -- and, more importantly, covers the various trade-offs involved. Finally, it demonstrates the power of Policy-based template classes in expressing these trade-offs in code.

Being a conscientious reviewer, let me also point ot a few problems. It is somewhat startling that Addison-Wesley has done such a bad job about producing such an useful book. There definitely is a feel that the book has been rushed to print. There are many obvious errors that any competent copy-editor would have caught and fixed. Typos abound. Names are inconsistent -- for example in one paragraph the same class is called both 'Singleton' and 'SingletonHolder'. The flow is sometimes somewhat jarring -- for example, in the discussion about smart pointers, and using the 'SmartPtr<...> sp; if (sp)' construct -- one paragraph essentially says there's no safe way to do this, "end of story", and then immediately after that presents a technique to implement this, as far as I could make out, safely. Another small distraction is that the fixed-width font used for presenting the code uses a 'fi' ligature (i.e., the two letters 'fi' take up the space of one letter) -- a simple error that should have been caught. All these make the reading experience somewhat less pleasant than it should be.

However, these detract little from my overall opinion of the book. This book belongs on your bookshelf.

Rating: 5 stars
Summary: Inspiring
Review: This was a good buy for me, but I needed time to realize this. At first some techniques present in the book seemed too obscure to me, even though I use template metaprogramming regularly myself to perform tasks, where conventional C++ techniques lack in expressivity (like no direct support for reflection).

As the time passed and the tasks at hand became more complicated, those techniques that seemed ezoteric to me before provided me with the inspiration needed to cope with the difficulties that arised in my work.

Rating: 4 stars
Summary: Solid stuff, but not for today
Review: The techniques employed in Loki (the library presented in the book) are fairly solid directions for the future of C++ programming, but the reality of today is that many of these techniques rely heavily on mechanisms (templates, STL) that aren't well implemented in current compilers.

This is probably the best available book of applications for template metaprogramming, which is a frightening abuse of C++ templates and lookup rules to perform computation at compile time. It does have it's place, particularly the simpler tricks like compile time assertions.

A primary thrust of design is the use of policy classes, which are template template parameters that generally end up as base classes. This use of empty multiple inheritance base classes comes with a cost that the author wasn't aware of when he wrote the book. A discussion to that effect appeared in comp.std.c++ with the title "Obese compound objects??? >:o(".

The SmartPtr discussion is one of the best I've ever seen (and Scott Meyers taught a class on that topic here at work). However, the book doesn't cover every little detail of the Loki implementation, which has vague comments like "Colvin/Gibbons trick." I suppose accu.org might have a pointer to what that means, but I feel this sort of detail should have been covered all in one place.

All that said, it's still a very welcome addition to any C++ programmer's library, but in my library it's a reference among many of trendy C++ abuses that might turn up in somebody else's code I may have to work with some day.

Rating: 5 stars
Summary: A significant and valuable book; strongly recommended.
Review: I was waiting for this, and pestering bookstores for it for 2 weeks before it arrived. And it still exceeded my expectations. Note: The author was partly responsible for the C++ ScopeGuard library - an amazing, essential piece of code.

For any C++ engineers using reference counting (that'll be all of us, then), the amazingly configurable SmartPtr<> and the SmallObjectAllocator are instantly worth many times the price of the book. The deep, thorough analysis of Singletons, Functors, the Visitor pattern, Double-dispatch and Factories are all important chapters in their own right, with immediate use in real programs as well as educational value. The pervading concept of policy classes will undoubtedly influence your future approach to design, because the examples are all so elegant, compelling and downright useful.

But I think there is even more value in the longer term. This book takes a somewhat dizzying step into a new way of thinking, reminiscent of first encountering STL or GoF's Design Patterns. I feel sure that the concept of typelists is an important contribution to the direction of the language; a flexible, generic, *declarative* way of expressing relationships between abstractions. However, these techniques place such strain on the C++ template facility (which even in its final ISO form is barely adequate for the task) that it's amazing that they work at all. The book is full of ingenious work-arounds to overcome language limitations.

I just wish that more current compilers would accept the code. Sadly, Visual C++ 6.0 is a long way from this level of standard-conformance. Hopefully VC++ .NET will be better.

Rating: 3 stars
Summary: Good book but..
Review: I have to say that this is indeed a good book but it as it share of problems.
The chapter about type list is good, the functor is very good and its multimethods is greate. The reset is between nice to poor. Is implemention of singleton is simply poor programming in both design and implemetion. He seem to fall to any trap posible on the way to impelementing it. The small object allocator is also very poor. The object factory is redandnet as the impemention is C++ is very trivial. The first 2 chapers are nice but if you into template there are other books much better then this (and this book don't intend to teach you about it anyway). The smart pointer is also more of a techenics that you may consider - if you want good staff about it then go to boost.org . There are better code about this staff and others anyway. Anther problem is that he seem to come from the windows world and so Loki would not work on any other platfrom without you writing the code to port it - Anyway is design of multithreading is anther shortcoming. This book is good mainly - like the design pattern book - for some insites and idias, other then that the book is of very limiting use in the real world as it trys to solve problems that he cannot solve (unless you design your code around it and not the other way around). I have to say that when I first read the book is seem like its something great and new, but once I read more into this subject in other books and on the internet I found that its not that greate as it seem from the first impartation. Last point is that its coding style seem very poor (At least to me). It reminded me the way I used to write when I first started to program (using pSomething to point that the variable is a pointer..) He should have uses style similer to what is commenly used in other books (like the C++ programming laguage book). If you into design then Multi-Paradigm Design for C++ is better, and if you into template then "C++ templates" is much better.

Rating: 4 stars
Summary: template pathology
Review: Read this book and you may feel you've fallen down the hole into some sort of C++ Alice-in-Wonderland:

"Isn't it nifty just how much you can do with functions... that not only don't do anything but don't even really exist at all?" p.36

The title is a bit presumptuous; a more accurate title would be "Template Metaprogramming Stunts", since this book is primarily about tricks you can play with C++'s template mechanism.

The author does also make a go at proposing a new concept of "policy-based class design" -- by which he means using templates intead of multiple inheritance to create combinatorial mixtures of behavior. This is interesting, but seems hard to apply beyond the cliches he considers (ex: smart pointers), so his argument reads like a well-intended but parochial graduate thesis, with dutiful gestures of respect to his mentors (ex: Scot Myers) and limited range of real-world application.

The real meat of the book is his template techniques, which are ingenious -- if perverse, when seen from the standpoint of someone else trying to read and extend your code, or diagnose its arcane compiler errors. If you've ever had to work with other people on software, you may find his glib view of compiler errors disappointing. In many cases he relies on compiler errors to signal something more complex and semantic than the mere error would suggest. (If you're programmed much C++ you've surely experienced 10-line long STL template errors with a very simple underlying cause that is hard to discern from the error message. Learning to suss out what these mean is much of the sweat-work of learning C++.) I think this is simply that he's coming from the perspective that the interworkings of the language and the compiler are fascinating, and worth being a primary focus of study. But from the perspective of someone just tried to get your work done in the problem domain at hand, you may resent this attitude.

This book is best approached if you think C++ is really neat. Wheter you love C++ for its roccoco intricacy, or just see it as an evolutionary leaf node language full of botched misfeatures, you will find much here to confirm your opinion. I don't mean to belittle this book. There is real insight here: the idea of computing on types instead of values (to store the results of template-based computations) is a nifty idea. But it's worth keeping an eye on what problems you are really trying to solve, and which ones you may be creating.

Some telling quotes:

"Unfortunately, type_info's useful capabilities are packaged in a way that makes them unnecessarily hard to exploit." p.38

"For a variety of reasons, C++ is a language that leads its users sometimes to say, 'These are the smartest five lines of code I ever wrote.' Maybe it is its semantic richness or the ever-exciting (and surprising?) way its features interact." p.51

Rating: 5 stars
Summary: Excellent
Review: Being a C++ programmer of 10+ years, I thought I was very proficient. This book has thought me to rethink my thought processes when it comes to design and implementation (not just through C++).
If you're a novice C++ programmer, this book isn't for you. The delicacies and intricacies therein both challenge and delight!

Rating: 5 stars
Summary: Template to the extreme.
Review: The book open up the many possibility of C++ template, if you can read this book, you can read BOOST. Only the author commented the standard memory allocation routine is not very accurate, taking the fact that CRT is very easy to improve by overriding.

Rating: 5 stars
Summary: A very good book on C++ template
Review: I strongly recommend this book to all C/C++ developer, regardless you are working on Windows, UNIX, LINUX or RTOS. While the subject is titled C++ template, it actually emphasize the important of software design, really explain and demonstrate how design pattern could affect the quality of a software project.

The only subject I think is not right is the comment made on C memory management. Not only such routine is differ from platform to platform, it has proven itself over the last 10 years. What to know more, get a copy of the book!


<< 1 2 3 4 .. 6 >>

© 2004, ReviewFocus or its affiliates