Mdn 0512Dg.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

Mdn 0512Dg.Pdf Duplicate Code Detection & Consolidation with CodeRush CodeRush helps you create and maintain source code with optimum efÄ ciency. Consume-Ä rst declaration, powerful templates, smart selection tools, intelligent code analysis, innovative navigation and an unrivalled collection of refactorings all work together to increase your productivity dramatically. Download the 30-day free trial to experience the next generation of developer productivity tools at www.DevExpress.com © 1998-2012 Developer Express Inc. ALL RIGHTS RESERVED. All trademarks or registered trademarks are property of their respective owners. Untitled-7 1 4/10/12 4:57 PM THE MICROSOFT JOURNAL FOR DEVELOPERS MAY 2012 VOL 27 NO 5 Creating Media Apps for Windows Phone COLUMNS Mark Hopkins .......................................................................... 22 CUTTING EDGE Understanding the Power Develop HTML5 Windows Phone Apps of WebSockets with Apache Cordova Dino Esposito, page 6 Colin Eberhardt ........................................................................ 28 FORECAST: CLOUDY 5 Reasons to Start Working Using HTML5 to Create Mobile Experiences with Windows Azure Brandon Satrom ....................................................................... 46 Joseph Fultz, page 14 TEST RUN What’s New for Mobile Development Dive into Neural Networks in ASP.NET MVC 4 James McCaffrey, page 72 Keith Burnell ............................................................................ 52 THE WORKING PROGRAMMER Introducing the Navigation Talk to Me, Part 3: Meet the Therapist for ASP.NET Web Forms Framework Ted Neward, page 78 Graham Mendick ..................................................................... 56 CLIENT INSIGHT Managing Complexity in Advanced JsRender Templating Features T4 Code-Generation Solutions John Papa, page 82 Peter Vogel .............................................................................. 62 DON’T GET ME STARTED The Myth of Informed Consent Multimodal Communication with Kinect David Platt, page 88 Leland Holmquest .................................................................... 68 Start a Revolution Refuse to choose between desktop and mobile. With the brand new NetAdvantage for .NET, you can create awesome apps with killer data visualization today, on any platform or device. Get your free, fully supported trial today! www.infragistics.com/NET Infragistics Sales US 800 231 8588 • Europe +44 (0) 800 298 9055 • India +91 80 4151 8042 • APAC (+61) 3 9982 4545 Copyright 1996-2012 Infragistics, Inc. All rights reserved. Infragistics and NetAdvantage are registered trademarks of Infragistics, Inc. The Infragistics logo is a trademark of Infragistics, Inc. All other trademarks or registered trademarks are the respective property of their owners. Untitled-8 2 4/10/12 5:13 PM Compatible with Microsoft® Visual Studio® 11 Beta Untitled-8 3 4/10/12 5:14 PM MAY 2012 VOLUME 27 NUMBER 5 magazine MITCH RATCLIFFE Director LUCINDA ROWLEY Editorial Director/[email protected] PATRICK O’NEILL Site Manager MICHAEL DESMOND Editor in Chief/[email protected] DAVID RAMEL Technical Editor SHARON TERDEMAN Features Editor WENDY HERNANDEZ Group Managing Editor KATRINA CARRASCO Associate Managing Editor SCOTT SHULTZ Creative Director JOSHUA GOULD Art Director CONTRIBUTING EDITORS Dino Esposito, Joseph Fultz, Kenny Kerr, Julie Lerman, Dr. James McCaffrey, Ted Neward, John Papa, Charles Petzold, David S. Platt Henry Allain President, Redmond Media Group Doug Barney Vice President, New Content Initiatives Michele Imgrund Sr. Director of Marketing & Audience Engagement Tracy Cook Director of Online Marketing ADVERTISING SALES: 508-532-1418/[email protected] Matt Morollo VP/Group Publisher Chris Kourtoglou Regional Sales Manager William Smith National Accounts Director Danna Vedder Microsoft Account Manager Jenny Hernandez-Asandas Director, Print Production Serena Barnes Production Coordinator/[email protected] Neal Vitale President & Chief Executive Offi cer Richard Vitale Senior Vice President & Chief Financial Offi cer Michael J. Valenti Executive Vice President Christopher M. Coates Vice President, Finance & Administration Erik A. Lindgren Vice President, Information Technology & Application Development David F. Myers Vice President, Event Operations Jeffrey S. Klein Chairman of the Board MSDN Magazine (ISSN 1528-4859) is published monthly by 1105 Media, Inc., 9201 Oakdale Avenue, Ste. 101, Chatsworth, CA 91311. Periodicals postage paid at Chatsworth, CA 91311-9998, and at additional mailing offi ces. Annual subscription rates payable in US funds are: U.S. $35.00, International $60.00. Annual digital subscription rates payable in U.S. funds are: U.S. $25.00, International $25.00. Single copies/back issues: U.S. $10, all others $12. Send orders with payment to: MSDN Magazine, P.O. Box 3167, Carol Stream, IL 60132, email [email protected] or call (847) 763-9560. POSTMASTER: Send address changes to MSDN Magazine, P.O. Box 2166, Skokie, IL 60076. Canada Publications Mail Agreement No: 40612608. Return Undeliverable Canadian Addresses to Circulation Dept. or XPO Returns: P.O. Box 201, Richmond Hill, ON L4B 4R5, Canada. Printed in the U.S.A. Reproductions in whole or part prohibited except by written permission. Mail requests to “Permissions Editor,” c/o MSDN Magazine, 4 Venture, Suite 150, Irvine, CA 92618. Legal Disclaimer: The information in this magazine has not undergone any formal testing by 1105 Media, Inc. and is distributed without any warranty expressed or implied. Implementation or use of any information contained herein is the reader’s sole responsibility. While the information has been reviewed for accuracy, there is no guarantee that the same or similar results may be achieved in all environments. Technical inaccuracies may result from printing errors and/or new developments in the industry. Corporate Address: 1105 Media, Inc., 9201 Oakdale Ave., Ste 101, Chatsworth, CA 91311, www.1105media.com Media Kits: Direct your Media Kit requests to Matt Morollo, VP Publishing, 508-532-1418 (phone), 508-875-6622 (fax), [email protected] Reprints: For single article reprints (in minimum quantities of 250-500), e-prints, plaques and posters contact: PARS International, Phone: 212-221-9595, E-mail: [email protected], www.magreprints.com/ QuickQuote.asp List Rental: This publication’s subscriber list, as well as other lists from 1105 Media, Inc., is available for rental. For more information, please contact our list manager, Merit Direct. Phone: 914-368-1000; E-mail: [email protected]; Web: www.meritdirect.com/1105 All customer service inquiries should be sent to [email protected] or call 847-763-9560. Printed in the USA Untitled-11 1 4/6/12 12:43 PM EDITOR’S NOTE MICHAEL DESMOND MSDN Magazine Welcomes Script Junkie Unless you’ve been living under a rock the past two years, you’ve the Script Junkie homepage at msdn.microsoft.com/magazine/ee729207. Or noticed that Microsoft has gotten behind HTML5-based applica- just look for the link on the MSDN Magazine homepage. tion development in a big way. And it’s no surprise—we’ve been What does the transition mean for you? More than anything, busy producing a steady diet of features, columns and Web articles it ensures that developers will continue to enjoy access to timely focused on HTML5, JavaScript and CSS3. how-to articles from respected and established Script Junkie authors Th is month includes another installment in our ongoing HTML5 like Tim Kulp, Emily Lewis and Addy Osmani. What’s more, the feature series by Brandon Satrom, “Using HTML5 to Create Mobile move helps introduce Script Junkie to the larger community of Experiences.” He explores two pillars of responsive Web design— MSDN Magazine subscribers and site visitors. Our Web metrics fl uid grids and fl exible images. Also in this issue you’ll fi nd Colin have shown strong reader interest in HTML5-themed features Eberhardt’s feature on developing native HTML5 applications for and columns, and we expect Script Junkie will be valued by MSDN Windows Phone, using the open source Apache Cordova mobile Magazine readers who are anxious to explore new topics and development framework. challenges in script-based Web development. In February we launched the Client Insight column specifi cally Are there specific topics or issues you’d like to see covered at to address growing interest in rich client frameworks and tech- Script Junkie? E-mail me at mmeditor@microsoft .com. nologies, including HTML5 and XAML-based Silverlight and Windows Presentation Foundation (WPF). Written by John Papa, So Long and Thanks for All the Fish the column this month digs deeper into the JsRender JavaScript No, the dolphins aren’t leaving the planet (at least, not yet). But library and explores scenarios such as rendering external tem- I’m sad to say that MSDN Magazine Editorial Director Kit George plates, changing context with the {{for}} tag and using complex has moved on, assuming a new role with the Bing team that he expressions. described as “too good to refuse.” Yes, there’s plenty of HTML5 and related coverage in each issue of Kit’s had a hand in a lot of the changes you’ve seen in the MSDN Magazine. And there’s more of that to be found on the MSDN magazine—and especially the Web site—over the past year and a Magazine Web site, including Rachel Appel’s popular Web Dev Report half. He campaigned for the addition of unique online editorial column. Her latest piece off ers helpful tips for working with CSS, and content,
Recommended publications
  • Learning React Functional Web Development with React and Redux
    Learning React Functional Web Development with React and Redux Alex Banks and Eve Porcello Beijing Boston Farnham Sebastopol Tokyo Learning React by Alex Banks and Eve Porcello Copyright © 2017 Alex Banks and Eve Porcello. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com/safari). For more information, contact our corporate/insti‐ tutional sales department: 800-998-9938 or [email protected]. Editor: Allyson MacDonald Indexer: WordCo Indexing Services Production Editor: Melanie Yarbrough Interior Designer: David Futato Copyeditor: Colleen Toporek Cover Designer: Karen Montgomery Proofreader: Rachel Head Illustrator: Rebecca Demarest May 2017: First Edition Revision History for the First Edition 2017-04-26: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781491954621 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Learning React, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
    [Show full text]
  • Introducing 2D Game Engine Development with Javascript
    CHAPTER 1 Introducing 2D Game Engine Development with JavaScript Video games are complex, interactive, multimedia software systems. These systems must, in real time, process player input, simulate the interactions of semi-autonomous objects, and generate high-fidelity graphics and audio outputs, all while trying to engage the players. Attempts at building video games can quickly be overwhelmed by the need to be well versed in software development as well as in how to create appealing player experiences. The first challenge can be alleviated with a software library, or game engine, that contains a coherent collection of utilities and objects designed specifically for developing video games. The player engagement goal is typically achieved through careful gameplay design and fine-tuning throughout the video game development process. This book is about the design and development of a game engine; it will focus on implementing and hiding the mundane operations and supporting complex simulations. Through the projects in this book, you will build a practical game engine for developing video games that are accessible across the Internet. A game engine relieves the game developers from simple routine tasks such as decoding specific key presses on the keyboard, designing complex algorithms for common operations such as mimicking shadows in a 2D world, and understanding nuances in implementations such as enforcing accuracy tolerance of a physics simulation. Commercial and well-established game engines such as Unity, Unreal Engine, and Panda3D present their systems through a graphical user interface (GUI). Not only does the friendly GUI simplify some of the tedious processes of game design such as creating and placing objects in a level, but more importantly, it ensures that these game engines are accessible to creative designers with diverse backgrounds who may find software development specifics distracting.
    [Show full text]
  • Altova Umodel 2012 User & Reference Manual
    User and Reference Manual Altova UModel 2012 User & Reference Manual All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Published: 2012 © 2012 Altova GmbH UML®, OMG™, Object Management Group™, and Unified Modeling Language™ are either registered trademarks or trademarks of Object Management Group, Inc. in the United States and/or other countries. Table of Contents 1 UModel 3 2 Introducing UModel 6 3 What's new in UModel 8 4 UModel tutorial 14 4.1 Starting UModel................................................................................................................. 16 4.2 Use cases ................................................................................................................
    [Show full text]
  • Teaching Introductory Programming with Javascript in Higher Education
    Proceedings of the 9th International Conference on Applied Informatics Eger, Hungary, January 29–February 1, 2014. Vol. 1. pp. 339–350 doi: 10.14794/ICAI.9.2014.1.339 Teaching introductory programming with JavaScript in higher education Győző Horváth, László Menyhárt Department of Media & Educational Informatics, Eötvös Loránd University, Budapest, Hungary [email protected] [email protected] Abstract As the Internet penetration rate continuously increases and web browsers show a substantial development, the web becomes a more general and ubiq- uitous application runtime platform, where the programming language on the client side exclusively is JavaScript. This is the reason why recently JavaScript is more often considered as the lingua franca of the web, or, from a different point of view, the universal virtual machine of the web. In ad- dition, the JavaScript programming language appears in many other areas of informatics due to the wider usage of the HTML-based technology, and the embedded nature of the language. Consequently, in these days it is quite difficult to program without getting in touch with JavaScript in some way. In this article we are looking for answers to how the JavaScript language is suitable for being an introductory language in the programming related subjects of the higher education. First we revisit the different technologies that lead to and ensure the popularity of JavaScript. Following, current approaches using JavaScript as an introductory language are overviewed and analyzed. Next, a curriculum of an introductory programming course at the Eötvös Loránd University is presented, and a detailed investigation is given about how the JavaScript language would fit in the expectations and requirements of this programming course.
    [Show full text]
  • Provided by Heriot Watt University
    LEAPS S4 Conference: Engineering Courses Suzanne Ewing Widening Participation Officer Contact details: [email protected] Engineering Degree courses BEng/ MEng (Hons) Architectural Engineering BEng/ MEng (Hons) Chemical Engineering BEng/ Meng (Hons) Civil Engineering BEng/MEng (Hons) Electrical and Electronic Engineering BEng Engineering BEng/MEng (Hons) Mechanical Engineering BEng/ MEng Structural Engineering MEng Software Engineering Other Universities delivering similar courses are: Abertay University, University of Dundee, University of Edinburgh, University of Strathclyde. Please check each university’s own website for details. Entry requirements BEng Engineering (1yr only) Standard: AABB minimum: BBBC HNC: A Essential Subjects: Maths and a Science BEng/ MEng (Hons) Architectural Engineering Standard: ABBB Minimum: BBBC HNC: B Essential Subjects: Maths or Engineering Subject BEng/ MEng (Hons) Chemical & Mechanical Engineering Standard: AAAB Minimum: BBBC HNC: A Essential Subjects: Maths & Chemistry/ maths and Physics/ Engineering Science BEng/ Meng (Hons) Civil & Structural Engineering BBBC Standard: AABB Minimum: BBBC HNC: B Essential Subjects: Maths or Engineering Subject BEng/MEng (Hons) Electrical and Electronic Engineering Standard: BBBBC/ AABB Minimum: BBBC HNC: A Essential Subjects: Maths & 1 from Physics, Eng Science, Tech Studies BEng Software Engineering Standard: AAAB Minimum: BBBC HNC:B Essential Subject: Maths Career prospects It is the design, specification and management of the materials used •Design Engineer
    [Show full text]
  • Stephen Foreshew-Cain Joins Software Consultancy Scott Logic As CEO Submitted By: Rise PR Thursday, 14 January 2021
    Stephen Foreshew-Cain joins software consultancy Scott Logic as CEO Submitted by: Rise PR Thursday, 14 January 2021 Former GDS chief aims to establish the software consultancy in areas beyond Financial Services and the Public Sector, and to have an impact in wider communities 14 January 2021 – Software consultancy Scott Logic (https://www.scottlogic.com/) has appointed Stephen Foreshew-Cain as its new CEO, as the company embarks on a new phase of growth in 2021 and beyond. Scott Logic employs more than 300 people across its five UK and European locations, helping organisations primarily in investment banking and financial services with solutions to a wide range of complex challenges they are facing. Foreshew-Cain, the former executive director of Government Digital Services (GDS), joins Scott Logic from global software consultancy, ThoughtWorks, where he held the position of UK Chief Operating Officer. “As soon as we started discussions it became clear that Scott Logic was the type of organisation I was drawn to, one that puts its people at the heart of decision-making and allows tech people to flourish,” said Stephen Foreshew-Cain. “Technology can be transformative and I want to build on the heritage and expertise that Scott Logic has in financial services and apply that to other industries, such as the public sector. I believe in the vast potential of technology and in the duty of companies to do more than just make a profit and this will be a priority for Scott Logic this year.” Foreshew-Cain has held senior roles at some of the world’s biggest and best-known consultancies, including Accenture and Capgemini, and also at client-side organisations such as ITV and the Co-op.
    [Show full text]
  • Focus Type Applies To
    Focus Type Applies To All Power Tools All All Power Tools Team Foundation Server All Templates Team Foundation Server All Integration Provider Team Foundation Server All Power Tools Team Foundation Server All Power Tools Team Foundation Server All Integration Provider Team Foundation Server Architecture Power Tools Visual Studio Architecture Power Tools Visual Studio Architecture Templates Visual Studio Architecture Integration Provider Oracle Architecture Templates Expression Builds Power Tools Team Foundation Server Builds Integration Provider Visual Studio Builds Power Tools Team Foundation Server Builds Templates Team Foundation Server Builds Power Tools Team Foundation Server Builds Power Tools Team Foundation Server Builds Power Tools Team Foundation Server Coding Power Tools Visual Studio Coding Integration Provider Visual Studio Coding Azure Integration Visual Studio Coding Integration Provider Dynamics CRM Coding Documentation Visual Studio Coding Integration Provider Visual Studio Coding Templates Visual Studio Coding Documentation Visual Studio Coding Templates SharePoint Coding Templates SharePoint Coding Integration Provider Visual Studio Coding Integration Provider Visual Studio Coding Templates SharePoint Coding Power Tools Visual Studio Coding Power Tools Visual Studio Coding Templates SharePoint Coding Templates Visual Studio Coding Templates Visual Studio Coding Templates Visual Studio Coding Power Tools Visual Studio Coding Integration Provider SharePoint Coding Templates Visual Studio Coding Templates SharePoint Coding
    [Show full text]
  • Umodel – UML Tool for Software Modeling and Application Development
    The starting point for successful UML, SysML, and BPMN project development UModel – UML tool for software modeling and application development Altova® UModel® 2021 combines a rich visual interface with superior usability features to help level the UML learning curve, yet it also includes high-end functionality to empower users with the most compelling advantages of UML software development. get account balance get account balance get account balance Use case Sequence diagram Activity diagram Class diagram • Support for all 14 UML diagrams • Model Driven Architecture with trans- formation to and from UML, C#, C++, VB.NET, Java, databases, and XSD • SQL database modeling with SQL script generation • Support for all 9 SysML diagrams • Business process (BPMN) diagrams • Integrates with popular source control systems • Modeling of XML Schemas in UML diagrams • Source code generation in Java, C++, C#, and VB.NET languages • Reverse engineering of existing Java, C++, C#, and VB.NET code and binary files • Generation of customizable project documentation • Tight integration with Visual Studio® UModel allows you to design your application with UML models, SysML and Eclipse and business process (BPMN 1.0 and 2.0) diagrams, plus a UML-style • Synchronizes model and code through XML Schema diagram for XML data architectures in your project. round-trip engineering Generate code in C#, C++, Java, or Visual Basic. Then enhance either • Diagram layers with selective visibility the code or model, and synchronize with round-trip • Support for XMI model interchange engineering. Or, reverse-engineer an existing application for visual analysis. UModel adapts to Download your development style – you can run it inside a free trial now at www.altova.com Visual Studio, Eclipse, or as a stand-alone tool.
    [Show full text]
  • Node.Js I – Getting Started Chesapeake Node.Js User Group (CNUG)
    Node.js I – Getting Started Chesapeake Node.js User Group (CNUG) https://www.meetup.com/Chesapeake-Region-nodeJS-Developers-Group Agenda ➢ Installing Node.js ✓ Background ✓ Node.js Run-time Architecture ✓ Node.js & npm software installation ✓ JavaScript Code Editors ✓ Installation verification ✓ Node.js Command Line Interface (CLI) ✓ Read-Evaluate-Print-Loop (REPL) Interactive Console ✓ Debugging Mode ✓ JSHint ✓ Documentation Node.js – Background ➢ What is Node.js? ❑ Node.js is a server side (Back-end) JavaScript runtime ❑ Node.js runs “V8” ✓ Google’s high performance JavaScript engine ✓ Same engine used for JavaScript in the Chrome browser ✓ Written in C++ ✓ https://developers.google.com/v8/ ❑ Node.js implements ECMAScript ✓ Specified by the ECMA-262 specification ✓ Node.js support for ECMA-262 standard by version: • https://node.green/ Node.js – Node.js Run-time Architectural Concepts ➢ Node.js is designed for Single Threading ❑ Main Event listeners are single threaded ✓ Events immediately handed off to the thread pool ✓ This makes Node.js perfect for Containers ❑ JS programs are single threaded ✓ Use asynchronous (Non-blocking) calls ❑ Background worker threads for I/O ❑ Underlying Linux kernel is multi-threaded ➢ Event Loop leverages Linux multi-threading ❑ Events queued ❑ Queues processed in Round Robin fashion Node.js – Event Processing Loop Node.js – Downloading Software ➢ Download software from Node.js site: ❑ https://nodejs.org/en/download/ ❑ Supported Platforms ✓ Windows (Installer or Binary) ✓ Mac (Installer or Binary) ✓ Linux
    [Show full text]
  • Complexity Revisited
    23%#52 4% )4 5 9 0 , ! - " / # + @ P : K < J@ .E@M<I Comp215: Introduction to JavaScript 23%#52 4% )4 5 9 0 , ! - Dan S. Wallach (Rice University) " / # + @ P : K < J@ .E@M<I Copyright ⓒ 2015, Dan S. Wallach. All rights reserved. What does JavaScript have to do with the Web? Way back in 1995... Web browsers had no way to run external code But, there were tons of “mobile code systems” in the world Tcl/Tk: Popular with Unix tool builders, still running today in many places Java: Originally targeting television set-top boxes Released in ’95 with “HotJava” web browser Many others that never achieved commercial success Meanwhile, inside Netscape... Mocha --> LiveScript --> JavaScript Brendan Eich’s original goals of JavaScript: Lightweight execution inside the browser Safety / security Easy to learn / easy to write Scheme-liKe language with C / Java-liKe syntax Easy to add small behaviors to web pages One-liners: click a button, pop up a menu The big debate inside Netscape therefore became “why two languages? why not just Java?” The answer was that two languages were required to serve the two mostly-disjointMocha audiences --> in the LiveScript programming ziggurat --> who JavaScriptmost deserved dedicated programming languages: the component authors, who wrote in C++ or (we hoped)Brendan Java; and Eich’s the “scripters”, original goals amateur of orJavaScript: pro, who would write code directly embeddedLightweight in HTML. execution inside the browser Safety / security Whether anyEasy existing to learn language / easy tocould write be used, instead of inventing a new one, was also notScheme-liKe something language I decided.
    [Show full text]
  • Debugging Javascript
    6803.book Page 451 Thursday, June 15, 2006 2:24 PM APPENDIX ■ ■ ■ Debugging JavaScript In this appendix, I will introduce you to some tricks and tools to debug your JavaScript code. It is very important to get acquainted with debugging tools, as programming consists to a large extent of trying to find out what went wrong a particular time. Some browsers help you with this problem; others make it harder by having their debugging tools hidden away or returning cryptic error messages that confuse more than they help. Some of my favorites include philo- sophical works like “Undefined is not defined” or the MSIE standard “Object doesn’t support this property or method.” Common JavaScript Mistakes Let’s start with some common mistakes that probably every JavaScript developer has made during his career. Having these in the back of your head when you check a failing script might make it a lot quicker to spot the problem. Misspellings and Case-Sensitivity Issues The easiest mistakes to spot are misspellings of JavaScript method names or properties. Clas- sics include getElementByTagName() instead of getElementsByTagName(), getElementByID() instead of getElementById() and node.style.colour (for the British English writers). A lot of times the problem could also be case sensitivity, for example, writing keywords in mixed case instead of lowercase. If( elm.href ) { var url = elm.href; } There is no keyword called If, but there is one called if. The same problem of case sensi- tivity applies to variable names: var FamilyGuy = 'Peter'; var FamilyGuyWife = 'Lois'; alert( 'The Griffins:\n'+ familyGuy + ' and ' + FamilyGuyWife ); This will result in an error message stating “familyGuy is not defined”, as there is a variable called FamilyGuy but none called familyGuy.
    [Show full text]
  • A City of Opportunity
    INNOVATION. CONNECTION. OPPORTUNITY. A city of opportunity www.investnewcastle.com WWW.INVESTNEWCASTLE.COM 1 Newcastle, the regional capital of North East England, is one of WHO’S HERE? the UK’s core cities and an integral part of the Northern Powerhouse. Newcastle has an impressive track record in the attraction of overseas investment as well as With Leeds and Manchester just a couple of hours to the south establishing and supporting home-grown businesses. and Edinburgh less than two hours to the north, we are perfectly From software giants to high street banks and world leaders in research, global brands have chosen to placed for businesses to establish a UK base. make North East England their UK home. 4Projects ACCORD HEALTHCARE PROCTER & GAMBLE Concentrix British Airways VIRGIN MONEY Santander Cundall Tesco Bank Greggs Go Ahead Group NESTLÉ Bellway Pearson Engineering Aesica Pharmaceuticals Bridon Ropes DELOITTE Bel Valves EY Teleperformance HITACHI RAIL GE Oil & Gas Union Electric Steel Northern Power Grid Zerolight WORLDPAY DWP/HMRC Northumbrian Water Barclays Bank BskyB Komatsu Shire Pharmaceuticals THE SAGE GROUP PLC The AA RINGTONS SIEMENS Bede Gaming North of England P&I Reece Engineering TECHNIP UMBILICALS Akzo Nobel Ubisoft Accenture NISSAN NEWCASTLE With access to three major ports, the East Coast high-speed train The economy is fundamentally strong, highly competitive, and From major international investments to home-grown talent and exciting line providing fast and regular travel to London in less than three has been the fastest-growing economy in the G7 in recent years. start-ups, there are many reasons to bring your business to Newcastle.
    [Show full text]