Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)

所需积分/C币:10 2017-11-11 21:00:12 3.23MB PDF
收藏 收藏
举报

True PDF Write reliable code to create powerful applications by mastering advanced JavaScript design patterns
Mastering Java Script Design Patterns Second edition Copyright o 2016 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals However, Packt Publishing cannot guarantee the accuracy of this information First published: November 2014 Second published June 2016 Production reference: 1240616 Published by Packt Publishing Ltd Livery place 35 Livery street Birmingham b3 2PB, UK ISBN978-1-78588-216-6 www.packtpub.com [FM2] Credits Author Copy editor Simon Timms Safis Editing Reviewer Project Coordinator Dobrin ganey Ulhas Kambli Commissioning Editor Proofreader Wilson d'souza Safis Editing Acquisition Editor Indexer Tushar Gupta Monica Ajmera mehta Content Development Editor Production coordinator Onkar wani Aparna Bhagat Technical editor Cover Work Dhiraj chandanshive Aparna Bhagat [FM3] About the author Simon Timms is a developer who loves writing code. He writes in a variety of languages and using a number of tools. Mostly, he develops web applications with NET backends. Simon is very interested in visualizations and cloud computing a background in builds and system administration keeps him on the straight and narrow when it comes to DevOps He is the author of Social data Visualization with htmL5 and Javascript, Packt Publishing He blogs on blog. simontimms. com, and he is also a frequent contributor tothewEsternDevs(http://westerndevs.com),whichisaloosecollaborationof developers mostly located in Canada. Twice a week, he participates in a videocast called The asP. Net monsters about the future of asp.net which is one of the most popularseriesonMicrosoftsChannel9videoservice(https://channel9.msdn com/Series/aspnetmonsters Simon is the president of the Calgary Net user group and a member of half a dozen other groups. He speaks on a variety of topics from DevOps to how the telephone system works. He works as a principal software developer for Clear-Measure located in Austin, Texas. He is currently working on a new title about ASP. NET Core I would like to thank my wonderful wife for all her support and my kids for providing a welcome distraction from writing. I would also like to thank the Western Devs for being a constant sounding board for insane ideas [FM4] About the reviewer Dobrin ganev is a software developer with years of experience in various development environments from finance to business process management. In recent years, he has focused on geospatial development and data analytics using languages such as JavaScript, Java, Python, Scala, and R Hle has extensive knowledge about the open source geospatial and the Esri platforms. Currently, he is focused on Big Data, and its applications across broad industries and sectors chorstreamInc.(http://www.chorstream.com/)isasoftwaredevelopmentfirm focused on the use of Big Data and Big Data technologies to help clients work with and leverage large and diverse volumes of data, which was founded in 2015. As a co-founder, Mr Ganev has worked with an accomplished team of professionals to to build custom and focused applications without needing any development skill o create and bring to market an application s framework that end users are able to u He has reviewed the book ArcGIS for JavaScript Developers by example, by Packt Publishing [FM5] Www.Packtpub.com eBooks, discount offers and more Did you know that Packt offers e Book versions of every book published, with PDF andepuBfilesavailableYoucanupgradetotheebookversionatwww.packtpub com and as a print book customer, you are entitled to a discount on the e Book copy Get in touch with us at customercareapacktpub. com for more details Atwww.packtPub.comyoucanalsoreadacollectionoffreetechnicalarticlessign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and ebook PACKILIB https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser [EM-6] Table of contents Preface Chapter 1: Designing for Fun and Profit The road to JavaScript The early days A pause The way of gmail JavaScript everywhere What is a design pattern? 112457923 Anti-patterns Summary Part 1: Classical Design Patterns Chapter 2: Organizing Code 17 Chunks of code 17 What's the matter with global scope anyway? 20 Objects in JavaScript 21 Build me a prototype 25 Inheritance 28 Modules 30 ECMAScript 2015 classes and modules 34 Best practices and troubleshooting 35 Summary 35 Chapter 3: Creational Patterns 37 Abstract factory 38 Implementation 42 Builder 45 Implementation 46 Table of contents Factory method 48 Implementation 49 Singleton 52 Implementation 52 Disadvantages 53 Prototype 54 Implementation 54 Tips and tricks 55 Summary 56 Chapter 4: Structural Patterns Adapter 58 Implementation 59 Bridge 62 Implementation 63 Composite 65 Exampl 66 Implementation 67 Decorator 70 Implementation Facade 72 Implementation 72 flyweight 74 Implementation 75 Prox 76 Implementation 77 Hints and tips Summary 79 Chapter 5: Behavioral Patterns 81 Chain of responsibility 82 Implementation 82 Command 86 Command message 86 Invoker 88 Receiver 89 Interpreter 90 EXample 90 Implementation 91 Iterator 92 Implementation 92 ECMAScript 2015 iterators 94 Table of Contents Mediator 95 Implementation 95 Memento 97 Implementation 98 observer 100 Implementation 101 State 103 Implementation 104 Strategy 106 Implementation 108 Template method 110 Implementation 111 Visitor 113 Hints and tips Summary 18 Part 2: Other Patterns Chapter 6: Functional Programming 121 Functional functions are side-effect-free 122 Function passing 22 Implementation 124 Filters and pipes 126 Implementation 127 Accumulators 129 Implementation 130 Memoization 131 Implementation 131 Immutability 133 Lazy instantiation 135 Implementation 135 Hints and tips 137 Summary Chapter 7: Reactive Programming 139 Application state changes 140 Streams 140 Filtering streams 143 Merging streams 145 Streams for multiplexing 147 Hints and tips 147 Summa 148

...展开详情
试读 127P Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)
立即下载 低至0.43元/次 身份认证VIP会员低至7折
抢沙发
一个资源只可评论一次,评论内容不能少于5个字
  • 分享王者

    成功上传51个资源即可获取
关注 私信 TA的资源
上传资源赚积分,得勋章
最新推荐
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016) 10积分/C币 立即下载
1/127
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第1页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第2页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第3页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第4页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第5页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第6页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第7页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第8页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第9页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第10页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第11页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第12页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第13页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第14页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第15页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第16页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第17页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第18页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第19页
Packt - Mastering JavaScript Design Patterns, 2nd Edition (Jun 2016)第20页

试读结束, 可继续阅读

10积分/C币 立即下载 >