Ajax, the Popular Term for Asynchronous Javascript and XML, Is One of the Most Important Combinations of Technologies for Web Developers to Know These Days

Total Page:16

File Type:pdf, Size:1020Kb

Ajax, the Popular Term for Asynchronous Javascript and XML, Is One of the Most Important Combinations of Technologies for Web Developers to Know These Days Ajax Hacks By Bruce W. Perry ............................................... Publisher: O'Reilly Pub Date: March 2006 Print ISBN-10: 0-596-10169-4 Print ISBN-13: 978-0-59-610169-5 Pages: 438 Table of Contents | Index Ajax, the popular term for Asynchronous JavaScript and XML, is one of the most important combinations of technologies for web developers to know these days. With its rich grouping of technologies, Ajax developers can create interactive web applications with XML-based web services, using JavaScript in the browser to process the web server response. Taking complete advantage of Ajax, however, requires something more than your typical "how-to" book. What it calls for is Ajax Hacks from O'Reilly. This valuable guide provides direct, hands-on solutions that take the mystery out of Ajax's many capabilities. Each hack represents a clever way to accomplish a specific task, saving you countless hours of searching for the right answer. A smart collection of 100 insider tips and tricks,Ajax Hacks covers all of the technology's finer points. Want to build next-generation web applications today? This book can show you how. Among the multitude of topics addressed, it shows you techniques for: Using Ajax with Google Maps and Yahoo Maps Displaying Weather.com data Scraping stock quotes Fetching postal codes Building web forms with auto-complete functionality Ajax Hacks also features a number of advanced hacks for accelerated web developers. Discover how to create huge, maintainable bookmarklets, how to use client-side storage for Ajax applications, and how to call a built-in Java object from JavaScript using Ajax. The book even addresses best practices for testing Ajax applications and improving maintenance, performance, and reliability for JavaScript code. The latest in O"Reilly's celebrated Hacks series, Ajax Hacks smartly complements other O'Reilly titles such as Head Rush Ajax and JavaScript: The Definitive Guide. Ajax Hacks By Bruce W. Perry ............................................... Publisher: O'Reilly Pub Date: March 2006 Print ISBN-10: 0-596-10169-4 Print ISBN-13: 978-0-59-610169-5 Pages: 438 Table of Contents | Index Foreword credits Credits About the Author Contributors Acknowledgments Preface Building Single-Page Applications Explaining Ajax How to Use This Book How This Book Is Organized Conventions Used in This Book Using Code Examples Safari Enabled How to Contact Us Got a Hack? Chapter 1. Ajax Basics It's Not a Floor Wax Handle with Care XMLHttpRequest Hack 1. Detect Browser Compatibility with the Request Object Hack 2. Use the Request Object to POST Data to the Server Hack 3. Use Your Own Library for XMLHttpRequest Hack 4. Receive Data as XML Hack 5. Get Plain Old Strings Hack 6. Receive Data as a Number Hack 7. Receive Data in JSON Format Hack 8. Handle Request Object Errors Hack 9. Dig into the HTTP Response Hack 10. Generate a Styled Message with a CSS File Hack 11. Generate a Styled User Message on the Fly Chapter 2. Web Forms Hack 12. Submit Text Field or textarea Values to the Server Without a Browser Refresh Hack 13. Display Text Field or textarea Values Using Server Data Hack 14. Submit Selection-List Values to the Server Without a Round Trip Hack 15. Dynamically Generate a New Selection List Using Server Data Hack 16. Extend an Existing Selection List Hack 17. Submit Checkbox Values to the Server Without a Round Trip Hack 18. Dynamically Generate a New Checkbox Group with Server Data Hack 19. Populate an Existing Checkbox Group from the Server Hack 20. Change Unordered Lists Using an HTTP Response Hack 21. Submit Hidden Tag Values to a Server Component Chapter 3. Validation Hack 22. Validate a Text Field or textarea for Blank Fields Hack 23. Validate Email Syntax Hack 24. Validate Unique Usernames Hack 25. Validate Credit Card Numbers Hack 26. Validate Credit Card Security Codes Hack 27. Validate a Postal Code Chapter 4. Power Hacks for Web Developers Hack 28. Get Access to the Google Maps API Hack 29. Use the Google Maps API Request Object Hack 30. Use Ajax with a Google Maps and Yahoo! Maps Mash-up Hack 31. Display a Weather.com XML Data Feed Hack 32. Use Ajax with a Yahoo! Maps and GeoURL Mash-up Hack 33. Debug Ajax-Generated Tags in Firefox Hack 34. Fetch a Postal Code Hack 35. Create Large, Maintainable Bookmarklets Hack 36. Use Permanent Client-Side Storage for Ajax Applications Hack 37. Control Browser History with iframes Hack 38. Send Cookie Values to a Server Program Hack 39. Use XMLHttpRequest to Scrape an Energy Price from a Web Page Hack 40. Send an Email with XMLHttpRequest Hack 41. Find the Browser's Locale Information Hack 42. Create an RSS Feed Reader Chapter 5. Direct Web Remoting (DWR)for Java Jocks Hack 43. Integrate DWR into Your Java Web Application Hack 44. Use DWR to Populate a Selection List from a Java Array Hack 45. Use DWR to Create a Selection List from a Java Map Hack 46. Display the Keys/Values from a Java HashMap on a Web Page Hack 47. Use DWR to Populate an Ordered List from a Java Array Hack 48. Access a Custom Java Object with JavaScript Hack 49. Call a Built-in Java Object from JavaScript Using DWR Chapter 6. Hack Ajax with the Prototype and Rico Libraries Hack 50. Use Prototype's Ajax Tools with Your Application Hack 51. Update an HTML Element's Content from the Server Hack 52. Create Observers for Web Page Fields Hack 53. Use Rico to Update Several Elements with One Ajax Response Hack 54. Create a Drag-and-Drop Bookstore Chapter 7. Work with Ajax and Ruby on Rails Sensible MVC Hack 55. Install Ruby on Rails Hack 56. Monitor Remote Calls with Rails Hack 57. Make Your JavaScript Available to Rails Applications Hack 58. Dynamically Generate a Selection List in a Rails Template Hack 59. Find Out Whether Ajax Is Calling in the Request Hack 60. Dynamically Generate a Selection List Using Database Data Hack 61. Periodically Make a Remote Call Hack 62. Dynamically View Request Information for XMLHttpRequest Chapter 8. Savor the script.aculo.us JavaScript Library Hack 63. Integrate script.aculo.us Visual Effects with an Ajax Application Hack 64. Create a Login Box That Shrugs Off Invalid Logins Hack 65. Create an Auto-Complete Field with script.aculo.us Hack 66. Create an In-Place Editor Field Hack 67. Create a Web Form That Disappears When Submitted Chapter 9. Options and Efficiencies Hack 68. Fix the Browser Back Button in Ajax Applications Hack 69. Handle Bookmarks and Back Buttons with RSH Hack 70. Set a Time Limit for the HTTP Request Hack 71. Improve Maintainability, Performance, and Reliability for Large JavaScript Applications Hack 72. Obfuscate JavaScript and Ajax Code Hack 73. Use a Dynamic script Tag to Make Web Services Requests Hack 74. Configure Apache to Deal with Cross-Domain Issues Hack 75. Run a Search Engine Inside Your Browser Hack 76. Use Declarative Markup Instead of Script via XForms Hack 77. Build a Client-Side Cache Hack 78. Create an Auto-Complete Field Hack 79. Dynamically Display More Information About a Topic Hack 80. Use Strings and Arrays to Dynamically Generate HTML Index Foreword The truth is, I've never built an Ajax application. Sure, I've worked on Ajax projects. But when it comes to programming, my experience is pretty limited. I've done some JavaScripting here and there. I know a little Perl, but hardly enough to build a web application. As a programmer, I'm more of an occasional weekend hobbyist than anything else. You can imagine how frustrating it is for people to learn this fact when they send me emails asking for help with their JavaScript. But you can hardly fault them for expecting me to be a technologist. After all, I wrote an article coining the term "Ajax," and Ajax is all about technology, right? The funny thing is that I didn't see it that way when I was writing the essay. I didn't think I was writing for technologists at all. I'm a designer, and I thought I was writing for a design audience. If you look at some of the other things we've published on adaptivepath.com, you can see that we're much more likely to be talking about ways to analyze user behavior or make an experience connect with people than about the latest code libraries or data schemas. That's one reason some people thought it was a little strange for me to be writing about Ajax at all. Designers, one way of thinking goes, should leave writing about technology to technologists. But seeing Ajax as a purely technological phenomenon misses the point. If anything, Ajax is even more of a sea change for designers than it is for developers. Sure, there are a lot of ways in which developers need to change their thinking as they make the transition from building traditional web applications to building Ajax applications. But for those of us who design user experiences, the change brought about by Ajax is even more profound. We've gotten pretty good at our jobs in the last 10 years or so. We've started to get a handle on what the Web does well and what the Web does poorly. And we've developed an arsenal of conventions to rely on when we design applications: where the logo goes, how a link behaves when it is clicked, how to communicate that something even can be clicked... All of that knowledgewell, most of it, anywaygoes out the window with Ajax.
Recommended publications
  • OMA Specification
    Scalable Vector Graphics (SVG) for the Mobile Domain Candidate Version 1.0 – 24 Oct 2008 Open Mobile Alliance OMA-TS-SVG_Mobile-V1_0-20081024-C 2008 Open Mobile Alliance Ltd. All Rights Reserved. Used with the permission of the Open Mobile Alliance Ltd. under the terms as stated in this document. [OMA-Template-Spec-20080101-I] OMA-TS-SVG_Mobile-V1_0-20081024-C Page 2 (30) Use of this document is subject to all of the terms and conditions of the Use Agreement located at http://www.openmobilealliance.org/UseAgreement.html. Unless this document is clearly designated as an approved specification, this document is a work in process, is not an approved Open Mobile Alliance™ specification, and is subject to revision or removal without notice. You may use this document or any part of the document for internal or educational purposes only, provided you do not modify, edit or take out of context the information in this document in any manner. Information contained in this document may be used, at your sole risk, for any purposes. You may not use this document in any other manner without the prior written permission of the Open Mobile Alliance. The Open Mobile Alliance authorizes you to copy this document, provided that you retain all copyright and other proprietary notices contained in the original materials on any copies of the materials and that you comply strictly with these terms. This copyright permission does not constitute an endorsement of the products or services. The Open Mobile Alliance assumes no responsibility for errors or omissions in this document.
    [Show full text]
  • Efficient XML Processing in Browsers
    Efficient XML Processing in Browsers R. Alexander Milowski ILCC, School of Informatics, University of Edinburgh [email protected] Motivation Partially, in response to the anti-XML crowd's complaints about XML in browser applications: XML slow, inefficient way to deliver data, JSON is simpler and more directly usable, and several other red herrings. Mostly because I want it! ...pretty shiny XML objects... The reality: XMLHttpRequest is insufficient for both XML and JSON delivery. Why and what do you do about processing large amounts of XML data efficiently in browsers? Inefficiencies with XMLHttpRequest Three general deficiencies: 1. If the response is not XML and not characters, there is little support for handling the entity body (e.g. images). 2. If the response is not XML but is characters, treating it as XML or as a sequence of characters may be wasteful. 3. If the response is XML, the "whole document" intermediary DOM may be wasteful. This talk is about concerned with #3. Strategy We want flexibility and choice in our processing model: whole document, subsetting, multiple DOMs, view porting, filtering, or just a stream of events. We'll replace XMLHttpRequest and: Keep the request formulation, Remove the "whole document" treatment of the response, Add event-oriented processing of the XML. The XMLReader Interface Shares a lot in common with XMLHttpRequest for making the request: send, open, overrideMimeType, setRequestHeader, etc. request model is the same, added a parse(in DOMString xml) method for completeness, added an onxml event listener attribute for receiving XML, added an "xml" event type for addEventListener() XML Events Events for: start/end document, start/end element, characters, processing instructions, comments Events are flattened - one interface for all of them.
    [Show full text]
  • Bibliography of Erik Wilde
    dretbiblio dretbiblio Erik Wilde's Bibliography References [1] AFIPS Fall Joint Computer Conference, San Francisco, California, December 1968. [2] Seventeenth IEEE Conference on Computer Communication Networks, Washington, D.C., 1978. [3] ACM SIGACT-SIGMOD Symposium on Principles of Database Systems, Los Angeles, Cal- ifornia, March 1982. ACM Press. [4] First Conference on Computer-Supported Cooperative Work, 1986. [5] 1987 ACM Conference on Hypertext, Chapel Hill, North Carolina, November 1987. ACM Press. [6] 18th IEEE International Symposium on Fault-Tolerant Computing, Tokyo, Japan, 1988. IEEE Computer Society Press. [7] Conference on Computer-Supported Cooperative Work, Portland, Oregon, 1988. ACM Press. [8] Conference on Office Information Systems, Palo Alto, California, March 1988. [9] 1989 ACM Conference on Hypertext, Pittsburgh, Pennsylvania, November 1989. ACM Press. [10] UNIX | The Legend Evolves. Summer 1990 UKUUG Conference, Buntingford, UK, 1990. UKUUG. [11] Fourth ACM Symposium on User Interface Software and Technology, Hilton Head, South Carolina, November 1991. [12] GLOBECOM'91 Conference, Phoenix, Arizona, 1991. IEEE Computer Society Press. [13] IEEE INFOCOM '91 Conference on Computer Communications, Bal Harbour, Florida, 1991. IEEE Computer Society Press. [14] IEEE International Conference on Communications, Denver, Colorado, June 1991. [15] International Workshop on CSCW, Berlin, Germany, April 1991. [16] Third ACM Conference on Hypertext, San Antonio, Texas, December 1991. ACM Press. [17] 11th Symposium on Reliable Distributed Systems, Houston, Texas, 1992. IEEE Computer Society Press. [18] 3rd Joint European Networking Conference, Innsbruck, Austria, May 1992. [19] Fourth ACM Conference on Hypertext, Milano, Italy, November 1992. ACM Press. [20] GLOBECOM'92 Conference, Orlando, Florida, December 1992. IEEE Computer Society Press. http://github.com/dret/biblio (August 29, 2018) 1 dretbiblio [21] IEEE INFOCOM '92 Conference on Computer Communications, Florence, Italy, 1992.
    [Show full text]
  • SALT: an XML Application for Web-Based Multimodal Dialog Management
    SALT: An XML Application for Web-based Multimodal Dialog Management Kuansan Wang Speech Technology Group, Microsoft Research One Microsoft Way, Microsoft Corporation Redmond, WA, 98006, USA http://research.microsoft.com/stg devices. GUI is an immensely successful concept, Abstract notably demonstrated by the World Wide Web. Although the relevant technologies for the This paper describes the Speech Internet had long existed, it was not until the Application Language Tags, or SALT, an adoption of GUI for the Web did we witness a XML based spoken dialog standard for surge on its usage and rapid improvements in multimodal or speech-only applications. A Web applications. key premise in SALT design is that speech-enabled user interface shares a lot GUI applications have to address the issues of the design principles and computational commonly encountered in a goal-oriented dialog requirements with the graphical user system. In other words, GUI applications can be interface (GUI). As a result, it is logical to viewed as conducting a dialog with its user in an introduce into speech the object-oriented, iconic language. For example, it is very common event-driven model that is known to be for an application and its human user to undergo flexible and powerful enough in meeting many exchanges before a task is completed. The the requirements for realizing application therefore must manage the interaction sophisticated GUIs. By reusing this rich history in order to properly infer user’s intention. infrastructure, dialog designers are The interaction style is mostly system initiative relieved from having to develop the because the user often has to follow the underlying computing infrastructure and prescribed interaction flow where allowable can focus more on the core user interface branches are visualized in graphical icons.
    [Show full text]
  • Developing XML Applications for Oracle Weblogic Server 12C (12.2.1.2.0) E78038-02
    Oracle® Fusion Middleware Developing XML Applications for Oracle WebLogic Server 12c (12.2.1.2.0) E78038-02 December 2016 This document is a resource for software developers who design and develop applications that include XML processing. Oracle Fusion Middleware Developing XML Applications for Oracle WebLogic Server, 12c (12.2.1.2.0) E78038-02 Copyright © 2007, 2016, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency- specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]
  • Scalable Vector Graphics (SVG) 1.2
    Scalable Vector Graphics (SVG) 1.2 Scalable Vector Graphics (SVG) 1.2 W3C Working Draft 27 October 2004 This version: http://www.w3.org/TR/2004/WD-SVG12-20041027/ Previous version: http://www.w3.org/TR/2004/WD-SVG12-20040510/ Latest version of SVG 1.2: http://www.w3.org/TR/SVG12/ Latest SVG Recommendation: http://www.w3.org/TR/SVG/ Editor: Dean Jackson, W3C, <[email protected]> Authors: See Author List Copyright ©2004 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply. Abstract SVG is a modularized XML language for describing two-dimensional graphics with animation and interactivity, and a set of APIs upon which to build graphics- based applications. This document specifies version 1.2 of Scalable Vector Graphics (SVG). Status of this Document http://www.w3.org/TR/SVG12/ (1 of 10)30-Oct-2004 04:30:53 Scalable Vector Graphics (SVG) 1.2 This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/. This is a W3C Last Call Working Draft of the Scalable Vector Graphics (SVG) 1.2 specification. The SVG Working Group plans to submit this specification for consideration as a W3C Candidate Recommendation after examining feedback to this draft. Comments for this specification should have a subject starting with the prefix 'SVG 1.2 Comment:'. Please send them to [email protected], the public email list for issues related to vector graphics on the Web.
    [Show full text]
  • Collection Titles
    Direct e-Learning Solutions for Today’s Careers CBT Direct’s IT Pro Collection Available: 7476 Collection Titles Coming Soon: 557 .NET 2.0 for Delphi Programmers Architecture Tivoli OMEGAMON XE for DB2 Performance .NET 3.5 CD Audio Player: Create a CD Audio 3D Computer Graphics: A Mathematical Expert on z/OS Player in .NET 3.5 Using WPF and DirectSound Introduction with OpenGL A Field Guide to Digital Color .NET Development for Java Programmers "3D for the Web: Interactive 3D animation using A First Look at Solution Installation for .NET Development Security Solutions 3ds max; Flash and Director " Autonomic Computing .NET Domain-Driven Design with C#: Problem - 3D Game Programming All in One A Guide to Global E-Commerce: Issues to Design - Solution 3D Graphics ReferencePoint Suite Consider When Selling Internationally Over the .NET E-Commerce Programming 3D Modeling in AutoCAD: Creating and Using Internet .NET Enterprise Development in C#: From 3D Models in AutoCAD 2000; 2000i; 2002; A Guide to MATLAB Object-Oriented Design to Deployment Second Edition Programming .NET Enterprise Development in VB.NET: From 3D Programming for Windows: Three- A Guide to Software Configuration Design to Deployment Dimensional Graphics Programming for the Management .NET for Visual FoxPro Developers Windows Presentation Foundation A Guide to Software Package Evaluation and .NET Framework ReferencePoint Suite 3ds max 5 Bible Selection .NET Framework Solutions: In Search of the 3ds max 5 For Dummies A Guide to the Project Management Body of Lost Win32 API
    [Show full text]
  • XML Application Components (Xacs)
    XML Application Components (XACs) Rafah A. Hosn IBM Research May 11th, 2007 TRACK Outline Backplane and Web 2.0 Web 2.0 Widgets & Composite Apps XACs, Component Model for Widget Composition Demo & Code Walkthrough Agenda Backplane and Web 2.0 Web 2.0 Widgets & Composite Apps XACs, Standard Composition Model Demo & Code Walkthrough Backplane & Web 2.0 Web 2.0 No Longer A Buzzword ?! Main themes Data-centric Collaborative Simple to author, simple to use Remixable How can the Backplane help? Standardize the programming model Easily snap various namespaces together Events Data model lifecycle Choreography Component Composition model Rich Web Application Backplane Interaction Namespaces and Frameworks XHTML SVG XForms VoiceXML SMIL Composite Apps Rich Web Application Backplane Compound Model-view Submission object Data Choreography Component Model Document binding (XMLHTTP++) Model (SCXML) and Composition Framework and events and behavior Platform technologies DOM Parser XPath, XSLT DOM Events JS Security Agenda Backplane and Web 2.0 Web 2.0 Widgets & Composite Apps XACs, Standard Composition Model Demo & Code Walkthrough Web 2.0 Widgets & Composite Apps Web 2.0 Widgets today Lots of various platforms & widget component models Google, Yahoo, Adobe, Clearspring, Netvibes, Microsoft… Composing widgets Different per platform/widget provider No standards to date Interoperability is not seamless (if at all possible) Mashing up widgets from different platforms is difficult Web 2.0 value-add proposition is weakened
    [Show full text]
  • Xforms --- Toward Light-Weight Web Applications
    Web Applications In XML XForms —Online Forms To Web Applications T. V. Raman IBM Research Web Applications In XML – p. 1 Outline Online forms to Web Applications Anatomy Of A Web Application Discovering, codifying Web patterns XForms and Web Applications Re-democratizing the Web Empowering authors, not browser vendors Web Applications In XML – p. 2 Online Forms To Web Applications Web Applications In XML – p. 3 CGI And HTML Forms Enabled interactivity on the Web. HTML forms collected data values, CGI scripts processed collected values, And served up the next step in the interaction. Server-side has stayed the same since 1993. Web Applications In XML – p. 4 Client-side Of Web Applications Evolved to enable richer client-side interaction. Scripting implements client-side behaviors. DOM enables manipulation of the HTML UI. Enables separation of data from presentation. Toward discovery of useful design patterns. Web Applications In XML – p. 5 Anatomy Of A Web Application Web Applications In XML – p. 6 Anatomy Of Web Applications Interaction widgets that collect data, Event handlers that implement behavior, Memory model synchronized with server, Server logic to knit together the application. Deploy User Interaction To A Universal Client Web Applications In XML – p. 7 Discovering Web Design Patterns Web Applications In XML – p. 8 Web Interaction Idioms Data Binding Data in ECMAScript objects, Data in XML, Bound to HTML view via DOM. Data Sources Data from multiple sources, Submit to multiple destinations. Web Applications In XML – p. 9 Web Design Idioms Dynamic Grow or shrink the interface. Customize presentation on the fly. Interactively validate user input.
    [Show full text]
  • Tivoli Netcool Support's Guide to the Message Bus Integration by Jim Hutchinson Document Release: 4.3 Support's Guide to the Message Bus Integration
    Tivoli Netcool Support's Guide to the Message Bus Integration by Jim Hutchinson Document release: 4.3 Support's Guide to the Message Bus Integration Table of Contents 1Introduction...................................................................................................................................4 1.1Overview......................................................................................................................................4 1.2Capabilities..................................................................................................................................5 1.3Probe design................................................................................................................................6 1.4Gateway design...........................................................................................................................7 2JMS Transport with Apache MQ.................................................................................................8 2.1Overview......................................................................................................................................8 2.2Requirements..............................................................................................................................8 2.3Apache ActiveMQ server.............................................................................................................9 2.3.1Downloading and installing.......................................................................................................9
    [Show full text]
  • Functional Extensions for Animation And
    Presentation Dynamism in XML Functional Programming meets SMIL Animation Patrick Schmitz Simon Thompson Peter King Ludicrum Enterprises Computing Laboratory Department of Computer Science San Francisco, CA, USA University of Kent University of Manitoba Winnipeg, MB, Canada [email protected] Canterbury, Kent, UK +44 1227 823820 +1 204 474 9935 [email protected] [email protected] ABSTRACT structure and semantics of declarative languages, and often cannot The move towards a semantic web will produce an increasing easily integrate imperative content extensions. Similarly, the use number of presentations whose creation is based upon semantic of script or code is problematic in data-driven content models queries. Intelligent presentation generation engines have already based upon XML and associated tools. begun to appear, as have models and platforms for adaptive In this paper we will motivate and describe a set of XML [10] presentations. However, in many cases these models are language extensions that will enhance these language standards. constrained by the lack of expressiveness in current generation The specific extensions are inspired by constructions from presentation and animation languages. Moreover, authors of functional programming languages, and include: dynamic, adaptive web content must often use considerable • attribute values defined as dynamically evaluated amounts of script or code, thus breaking the declarative expressions, description possible in the original presentation language. Furthermore, the scripting/coding approach does not lend itself to • custom (or ‘author defined’) events based on predicate authoring by non-programmers. In this paper we describe a set of expressions, XML language extensions that bring tools from the functional • parameterized templates for document content.
    [Show full text]
  • Introduction to Ajax
    IInnttrroodduuccttiioonn ttoo AAjjaaxx SSaanngg SShhiinn JJaavvaa TTeecchhnonollogogyy AArrcchhiitteecctt SSunun MMiiccrroossyysstteemmss,, IIncnc.. ssaanng.g.sshhiinn@@ssuunn..ccoomm wwwwww..jjaavvaapapassssiioonn..ccoomm Agenda 1.What is Rich User Experience? 2.Rich Internet Application (RIA) Technologies 3.AJAX: Real-life examples & Usage cases 4.What is and Why AJAX? 5.Technologies used in AJAX 6.Anatomy of AJAX operation 7.XMLHttpRequest Methods & Properties 8.DOM APIs & InnerHTML 9.AJAX Security 10.JavaScript debugging tools 2 Topics Covered in Other Presentations • AJAX Toolkits & Frameworks • JSON (JavaScript Object Notation) • Dojo Toolkit • DWR (Direct Web Remoting) • AJAX-enabled JSF Components • Google Web Toolkit (GWT) • jMaki • Phobos (MVC-based server-side scripting) • Ajax and Portlet/Portal • Wicket and Shale (as AJAX-aware Web applicaion frameworks) • JavaScript Programming Best Practices 3 11.. RRiicchh UUsseerr EExxppeerriieennccee ffoorr WWeebb AApppplliiccaattiioonn Rich User Experience • Take a look at a typical desktop application (Spreadsheet app, etc.) • The program responses intuitively and quickly • The program gives a user meaningful feedback's instantly > A cell in a spreadsheet changes color when you hover your mouse over it > Icons light up as mouse hovers them • Things happen naturally > No need to click a button or a link to trigger an event 5 Characteristics of Conventional Web Applications (Apps without Ajax) • “Click, wait, and refresh” user interaction > Any communication with the server forces a
    [Show full text]