Wilson Greg - Software Design By Example. A Tool-Based Introduction With JavaScript.pdf

(16218 KB) Pobierz
Software Design by Example
The best way to learn design in any field is to study examples, and some of the best examples
of software design come from the tools programmers use in their own work.
Software De-
sign by Example: A Tool-Based Introduction with JavaScript
therefore builds small ver-
sions of the things programmers use in order to demystify them and give some insights into
how experienced programmers think. From a file backup system and a testing framework to
a regular expression matcher, a browser layout engine, and a very small compiler, we explore
common design patterns, show how making code easier to test also makes it easier to re-
use, and help readers understand how debuggers, profilers, package managers, and version
control systems work so that they can use them more effectively.
This material can be used for self-paced study, in an undergraduate course on software
design, or as the core of an intensive weeklong workshop for working programmers. Each
chapter has a set of exercises ranging in size and difficulty from half a dozen lines to a full
day’s work. Readers should be familiar with the basics of modern JavaScript, but the more
advanced features of the language are explained and illustrated as they are introduced.
All the written material in this project can be freely reused under the terms of the Creative
Commons - Attribution license, while all of the software is made available under the terms
of the Hippocratic License. All proceeds from sale of this book will go to support the Red
Door Family Shelter in Toronto.
Features
•  
eaches software design by showing programmers how to build the tools they use every
T
day
Each chapter includes exercises to help readers check and deepen their understanding
All the example code can be downloaded, re-used, and modified under an open license
Greg Wilson
has worked in industry and academia for 35 years, and is the author, co-
author, or editor of several books, including
Beautiful Code, The Architecture of Open
Source Applications, JavaScript for Data Science, Teaching Tech Together,
and
Research
Software Engineering with Python.
He is the co-founder and first executive director of
Software Carpentry and received ACM SIGSOFT’s Influential Educator Award in 2020.
Taylor & Francis
Taylor
&
Francis Group
http://taylorandfrancis.com
A Tool-Based Introduction with JavaScript
Software Design by Example
Greg Wilson
First edition published 2023
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
and by CRC Press
4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN
© 2023 Greg Wilson
CRC Press is an imprint of Taylor & Francis Group, LLC
Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot as-
sume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have
attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders
if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please
write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or
utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including pho-
tocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission
from the publishers.
For permission to photocopy or use material electronically from this work, access
www.copyright.com
or contact the
Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. For works that are
not available on CCC please contact
mpkbookspermissions@tandf.co.uk
Trademark notice:
Product or corporate names may be trademarks or registered trademarks and are used only for
identification and explanation without intent to infringe.
Library of Congress Cataloging-in-Publication Data
Names: Wilson, Greg, 1963- author.
Title: Software design by example : a tool-based introduction with
JavaScript / Greg Wilson.
Description: First edition. | Boca Raton : C&H/CRC Press, 2023. | Includes
bibliographical references and index.
Identifiers: LCCN 2022030475 (print) | LCCN 2022030476 (ebook) | ISBN
9781032399676 (hardback) | ISBN 9781032330235 (paperback) | ISBN
9781003317807 (ebook)
Subjects: LCSH: Software patterns. | Software architecture. | JavaScript
(Compuer program language)
Classification: LCC QA76.76.P37 W55 2023 (print) | LCC QA76.76.P37
(ebook) | DDC 005.13/267--dc23/eng/20220906
LC record available at
https://lccn.loc.gov/2022030475
LC ebook record available at
https://lccn.loc.gov/2022030476
ISBN: 978-1-032-39967-6 (hbk)
ISBN: 978-1-032-33023-5 (pbk)
ISBN: 978-1-003-31780-7 (ebk)
DOI:
10.1201/9781003317807
Typeset in SFRM
by KnowledgeWorks Global Ltd.
Publisher’s note:
This book has been prepared from camera-ready copy provided by the authors.
Zgłoś jeśli naruszono regulamin