• Complain

Yehonathan Sharvit - Data-Oriented Programming: Reduce software complexity

Here you can read online Yehonathan Sharvit - Data-Oriented Programming: Reduce software complexity full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2022, publisher: Manning Publications Co., genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Yehonathan Sharvit Data-Oriented Programming: Reduce software complexity
  • Book:
    Data-Oriented Programming: Reduce software complexity
  • Author:
  • Publisher:
    Manning Publications Co.
  • Genre:
  • Year:
    2022
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Data-Oriented Programming: Reduce software complexity: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Data-Oriented Programming: Reduce software complexity" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Eliminate the unavoidable complexity of object-oriented designs. Using the persistent data structures built into most modern programming languages, Data-oriented programming cleanly separates code and data, which simplifies state management and eases concurrency.Data-Oriented Programming teaches you to design and implement software using the data-oriented programming paradigm. In it, youll learn author Yehonathan Sharvits unique approach to DOP that he has developed over a decade of experience.Every chapter contains a new light bulb moment that will change the way you think about programming. As you read, youll build a library management system using the DOP paradigm. Youll design data models for business entities, manipulate immutable data collections, and write unit tests for data-oriented systems.

Yehonathan Sharvit: author's other books


Who wrote Data-Oriented Programming: Reduce software complexity? Find out the surname, the name of the author of the book and a list of all author's works by series.

Data-Oriented Programming: Reduce software complexity — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Data-Oriented Programming: Reduce software complexity" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
inside front cover

Yehonathan Sharvit has over 20 years of experience as a software engineer - photo 5

Principles of data-oriented programming

Yehonathan Sharvit has over 20 years of experience as a software engineer - photo 6

Data-Oriented Programming

Reduce software complexity

Yehonathan Sharvit

Forewords by Michael T. Nygard and Ryan Singer

To comment go to liveBook

Yehonathan Sharvit has over 20 years of experience as a software engineer - photo 7

Manning

Shelter Island

For more information on this and other Manning titles go to

www.manning.com

Copyright

For online information and ordering of these and other Manning books, please visit www.manning.com. The publisher offers discounts on these books 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: orders@manning.com

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 Mannings 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.

Yehonathan Sharvit has over 20 years of experience as a software engineer - photo 8

Manning Publications Co.

20 Baldwin Road Technical

PO Box 761

Shelter Island, NY 11964

Development editor:

Elesha Hyde

Technical development editor:

Marius Butuc

Review editor:

Aleksandar Dragosavljevi

Production editor:

Andy Marinkovich

Copy editor:

Frances Buran

Proofreader:

Keri Hales

Technical proofreader:

Karsten Strbaek

Typesetter:

Dennis Dalinnik

Cover designer:

Marija Tudor

ISBN: 9781617298578

dedication

To Karine, who supports my dysfunctionalities on a daily basis.

front matter
forewords

Every programming principle, every design method, every architecture style, and even most language features are about organizing complexity while allowing adaptation. Two characteristicsimmutable data and turning parts of the program into data inside the program itselfdrew me to Clojure in 2009 and more recently to Yehonathan Sharvits Data-Oriented Programming.

In 2005, I worked on one of my favorite projects with some of my favorite people. It was a Java project, but we did two things that were not common practice in the Java world at that time. First, we made our core data values immutable. It wasnt easy but it worked extraordinarily well. We hand-rolled clone and deepClone methods in many classes. The payoff was huge. Just as one example, suppose you need template documents for users to instantiate. When you can make copies of entire object trees, the objects themselves dont need to know whether they are template data or instance data. That decision is up to whatever object holds the reference. Another big benefit came from comparison: when values are immutable, equality of identity indicates equality of value. This can make for very fast equality checks.

Our second technique was to take advantage of generic datathough not to the extent Yehonathan will show you in this book. Where one layer had a hierarchy of classes, its adjoining layer would represent those as instances of a more general class. What would be a member variable in one layer would be described by a field in a map in another layer. I am certain this style was influenced by the several small talkers on our team. It also paid off immediately, as we were able to compose and recompose objects in different configurations.

Data-oriented programming, as you will see, promises to reduce accidental complexity, and raise the level of abstraction you work at. You will start to see repeated behavior in your programs as artificial, a result of carving generic functions into classes, which act like little namespaces that operate only on a subset of your programs values (their instances). We can fold together almost all of those values into maps and lists. We can turn member names (data available only with difficulty via reflective APIs) into map keys. As we do that, code simply melts away. This is the first level of enlightenment.

At this point, you might object that the compiler uses those member names at compile time for correctness checking. Indeed it does. But have faith, for Yehonathan will guide you to the next level of enlightenment: that those compile-time checks are a small subset of possible correctness checks on values. We can make the correctness checks themselves into data, too! We can make schemas into values inside our programs. Whats more, we can enforce criteria that researchers on the forefront of type systems are still trying to figure out. This is the second level of enlightenment.

Data-oriented programming especially shines when working with web APIs. There is no type of system on the wire, so attempting to map a request payload directly into a domain class guarantees a brittle, complex implementation. If we let data be data, we get simpler code and far fewer dependencies on hundred-megabyte framework libraries.

So, whatever happened to the OOP virtues of encapsulation, inheritance, and polymorphism? It turns out we can decomplect these and get each of them la carte. (In my opinion, inheritance of implementations is the least important of these, even though it is often the first one taught. I now prefer inheritance of interfaces via protocols and shared function signatures.) Data-oriented programming offers polymorphism of the traditional kind: dispatch to one of many functions based on the type of the first argument (in an OO language, this is a disguise for the methods first argument. It just happens it goes before the .). However, as with schema checking, DOP allows more dynamism. Imagine dispatching based on the types of the first two arguments. Or based on whether the argument has a birthday field with todays date in it! This is the third level of enlightenment.

And as for encapsulation, we must still apply it to the organizing logic of our program. We encapsulate subsystems, not values. This encapsulation embodies the decision-hiding of David Parnas. Inside a subsystem, we can stop walling off our data into the disjointed namespaces that classes impose. In the words of Alan Perlis, It is better to have one hundred functions operate on one data structure than ten functions on ten data structures.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Data-Oriented Programming: Reduce software complexity»

Look at similar books to Data-Oriented Programming: Reduce software complexity. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Data-Oriented Programming: Reduce software complexity»

Discussion, reviews of the book Data-Oriented Programming: Reduce software complexity and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.