CMSC434 TUTORIAL #3 HTML CSS JavaScript Jquery Ajax + Google AppEngine Mobile WebApp HTML5



Similar documents
The purpose of jquery is to make it much easier to use JavaScript on your website.

jquery Tutorial for Beginners: Nothing But the Goods

Example. Represent this as XML

PLAYER DEVELOPER GUIDE

Performance Testing for Ajax Applications

MASTERTAG DEVELOPER GUIDE

Citrix StoreFront. Customizing the Receiver for Web User Interface Citrix. All rights reserved.

jquery Programming Cookbook jquery Programming Cookbook

BT CONTENT SHOWCASE. JOOMLA EXTENSION User guide Version 2.1. Copyright 2013 Bowthemes Inc.

Client-side Web Engineering From HTML to AJAX

Pay with Amazon Integration Guide

Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator

Debugging JavaScript and CSS Using Firebug. Harman Goei CSCI 571 1/27/13

Dashboard Skin Tutorial. For ETS2 HTML5 Mobile Dashboard v3.0.2

Progressive Enhancement With GQuery and GWT. Ray Cromwell

Advantage of Jquery: T his file is downloaded from

Overview. In the beginning. Issues with Client Side Scripting What is JavaScript? Syntax and the Document Object Model Moving forward with JavaScript

It is highly recommended that you are familiar with HTML and JavaScript before attempting this tutorial.

Credits: Some of the slides are based on material adapted from

Subject Tool Remarks What is JQuery. Slide Javascript Library

Web. Programming. Hans- Pe0er Halvorsen, M.Sc. h0p://home.hit.no/~hansha/?page=sojware_development

Making Web Application using Tizen Web UI Framework. Koeun Choi

Visualizing a Neo4j Graph Database with KeyLines

Building Ajax Applications with GT.M and EWD. Rob Tweed M/Gateway Developments Ltd

DIPLOMA IN WEBDEVELOPMENT

WEB DEVELOPMENT COURSE (PHP/ MYSQL)

Web application Architecture

BT BACKGROUND SLIDESHOW JOOMLA EXTENSION User guide Version 2.0

Chapter 3: Web Paradigms and Interactivity

Visualizing an OrientDB Graph Database with KeyLines

Using HTML5 Pack for ADOBE ILLUSTRATOR CS5

Web Programming Step by Step

Using jquery and CSS to Gain Easy Wins in CiviCRM

Building Responsive Websites with the Bootstrap 3 Framework

Developing Offline Web Application

DESIGNING HTML HELPERS TO OPTIMIZE WEB APPLICATION DEVELOPMENT

Rich Internet Applications

Modern Web Development:

Introduction to web development and JavaScript

SizmekFeatures. HTML5JSSyncFeature

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

Term Paper. P r o f. D r. E d u a r d H e i n d l. H o c h s c h u l e F u r t w a n g e n U n i v e r s i t y. P r e s e n t e d T o :

CLASSROOM WEB DESIGNING COURSE

CarTrawler AJAX Booking Engine Version: 5.10 Date: 01/10/13.

Adding Panoramas to Google Maps Using Ajax

MAGENTO THEME SHOE STORE

Next Generation Clickjacking

A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server

Website Login Integration

1. User Guide API overview addon - xml Definition addon.background addon.background.script

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Sizmek Features. Wallpaper. Build Guide

WebIOPi. Installation Walk-through Macros

USER S MANUAL JOOMLA! GOVERNMENT WEB TEMPLATE

This matches a date in the MM/DD/YYYY format in the years The date must include leading zeros.

Fortis Theme. User Guide. v Magento theme by Infortis. Copyright 2012 Infortis

A set-up guide and general information to help you get the most out of your new theme.

IMRG Peermap API Documentation V 5.0

Table of Contents. Overview Supported Platforms Demos/Downloads Known Issues Note Included Files...

Reading an sent with Voltage Secur . Using the Voltage Secur Zero Download Messenger (ZDM)

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc.

Interactive Data Visualization for the Web Scott Murray

Web Design Technology

Single Page Web App Generator (SPWAG)

Step One Check for Internet Connection

Bazaarvoice for Magento

Table of contents. HTML5 Data Bindings SEO DMXzone

Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL

Webapps Vulnerability Report

HP Business Process Monitor

Magic Liquidizer Documentation

Reference Guide for WebCDM Application 2013 CEICData. All rights reserved.

AJAX with jquery. ACM Webmonkeys 2011

BT MEDIA JOOMLA COMPONENT

Getting Started Guide with WIZ550web

Open CTI Developer's Guide

Software Requirements Specification For Real Estate Web Site

Mobile Web Design with HTML5, CSS3, JavaScript and JQuery Mobile Training BSP-2256 Length: 5 days Price: $ 2,895.00

BROWSER-BASED DEVELOPMENT & NETWORK MONITORING UTILITIES

Skills for Employment Investment Project (SEIP)

Ajax Development with ASP.NET 2.0

JQUERY - EFFECTS. Showing and Hiding elements. Syntax. Example

Team Members: Christopher Copper Philip Eittreim Jeremiah Jekich Andrew Reisdorph. Client: Brian Krzys

Magento Theme Instruction

Finding XSS in Real World

Certified PHP/MySQL Web Developer Course

Transcription:

CMSC434 TUTORIAL #3 HTML CSS JavaScript Jquery Ajax + Google AppEngine Mobile WebApp HTML5

JQuery Recap JQuery source code is an external JavaScript file <script src="h;p://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> Provides convenient selectors for DOM $( tag ), $( #id ), $(.class ), $(this), $( tag#id ), $( tag.class ) $( #id >.class:first ) Simpler methods for DOM manipulason $().css( font- size, 16px ) $().html( <div> hello </div> ), $().append( <div> added text </div> ) $().hide(), $().show( fast ) $().addclass( bu;onselected ), $().removeclass( bu;onnormal ) Event listener $().click( funcson () { // do something here } ); $(document).ready( funcson() { } ); Request data and Process response $.get( myhtmlpage.html, funcson(response) { // do something with response });

JQuery DOM ManipulaSon > reference page $(selector).append(content) >link : insert content to the end of the selected DOM element(s) : e.g. expanding list of items in Google Image search before <div class="container >!!<div class="inner">hello</div>!!<div class="inner">goodbye</div>! </div>! afer $('.inner').append('<p>test</p>'); <div class="container >!!<div class="inner">hello!!!<p>text</p>!!</div>!!<div class="inner">goodbye!!!<p>text</p>!!</div>! </div>! similarly, before() insert content before the selected, prepend() insert to the beginning in the selected elements.

JQuery DOM ManipulaSon > reference page $(selector1).remove(selector2) >link : remove selected item from DOM structure : remove items(selector2) in items(selector1) before <div class="container">!!<div class="hello">hello</div>!!<div class="goodbye">goodbye</div>! </div>! afer $('.hello').remove(); or $( div').remove(.hello ); <div class="container >!!<div class= goodbye">goodbye</div>! </div>!

JQuery effects > reference page.animate >link : creates animason effect using any numeric CSS property $('#clickme').click(function() {! $('#book').animate({! opacity: 0.25,! left: '+=50',! height: 'toggle'! }, 5000, function() {! // Animation complete.! });! });!.toggle >link : show & hide alternasvely in one acson $('#clickme').click(function() {!!$('#book').toggle('slow', function() {!!!// Animation complete.!!});! });!

JQuery UI example > reference page include this first! <script type="text/javascript" src="js/jquery- ui- 1.8.16.custom.min.js"></script> sortable resizable accordion datepicker tabs slider

AJAX Asynchronous JavaScript and XML Exchanging data with a server, and update parts of a web page- without reloading the whole page Why Asynchronous? Nobody wants to hold process while waisng for response from the server Define CallBack func+on that will handle the response later Examples? Google Instant Search Facebook show more feeds bu7on Use Firebug > Net panel to monitor current web page s Ajax communicason

How to use AJAX Using XMH;pRequest object and pure Javascript var xmlhttp; if (window.xmlhttprequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }! xmlhttp.onreadystatechange=function() { if (xmlhttp.readystate==4 && xmlhttp.status==200) { document.getelementbyid("mydiv").innerhtml=xmlhttp.responsetext; } } xmlhttp.open("get","ajax_info.txt",true); xmlhttp.send();! Using Jquery method: the type of request: GET or POST url: the locason of the file on the server async: true (asynchronous) or false (synchronous) creasng object callback funcson it selects mydiv and replace its inner html with response from the server execute $.ajax({!type: GET,!!!!url: ajax_info.txt,!!!!success: function(response) { $( #mydiv ).html(response); }! });!

$.ajax in detail $.ajax({!type: POST, // GET (Default) or POST!!!!!!url: some.php,!!!!!!data : name=john&location=boston,!!!!!!async: true, // if false, browser holds until server responds!!!!!!success: function(response) {!!!!!!!var data = $.parsejson(response);!!!!!!!!!$( #console ).text(data.message);!!!!!!!$.each(data.games, function(i,v) {!!!!!!!!$( #gamelist ).append(!!!!!!!!! <DIV> +v.name+, +v.desc+ </DIV>!!!!!!!!);!!!!!!!});!!!!!!},!!! });! $.parsejson converts string to JavaScript object. In this example, we assumed to get response like { message : you have games below, games : [ [ name : call of duty, desc : black ops ], [ name : diablo 3, desc : awesome game ] ] } And parsed JavaScript object will be assigned to data, so that data.message = you have games below data.games[0].name = call of duty, This iterates each element of data.games. i : index number (0~ ), and v : element of each itera+on.

Google AppEngine (GAE) > reference page What is it? it s a web server + DB system Use Python or JAVA Why GAE? free when it s small No complex system administrason Scale up automascally RelaSvely simple to code Downside Stuck in GAE I m too spoiled to use PHP again L

GAE demo