Widget Summit: Advanced JavaScript Joseph Smarr Plaxo, Inc. October 16, 2007.

Slides:



Advertisements
Similar presentations
Building Fast 3rd-Party Webapps O'Reilly Velocity Web Performance and Operations Conference 24 June Lessons.
Advertisements

Performance Challenges for the Open Web Stanford CS193H 29 September 2008.
CS193H: High Performance Web Sites Lecture 12: Rule 8 – Make JavaScript and CSS External Steve Souders Google
CS193H: High Performance Web Sites Lecture 19: Vol 2 – Load Scripts Without Blocking Steve Souders Google
High-Performance JavaScript: Why Everything Youve Been Taught is Wrong Joseph Smarr Plaxo, Inc.
The Internet and the Web
1 The phone in the cloud Utilizing resources hosted anywhere Claes Nilsson.
By Loukik Purohit & Rohit Ghatol
Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
Testing Web Applications & Services Testing Web Applications & Web Services.
Copyright © Steven W. Johnson
Web Toolkit Julie George & Ronald Lopez 1. Requirements  Java SDK version 1.5 or later  Apache Ant is also necessary to run command line arguments 
JavaScript and AJAX Jonathan Foss University of Warwick
Javascript Introduction Norman White Material is from w3schools.com Go there to run examples interactively.
Introduction to HTML5 Programming donghao. HTML5 is the New HTML Standard New Elements, Attributes. Full CSS3 Support Video and Audio 2D/3D Graphics Local.
Introduction to jQuery (for Drupal) Amit Asaravala “aasarava” on drupal.org.
GATEKEEPER MOSTLY STATIC ENFORCEMENT OF SECURITY AND RELIABILITY PROPERTIES FOR JAVASCRIPT CODE Salvatore Guarnieri & Benjamin Livshits Presented by Michael.
Team Members: Brad Stancel,
9. AJAX & RIA. 2 Motto: O! call back yesterday, bid time return. — William Shakespeare.
Blackbox Reversing of XSS Filters Alexander Sotirov ekoparty 2008.
Cloud Computing Lecture #7 Introduction to Ajax Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under a.
Does Ajax suck? CS575 Spring 2007 Chanwit Suebsureekul.
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
ITM352 Javascript and Dynamic Web Pages: Client Side Processing.
Mark Phillip markphillip.com 200s, 304s, Expires Headers, HTTP Compression, And You.
Definition from Wikipedia.  The Prototype JavaScript Framework  implemented as a single file of JavaScript code  named prototype.js (
1 Ajax. 2 What’s Ajax? AJAX is a combination of a few technologies that has come together in the past few years AJAX used to be an acronym for Asynchronous.
Lecture 12 – AJAX SFDV3011 – Advanced Web Development Reference: 1.
Introduction to ArcGIS API for JavaScript
AJAX Without the “J” George Lawniczak. What is Ajax?
Bridges To Computing General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. You are invited.
Intro to Ajax Fred Stluka Jan 25, /25/2006Intro to AjaxFred Stluka2 What is Ajax? "Asynchronous JavaScript and XML" New name for an old technique:
Copyright 2007 Adobe Systems Incorporated. 1 ColdFusion 8 : Advanced AJAX Development Rakshith N Computer Scientist Jan 02, 2008.
Instructor, Dr. Khalili Bahram Jeevan Kumar Gogineni.
Smarten Up Your Address Book with a Plaxo Mashup Presentation to Mashup University Joseph Smarr Plaxo, Inc. July 11, 2006.
Joseph Smarr - Cross-Site Ajax 1 Cross-Site Ajax Challenges and Techniques for Building Rich Web 2.0 Mashups Joseph Smarr Plaxo, Inc.
JavaScript, Fourth Edition
Understanding AJAX Hype, Hope, Hurt and Help for the Web MJTS May 4th, 2006 _________________________ Terence Conklin, Conklin Systems
Cross Site Integration “mashups” cross site scripting.
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 1.
JQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved.
NEXT GEN YSLOW Marcel Duran Betty Tso Exceptional Performance Team.
Safe browsing - is an ad-blocker extension enough? AIMILIOS TSOUVELEKAKIS IT-DI-CSO IT LIGHTNING TALK – 12/
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Joseph Smarr A Practical Vision for Friends-List Portability Joseph Smarr IIW 2007b, 12/5/2007.
Rich Internet Applications 3. Client JavaScript. Document Object Model (DOM) The DOM, is an interface that allows scripts or programs to access and manipulate.
JavaScript Overview Developer Essentials How to Code Language Constructs The DOM concept- API, (use W3C model) Objects –properties Methods Events Applications;
Event Handling & AJAX IT210 Web Systems. Question How do we enable users to dynamically interact with a website? Answer: Use mouse and keyboard to trigger.
AJAX Use Cases for WSRP Subbu Allamaraju BEA Systems Inc WSRP F2F Meeting, May 2006.
AJAX CS456 Fall Examples Where is AJAX used? Why do we care?
JQUERY AND AJAX
IN THIS LESSON WE WILL REVIEW THE STRUCTURE OF THE INTERNET AND HOW BROWSERS ASSEMBLE WEBSITES BASED ON INSTRUCTIONS THEY RECEIVE FROM SERVERS. Internet.
Website Update and Use of Official accounts Dr.Lasantha Ranwala ( MBBS,MSc-Biomedical Informatics) Medical Officer - Health Informatics RDHS Office.
4.3. Code animations by using JavaScript Access data access by using JavaScript. Creating Animations, Working with Graphics, and Accessing Data.
INNOV-16: Rich User Interface for the Web???? AJAX to the Rescue Ken Wilner VP of Technology Progress Software.
JQuery Fundamentals Introduction Tutorial Videos
Web Technologies Computing Science Thompson Rivers University
Subbu Allamaraju BEA Systems Inc
Application with Cross-Platform GUI
AJAX.
Giuseppe Attardi Università di Pisa
Asynchronous Javascript And XML
JavaScript CS 4640 Programming Languages for Web Applications
Intro to Ajax Fred Stluka Jan 25, 2006.
Web Technologies Computing Science Thompson Rivers University
Web Programming and Design
Exploring DOM-Based Cross Site Attacks
JavaScript CS 4640 Programming Languages for Web Applications
Presentation transcript:

Widget Summit: Advanced JavaScript Joseph Smarr Plaxo, Inc. October 16, 2007

Joseph Smarr, Plaxo, Inc. JosephSmarr.com About me -Chief Platform Architect at Plaxo -First employee (March 2002) -Architect and lead developer for Plaxo Online -Abusing web browsers since 1993 (Mosaic) -Plaxo Online 2.0 (AJAX via iframes in 2004) -Plaxos Address Book Access Widget -JavaScript Wormhole

Joseph Smarr, Plaxo, Inc. JosephSmarr.com About Plaxo -Smart Address Book -Syncs address book and calendar with lots of places -User updates their contact info you get it automatically -Founded in 2002, ~50 employees, 15M+ users -Backed by Sequoia, Ram Shriram, Tim Koogle, et al

Joseph Smarr, Plaxo, Inc. JosephSmarr.com Plaxo Online AJAX Desktop beta.plaxo.com Flexible desktop Contacts Calendar Tasks Notes Sync dashboard Pulse Profile / settings

Joseph Smarr, Plaxo, Inc. JosephSmarr.com Plaxo Online AJAX Desktop beta.plaxo.com Flexible desktop Contacts Calendar Tasks Notes Sync dashboard Pulse Profile / settings

Joseph Smarr, Plaxo, Inc. JosephSmarr.com Why JavaScript is special -Downloading / running source code in the browser -Downloading / running JS blocks the browser -Code from different domains executing together -Extremely open, flexible, dynamic language You can do a lot of good, and a lot of harm!

Joseph Smarr, Plaxo, Inc. JosephSmarr.com Firebug: A web hackers best friend -DOM inspector, CSS tweaker, profiler, and more!

Joseph Smarr, Plaxo, Inc. JosephSmarr.com Secrets to high-performance widgets -Write less code -Draw HTML efficiently -Yield early and often -Profile like crazy

Joseph Smarr, Plaxo, Inc. JosephSmarr.com Drawing HTML efficiently -document.write vs. DOM manipulation vs. innerHTML -Attaching event handlers (direct vs. listeners) -Drawing immediately vs. later (e.g. onload) -Yielding (staging load, responsiveness) -Use setTimeout(func, 0) to yield to the browser UI -

Joseph Smarr, Plaxo, Inc. JosephSmarr.com Software design best practices -Packages / namespaces for your code -plaxo.widget.doSomething() -Private vars (I tend not to use them) -Global vs. instance objects -Multiple copies of your widgets on the same page? -Event system -Dont steal / clobber existing event handlers -Load on-demand if you have a lot of code -Use a framework like dojo, etc.

Joseph Smarr, Plaxo, Inc. JosephSmarr.com Communication / security -Same-origin policy (cant normally talk between sites) -Using JSON + callbacks for 3 rd party API calls -Security issues (3 rd party access to cookies, etc.) -No personally identifiable info in 3rd-party JSON calls (w/o auth token) -Danger of raw eval (use pre-eval JSON regex) if (/^[\],:{}\s]*$/.test(this.replace(/\\./g, replace(/"[^"\\\n\r]*"|true|false|null|- ?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, ']'). replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { // … youre safe! }

Joseph Smarr, Plaxo, Inc. JosephSmarr.com Conclusion: You have the power -JavaScript is wonderfully powerful and flexible -…so dont make your host sites slow or insecure! -Follow the High-Performance JavaScript Mantra: -Be Lazy, Be Responsive, Be Pragmatic, Be Vigilant -Want more?