JQuery Refactoring how we think about client-side scripting Andrew Roazen Cline Library Technology Services February 8, 2011.

Slides:



Advertisements
Similar presentations
Getting Started with jQuery. 1. Introduction to jQuery 2. Selection and DOM manipulation Contents 2.
Advertisements

ProJAX An AJAX Framework for Progress Tom Bascom President Greenfield Technologies
Jax Code Camp 2010 Good morning. iPhone Dev How to develop for the iOS 4.
Vishal Kumar 06131A1258. Why you’re going to love jQuery!
What’s new in ASP.NET 3.5? Mike Ormond Developer & Platform Group Microsoft Ltd
CS428 Web Engineering Lecture 15 Introduction to Jquery.
JQuery. What is jQuery? jQuery is a fast, small, and feature-rich JavaScript library that simplifies HTML document traversing and manipulation event handling.
Philly.NET Hands-On jQuery + Plug-ins Bill Wolff, Rob Keiser.
Pengantar Teknologi Internet W15: Advanced Scripting.
Definition from Wikipedia.  The Prototype JavaScript Framework  implemented as a single file of JavaScript code  named prototype.js (
DHTML - Introduction Introduction to DHTML, the DOM, JS review.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
JavaScript, jQuery & AJAX. What is JavaScript? An interpreted programming language with object oriented capabilities. Not Java! –Originally called LiveScript,
What is jQuery?  JavaScript Library  Functionality  DOM scripting & event handling  Ajax  User interface effects  Form validation 2.
Philly.NET Hands-on Labs JAVASCRIPT SERIES. July 9: JavaScript Syntax Visual Studio ◦Projects ◦Editors ◦Debugging ◦Script blocks ◦Minification and bundling.
XForms: A case study Rajiv Shivane & Pavitar Singh.
Ajax Runtime Toolkits IBM Emerging Technologies. What is an AJAX Toolkit/Framework? An AJAX Toolkit/Runtime is more than just XMLHTTPRequest Should includes:
JQuery March 09 th,2009 Create by
A really fairly simple guide to: mobile browser-based application development (part 4, JQuery & DOM) Chris Greenhalgh G54UBI / Chris Greenhalgh.
JQUERY | INTRODUCTION. jQuery  Open source JavaScript library  Simplifies the interactions between  HTML document, or the Document Object Model (DOM),
Review IDIA 619 Spring 2013 Bridget M. Blodgett. HTML A basic HTML document looks like this: Sample page Sample page This is a simple sample. HTML user.
Working with Objects Creating a Dynamic Web Page.
CITS1231 Web Technologies JavaScript and Document Object Model.
AJAX and Atlas in ASP.NET 2.0 William J. Steele MSDN Developer Evangelist Microsoft Corporation
Jquery Nasrullah. Jquery jQuery is a JavaScript Library. jQuery greatly simplifies JavaScript programming. jQuery is easy to learn.
JavaScript Frameworks Presented by Kyle Goins Also see:
DHTML - Introduction Chapter Introduction to DHTML, the DOM, JS review.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scripting with the DOM Ellen Pearlman Eileen Mullin Programming the Web.
JQuery Fairway Code Brew. Agenda What is jQuery? No, really, what is it? Show me something cool Why should I use it? Disturbing photo More features FlexBox.
DHTML: Working with Objects Creating a Dynamic Web Page.
. Taught by: Muhammad Ali Baloch midahot. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between.
Unleash the Power of jQuery Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
JQuery Javascript Library. JQuery Powerful JavaScript library –Simplify common JavaScript tasks –Access parts of a page using CSS or XPath-like expressions.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
JQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved.
COSC617 Project XML Tools Mark Liu Sanjay Srivastava Junping Zhang.
Unleash the Power of jQuery Learning & Development Team Telerik Software Academy.
JQuery Overview Unleash the Power of jQuery SoftUni Team Technical Trainers Software University
Unit 13 –JQuery Basics Instructor: Brent Presley.
Web Technologies Lecture 8 JQuery. “A fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax.
Lesson 30: JavaScript and DHTML Fundamentals. Objectives Define and contrast client-side and server-side technologies used to create dynamic content for.
SHAREPOINT & JQUERY. Hi, my name and I am a product manager at lightning tools. I have been working with SharePoint for 5 years.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo HoarFundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy.
JQuery “write less, do more”. jQuery - Introduction Simply a JavaScript library to simplify JavaScript programming itself Wraps long standard JavaScript.
LECTURE #4: JQUERY AND FORM VALIDATION Josh Kaine Josh Kaine 4/1/2016.
The New Face of ASP.NET ASP.NET MVC, Razor, and jQuery Ido Flatow | Senior Architect | Sela | This session is.
Introduction to Web Site Development Department of Computer Science California State University, Los Angeles Lecture 9: JavaScript.
.. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between HTML and JavaScript. The jQuery library.
Javascript Prof. Wenwen Li School of Geographical Sciences and Urban Planning 5644 Coor Hall
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
SharePoint & jQuery. About me Phill Duffy – Product Manager at Lightning Tools Ltd – Author of ‘Pro SharePoint with jQuery’ – MCTS Application Developer.
JQuery Fundamentals Introduction Tutorial Videos
What is jQuery?.
Tk Widgets in Javascript
Tek Raj Chhetri Code for Humans not for machine.
Development of Internet Applications jQuery, TypeScript, LESS
Intro to jQuery jQuery is a popular, and extensible, JavaScript library Supports … DOM manipulation CSS manipulation HTML event methods Effects & animations.
User Interface Design and Usability jQuery, jQuery UI & jQuery Plugins
JQuery.
JQUERY Online TRAINING AT GOLOGICA
Application with Cross-Platform GUI
The Cliff Notes Version
JavaScript Introduction
JQuery with ASP.NET.
Modern web applications
Modern web applications
MIS JavaScript and API Workshop (Part 2)
Getting started with jQuery
Document Object Model.
Chengyu Sun California State University, Los Angeles
Presentation transcript:

jQuery Refactoring how we think about client-side scripting Andrew Roazen Cline Library Technology Services February 8, 2011

What is jQuery? A library providing a superset of JavaScript An extensible, pluggable platform A way of more intuitively programming the Web

Foundations of jQuery JavaScript (Brendan Eich, 1995) – Inspired by HyperCard’s interactivity and Java’s object-oriented features – Designed as “Java Lite” with a minimum of bloat and a shallow learning curve for Java/C programmers – Quickly cloned by MS: extended, embraced… but not extinguished

Foundations of jQuery Problems with JavaScript – Incompatibility: No vendor consensus on implementation of object/event referencing, object positioning or even event capturing – CSS still a draft concept – Target audience largely not Java/C programmers – Massive reinvention of wheel to perform simple tasks

Foundations of jQuery Cross-browser libraries (early 2000s) – Simple wrapper functions which replace incompatible native object referencing/event capturing functionality – The beginnings of effects libraries built on these wrapper functions (script.aculo.us, MooTools) – Libraries became larger and more complex but not proportionately mature – A tendency to focus on user experience rather than the broader underlying issue behind it: a low level language meant to solve a platform-specific task

Foundations of jQuery CSS behaviors (IE-only, early 2000s) – Introduced the ability to attach function-based behaviors to classes rather than named objects – Benefits of prototyping without the overhead – Not part of any recognized standard – No adoption outside IE

Enter jQuery jQuery (John Resig, 2006) – Inspired by: IE’s CSS behaviors CSS selector syntax XLST (Xpath) selector syntax

Enter jQuery jQuery (John Resig, 2006) – Selectors: object abstraction by Xpath-like queries describing/combining class, ID, tag, node relationship, attribute values, etc. – Code written as chainable methods applied to selector queries, making code compact and intent more concrete – Utility functions for the most common interactive content development tasks: Xpath-flavored DOM node traversal / manipulation Event handling, from simple capturing to complex delegation/queuing Form control /control status selectors Basic CSS effects/animation AJAX / JSON / XML.data() method for storing/querying arbitrary data structures in an element

Enter jQuery jQuery (John Resig, 2006) – Unobtrusive JavaScript: script never appears inside, separating content and controller – Nonbloated: Base library only 29K minified/gzipped, 207k uncompressed Extensive plugins libraries as simple or complex as your needs jQuery UI for the more sophisticated widgets / effects – MIT/GPL2 license Bundled into a growing number of sites and commercial/open source products CDN hosted by Google, Microsoft as well as jquery.com itself

Enter jQuery jQuery (John Resig, 2006) – Mature: consistently fine tuned for speed and stability (leveraging native platform strengths where possible) resisting explosive or trendy feature creep stewarded by a large enough user/developer base to make it unlikely to become abandonware – Aggressively cross-browser compatible, standards compliant and adaptive to trends in web technologies

Example JavaScript: function newswap (target) { for (var i in this) { myobj = document.getElementById(this[i]); if (i != 'swapit') {myobj.style.display = 'none';} } document.getElementById (this[target]).style.display = 'block'; } Array.prototype.swapit = newswap; jQuery: $("select.swaptext").change (function() { var annot =$(this).closest('form').find('.note'); $(annot).find('div').hide(); $('#'+$(annot).attr('id')+$(this).val()).show(); });