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

4,23 valoración promedio
( 673 valoraciones por Goodreads )
 
9780201704310: Modern C++ Design: Generic Programming and Design Patterns Applied

In Modern C++ Design , Andrei Alexandrescu opens new vistas for C++ programmers. Displaying extraordinary creativity and programming virtuosity, Alexandrescu offers a cutting-edge approach to design that unites design patterns, generic programming, and C++, enabling programmers to achieve expressive, flexible, and highly reusable code.

 

This book introduces the concept of generic components—reusable design templates that produce boilerplate code for compiler consumption—all within C++. Generic components enable an easier and more seamless transition from design to application code, generate code that better expresses the original design intention, and support the reuse of design structures with minimal recoding.

 

The author describes the specific C++ techniques and features that are used in building generic components and goes on to implement industrial strength generic components for real-world applications. Recurring issues that C++ developers face in their day-to-day activity are discussed in depth and implemented in a generic way. These include:

  • Policy-based design for flexibility
  • Partial template specialization
  • Typelists—powerful type manipulation structures
  • Patterns such as Visitor, Singleton, Command, and Factories
  • Multi-method engines

For each generic component, the book presents the fundamental problems and design options, and finally implements a generic solution.

 

In addition, an accompanying Web site, http://www.awl.com/cseng/titles/0-201-70431-5, makes the code implementations available for the generic components in the book and provides a free, downloadable C++ library, called Loki, created by the author. Loki provides out-of-the-box functionality for virtually any C++ project.

 

Get a value-added service! Try out all the examples from this book at www.codesaw.com. CodeSaw is a free online learning tool that allows you to experiment with live code from your book right in your browser.

"Sinopsis" puede pertenecer a otra edición de este libro.

From the Inside Flap:

You might be holding this book in a bookstore, asking yourself whether you should buy it. Or maybe you are in your employers library, wondering whether you should invest time in reading it. I know you dont have time, so Ill cut to the chase. If you have ever asked yourself how to write higher-level programs in C++, how to cope with the avalanche of irrelevant details that plague even the cleanest design, or how to build reusable components that you dont have to hack into each time you take them to your next application, then this book is for you.

Imagine the following scenario. You come from a design meeting with a couple of printed diagrams, scribbled with your annotations. Okay, the event type passed between these objects is not char anymore; its int. You change one line of code. The smart pointers to Widget are too slow; they should go unchecked. You change one line of code. The object factory needs to support the new Gadget class just added by another department. You change one line of code.

You changed the design. Compile. Link. Done.

Well, there is something wrong with this scenario, isnt there? A much more likely scenario is this: You come from the meeting in a hurry because you have a pile of work to do. You fire a global search. You perform surgery on code. You add code. You introduce bugs. You remove the bugs . . . thats the way a programmers job is, right? Although this book cannot possibly promise you the first scenario, it is nonetheless a resolute step in that direction. It tries to present C++ as a newly discovered language for software architects.

Traditionally, code is the most detailed and intricate aspect of a software system. Historically, in spite of various levels of language support for design methodologies (such as object orientation), a significant gap persisted between the blueprints of a program and its code because the code must take care of the ultimate details of the implementation and of many ancillary tasks. The intent of the design is, more often than not, dissolved in a sea of quirks.

This book presents a collection of reusable design artifacts, called generic components, together with the techniques that make them possible. These generic components bring their users the well-known benefits of libraries, but in the broader space of system architecture. The coding techniques and the implementations provided focus on tasks and issues that traditionally fall in the area of design, activities usually done before coding. Because of their high level, generic components make it possible to map intricate architectures to code in unusually expressive, terse, and easy-to-maintain ways.

Three elements are reunited here: design patterns, generic programming, and C++. These elements are combined to achieve a very high rate of reuse, both horizontally and vertically. On the horizontal dimension, a small amount of library code implements a combinatorialand essentially open-endednumber of structures and behaviors. On the vertical dimension, the generality of these components makes them applicable to a vast range of programs.

This book owes much to design patterns, powerful solutions to ever-recurring problems in object-oriented development. Design patterns are distilled pieces of good designrecipes for sound, reusable solutions to problems that can be encountered in manycontexts. Design patterns concentrate on providing a suggestive lexicon for designs to be conveyed. They describe the problem, a time-proven solution with its variants, and the consequences of choosing each variant of that solution. Design patterns go above and beyond anything a programming language, no matter how advanced, could possibly express. By following and combining certain design patterns, the components presented in this book tend to address a large category of concrete problems.

Generic programming is a paradigm that focuses on abstracting types to a narrow collection of functional requirements and on implementing algorithms in terms of these requirements. Because algorithms define a strict and narrow interface to the types they operate on, the same algorithm can be used against a wide collection of types. The implementations in this book use generic programming techniques to achieve a minimal commitment to specificity, extraordinary terseness, and efficiency that rivals carefully handcrafted code.

C++ is the only implementation tool used in this book. You will not find in this book code that implements nifty windowing systems, complex networking libraries, or clever logging mechanisms. Instead, you will find the fundamental components that make it easy to implement all of the above, and much more. C++ has the breadth necessary to make this possible. Its underlying C memory model ensures raw performance, its support for polymorphism enables object-oriented techniques, and its templates unleash an incredible code generation machine. Templates pervade all the code in the book because they allow close cooperation between the user and the library. The user of the library literally controls he way code is generated, in ways constrained by the library. The role of a generic component library is to allow user-specified types and behaviors to be combined with generic components in a sound design. Because of the static nature of the technique used, errors in mixing and matching the appropriate pieces are usually caught during compile time.

This books manifest intent is to create generic componentspreimplemented pieces of design whose main characteristics are flexibility, versatility, and ease of use. Generic components do not form a framework. In fact, their approach is complementarywhereas a framework defines interdependent classes to foster a specific object model, generic components are lightweight design artifacts that are independent of each other, yet can be mixed and matched freely. They can be of great help in implementing frameworks.

Audience

The intended audience of this book falls into two main categories. The first category is that of experienced C++ programmers who want to master the most modern library writing techniques. The book presents new, powerful C++ idioms that have surprising capabilities, some of which werent even thought possible. These idioms are of great help in writing high-level libraries. Intermediate C++ programmers who want to go a step further will certainly find the book useful, too, especially if they invest a bit of perseverance. Although pretty hard-core C++ code is sometimes presented, it is thoroughly explained.

The second category consists of busy programmers who need to get the job done without undergoing a steep learning investment. They can skim the most intricate details of implementation and concentrate on using the provided library. Each chapter has an introductory explanation and ends with a Quick Facts section. Programmers will find these features a useful reference in understanding and using the components. The components can be understood in isolation, are very powerful yet safe, and are a joy to use.

You need to have a solid working experience with C++ and, above all, the desire to learn more. A degree of familiarity with templates and the Standard Template Library (STL) is desirable.

Having an acquaintance with design patterns (Gamma et al. 1995) is recommended but not mandatory. The patterns and idioms applied in the book are described in detail. However, this book is not a pattern bookit does not attempt to treat patterns in full generality. Because patterns are presented from the pragmatic standpoint of a library writer, even readers interested mostly in patterns may find the perspective refreshing, if constrained.

Loki

The book describes an actual C++ library called Loki. Loki is the god of wit and mischief in Norse mythology, and the authors hope is that the librarys originality and flexibility will remind readers of the playful Norse god. All the elements of the library live in the namespace Loki. The namespace is not mentioned in the coding examples because it would have unnecessarily increased indentation and the size of the examples. Loki is freely available; you can download it from awl/cseng/titles/0-201-70431-5.

Except for its threading part, Loki is written exclusively in standard C++. This, alas, means that many current compilers cannot cope with parts of it. I implemented and tested Loki using Metrowerks CodeWarrior Pro 6.0 and Comeau C++ 4.2.38, both on Windows. It is likely that KAI C++ wouldnt have any problem with the code, either. As vendors release new, better compiler versions, you will be able to exploit everything Loki has to offer.

Lokis code and the code samples presented throughout the book use a popular coding standard originated by Herb Sutter. Im sure you will pick it up easily. In a nutshell,

Classes, functions, and enumerated types look LikeThis.

Variables and enumerated values look likeThis.

Member variables look likeThis_.

Template parameters are declared with class if they can be only a user-defined type, and with typename if they can also be a primitive type.

From the Back Cover:

Modern C++ Design is an important book. Fundamentally, it demonstrates ‘generic patterns’ or ‘pattern templates’ as a powerful new way of creating extensible designs in C++–a new way to combine templates and patterns that you may never have dreamt was possible, but is. If your work involves C++ design and coding, you should read this book. Highly recommended.
–Herb Sutter

What’s left to say about C++ that hasn’t already been said? Plenty, it turns out.
–From the Foreword by John Vlissides

In Modern C++ Design, Andrei Alexandrescu opens new vistas for C++ programmers. Displaying extraordinary creativity and programming virtuosity, Alexandrescu offers a cutting-edge approach to design that unites design patterns, generic programming, and C++, enabling programmers to achieve expressive, flexible, and highly reusable code.

This book introduces the concept of generic components–reusable design templates that produce boilerplate code for compiler consumption–all within C++. Generic components enable an easier and more seamless transition from design to application code, generate code that better expresses the original design intention, and support the reuse of design structures with minimal recoding.

The author describes the specific C++ techniques and features that are used in building generic components and goes on to implement industrial strength generic components for real-world applications. Recurring issues that C++ developers face in their day-to-day activity are discussed in depth and implemented in a generic way. These include:

  • Policy-based design for flexibility
  • Partial template specialization
  • Typelists–powerful type manipulation structures
  • Patterns such as Visitor, Singleton, Command, and Factories
  • Multi-method engines

For each generic component, the book presents the fundamental problems and design options, and finally implements a generic solution.

In addition, an accompanying Web site, http://www.awl.com/cseng/titles/0-201-70431-5, makes the code implementations available for the generic components in the book and provides a free, downloadable C++ library, called Loki, created by the author. Loki provides out-of-the-box functionality for virtually any C++ project.

Get a value-added service! Try out all the examples from this book at www.codesaw.com. CodeSaw is a free online learning tool that allows you to experiment with live code from your book right in your browser.



0201704315B11102003

"Sobre este título" puede pertenecer a otra edición de este libro.

Los mejores resultados en AbeBooks

Edición internacional
Edición internacional

1.

Andrei Alexandrescu
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos Paperback Cantidad: 12
Edición internacional
Librería
Bookstore99
(Wilmington, DE, Estados Unidos de America)
Valoración
[?]

Descripción Paperback. Estado de conservación: NEW. This is an International Edition. Brand New Paperback- Same Title Author and Edition as listed. ISBN and Cover design differs. Similar Contents as U.S Edition. Delivery within 3-7 business days ACROSS THE GLOBE. We can ship to PO Box address in US. International Edition Textbooks may bear a label "Not for sale in the U.S. or Canada" or "For sale in Asia only" or similar restrictions- printed only to discourage students from obtaining an affordable copy. US Court has asserted your right to buy and use International edition. Access code/CD may not provided with these editions. We may ship the books from multiple warehouses across the globe including Asia depending upon the availability of inventory. Printed in English. Customer satisfaction guaranteed. Choose expedited shipping for Express delivery. Tracking number provided for every order. Nº de ref. de la librería RU_9780201704310

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 10,06
Convertir moneda

Añadir al carrito

Gastos de envío: EUR 2,53
A Estados Unidos de America
Destinos, gastos y plazos de envío
Edición internacional
Edición internacional

2.

Alexandrescu, Andrei
Editorial: Addison-Wesley Professional
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos Tapa blanda Cantidad: 4
Edición internacional
Librería
Sunshine Book Store
(Wilmington, DE, Estados Unidos de America)
Valoración
[?]

Descripción Addison-Wesley Professional. Estado de conservación: New. 0201704315 This is an International Edition. Brand New, Paperback, Delivery within 6-14 business days, Similar Contents as U.S Edition, ISBN and Cover design may differ, printed in Black & White. Choose Expedited shipping for delivery within 3-8 business days. We do not ship to PO Box, APO , FPO Address. In some instances, subjects such as Management, Accounting, Finance may have different end chapter case studies and exercises. International Edition Textbooks may bear a label "Not for sale in the U.S. or Canada" and "Content may different from U.S. Edition" - printed only to discourage U.S. students from obtaining an affordable copy. The U.S. Supreme Court has asserted your right to purchase international editions, and ruled on this issue. Access code/CD is not provided with these editions , unless specified. We may ship the books from multiple warehouses across the globe, including India depending upon the availability of inventory storage. Customer satisfaction guaranteed. Nº de ref. de la librería HU_9780201704310

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 12,73
Convertir moneda

Añadir al carrito

Gastos de envío: GRATIS
A Estados Unidos de America
Destinos, gastos y plazos de envío
Edición internacional
Edición internacional

3.

Alexandrescu, Andrei
Editorial: Addison-Wesley Professional
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos PAPERBACK Cantidad: 10
Edición internacional
Librería
WFL
(Holtsville, NY, Estados Unidos de America)
Valoración
[?]

Descripción Addison-Wesley Professional. PAPERBACK. Estado de conservación: New. 0201704315 New ,International edition , softcover ,Same text as US edition , ISBN /Cover may be different , Ready to ship, 5-8 business days worldwide delivery. Nº de ref. de la librería INFFGK452

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 10,20
Convertir moneda

Añadir al carrito

Gastos de envío: EUR 3,90
A Estados Unidos de America
Destinos, gastos y plazos de envío
Edición internacional
Edición internacional

4.

Andrei Alexandrescu
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos Paperback Cantidad: 2
Edición internacional
Librería
US_Superfast_Bookstore
(New Castle, DE, Estados Unidos de America)
Valoración
[?]

Descripción Paperback. Estado de conservación: New. This is an International Edition. Brand New Paperback- Same Title Author and Edition as listed. ISBN and Cover design differs. Similar Contents as U.S Edition. Delivery within 3-7 business days ACROSS THE GLOBE. We can ship to PO Box address in US. International Edition Textbooks may bear a label "Not for sale in the U.S. or Canada" or "For sale in Asia only" or similar restrictions- printed only to discourage students from obtaining an affordable copy. US Court has asserted your right to buy and use International edition. Access code/CD may not provided with these editions. We may ship the books from multiple warehouses across the globe including Asia depending upon the availability of inventory. Printed in English. Customer satisfaction guaranteed. Nº de ref. de la librería U_9780201704310

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 12,55
Convertir moneda

Añadir al carrito

Gastos de envío: EUR 2,53
A Estados Unidos de America
Destinos, gastos y plazos de envío
Edición internacional
Edición internacional

5.

Alexandrescu, Andrei
Editorial: Addison-Wesley Professional
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos PAPERBACK Cantidad: 5
Edición internacional
Librería
Book Arsenal
(Delhi, DELHI, India)
Valoración
[?]

Descripción Addison-Wesley Professional. PAPERBACK. Estado de conservación: New. 0201704315 We ship from India. PAPERBACK INTERNATIONAL EDITION Brand New Copy. The ISBN-13 or Cover might be different but content is extactly same. We deliver in 5 - 9 days and actively resolve customer issues. Nº de ref. de la librería 0201704315-ABAB

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 15,46
Convertir moneda

Añadir al carrito

Gastos de envío: GRATIS
De India a Estados Unidos de America
Destinos, gastos y plazos de envío
Edición internacional
Edición internacional

6.

Andrei Alexandrescu
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos Softcover Primera edición Cantidad: > 20
Edición internacional
Librería
LowPriceBookDeals
(Wilmington, DE, Estados Unidos de America)
Valoración
[?]

Descripción Softcover. Estado de conservación: New. 1st edition. Brand NEW, Paperback International Edition. Black & White or color, Cover and ISBN may be different but similar contents as US editions. Standard delivery takes 5-9 business days by USPS with tracking number. Choose expedited shipping for superfast delivery 2-4 business days by DHL/FEDEX. We also ship to PO Box addresses but by Standard delivery. International Edition Textbooks may bear a label -Not for sale in the U.S. or Canada- etc. printed only to discourage U.S. students from obtaining an affordable copy. Legal to use despite any disclaimer on cover as per US court. No access code or CD included unless specified. In some instances, the international textbooks may have different exercises at the end of the chapters. Printed in English. We may ship the books from multiple warehouses across the globe, including India depending upon the availability of inventory storage. 100% Customer satisfaction guaranteed! Please feel free to contact us for any queries. Nº de ref. de la librería LPBD31424811

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 12,67
Convertir moneda

Añadir al carrito

Gastos de envío: EUR 3,35
A Estados Unidos de America
Destinos, gastos y plazos de envío
Edición internacional
Edición internacional

7.

Andrei Alexandrescu
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos Tapa blanda Cantidad: 10
Edición internacional
Librería
bookscollection
(Delhi, DELHI, India)
Valoración
[?]

Descripción Estado de conservación: Brand New. PAPERBACK,Book Condition New, International Edition. We Do not Ship APO FPO AND PO BOX. Cover Image & ISBN may be different from US edition but contents as US Edition. Printing in English language.NO CD AND ACCESS CODE. Quick delivery by USPS/UPS/DHL/FEDEX/ARAMEX ,Customer satisfaction guaranteed. We may ship the books from Asian regions for inventory purpose. Nº de ref. de la librería ABEADH*##5716

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 14,28
Convertir moneda

Añadir al carrito

Gastos de envío: EUR 3,50
De India a Estados Unidos de America
Destinos, gastos y plazos de envío
Edición internacional
Edición internacional

8.

Andrei Alexandrescu
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos Soft cover Primera edición Cantidad: > 20
Edición internacional
Librería
LOW COST_FAST SHIP
(Scottsdale, AZ, Estados Unidos de America)
Valoración
[?]

Descripción Soft cover. Estado de conservación: New. NEW - International Edition - ISBN 9788131711156 - Same Contents as in US edition - in english - 1ed - - SHRINKwrapped BOXpacked - Printed in Asia - Cover image is different from US edition - There is no CD or Access Code, unless specified above - Ships from various locations - Expedited 2 to 4 day Delivery option available -Standard shipping takes 5 to 10 business days - Tracking number is emailed for every order -You get same study contents at a fraction of US edition cost - Save Hard earned money. Nº de ref. de la librería GQ9

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 13,01
Convertir moneda

Añadir al carrito

Gastos de envío: EUR 5,08
A Estados Unidos de America
Destinos, gastos y plazos de envío
Edición internacional
Edición internacional

9.

International Edition
Editorial: International Edition
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos Paperback Cantidad: 1
Edición internacional
Librería
Campustexxts
(Vicksburg, MI, Estados Unidos de America)
Valoración
[?]

Descripción International Edition. Paperback. Estado de conservación: New. International Edition. Very fast shipping. Receive your book in 2-7 business days if you checkout with expedited shipping. We take pride in our customer service, please contact us if you have any questions regarding the listing. Nº de ref. de la librería in-us-9780201704310

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 16,31
Convertir moneda

Añadir al carrito

Gastos de envío: EUR 2,97
A Estados Unidos de America
Destinos, gastos y plazos de envío
Edición internacional
Edición internacional

10.

Andrei Alexandrescu
ISBN 10: 0201704315 ISBN 13: 9780201704310
Nuevos Softcover Cantidad: 20
Edición internacional
Librería
Unique Bookseller
(Delhi, India)
Valoración
[?]

Descripción Softcover. Estado de conservación: Brand New. .. Black & White or color International Edition. ISBN and front cover may be different, but contents are same as the US edition. Book printed in English. Territorial restrictions may be printed on the book. GET IT FAST within 3-5 business days by DHL/FedEx/Aramex and tracking number will be uploaded into your order page within 24-48 hours. Kindly provide day time phone number in order to ensure smooth delivery. No shipping to PO BOX, APO, FPO addresses. 100% Customer satisfaction guaranteed!. . Nº de ref. de la librería UBS03722

Más información sobre esta librería | Hacer una pregunta a la librería

Comprar nuevo
EUR 20,48
Convertir moneda

Añadir al carrito

Gastos de envío: GRATIS
De India a Estados Unidos de America
Destinos, gastos y plazos de envío

Existen otras copia(s) de este libro

Ver todos los resultados de su búsqueda