MasteringJavaScript(PACKT,2016)

上传:linzhicheng 浏览: 38 推荐: 0 文件:PDF 大小:2.82MB 上传时间:2019-05-08 03:58:06 版权申诉
JavaScript is a high-level, dynamic, untyped, lightweight, and interpreted programming language. Along with HTML and CSS, it is one of the three essential technologies of World Wide Web content production, and is an open source and cross-platform technology. The majority of websites employ JavaScripMastering JavaScriptCopyright o 2016 Packt PublishingAll rights reserved. No part of this book may be reproduced, stored in a retrievalsystem, or transmitted in any form or by any means, without the prior writtenpermission of the publisher, except in the case of brief quotations embedded incritical articles or reviewsrt has been made in the preparation of this book to ensure the accuracyof the information presented However the information contained in this book issold without warranty, cither express or implied. Neither the author nor PaclPublishing and its dealers and distributors will be held liable for any damagescaused or alleged to be caused directly or indirectly by this bookPackt Publishing has endeavored to provide trademark information about all of thecompanies and products mentioned in this book by the appropriate use of capitalsHowever, Packt Publishing cannot guarantee the accuracy of this informationFirst published January 2016Production reference: 1250116Published by Packt Publishing ltdLivery place35 Livery streetBirmingham b3 2PB UKISBN978-1-78528-134-1www.packtpub.comCreditsProject CoordinatorVed antaniFrancina pintoReviewerProofreaderIvano malayoltaSafis EditingCommissioning EditorIndexerSarah CroftonMonica Aimera mehtaAcquisition EditorProduction coordinatorKevin colacoConidon mirandaContent Development Editor Cover WorkMerint MathewConidon mirandaTechnical editorManthan rajaCopy EditorTasneem fatehAbout the authorVed Antani is an AVP(engineering) at Myntra Before Myntra, he worked withElectronic Arts, NetApp, and Oracle Ved is passionate about programming and hasbeen programming in JavaScript since 2005. He has extensive experience in buildingscalable systems and mobile applications. Ved is a minimalist, a father, and an avidtea drinkerI would like to thank my wife, Meghna, for her support She wasalways there to encourage and help me when i needed it the mostAbout the reviewerIvano malavolta is a postdoctoral researcher at the Gran Sasso Science Institute(LAquila, Italy), and he holds a PhD in computer science from the University ofL'Aquila. His research is positioned in three main fields: software architecture,Model-Driven Engineering(MDE), and mobile-enabled systems. I le is especiallyinterested in investigating how MDE techniques can be exploited for architectingcomplex and mobile-enabled software systems at the right level of abstraction heis the author of more than 40 papers in international journals and peer-reviewedinternational conferences' proceedings; among them he has coauthored twoarticles published in the IEee Transactions on Software Engineering(tSe), which isconsidered the leading journal in the field of software engineering. He is a reviewerfor four international journals, a program committee member of 10 internationalconferences, a reviewer for 13 international conferences, and a guest editor of aninternational journalHe is an instructor of three courses on software engineering, mobile computing, andmobile application development via web technologies; these courses are held at theUniversity of L'Aquila and Gran Sasso Science Institute, ItalyHe has previously reviewed other books about web technologies for packtPublishing, such as Backbone. js Cookbook by Vadim Mirgorod and Backbone. s Blueprintsby Andrew burgessWww.Packtpub.comSupport files, eBooks, discount offersand moreForsupportfilesanddownloadsrelatedtoyourbookpleasevisitwww.packtpub.comDid you know that Packt offers e Book versions of every book published, with PDF andepubfilesavailableYoucanupgradetotheebooKversionatwww.Packtpub.comandis a print book customer, you are entitled to a discount on the eBook copy. Get in touchwith us at serviceapacktpub. com for more detailsAtwww.Packtpub.comyoucanalsoreadacollectionoffreetechnicalarticlessignupfor a range of free newsletters and receive exclusive discounts and offers on packt booksand ebooksJ PACKTLIBhttps://www2.packtpub.ccm/books/subscription/packtlibDo you need instant solutions to your IT questions? PacktLib is Packt's online digitalbook library. Here, you can search, access, and read packt's entire library of booksWhy subscribe?Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentDn demand and accessible via a web browserFree access for packt account holdersIfyouhaveanaccountwithpacktatwww.Packtpub.comyoucanusethistoaccessPacktLib today and view 9 entirely free books Simply use your login credentials forimmediate accessTable of contentsPrefaceChapter 1: JavaScript PrimerA little bit of historyHow to use this bookHello worldAn overview of JavaScript123666ConstantsString11Undefined valuesBooleans13The instanceof operatorDate objects15The operator16The + and-operatorsBoolean operators18EquJavaScript types27Automatic semicolon insertion30JavaScript style guide32WhitespacesParentheses. line breaks and bracesQuotes34End of lines and empty lines34Type checking35Type casting35Conditional evaluationNaming38Table of contentsThe eval method is evilThe strict mode39Running JSHint41Summary43Chapter 2: Functions, Closures, and Modules45A function literal46a function declaration46Functions as data49Scoping50Global scope51ocal scope52Function-level scope versus block-level scope52nline function expressions56Block scopes56Function declarations versus function expressions58The arguments parameter60The this parameter61Invocation as a function61Invocation as a method61Invocation as a constructor63Invocation using apply and callo methods63Anonymous functions64Anonymous functions while creating an object64Anonymous functions while creating a list64Anonymous functions as a parameter to another function65Anonymous functions in conditional logic65Closures66Timers and callbacks69Private variables69Loops and closures70ModulesStylistic considerationsSummary73Chapter 3: Data Structures and Manipulation75Regular expressions76Exact matchMatch from a class of charactersRepeated occurrences81Alternatives-OR84Beginning and end84Table of ContentsBackreferences84Greedy and lazy quantifiers85Arr86Maps95Sets95A matter of style97Summary97Chapter 4: object-Oriented JavaScript99Understanding objects99Behavior of Java Script objects101Prototypes103Instance properties versus prototype properties104Inheritance110Getters and setters117Summary120Chapter 5: JavaScript Patterns121Design patterns122The namespace pattern123The module pattern124ES6 modules131The factory pattern131The mixin pattern133The decorator pattern134The observer pattern137Javascript Model-view-* patterns135Model-View-Controller139Models140Views140Controllers141The Model-view-Presenter pattern141Model-view-View Model142Summary143Chapter 6: Testing and Debugging145Unit testing146Test-driven development147Behavior-driven development147JavaScript debugging154Syntax er154Using strict155
上传资源
用户评论
相关推荐
FlaskByExample PACKT2016
ThisbookwilltakeyouonajourneyfromlearningaboutwebdevelopmentusingFlasktobuildingfullyfunctionalwebap
PDF
0B
2019-05-05 07:21
PuppetforContainerization PACKT2016
ThisbookteachesyouhowtotakeadvantageofthenewbenefitsofcontainerizationsystemssuchasDocker,Kubernetes
pdf
0B
2019-05-13 13:49
ExtendingDocker PACKT2016
WithDocker,itispossibletogetalotofappsrunningonthesameoldservers,makingitveryeasytopackageandshippro
PDF
0B
2019-05-08 03:57
ExtendingSaltStack PACKT2016
Saltalreadyshipswithaverypowerfulsetoftools,butthatdoesn’tmeanthattheyallsuityourneedsperfectly.Byad
PDF
0B
2019-05-08 03:57
SmarterDecisions PACKT2016
WithanincreasingnumberofdevicesgettingconnectedtotheInternet,massiveamountsofdataarebeinggeneratedth
PDF
0B
2019-05-08 03:58
MasteringRabbitMQ PACKT2016
RabbitMQ is one of the most powerful Open Source message broker software, which is widely used in te
PDF
0B
2019-05-08 03:58
LearningProbabilisticGraphicalModelsinR PACKT2016
Probabilisticgraphicalmodels(PGM,alsoknownasgraphicalmodels)areamarriagebetweenprobabilitytheoryandg
pdf
0B
2019-05-08 04:01
UnrealEngineEssentials PACKT2016
UnrealEngine4isacompletesuiteofgamedevelopmenttoolsthatgivesyoupowertodevelopyourgameandseamlesslyde
PDF
0B
2019-04-28 17:44
RaspberryPiComputerArchitectureEssentials PACKT2016
WiththereleaseoftheRaspberryPi2,anewseriesofthepopularcompactcomputerisavailableforyoutobuildcheap,e
PDF
0B
2019-04-28 17:45
ApplePayEssentials PACKT2016
ApplePay,oneofthemosttalkedaboutofferingsofthelatestiOS9release,isadigitalwalletandelectronicpayment
PDF
0B
2019-05-14 21:42
MasteringPostCSSforWebDesign PACKT2016
PostCSS is a tool that has quickly emerged as the future of existing preprocessors such as SASS and
PDF
0B
2019-01-04 09:40
MasteringJavaScript无水印pdf
MasteringJavaScript英文无水印pdfpdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开本资源转载自网络,如有侵权,请联系上传者或csdn删除本
PDF
0B
2019-04-29 12:03
Mastering Git PACKT2016
GitisoneofthemostpopulartypesofSourceCodeManagement(SCM)andDistributedVersionControlSystem(DVCS).Des
PDF
0B
2019-06-22 19:39
Learning Elixir PACKT2016
Elixir,basedonErlang’svirtualmachineandecosystem,makesiteasiertoachievescalability,concurrency,fault
PDF
0B
2019-06-23 03:42
Hacking Android PACKT2016
WiththemassexplosionofAndroidmobilephonesintheworld,mobiledeviceshavebecomeanintegralpartofoureveryd
PDF
0B
2019-06-23 03:42