Comparing Javascript Libraries

Total Page:16

File Type:pdf, Size:1020Kb

Comparing Javascript Libraries www.XenCraft.com Comparing JavaScript Libraries Craig Cummings, Tex Texin October 27, 2015 Abstract Which JavaScript library is best for international deployment? This session presents the results of several years of investigation of features of JavaScript libraries and their suitability for international markets. We will show how the libraries were evaluated and compare the results for ECMA, Dojo, jQuery Globalize, Closure, iLib, ibm-js and intl.js. The results may surprise you and will be useful to anyone designing new international or multilingual JavaScript applications or supporting existing ones. 2 Agenda • Background • Evaluation Criteria • Libraries • Results • Q&A 3 Origins • Project to extend globalization - Complex e-Commerce Software - Multiple subsystems - Different development teams - Different libraries already in use • Should we standardize? Which one? - Reduce maintenance - Increase competence 4 Evaluation Criteria • Support for target and future markets • Number of internationalization features • Quality of internationalization features • Maintained? • Widely used? • Ease of migration from existing libraries • Browser compatibility 5 Internationalization Feature Requirements • Encoding Support • Text Support -Unicode -Case, Accent Mapping -Supplementary Chars -Boundary detection -Bidi algorithm, shaping -Character Properties -Transliteration -Charset detection • Message Formatting -Conversion -IDN/IRI -Resource/properties files -Normalization -Collation -Plurals, Gender, et al 6 Internationalization Feature Requirements (more) • Regular Expressions • Data formats -Date, time, calendar • Compression -Time zone -Number, Currency • Locales -Postal Address -Names (BCP 47) -Names, Honorifics -Negotiation -Phone numbers -Fallback -Detection • Measurement systems 7 Candidate Libraries AccDC MooTools Ample SDK PhoneJS CupQ Prototype DHTMLX Pyjamas Dojo qooxdoo Echo3 Rialto Toolkit Enyo Rico Ext JS SmartClient & SmartGWT Google Web Toolkit Wakanda i18next Web Atoms jQuery Webix Midori YUI MochiKit ZK8 I18n Libraries (general libraries left; messages-specific right) ECMA (402+262) jQuery.i18n (Wikimedia) Dojo L20n (Mozilla) jQuery Globalize FormatJS Closure iLib CLDRPluralRuleParser ibm-js I18Next intl-js messageformat.js l10n.js moment.js l10ns numeral.js browser-i18n date.js requirejs-i18n jQuery.now 9 The ECMA I18n Standard • Why not rely on the new standard? - ECMA-402 • 1st Edition released Dec, 2012 • 2nd Edition released Jun, 2015 - ECMA-262 (supplementary character support) • 6th Edition released Jun 2015 - More details at site of one of authors • http://norbertlindenberg.com/2013/10/javascript-internationalization/index.html 10 Desirable Features - Cross-browser compatibility – including Safari • Desktop, Mobile, Node.js, Older versions - Based on CLDR Locale Data - Based on ICU (see next slide) - Ease of data update and customization • Time zone data (Olson/IANA) • CLDR locale corrections and additions - Part of a larger (useful) JS platform - Well-performing (CPU, download size, disk, memory) 11 ICU Value (Skeleton Dates) DateFormat(DateFormat.FULL) SimpleDateFormat ICU Skeleton = JS Results English Wednesday, December 23, 2015 Wednesday December 23 2015Wednesday, December 23, 2015 French mercredi 23 décembre 2015 mercredi décembre 23 2015 mercredi 23 décembre 2015 German Mittwoch, 23. Dezember 2015 Mittwoch Dezember 23 2015 Mittwoch, 23. Dezember 2015 Spanish miércoles 23 de diciembre de 2015 miércoles diciembre 23 2015 miércoles, 23 de diciembre de 2015 Brazilian Portuguese Quarta-feira, 23 de Dezembro de 2015 quarta-feira dezembro 23 2015 quarta-feira, 23 de dezembro de 2015 Japanese 2015年12月23日 水曜日 12月 23 2015 2015年12月23日水曜日 Korean 2015년 12월 23일 수요일 수요일 12월 23 2015 2015년 12월 23일 수요일 Simplified Chinese 2015年12月23日 星期三 星期三 十二月 23 2015 2015年12月23日星期三 12 Scoping • Need to limit investigation • Writing tests and reviewing each feature for each library would take a large effort • Reduced list of libraries (sort of; see next bullet) - Already in use or strongly recommended - ECMA, Dojo, jQuery Globalize, iLib, Closure, ibm- js, intl.js (honorable mention to moment.js & numeral.js) • Plus a plethora of message formatting libs 13 Minimal Feature Requirements (Ideally in one library) • Encodings - Detection, Supplementary characters, Conversion • Locales: European and Asian Markets • Data Formats - Dates, times, numbers, currency - Localized Gregorian calendar • Message formatting, Externalized text • IDN, IRI 14 Updated Goals • Adequate i18n for foreseeable future • Meets minimal i18n requirements • Meets browser requirements • Acceptable to development teams • Part of a larger library • Easy to update data • Easy to migrate to 15 Example Challenge: Dates • 142 different date formats in use • 300+ different date formats in use • Unclear history or requirements for each format • Unclear how to internationalize some formats • Unclear whether to internationalize some formats - A little clearer as some of these derive from different databases, programming languages, and standards. - Still a mess! 16 js-i18n.com http://js-i18n.com 17 Passing Unit Tests Lib DFO DFO All DTF DTF All NF NF All Dojo 124/156 1883/2732 51/624 839/10928 38/39 587/683 Globalize 139 2577 89 1404 37 669 iLib 134 2378 0 0 39 660 Closure 151 2627 72 1235 39 682 ECMA 119 2179 232 1488 39 671 ibm-js 98 2179 168 1672 39 676 Intl.js 119 2179 232 1488 39 671 DFO = Date format only DTF = Date and time format NF = Number format 18 Measure by Caveats • iLib - Comes out-of-the-box with only 20 locales • Instructions about building more are hard to find • Dojo and ibm-js - 600+ additional locales can be built with relative ease. Tools and instructions available per readme files in package. - ibm-js readme lacks links to 2/3 require-related libraries • JQ on server/browser (not node.js) is painful. Even then needs tweaking to remove locales from jQuery require 19 Rafael Xavier Comparison Matrix (https://libraries.io/github/rxaviers/javascript-globalization) 20 Feature Comparison Eye Chart Feature iLib Closure Globalize Dojo ibm-js/Intl.js/ECMA Locale 683 682 683 683 683 CLDR Locale Data ✔ ✔ ✔ ✔ ✔ Date/Time ✔ ✔ ✔ ✔ ✔ Number/Currency/Percentage ✔ ✔ ✔ ✔ ✔ International Calendars ✔ ✔ ✔ ✔ Parsing ✔ partial ✔ Collation ✔ ✔ Bidi ✔ ✔ †iLib additionally has support for time zone, measurement, name, address and phone formats as well as resource files, Unicode normalization, case mapping, encoding conversion and more †† ECMA (and ibm-js & intl.js) has (have) extensive locale detection, negotiation, and fallback support ††† Notably still missing is support for boundary detection/wrapping, Unicode regex, and IDNs/IRIs 21 Message Library Comparison Lib Concat Gender Plural Ordinal Grammar Custom FormatJS ✔ ✔ ✔ ✔ ✔ JQ I18n ✔ ✔ ✔ ✔ L20N ✔ ✔ ✔ ✔ CldrPlural ✔ ✔ JQ Globalize ✔ ✔ ✔ Closure ✔ ✔ ✔ ✔ messageformat.js ✔ ✔ ✔ i18next ✔ ✔ ✔ l10ns ✔ ✔ ✔ ✔ browser-i18n ✔ ✔ iLib ✔ ✔ ✔ ECMA 22 Conclusion • Further investigation and recent changes indicate better i18n coverage in “basic” areas (a problem noted in the past) - Improvements on mobile • ECMA could use more consistent results across browsers • Extensive evaluation is nice to have; scoping to near- term needs is practical - Risks repeating and replacing library in the future 23 Resources • ECMA - ECMA-402 Edition 2 • http://www.ecma-international.org/ecma-402/2.0/ECMA-402.pdf - ECMA-262 Edition 6 (supplementary characters) • http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf - Mozilla Developer Network • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl 24 Resources (other libraries) Dojo https://dojotoolkit.org/ jQuery Globalize https://github.com/jquery/globalize iLib http://sourceforge.net/projects/i18nlib/ Closure https://github.com/google/closure-library ibm-js https://github.com/ibm-js/ecma402 Intl.js https://github.com/andyearnshaw/Intl.js/ 25 Questions? 26 Craig R. Cummings Principal Software Engineer – I18n, Informatica Craig has been working in the field of software globalization for over twenty years. Before his role at Informatica, Craig was at Zynga making games in a variety of languages including Arabic. Before that, at Yahoo! Inc., he helped drive corporate technical strategy for internationalization with a particular focus on Middle Eastern markets. Prior to that, Craig was with Oracle's Applications globalization team where he worked closely with Sun's internationalization team to shape some of the pluggable locale, resource bundle, font, and supplementary character support in Java. 27 Tex Texin Globalization Architect, XenCraft Tex Texin is an industry thought leader specializing in business and software globalization services. His expertise includes global product strategy, Unicode and internationalization architecture, and cost-effective implementation and testing. Over the past two decades, Tex has created numerous global products, led internationalization development teams, and guided companies in taking business to new regional markets. Tex is a contributor to several internationalization standards for software and on the Web. He is on the steering committees of open source products and the program committees for Unicode and other conferences. Tex is a popular speaker at conferences around the world and provides on-site training on Unicode, internationalization, and globalization worldwide. Tex maintains two Web sites for internationalization, the popular, instructional www.I18nGuy.com site and the site for his business www.XenCraft.com. Tex is founder and Chief Globalization Architect for XenCraft. XenCraft provides global business consulting and software design, implementation, test and training services on globalization product strategy and software internationalization architecture. 28.
Recommended publications
  • Machine Learning in the Browser
    Machine Learning in the Browser The Harvard community has made this article openly available. Please share how this access benefits you. Your story matters Citable link http://nrs.harvard.edu/urn-3:HUL.InstRepos:38811507 Terms of Use This article was downloaded from Harvard University’s DASH repository, and is made available under the terms and conditions applicable to Other Posted Material, as set forth at http:// nrs.harvard.edu/urn-3:HUL.InstRepos:dash.current.terms-of- use#LAA Machine Learning in the Browser a thesis presented by Tomas Reimers to The Department of Computer Science in partial fulfillment of the requirements for the degree of Bachelor of Arts in the subject of Computer Science Harvard University Cambridge, Massachusetts March 2017 Contents 1 Introduction 3 1.1 Background . .3 1.2 Motivation . .4 1.2.1 Privacy . .4 1.2.2 Unavailable Server . .4 1.2.3 Simple, Self-Contained Demos . .5 1.3 Challenges . .5 1.3.1 Performance . .5 1.3.2 Poor Generality . .7 1.3.3 Manual Implementation in JavaScript . .7 2 The TensorFlow Architecture 7 2.1 TensorFlow's API . .7 2.2 TensorFlow's Implementation . .9 2.3 Portability . .9 3 Compiling TensorFlow into JavaScript 10 3.1 Motivation to Compile . 10 3.2 Background on Emscripten . 10 3.2.1 Build Process . 12 3.2.2 Dependencies . 12 3.2.3 Bitness Assumptions . 13 3.2.4 Concurrency Model . 13 3.3 Experiences . 14 4 Results 15 4.1 Benchmarks . 15 4.2 Library Size . 16 4.3 WebAssembly . 17 5 Developer Experience 17 5.1 Universal Graph Runner .
    [Show full text]
  • Pragmatic Guide to Javascript
    www.allitebooks.com What Readers Are Saying About Pragmatic Guide to J a v a S c r i p t I wish I had o w n e d this book when I first started out doing JavaScript! Prag- matic Guide to J a v a S c r i p t will take you a big step ahead in programming real-world JavaScript by showing you what is going on behind the scenes in popular JavaScript libraries and giving you no-nonsense advice and back- ground information on how to do the right thing. W i t h the condensed years of e x p e r i e n c e of one of the best JavaScript developers around, it’s a must- read with great reference to e v e r y d a y JavaScript tasks. Thomas Fuchs Creator of the script.aculo.us framework An impressive collection of v e r y practical tips and tricks for getting the most out of JavaScript in today’s browsers, with topics ranging from fundamen- tals such as form v a l i d a t i o n and JSON handling to application e x a m p l e s such as mashups and geolocation. I highly recommend this book for anyone wanting to be more productive with JavaScript in their web applications. Dylan Schiemann CEO at SitePen, cofounder of the Dojo T o o l k i t There are a number of JavaScript books on the market today, b u t most of them tend to focus on the new or inexperienced JavaScript programmer.
    [Show full text]
  • THE FUTURE of SCREENS from James Stanton a Little Bit About Me
    THE FUTURE OF SCREENS From james stanton A little bit about me. Hi I am James (Mckenzie) Stanton Thinker / Designer / Engineer / Director / Executive / Artist / Human / Practitioner / Gardner / Builder / and much more... Born in Essex, United Kingdom and survived a few hair raising moments and learnt digital from the ground up. Ok enough of the pleasantries I have been working in the design field since 1999 from the Falmouth School of Art and onwards to the RCA, and many companies. Ok. less about me and more about what I have seen… Today we are going to cover - SCREENS CONCEPTS - DIGITAL TRANSFORMATION - WHY ASSETS LIBRARIES - CODE LIBRARIES - COST EFFECTIVE SOLUTION FOR IMPLEMENTATION I know, I know, I know. That's all good and well, but what does this all mean to a company like mine? We are about to see a massive change in consumer behavior so let's get ready. DIGITAL TRANSFORMATION AS A USP Getting this correct will change your company forever. DIGITAL TRANSFORMATION USP-01 Digital transformation (DT) – the use of technology to radically improve performance or reach of enterprises – is becoming a hot topic for companies across the globe. VERY DIGITAL CHANGING NOT VERY DIGITAL DIGITAL TRANSFORMATION USP-02 Companies face common pressures from customers, employees and competitors to begin or speed up their digital transformation. However they are transforming at different paces with different results. VERY DIGITAL CHANGING NOT VERY DIGITAL DIGITAL TRANSFORMATION USP-03 Successful digital transformation comes not from implementing new technologies but from transforming your organisation to take advantage of the possibilities that new technologies provide.
    [Show full text]
  • Create Mobile Apps with HTML5, Javascript and Visual Studio
    Create mobile apps with HTML5, JavaScript and Visual Studio DevExtreme Mobile is a single page application (SPA) framework for your next Windows Phone, iOS and Android application, ready for online publication or packaged as a store-ready native app using Apache Cordova (PhoneGap). With DevExtreme, you can target today’s most popular mobile devices with a single codebase and create interactive solutions that will amaze. Get started today… ・ Leverage your existing Visual Studio expertise. ・ Build a real app, not just a web page. ・ Deliver a native UI and experience on all supported devices. ・ Use over 30 built-in touch optimized widgets. Learn more and download your free trial devexpress.com/mobile All trademarks or registered trademarks are property of their respective owners. Untitled-4 1 10/2/13 11:58 AM APPLICATIONS & DEVELOPMENT SPECIAL GOVERNMENT ISSUE INSIDE Choose a Cloud Network for Government-Compliant magazine Applications Geo-Visualization of SPECIAL GOVERNMENT ISSUE & DEVELOPMENT SPECIAL GOVERNMENT ISSUE APPLICATIONS Government Data Sources Harness Open Data with CKAN, OData and Windows Azure Engage Communities with Open311 THE DIGITAL GOVERNMENT ISSUE Inside the tools, technologies and APIs that are changing the way government interacts with citizens. PLUS SPECIAL GOVERNMENT ISSUE APPLICATIONS & DEVELOPMENT SPECIAL GOVERNMENT ISSUE & DEVELOPMENT SPECIAL GOVERNMENT ISSUE APPLICATIONS Enhance Services with Windows Phone 8 Wallet and NFC Leverage Web Assets as Data Sources for Apps APPLICATIONS & DEVELOPMENT SPECIAL GOVERNMENT ISSUE ISSUE GOVERNMENT SPECIAL DEVELOPMENT & APPLICATIONS Untitled-1 1 10/4/13 11:40 AM CONTENTS OCTOBER 2013/SPECIAL GOVERNMENT ISSUE OCTOBER 2013/SPECIAL GOVERNMENT ISSUE magazine FEATURES MOHAMMAD AL-SABT Editorial Director/[email protected] Geo-Visualization of Government KENT SHARKEY Site Manager Data Sources MICHAEL DESMOND Editor in Chief/[email protected] Malcolm Hyson ..........................................
    [Show full text]
  • HCI Lessons Using AJAX for a Page-Turning Web Application
    CHI 2011 • Session: Reading & Writing May 7–12, 2011 • Vancouver, BC, Canada Bells, Whistles, and Alarms: HCI Lessons Using AJAX for a Page-turning Web Application Juliet L. Hardesty Abstract User Interface Design Specialist This case study describes creating a version of METS Digital Library Program Navigator, a page-turning web application for multi- Indiana University part digital objects, using an AJAX library with user Herman B Wells Library, W501 interface components. The design for this version 1320 E. 10th Street created problems for customized user interactions and Bloomington, IN 47405 USA accessibility problems for users, including those using [email protected] assistive technologies and mobile devices. A review of the literature considers AJAX, accessibility, and universal usability and possible steps to take moving forward to correct these problems in METS Navigator. Keywords AJAX, accessibility, universal usability ACM Classification Keywords H.5.2. Information interfaces and presentation: User interfaces - user-centered design, standardization. General Terms Design, human factors, standardization Copyright is held by the author/owner(s). CHI 2011, May 7–12, 2011, Vancouver, BC, Canada. Introduction ACM 978-1-4503-0268-5/11/05. AJAX (Asynchronous JavaScript and XML) is a widely used method for developing Web 2.0 applications 827 CHI 2011 • Session: Reading & Writing May 7–12, 2011 • Vancouver, BC, Canada (called Rich Internet Applications, or RIA’s), both to incorporate the Semantic Web into Web 2.0 enhance certain features
    [Show full text]
  • Extracting Taint Specifications for Javascript Libraries
    Extracting Taint Specifications for JavaScript Libraries Cristian-Alexandru Staicu Martin Toldam Torp Max Schäfer TU Darmstadt Aarhus University GitHub [email protected] [email protected] [email protected] Anders Møller Michael Pradel Aarhus University University of Stuttgart [email protected] [email protected] ABSTRACT ACM Reference Format: Modern JavaScript applications extensively depend on third-party Cristian-Alexandru Staicu, Martin Toldam Torp, Max Schäfer, Anders Møller, and Michael Pradel. 2020. Extracting Taint Specifications for JavaScript libraries. Especially for the Node.js platform, vulnerabilities can Libraries. In 42nd International Conference on Software Engineering (ICSE have severe consequences to the security of applications, resulting ’20), May 23–29, 2020, Seoul, Republic of Korea. ACM, New York, NY, USA, in, e.g., cross-site scripting and command injection attacks. Existing 12 pages. https://doi.org/10.1145/3377811.3380390 static analysis tools that have been developed to automatically detect such issues are either too coarse-grained, looking only at 1 INTRODUCTION package dependency structure while ignoring dataflow, or rely on JavaScript is powering a wide variety of web applications, both manually written taint specifications for the most popular libraries client-side and server-side. Many of these applications are security- to ensure analysis scalability. critical, such as PayPal, Netflix, or Uber, which handle massive In this work, we propose a technique for automatically extract- amounts of privacy-sensitive user data and other assets. An impor- ing taint specifications for JavaScript libraries, based on a dynamic tant characteristic of modern JavaScript-based applications is the analysis that leverages the existing test suites of the libraries and extensive use of third-party libraries.
    [Show full text]
  • IADIS Conference Template
    www.seipub.org/ie Information Engineering (IE) Volume 3, 2014 Performance and Quality Evaluation of jQuery Javascript Framework Andreas Gizas, Sotiris P. Christodoulou, Tzanetos Pomonis HPCLab, Computer Engineering & Informatics Dept., University of Patras Rion, Patras Received Jun 10, 2013; Revised Jun 21, 2013; Accepted Mar 12, 2014; Published Jun 12, 2014 © 2014 Science and Engineering Publishing Company Abstract devices. Mobile web is the name of this new field of The scope of this work is to provide a thorough web applications and JavaScript is expected to play a methodology for quality and performance evaluation of the major role in its development with the evolution of most popular JavaScript framework, the jQuery Framework, new devices and standards (ex. iPhone, Android) or as by taking into account well established software quality the heart of cross platform applications (like factors and performance tests. The JavaScript programming phonegap.com). There are also proposals for language is widely used for web programming and employing JavaScript in server-side applications increasingly, for general purpose of computing. Since the (Server-Side JavaScript Reference v1.2). growth of its popularity and the beginning of web 2.0 era, many JavaScript frameworks have become available for Due to the plethora of applications that JavaScript programming rich client-side interactions in web serves and the variety of programming needs, applications. The jQuery project and its community serve frameworks have been created in order to help both today as a major part of web programmers. The main programmers and end-users. These frameworks aim to outcome of this work is to highlight the pros and cons of be a useful tool for simplifying JavaScript code jQuery in various areas of interest and signify which and development and repeat blocks of code by using just a where the weak points of its code are.
    [Show full text]
  • 1. the ZK User Interface Markup Language
    1. The ZK User Interface Markup Language The ZK User Interface Markup Language (ZUML) is based on XML. Each XML element describes what component to create. XML This section provides the most basic concepts of XML to work with ZK. If you are familiar with XML, you could skip this section. If you want to learn more, there are a lot of resources on Internet, such as http://www.w3schools.com/xml/xml_whatis.asp and http://www.xml.com/pub/a/98/10/guide0.html. XML is a markup language much like HTML but with stricter and cleaner syntax. It has several characteristics worth to notice. Elements Must Be Well-formed First, each element must be closed. They are two ways to close an element as depicted below. They are equivalent. Close by an end tag: <window></window> Close without an end tag: <window/> Second, elements must be properly nested. Correct: <window> <groupbox> Hello World! </groupbox> </window> Wrong: <window> <groupbox> Hello World! </window> </groupbox> Special Character Must Be Replaced XML uses <element-name> to denote an element, so you have to replace special characters. For example, you have to use &lt; to represent the < character. ZK: Developer's Guide Page 1 of 92 Potix Corporation Special Character Replaced With < &lt; > &gt; & &amp; " &quot; ' &apos; It is interesting to notice that backslash (\) is not a special character, so you don't need to escape it at all. Attribute Values Must Be Specified and Quoted Correct: width="100%" checked="true" Wrong: width=100% checked Comments A comment is used to leave a note or to temporarily edit out a portion of XML code.
    [Show full text]
  • Microsoft AJAX Library Essentials Client-Side ASP.NET AJAX 1.0 Explained
    Microsoft AJAX Library Essentials Client-side ASP.NET AJAX 1.0 Explained A practical tutorial to using Microsoft AJAX Library to enhance the user experience of your ASP.NET Web Applications Bogdan Brinzarea Cristian Darie BIRMINGHAM - MUMBAI Microsoft AJAX Library Essentials Client-side ASP.NET AJAX 1.0 Explained Copyright © 2007 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 authors, Packt Publishing, nor its dealers or 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 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: July 2007 Production Reference: 1230707 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847190-98-7 www.packtpub.com Cover Image by www.visionwt.com Table of Contents Preface 1 Chapter 1: AJAX and ASP.NET 7 The Big Picture 8 AJAX and Web 2.0 10 Building
    [Show full text]
  • Learning Javascript Design Patterns
    Learning JavaScript Design Patterns Addy Osmani Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Learning JavaScript Design Patterns by Addy Osmani Copyright © 2012 Addy Osmani. All rights reserved. Revision History for the : 2012-05-01 Early release revision 1 See http://oreilly.com/catalog/errata.csp?isbn=9781449331818 for release details. ISBN: 978-1-449-33181-8 1335906805 Table of Contents Preface ..................................................................... ix 1. Introduction ........................................................... 1 2. What is a Pattern? ...................................................... 3 We already use patterns everyday 4 3. 'Pattern'-ity Testing, Proto-Patterns & The Rule Of Three ...................... 7 4. The Structure Of A Design Pattern ......................................... 9 5. Writing Design Patterns ................................................. 11 6. Anti-Patterns ......................................................... 13 7. Categories Of Design Pattern ............................................ 15 Creational Design Patterns 15 Structural Design Patterns 16 Behavioral Design Patterns 16 8. Design Pattern Categorization ........................................... 17 A brief note on classes 17 9. JavaScript Design Patterns .............................................. 21 The Creational Pattern 22 The Constructor Pattern 23 Basic Constructors 23 Constructors With Prototypes 24 The Singleton Pattern 24 The Module Pattern 27 iii Modules 27 Object Literals 27 The Module Pattern
    [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]
  • The Role of Standards in Open Source Dr
    Panel 5.2: The role of Standards in Open Source Dr. István Sebestyén Ecma and Open Source Software Development • Ecma is one of the oldest SDOs in ICT standardization (founded in 1961) • Examples for Ecma-OSS Standardization Projects: • 2006-2008 ECMA-376 (fast tracked as ISO/IEC 29500) “Office Open XML File Formats” RAND in Ecma and JTC1, but RF with Microsoft’s “Open Specification Promise” – it worked. Today at least 30+ OSS implementations of the standards – important for feedback in maintenance • 201x-today ECMA-262 (fast tracked as ISO/IEC 16262) “ECMAScript Language Specification” with OSS involvement and input. Since 2018 different solution because of yearly updates of the standard (Too fast for the “fast track”). • 2013 ECMA-404 (fast tracked as ISO/IEC 21778 ) “The JSON Data Interchange Syntax“. Many OSS impl. Rue du Rhône 114 - CH-1204 Geneva - T: +41 22 849 6000 - F: +41 22 849 6001 - www.ecma-international.org 2 Initial Questions by the OSS Workshop Moderators: • Is Open Source development the next stage to be adopted by SDOs? • To what extent a closer collaboration between standards and open source software development could increase efficiency of both? • How can intellectual property regimes - applied by SDOs - influence the ability and motivation of open source communities to cooperate with them? • Should there be a role for policy setting at EU level? What actions of the European Commission could maximize the positive impact of Open Source in the European economy? Rue du Rhône 114 - CH-1204 Geneva - T: +41 22 849 6000 - F: +41 22 849 6001 - www.ecma-international.org 3 Question 1 and Answer: • Is Open Source development the next stage to be adopted by SDOs? • No.
    [Show full text]