ebook img

Data-Oriented Programming: Reduce complexity by rethinking data PDF

426 Pages·2022·7.137 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Data-Oriented Programming: Reduce complexity by rethinking data

Reduce software complexity Yehonathan Sharvit Forewords by Michael T. Nygard and Ryan Singer M A N N I N G Principles of data-oriented programming Principle #2: Represent Immutable data with generic data structures. Generic Mutable Representation Principle #3: Specific Data is Data immutable. Schema Principle #4: Separate data schema from data Data-oriented representation. programming Functional Code programming Principle #1: Separate code from data. Object-oriented programming Data-Oriented Programming Data-Oriented Programming REDUCE SOFTWARE COMPLEXITY YEHONATHAN SHARVIT Forewords by MICHAEL T. NYGARD and RYAN SINGER MANNING SHELTER ISLAND For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 761 Shelter Island, NY 11964 Email: [email protected] ©2022 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine. The author and publisher have made every effort to ensure that the information in this book was correct at press time. The author and publisher do not assume and hereby disclaim any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from negligence, accident, or any other cause, or from any usage of the information herein. Manning Publications Co. Development editor: Elesha Hyde 20 Baldwin Road Technical development editor: Marius Butuc PO Box 761 Review editors: Aleksandar Dragosavljevic´ Shelter Island, NY 11964 Production editor: Andy Marinkovich Copy editor: Frances Buran Proofreader: Keri Hales Technical proofreader: Karsten Strøbaek Typesetter: Dennis Dalinnik Cover designer: Marija Tudor ISBN: 9781617298578 Printed in the United States of America To Karine, who supports my dysfunctionalities on a daily basis. brief contents PART 1 FLEXIBILITY..................................................................1 1 ■ Complexity of object-orientedprogramming 3 2 ■ Separation between code and data 26 3 ■ Basic data manipulation 43 4 ■ State management 71 5 ■ Basic concurrency control 91 6 ■ Unit tests 110 PART 2 SCALABILITY .............................................................137 7 ■ Basic data validation 141 8 ■ Advanced concurrency control 163 9 ■ Persistent data structures 175 10 ■ Database operations 197 11 ■ Web services 220 vvii BRIEF CONTENTS vii PART 3 MAINTAINABILITY......................................................245 12 ■ Advanced data validation 247 13 ■ Polymorphism 272 14 ■ Advanced data manipulation 295 15 ■ Debugging 311 contents forewords xiii preface xvii acknowledgments xviii about this book xx about the author xxiv about the cover illustration xxv dramatis personae xxvi PART 1 FLEXIBILITY........................................................1 1 Complexity of object-oriented programming 3 1.1 OOP design: Classic or classical? 4 The design phase 4 ■ UML 101 6 ■ Explaining each piece of the class diagram 9 ■ The implementation phase 12 1.2 Sources of complexity 13 Many relations between classes 14 ■ Unpredictable code behavior 16 ■ Not trivial data serialization 18 Complex class hierarchies 20 2 Separation between code and data 26 2.1 The two parts of a DOP system 27 2.2 Data entities 29 viii

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.