DEVNET-1444.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

DEVNET-1444.Pdf DEVNET-1444 JavaScript Essentials Stève Sfartz - Developer Experience Manager & API Design Lead at Cisco DevNet /Cisco/DevNet/SteveSfartz • Manager of a WW team of Developer Advocates • IoT, Collab, Cloud, DevOps • Application Developer Use Cases mailto: [email protected] • Technical lead for the Cisco « API Style Guide » github: ObjectIsAdvantag twitter: @SteveSfartz • API veteran, hobbyist coder, hands-On Architect • Contributor to DevNet CodeExchange • Code samples, developer tools, postman collections, “vision without awesome-webex, awesome-xapi… execution is • Based in France, DevNet Europe point of contact hallucination” -- Thomas Edison DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 3 Agenda • About JavaScript • Server-side JavaScript • Front-end JavaScript • Taking JavaScript to the next stage DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 4 Cisco Webex Teams Questions? Use Cisco Webex Teams (formerly Cisco Spark) to chat with the speaker after the session How 1 Find this session in the Cisco Events Mobile App 2 Click “Join the Discussion” 3 Install Webex Teams or go directly to the team space 4 Enter messages/questions in the team space cs.co/ciscolivebot#DEVNET-1444 DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 5 About JavaScript About JavaScript • 1995: created to add dynamic behaviors for Web pages • Built in 10 days for Netscape Navigator 2.0 release • Very simple core API • Lots of flavors (ES5, ES6, coffeescript, flow,typescript) • Large ecosystem (libraries, npm) • Javascript is ubiquitous DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 7 JavaScript is Ubiquitous Web Desktop Mobile Apps Apps Apps DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 8 JavaScript is Ubiquitous Web Desktop Mobile APIs, Proxys CLI Apps Apps Apps DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 9 JavaScript is Ubiquitous Web Desktop Mobile Extensibility APIs, Proxys CLI Apps Apps Apps DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 10 Server-Side Javascript (Node.js) What is Node.js? • Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine (https://v8.dev) • V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. • Runs on Windows 7 or later, MacOS 10.12+, and Linux systems • Can run standalone, or can be embedded into any C++ application. • V8 is used in Chrome and in Node.js. • Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 12 Node.js runtime https://nodejs.org/en/ DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 13 https://www.javascript.com/learn/objects DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 14 NodeSchool https://nodeschool.io DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 15 NodeSchool - javascripting https://github.com/workshopper/javascripting • Learn the basics of the language • npm install --global javascripting DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 16 Building Node.js applications https://code.visualstudio.com/ • VSCODE DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 18 DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 19 NodeSchool https://nodeschool.io DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 20 NodeSchool https://nodeschool.io DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 21 NodeSchool https://nodeschool.io DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 22 Simple HTTP Server DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 23 Webex Teams Bot Architecture . Register webhook events 1. interacts in spaces Webex • Messages / created via a Teams client cloud platform . Memberships / created Webex Teams . As events happen in spaces, User receive notifications from 2. posts notifications to registered Webhooks Webex 3. posts back messages as notifications fly in . Security tips . Select spaces to fire from via Publicly accessible a webhook filter bot endpoint . Check on user’s email domain in your code Your bot code running on-premises or on in the cloud . Check webhook payload signature via a shared secret DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 24 Webex Teams Webhook with Express DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 25 Webex Teams Webhook with Express DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 26 Webex Teams Webhook with Express DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 27 What is takes to code a bot? https://github.com/CiscoDevNet/botkit-template DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 28 Bot skills with Botkit https://github.com/CiscoDevNet/botkit-template/tree/master/skills DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 29 CLI Example https://github.com/ObjectIsAdvantag/webex-guestissuer DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 30 JavaScript is Ubiquitous Use cases for Server-side JavaScript at Cisco Server-side APIs, Proxys CLI Extensibility Webex ChatBots Webex Macros Webex Emulator Web Guest Issuer CLI DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 31 Webex Devices Extensibility DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 32 Button with widget id: DEVWKS-2074 DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 33 CE xAPI mapped to a Webex Room Kit Embed code Pull Listen to data events DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 34 ADD MACRO 1 2 3 4 DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 35 DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 36 Dealing with non-blocking IO What is Node.js? • Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine (https://v8.dev) • V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. • Runs on Windows 7 or later, MacOS 10.12+, and Linux systems • Can run standalone, or can be embedded into any C++ application. • V8 is used in Chrome and in Node.js. • Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 38 Async with Callbacks (ES5) DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 39 Async with Promises (ES6) DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 40 Async with Async (ES8) DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 41 JavaScript Versions JavaScript standard and versions • JavaScript: The commonly used name for implementations of the ECMAScript standard • ECMAScript: A language standardized by ECMA International and overseen by the TC39 committee. • ES5 (ECMAScript 5): 5th edition, standardized in December 2009 • ES6 (ECMAScript 6) - ES2015: 6th edition, standardized in June 2015 • ES7+ : yearly releases • Standardized or scheduled to be standardized • ES7/ES2016 (June 2016), ES8/ES2017 (June 2017), ES9/ES2018 (June 2018) DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 43 ES5 Object/array methods and extensions, strings, dates, JSON, Dec 2009 immutable globals, strict mode ES6 - new syntax for writing complex applications: classes and modules, June 2015 - Python-style generators and generator expressions, arrow functions, binary data, typed arrays, collections (maps, sets and weak maps), iterators and for/of loops, - Promises, reflection, proxies (metaprogramming for virtual objects) ES7 - exponentiation operator (**) June 2016 - Array.prototype.includes ES8 - Includes await/async, which works using generators and promises. June 2017 ES9 RegExp enhancements, Promise.prototype finally, await on loops June 2018 declarations, spread properties DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 44 Node.js versions Even numbers stand for LTS https://github.com/nodejs/Release Long Term Support versions ES6 ES8 ES9 DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 45 Node.js EcmaScript Support https://node.green DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 46 Client-side Javascript JavaScript in the Browser 2015 Today • Simply said, dynamic pages are event listeners Native and DOM manipulation…ending up with a lot of Native unmaintainable code. • Browser compatibility make things even more messy. jQuery jQuery • jQuery helps a lot… React Vue.js … unless you’re building Single Page Applications. Angular 1 Angular 2 DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 48 https://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_hide DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 49 Traditional Web Apps SPA (server side Web) (Single Page Apps) https://www.kirupa.com/react/introducing_react.htm DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 50 jQuery Vue.js DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 51 React Basics • The render method takes two arguments: 1. The HTML-like elements (aka JSX) you wish to output 2. The location in the DOM that React will render the JSX into 1 2 DEVNET-1444 © 2019 Cisco and/or its affiliates. All rights reserved.
Recommended publications
  • What's in the Cloud?
    WHAT’S IN THE CLOUD? PRODUCT GUIDE / MARCH 9, 2019 DISCLAIMER Oracle Commerce Cloud is a fully featured, extensible SaaS commerce solution, delivered in the Oracle Cloud, supporting B2C and B2B models in a single platform. Commerce Cloud grants greater agility and cost savings, with the extensibility and control required in the ultra-competitive digital commerce market. SIMPLIFY your technology footprint. INNOVATE to stay ahead of consumer demands and competitors in a low-risk way. DELIVER to every customer, every time to increase loyalty and revenue. Commerce Cloud has frequent releases. Please ensure you have the latest documentation. This content was updated for the 19A release (released in February 2019) 2 FEATURE GUIDE / WHAT’S IN THE CLOUD? Product Features Unified Admin ................................................................................................. 5 Core Platform and APIs ................................................................................. 5 Modular, Headless Options ............................................................................ 6 Responsive Storefront .................................................................................... 6 Guided Search................................................................................................ 7 SEO ................................................................................................................ 8 Drag-and-Drop Experience Creation ............................................................. 9 Catalog Management ..................................................................................
    [Show full text]
  • Extending Basic Block Versioning with Typed Object Shapes
    Extending Basic Block Versioning with Typed Object Shapes Maxime Chevalier-Boisvert Marc Feeley DIRO, Universite´ de Montreal,´ Quebec, Canada DIRO, Universite´ de Montreal,´ Quebec, Canada [email protected] [email protected] Categories and Subject Descriptors D.3.4 [Programming Lan- Basic Block Versioning (BBV) [7] is a Just-In-Time (JIT) com- guages]: Processors—compilers, optimization, code generation, pilation strategy which allows rapid and effective generation of run-time environments type-specialized machine code without a separate type analy- sis pass or complex speculative optimization and deoptimization Keywords Just-In-Time Compilation, Dynamic Language, Opti- strategies (Section 2.4). However, BBV, as previously introduced, mization, Object Oriented, JavaScript is inefficient in its handling of object property types. The first contribution of this paper is the extension of BBV with Abstract typed object shapes (Section 3.1), object descriptors which encode type information about object properties. Type meta-information Typical JavaScript (JS) programs feature a large number of object associated with object properties then becomes available at prop- property accesses. Hence, fast property reads and writes are cru- erty reads. This allows eliminating run-time type tests dependent on cial for good performance. Unfortunately, many (often redundant) object property accesses. The target of method calls is also known dynamic checks are implied in each property access and the seman- in most cases. tic complexity of JS makes it difficult to optimize away these tests The second contribution of this paper is a further extension through program analysis. of BBV with shape propagation (Section 3.3), the propagation We introduce two techniques to effectively eliminate a large and specialization of code based on object shapes.
    [Show full text]
  • Voice.AI Gateway API Reference Guide Version
    Reference Guide AudioCodes Intuitive Human Communications for Chatbot Services Voice.AI Gateway API Version 2.2 Notice Voice.AI Gateway | API Reference Guide Notice Information contained in this document is believed to be accurate and reliable at the time of printing. However, due to ongoing product improvements and revisions, AudioCodes cannot guarantee accuracy of printed material after the Date Published nor can it accept responsibility for errors or omissions. Updates to this document can be downloaded from https://www.audiocodes.com/library/technical-documents. This document is subject to change without notice. Date Published: November-04-2020 WEEE EU Directive Pursuant to the WEEE EU Directive, electronic and electrical waste must not be disposed of with unsorted waste. Please contact your local recycling authority for disposal of this product. Customer Support Customer technical support and services are provided by AudioCodes or by an authorized AudioCodes Service Partner. For more information on how to buy technical support for AudioCodes products and for contact information, please visit our website at https://www.audiocodes.com/services-support/maintenance-and-support. Documentation Feedback AudioCodes continually strives to produce high quality documentation. If you have any comments (suggestions or errors) regarding this document, please fill out the Documentation Feedback form on our website at https://online.audiocodes.com/documentation-feedback. Stay in the Loop with AudioCodes - ii - Notice Voice.AI Gateway | API Reference Guide Notes and Warnings OPEN SOURCE SOFTWARE. Portions of the software may be open source software and may be governed by and distributed under open source licenses, such as the terms of the GNU General Public License (GPL), the terms of the Lesser General Public License (LGPL), BSD and LDAP, which terms are located at https://www.audiocodes.com/services-support/open-source/ and all are incorporated herein by reference.
    [Show full text]
  • Quickly Documentation Release 0.1
    Quickly Documentation Release 0.1 Michael Spencer March 28, 2016 Contents 1 Offline Reading 3 1.1 Tutorial..................................................3 1.2 QMLify Transpiler............................................5 1.3 Core JS Modules.............................................5 1.4 Distributing your Module........................................8 2 Indices and tables 11 i ii Quickly Documentation, Release 0.1 Quickly is a build tool and QML module with provides an NodeJS-like ES6 environment for Javascript used in QML. The goal of the project is to allow you to write awesome modern ES6 Javascript taking advantage of classes, decorators, arrow functions, and best of all, many of the vast array of NPM packages available using the standard ES6 module imports. You can then take that code and use in directly from QML, just as you would with plain, old, QML-specific Javascript. You can even build a library using ES6 and NPM packages, and then distribute that as a standard QML module or QPM package for other developers to use in regular QML or QML-specific Javascript. For those who would prefer to stick with standard QML-specific Javascript, you can also do that and still use the Quickly library, which gives you promises, the fetch API, and many polyfills. This is great for longtime QML devel- opers or existing projects that just want to drop in some easy-to-use features from modern JS core libraries. Tutorial A quick guide to get you up and running with Quickly. QMLify Transpiler How to use qmlify, the Quickly transpiler. Core JS Modules How to use the core JS modules. Distributing your Module Distributing your awesome new module for other developers to use.
    [Show full text]
  • Coffeescript Accelerated Javascript Development.Pdf
    Download from Wow! eBook <www.wowebook.com> What readers are saying about CoffeeScript: Accelerated JavaScript Development It’s hard to imagine a new web application today that doesn’t make heavy use of JavaScript, but if you’re used to something like Ruby, it feels like a significant step down to deal with JavaScript, more of a chore than a joy. Enter CoffeeScript: a pre-compiler that removes all the unnecessary verbosity of JavaScript and simply makes it a pleasure to write and read. Go, go, Coffee! This book is a great introduction to the world of CoffeeScript. ➤ David Heinemeier Hansson Creator, Rails Just like CoffeeScript itself, Trevor gets straight to the point and shows you the benefits of CoffeeScript and how to write concise, clear CoffeeScript code. ➤ Scott Leberknight Chief Architect, Near Infinity Though CoffeeScript is a new language, you can already find it almost everywhere. This book will show you just how powerful and fun CoffeeScript can be. ➤ Stan Angeloff Managing Director, PSP WebTech Bulgaria Download from Wow! eBook <www.wowebook.com> This book helps readers become better JavaScripters in the process of learning CoffeeScript. What’s more, it’s a blast to read, especially if you are new to Coffee- Script and ready to learn. ➤ Brendan Eich Creator, JavaScript CoffeeScript may turn out to be one of the great innovations in web application development; since I first discovered it, I’ve never had to write a line of pure JavaScript. I hope the readers of this wonderful book will be able to say the same. ➤ Dr. Nic Williams CEO/Founder, Mocra CoffeeScript: Accelerated JavaScript Development is an excellent guide to Coffee- Script from one of the community’s most esteemed members.
    [Show full text]
  • Onclick Event-Handler
    App Dev Stefano Balietti Center for European Social Science Research at Mannheim University (MZES) Alfred-Weber Institute of Economics at Heidelberg University @balietti | stefanobalietti.com | @nodegameorg | nodegame.org Building Digital Skills: 5-14 May 2021, University of Luzern Goals of the Seminar: 1. Writing and understanding asynchronous code: event- listeners, remote functions invocation. 2. Basic front-end development: HTML, JavaScript, CSS, debugging front-end code. 3. Introduction to front-end frameworks: jQuery and Bootstrap 4. Introduction to back-end development: NodeJS Express server, RESTful API, Heroku cloud. Outputs of the Seminar: 1. Web app: in NodeJS/Express. 2. Chrome extensions: architecture and examples. 3. Behavioral experiment/survey: nodeGame framework. 4. Mobile development: hybrid apps with Apache Cordova, intro to Ionic Framework, progressive apps (PWA). Your Instructor: Stefano Balietti http://stefanobalietti.com Currently • Fellow in Sociology Mannheim Center for European Social Research (MZES) • Postdoc at the Alfred Weber Institute of Economics at Heidelberg University Previously o Microsoft Research - Computational Social Science New York City o Postdoc Network Science Institute, Northeastern University o Fellow IQSS, Harvard University o PhD, Postdoc, Computational Social Science, ETH Zurich My Methodology Interface of computer science, sociology, and economics Agent- Social Network Based Analysis Models Machine Learning for Optimal Experimental Experimental Methods Design Building Platforms Patterns
    [Show full text]
  • Chapter 1: Introduction to the Pencil Code Environment
    Chapter 1: Introduction to the Pencil Code Environment In this manual we will show how to use Pencil Code to explore programming. Pencil Code is a free programming tool available at pencilcode.net. Pencil Code was developed by Google engineer David Bau together with his son Anthony Bau, with open-source contributions from many others. Two Ways of Looking at a Program There are two ways of viewing a program. A computer user sees a program by looking at its output. A programmer works with a program’s source code. In Pencil Code, the screen is split into two halves, with the source code on the left and the output on the right. You run programs by by pressing the “play” button in the middle. The Pencil Code interface splits the screen, showing source code on the left and output on the right. The play button in the center runs the code and produces output. Languages and Libraries in Pencil Code Pencil Code supports code in both blocks and text using mainstream web programming languages and useful libraries including: • HTML, the standard HyperText Markup Language for the web. • JavaScript, the standard programming language of web browsers. • CSS, the standard Cascading Style Sheet language for visual styles on the web. • jQuery, a popular library that simplifies programming interactive websites. • CoffeeScript, a language that lets you do more with less typing than JavaScript. • jQuery-turtle, which extends jQuery to simplify graphics and animation for novices. With Pencil Code, students can use these technologies to create web applications with global visibility and impact while exploring fundamental concepts in computational thinking.
    [Show full text]
  • Coffeescript Accelerated Javascript Development, Second Edition
    Extracted from: CoffeeScript Accelerated JavaScript Development, Second Edition This PDF file contains pages extracted from CoffeeScript, published by the Prag- matic Bookshelf. For more information or to purchase a paperback or PDF copy, please visit http://www.pragprog.com. Note: This extract contains some colored text (particularly in code listing). This is available only in online versions of the books. The printed versions are black and white. Pagination might vary between the online and printed versions; the content is otherwise identical. Copyright © 2015 The Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. The Pragmatic Bookshelf Dallas, Texas • Raleigh, North Carolina CoffeeScript Accelerated JavaScript Development, Second Edition Trevor Burnham The Pragmatic Bookshelf Dallas, Texas • Raleigh, North Carolina Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf, PragProg and the linking g device are trade- marks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun.
    [Show full text]
  • Webpack Cheatsheet
    12/25/18, 655 PM Page 1 of 1 ! Edit Webpack cheatsheet — Proudly sponsored by — Airbrake.io Full-stack error tracking & analytics for Python developers. Try it Free! ethical ads via CodeFund This is a very basic “getting started with Webpack” guide for use with Webpack v3. This doesnʼt cover all features, but it should get you started in understanding the config file format. Basic config webpack.config.js module.exports = { context: __dirname, entry: 'src/app.js', output: { path: __dirname + '/public', filename: 'app.js' } } Terminal npm install --save-dev webpack webpack build webpack -- -p build production webpack -- --watch compile continuously This compiles src/app.js into public/app.js. (Note: you may need to use ./node_modules/.bin/webpack as a command if youʼre not invoking Webpack via npm scripts.) Multiple files webpack.config.js module.exports = { entry: { app: 'src/app.js', vendor: 'src/vendor.js' }, output: { path: __dirname + '/public', filename: '[name].js' } } This creates app.js and vendor.js. # Loaders Babel Terminal npm install --save-dev \ babel-loader \ babel-preset-env \ babel-preset-react webpack.config.js module.exports = { ··· module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: [ { loader: 'babel-loader' } ] } ] } } .babelrc { "presets": [ "env", "react" ] } Adds support for Babel. CSS Terminal npm install --save-dev \ css-loader \ style-loader webpack.config.js module.exports = { ··· module: { rules: [ { test: /\.css$/, exclude: /node_modules/, use: [ { loader: 'style-loader' }, { loader: 'css-loader'
    [Show full text]
  • Practical Javascript™, DOM Scripting, and Ajax Projects
    Practical JavaScript™, DOM Scripting, and Ajax Projects ■■■ Frank W. Zammetti Practical JavaScript™, DOM Scripting, and Ajax Projects Copyright © 2007 by Frank W. Zammetti All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-59059-816-0 ISBN-10 (pbk): 1-59059-816-4 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries. Apress, Inc., is not affiliated with Sun Microsystems, Inc., and this book was written without endorsement from Sun Microsystems, Inc. Lead Editor: Matthew Moodie Technical Reviewer: Herman van Rosmalen Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick, Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Jeff Pepper, Paul Sarknas, Dominic Shakeshaft, Jim Sumser, Matt Wade Project Manager: Tracy Brown Collins Copy Edit Manager: Nicole Flores Copy Editor: Marilyn Smith Assistant Production Director: Kari Brooks-Copony Production Editor: Laura Esterman Compositor: Susan Glinert Proofreaders: Lori Bring and April Eddy Indexer: Broccoli Information Management Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013.
    [Show full text]
  • Learning HTML5 Game Programming Addison-Wesley Learning Series
    Learning HTML5 Game Programming Addison-Wesley Learning Series Visit informit.com/learningseries for a complete list of available publications. The Addison-Wesley Learning Series is a collection of hands-on programming guides that help you quickly learn a new technology or language so you can apply what you’ve learned right away. Each title comes with sample code for the application or applications built in the text. This code is fully annotated and can be reused in your own projects with no strings attached. Many chapters end with a series of exercises to encourage you to reexamine what you have just learned, and to tweak or adjust the code as a way of learning. Titles in this series take a simple approach: they get you going right away and leave you with the ability to walk off and build your own application and apply the language or technology to whatever you are working on. Learning HTML5 Game Programming A Hands-on Guide to Building Online Games Using Canvas, SVG, and WebGL James L. Williams Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Cape Town • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products Associate are claimed as trademarks. Where those designations appear in this book, and the publish- Publisher er was aware of a trademark claim, the designations have been printed with initial capital Mark Taub letters or in all capitals. Senior Acquisitions The author and publisher have taken care in the preparation of this book, but make no Editor expressed or implied warranty of any kind and assume no responsibility for errors or omis- Trina MacDonald sions.
    [Show full text]
  • Npm Packages As Ingredients: a Recipe-Based Approach
    npm Packages as Ingredients: a Recipe-based Approach Kyriakos C. Chatzidimitriou, Michail D. Papamichail, Themistoklis Diamantopoulos, Napoleon-Christos Oikonomou, and Andreas L. Symeonidis Electrical and Computer Engineering Dept., Aristotle University of Thessaloniki, Thessaloniki, Greece fkyrcha, mpapamic, thdiaman, [email protected], [email protected] Keywords: Dependency Networks, Software Reuse, JavaScript, npm, node. Abstract: The sharing and growth of open source software packages in the npm JavaScript (JS) ecosystem has been exponential, not only in numbers but also in terms of interconnectivity, to the extend that often the size of de- pendencies has become more than the size of the written code. This reuse-oriented paradigm, often attributed to the lack of a standard library in node and/or in the micropackaging culture of the ecosystem, yields interest- ing insights on the way developers build their packages. In this work we view the dependency network of the npm ecosystem from a “culinary” perspective. We assume that dependencies are the ingredients in a recipe, which corresponds to the produced software package. We employ network analysis and information retrieval techniques in order to capture the dependencies that tend to co-occur in the development of npm packages and identify the communities that have been evolved as the main drivers for npm’s exponential growth. 1 INTRODUCTION Given that dependencies and reusability have be- come very important in today’s software develop- The popularity of JS is constantly increasing, and ment process, npm registry has become a “must” along is increasing the popularity of frameworks for place for developers to share packages, defining code building server (e.g.
    [Show full text]