Cross-Browser Internet Applications with Openlaszlo in a FLASH Timbec, Photocase.Com

Total Page:16

File Type:pdf, Size:1020Kb

Cross-Browser Internet Applications with Openlaszlo in a FLASH Timbec, Photocase.Com KNOW-HOW OpenLaszlo Cross-browser Internet applications with OpenLaszlo IN A FLASH timbec, photocase.com timbec, Long before Ajax hit the scene, Flash gave developers a basis for designing interactive web content. The OpenLaszlo framework, with its easy-to-learn command syntax, is the foundation on which many Flash applications build. BY PETER KREUSSEL and provides a basis for client-side appli- cation logic, which keeps barriers low lash does not have many friends [1] claims that more than 95 percent of for newcomers by integrating both among the open standard lobby all browsers have a Flash plugin in- HTML and CSS elements. The language Fon the Internet. This said, if you stalled, and you can assume that just as is XML compliant and object oriented, have no objection to using the closed- many surfers disable Javascript as have which means that you can reuse code source Flashplayer, the OpenLaszlo browsers that do not support Flash. framework offers a powerful, easy-to-use Flash technology, which supported inter- Listing 1: Object platform for interactive Internet applica- active applications before Ajax hit the Orientation tions with sophisticated graphics. Open- scene, offers a number of advantages: Laszlo creates Flash bytecode based on • Flash avoids browser compatibility is- 01 <class name="box" height="100" an XML language that uses HTML-style sues. Flashplayer will render a .swx 02 width="100" bgcolor="red"/> tags for interface design and plain Javas- file identically in Firefox, Opera, Inter- 03 cript for the client-side application logic. net Explorer, or other browser that 04 <class name="borderedbox" Flashplayer 7 for Linux (which has been supports Mozilla or Internet Explorer extends="box"> around for a while) is all you need to plugins. Even if Ajax applications are 05 <view bgcolor="yellow" run the applications without restrictions. based on libraries or frameworks that 06 x="3" y="3" The early preview of OpenLaszlo ver- introduce an abstraction layer between 07 width="${parent.width-6}" sion 4 can convert applications to Ajax content and browser capabilities, code, and thus do without proprietary achieving comparable robustness 08 height="${parent. height-6}"/> technology. However, this does not work means much cross-browser testing. for the full feature set, and thus far, only • Flash applications can integrate many 09 </class> Firefox/ Mozilla and Internet Explorer 6 media types, such as animations, vec- 10 have been able to render OpenLaszlo tor graphics, and sounds. 11 <box/> DHMTL applications reliably. OpenLaszlo applications are based on 12 <borderedbox/> Adobe’s Flash has a number of techni- XML files. The OpenLaszlo language, 13 <borderedbox/> cal benefits compared with Ajax. Adobe LZX, defines the user-interface design 50 ISSUE 78 MAY 2007 WWW.LINUX - MAGAZINE.COM OpenLaszlo KNOW-HOW effectively for your in- supports methods that provide specific x="10" y="10" /> terface design. Listing functionality for individual display ele- <window visible=ßß 1 creates the display ments or element classes. Event handlers "${cbox.value}" /> shown in Figure 1. call Javascript code while keeping to The listing starts Javascript standards. The value of the window attribute, visi- with the definition of The following example, which moves ble, is bound to the current value of the the box and bordered- a button five pixels to the right when cbox checkbox by a constraint. When a box classes, which clicked, provides an idea of how Open- user enables or disables the checkbox, can be displayed as Laszlo handles user input. The button OpenLaszlo will modify the visibility of often as you like by tag defines an onclick handler, which the window accordingly, without need- calling <classname> calls the moveHoriz() function with an ing an event handler to do so. in the source code. argument of 5. After adding the label borderedbox inherits Move me, the sample code implements Data Handling Figure 1: Object- from the box class; at the moveHoriz method, which incre- The core task of many web applications oriented inter- the same time, the ap- ments the x position by the number is that of displaying or editing data saved face designs. pearance of bordered- passed in as a parameter, again using server-side. To support this, the Open- box is redefined on syntax borrowed from Javascript. The Laszlo XML language integrates a num- the basis of the inherited properties. code keeps to existing Internet stan- ber of powerful methods. dards, simplifying life for newcomers: The grid display element draws the GUI Design displayed elements from the superordi- Let’s look at a couple of examples to <button onclick=U nate dataset element. The dataset tag demonstrate how powerful the XML "moveHoriz(5);"> contains either the XML-formatted data, interface design language is. <dat- Move me as in Listing 5, or the dataset element epicker></datepicker> is all it takes to <method name="moveHoriz"U loads the data from the server via HTTP, create a sophisticated date picker. Menus args="moveAmount"> as shown in Listing 3. This gives devel- that work reliably, no matter what this.setAttribute("x",U opers the ability to evaluate current da- browser you choose, are not much more this.x+moveAmount); tabase data. complicated. Listing 2 shows the XML </method> OpenLaszlo processes data on the code for a drop-down menu. </button> basis of XPath [3], a technology devel- A multicolumn list (grid), which sorts oped by the W3C consortium to address the entries in a column when you click The constraints in ${DOM path to input parts of an XML document. In the exam- on the column header and supports edit- field} offer another option for respond- ple, /forecast/day in contentdatapath, ing or selecting in rows, is just a couple ing to user input: which is in the data source, addresses of lines of code. See Listing 3. See the all day nodes in the forecast category. OpenLaszlo homepage [2] for an over- <checkbox id="cbox"ßß view of the available form elements. text="Show Window"U Client-Server Interaction Animations make life easier for Interactions between client- and server- users, especially if a developer Listing 2: Drop-Down Menu side program logic are typical for larger needs to visualize a state change scale web applications. In many cases, from state 1 to state 2. OpenLaszlo 01 <menubar width="200" > access by multiple clients to a shared da- makes effects simple – to create a 02 <menu text="Menu 1" width="100"> tabase requires access to functionality smooth movement, all you need 03 <menuitem text="Menu item 1" implemented server-side, often with the do is call the animate method in 04 onselect="canvas.whichOne(this);"/> aim of keeping the client application any display element. In Listing 4, lean. A lean client application saves 05 <menuitem text="Menu item 2" the onclick handler for the box ele- 06 onselect="canvas.whichOne(this);"/> ment takes care of this, causing a Listing 3: Multicolumn Grid 07 <menuitem text="Menu item 3" view-type element – a square 01 <canvas height="250"> “window” with an original height 08 onselect="canvas.whichOne(this);"/> 02 <dataset name="weatherdata" of 20 pixels – to grow to a height 09 <menuseparator/> request="true" of 200 pixels in 500 milliseconds. 10 <menuitem text="Menu item 4" 03 src="http://www. Clicking a second time shrinks the 11 onselect="canvas.whichOne(this);"/> laszlosystems.com/ box again. The instructions for 12 </menu> 04 cgi-pub/weather. this are contained in the parame- 13 <menu text="Menu 2" width="100"> cgi?zip=10022"/> ter box height==20?200:20, and 05 <grid datapath= the 500 parameter defines the du- 14 <menuitem text="More items..." "weatherdata:/weather" ration of the animation. 15 onselect="canvas.whichOne(this);"/> 06 contentdatapath= OpenLaszlo uses Javascript for 16 </menu> "forecast/day"/> application logic. Besides global 17 </menubar> <script> blocks, the framework 07 </canvas> WWW.LINUX - MAGAZINE.COM ISSUE 78 MAY 2007 51 KNOW-HOW OpenLaszlo Listing 4: State Change SOAP has been criticized for transmit- For more information on server adminis- ting large volumes of XML code for the tration, see the OpenLaszlo site [4]. In 01 <canvas> simplest of calls. As an alternative to environments without a Java Runtime 02 <view id="box" width="200" SOAP, OpenLaszlo also supports the sim- Environment, such as shared web host- height="20" pler XML RPC protocol. ing without root access, OpenLaszlo can 03 <bgcolor="red"/> OpenLaszlo is based on Tomcat 5. The be run in solo mode. An OpenLaszlo 04 <text onclick="box. OpenLaszlo SDK contains a Tomcat serv- server can compile the applications as animate( let container. The precondition for a full- separate, executable .swx files that pro- 05 'height',box.height== fledged OpenLaszlo server is a Java Run- vide the whole functionality in Flash 06 20?200:20, 500, false)"> time Environment, Version 1.4 or newer. code that runs client-side. A web server The Java platform brings the ability to without Java can provide this support on 07 Click here access Java objects and methods directly the Internet; however, RPC functions are 08 </text> from the client application. An Open- not available in these applications. 09 </canvas> Laszlo server is easy to set up. After in- stalling the Java SDK, unpack the Open- Conclusions client resources and saves downloading Laszlo tarball and call Path/to/unpack/ The OpenLaszlo XML language relies on large amounts of program code when directory/server/tomcat-5.0.24/bin/ standards that web developers will be fa- launching an Internet application. startup.sh. The sample applications in miliar with in many areas. The XML tags Besides data access, OpenLaszlo offers the archive should then be accessible on for defining display elements are similar various approaches to integrating server- http://localhost:8080/lps-Openlaszlo- to HTML tags.
Recommended publications
  • Rich Internet Applications
    Rich Internet Applications (RIAs) A Comparison Between Adobe Flex, JavaFX and Microsoft Silverlight Master of Science Thesis in the Programme Software Engineering and Technology CARL-DAVID GRANBÄCK Department of Computer Science and Engineering CHALMERS UNIVERSITY OF TECHNOLOGY UNIVERSITY OF GOTHENBURG Göteborg, Sweden, October 2009 The Author grants to Chalmers University of Technology and University of Gothenburg the non-exclusive right to publish the Work electronically and in a non-commercial purpose make it accessible on the Internet. The Author warrants that he/she is the author to the Work, and warrants that the Work does not contain text, pictures or other material that violates copyright law. The Author shall, when transferring the rights of the Work to a third party (for example a publisher or a company), acknowledge the third party about this agreement. If the Author has signed a copyright agreement with a third party regarding the Work, the Author warrants hereby that he/she has obtained any necessary permission from this third party to let Chalmers University of Technology and University of Gothenburg store the Work electronically and make it accessible on the Internet. Rich Internet Applications (RIAs) A Comparison Between Adobe Flex, JavaFX and Microsoft Silverlight CARL-DAVID GRANBÄCK © CARL-DAVID GRANBÄCK, October 2009. Examiner: BJÖRN VON SYDOW Department of Computer Science and Engineering Chalmers University of Technology SE-412 96 Göteborg Sweden Telephone + 46 (0)31-772 1000 Department of Computer Science and Engineering Göteborg, Sweden, October 2009 Abstract This Master's thesis report describes and compares the three Rich Internet Application !RIA" frameworks Adobe Flex, JavaFX and Microsoft Silverlight.
    [Show full text]
  • Open Source Web GUI Toolkits
    Open Source Web GUI Toolkits "A broad and probably far too shallow presentation on stuff that will probably change 180 degrees by the time you hear about it from me" Nathan Schlehlein [email protected] 1 Why Web Developers Drink... Can't get away with knowing one thing A Fairly Typical Web App... ➔ MySQL – Data storage ➔ PHP – Business logic ➔ Javascript - Interactivity ➔ HTML – Presentation stuff ➔ CSS – Presentation formatting stuff ➔ Images – They are... Purdy... ➔ httpd.conf, php.ini, etc. Problems are liable to pop up at any stage... 2 The Worst Thing. Ever. Browser Incompatibilities! Follow the rules, still lose Which is right? ➔ Who cares! You gotta make it work anyways! Solutions More work or less features? ➔ Use browser-specific stuff - Switch via Javascript ➔ Use a subset of HTML that most everyone agrees on 3 Web Application? Web sites are... OK, but... Boring... Bounce users from page to page Stuff gets messed up easily ➔ Bookmarks? Scary... ➔ Back button 4 Why A Web Toolkit? Pros: Let something else worry about difficult things ➔ Layout issues ➔ Session management ➔ Browser cross-compatibility ➔ Annoying RPC stuff 5 >INSERT BUZZWORD HERE< Neat web stuff has been happening lately... AJAX “Web 2.0” Google maps Desktop app characteristics on the web... 6 Problem With >BUZZWORDS< Nice, but... Lots of flux ➔ Technology ➔ Expectations of technology Communications can get tricky Yet another thing to program... ➔ (Correctly) 7 Why A Web Toolkit? Pros: Let something else worry about difficult things ➔ Communications management ➔ Tested Javascript code ➔ Toolkit deals with changes, not the programmer 8 My Criteria Bonuses For... A familiar programming language ➔ Javascript? Unit test capability ➔ Test early, test often, sleep at night Ability to incrementally introduce toolkit Compatibility with existing application Documentation Compelling Examples 9 Web Toolkits – Common Features ■ Widgets ■ Layouts ■ Manipulation of page elements DOM access, etc.
    [Show full text]
  • V a Lida T in G R D F Da
    Series ISSN: 2160-4711 LABRA GAYO • ET AL GAYO LABRA Series Editors: Ying Ding, Indiana University Paul Groth, Elsevier Labs Validating RDF Data Jose Emilio Labra Gayo, University of Oviedo Eric Prud’hommeaux, W3C/MIT and Micelio Iovka Boneva, University of Lille Dimitris Kontokostas, University of Leipzig VALIDATING RDF DATA This book describes two technologies for RDF validation: Shape Expressions (ShEx) and Shapes Constraint Language (SHACL), the rationales for their designs, a comparison of the two, and some example applications. RDF and Linked Data have broad applicability across many fields, from aircraft manufacturing to zoology. Requirements for detecting bad data differ across communities, fields, and tasks, but nearly all involve some form of data validation. This book introduces data validation and describes its practical use in day-to-day data exchange. The Semantic Web offers a bold, new take on how to organize, distribute, index, and share data. Using Web addresses (URIs) as identifiers for data elements enables the construction of distributed databases on a global scale. Like the Web, the Semantic Web is heralded as an information revolution, and also like the Web, it is encumbered by data quality issues. The quality of Semantic Web data is compromised by the lack of resources for data curation, for maintenance, and for developing globally applicable data models. At the enterprise scale, these problems have conventional solutions. Master data management provides an enterprise-wide vocabulary, while constraint languages capture and enforce data structures. Filling a need long recognized by Semantic Web users, shapes languages provide models and vocabularies for expressing such structural constraints.
    [Show full text]
  • Design of a Service-Oriented Dashboard
    DESIGN OF A SERVICE-ORIENTED DASHBOARD by GAYATHRI SUNDAR MURAT M. TANIK, COMMITTEE CHAIR DAVID G. GREEN GARY J. GRIMES JOHN L. HARTMAN IV A THESIS Submitted to the graduate faculty of The University of Alabama at Birmingham, in partial fulfillment of the requirements for the degree of Master of Science BIRMINGHAM, ALABAMA 2007 ii DESIGN OF A SERVICE-ORIENTED DASHBOARD GAYATHRI SUNDAR ELECTRICAL ENGINEERING ABSTRACT Service-Oriented Enterprises are currently focused on offering enhanced user ex- periences to customers, employees, and enterprise partners who use the enterprise’s soft- ware applications. A better user experience is delivered through the presentation of ser- vices and business processes to the user in a composite manner, and by facilitating a bet- ter user-application interaction for the user. Our experience with the bioinformatics do- main helped us to see that although existing models of enterprise portals offer an inte- grated environment to present applications and enterprise resources, they are not suffi- cient to address certain complex user-application interactions. In this thesis, we present a design for a Service-Oriented Dashboard to address this deficiency. The service-oriented dashboard leverages Service-Oriented Architecture to pre- sent an integrated environment to access and interact with the diverse and isolated soft- ware tools, applications, and resources of an enterprise. We address the design of the dashboard at three levels: the presentation layer, the task composition layer, and the ser- vices layer. We introduce in the thesis the notion of describing the user’s job function as a composition of tasks. Users, through this approach, will be able to compose applica- tions according to the user’s tasks.
    [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]
  • Open Source Bridge Touchscreen Presentation
    Interactive kiosk display framework Peter Krenesky ([email protected]) Rob McGuire-Dale ([email protected]) http://trac.osuosl.org/touchscreen What is Touchscreen? Interactive kiosk display framework that is: Portable Plugin-based Simple and flexible API Open-source How can Touchscreen be used? Interactive information kiosks How can Touchscreen be used? Public information displays Touchscreen demonstration How we use Touchscreen at the Open Source Lab Technologies in Touchscreen How Touchscreen is built Languages in Touchscreen HTML & CSS JavaScript jQuery (sexy JavaScript library) Raphael (JavaScript SVG graphics library) Python Django (server-side web framework) Twisted (python networking engine) Why not Flash or OpenLaszlo? Original Touchscreen (v1.0) was OpenLaszlo (compiles to Flash) Pros Touchscreen 1.0 Fast Javascript support Could parse XML feeds Cons Niche language poor HTML integration OpenLaszlo has annoying syntax <include href="lib/lzx/screen.lzx" /> <!-- FTP User Map --> <dataset type="http" name="dset_ftpUserMap" src="http://ftp-osl.osuosl.org:8000/"> </dataset> <datapointer xpath="dset_ftpUserMap:/rss/channel" rerunxpath="true"> <method event="ondata"> var label = this.xpathQuery('item[1]/title/text()'); var lat = this.xpathQuery('item[2]/title/text()'); var lon = this.xpathQuery('item[3]/title/text()'); screen_osl_ftpusersmap.createPoint(lat,lon, label); label = null; lat = null; lon = null; </method> </datapointer> <include href="lib/lzx/circle.lzx"/> <resource name="ftpusermap" src="screens/ftpmap/map_1360nolabel.png"/> <include href="screens/ftpmap/ftpusersmap.lzx"/> Why SVG and not canvas? SVG objects can: can be styled with css be manipulated with jQuery receive javascript events Speed Differences SVG better for large objects Canvas better for many smaller objects Conclusion SVG for interactivity Canvas for many animated objects Raphaël: a javascript SVG library provides easy API on top of SVG.
    [Show full text]
  • XML Prague 2020
    XML Prague 2020 Conference Proceedings University of Economics, Prague Prague, Czech Republic February 13–15, 2020 XML Prague 2020 – Conference Proceedings Copyright © 2020 Jiří Kosek ISBN 978-80-906259-8-3 (pdf) ISBN 978-80-906259-9-0 (ePub) Table of Contents General Information ..................................................................................................... vii Sponsors .......................................................................................................................... ix Preface .............................................................................................................................. xi A note on Editor performance – Stef Busking and Martin Middel .............................. 1 XSLWeb: XSLT- and XQuery-only pipelines for the web – Maarten Kroon and Pieter Masereeuw ............................................................................ 19 Things We Lost in the Fire – Geert Bormans and Ari Nordström .............................. 31 Sequence alignment in XSLT 3.0 – David J. Birnbaum .............................................. 45 Powerful patterns with XSLT 3.0 hidden improvements – Abel Braaksma ............ 67 A Proposal for XSLT 4.0 – Michael Kay ..................................................................... 109 (Re)presentation in XForms – Steven Pemberton and Alain Couthures ................... 139 Greenfox – a schema language for validating file systems – Hans-Juergen Rennau ..................................................................................................
    [Show full text]
  • Interfacing Openlaszlo Applications to Web Services
    1 Interfacing OpenLaszlo Applications to Web Services An Excerpt from “Laszlo in Action” By Norman Klein and Max Carlson with Glenn MacEwen Early Access Release: January 2007 Print Release: November 2007 | 500 pages ISBN: 1-932394-83-4 www.manning.com/laszloinaction For Source Code, Free Chapters, the Author Forum and more information about this title please go to www.manning.com/laszloinaction 1 2 Interfacing OpenLaszlo Applications to Web Services If you've been enviously eyeing the RIA capabilities of OpenLaszlo, but been daunted by its interface requirements, then you'll be glad to know that interfacing to OpenLaszlo is just like that old Talking Heads song "same as it ever was". In other words, OpenLaszlo uses the same HTTP standards that you're familiar with; allowing OpenLaszlo applications to co-exist with your HTML web applications to further leverage your server-side web services. All OpenLaszlo communications with the server are still based on sending and receiving HTTP requests and responses. OpenLaszlo operates just like Ajax by requiring HTTP responses to be composed of XML instead of HTML. The technical term for this is a ReST-based "XML-over-HTTP" service, but this is only a fancy way of describing the familiar operation of the web. So why does it use XML and not HTML? Since an RIA can provide a superior visual presentation, only the data is needed as the HTML presentation details are superfluous. OpenLaszlo's compliance to open standards allows it to interface to any HTTP web server; ranging from basic HTTP web servers such as Apache, Jetty or Microsoft's IIS to the different web frameworks such as Struts, Tapestry, Ruby on Rails, Microsoft .Net that work with servlet containers to provide enterprise class services.
    [Show full text]
  • Developing Rich Internet Applications with Rails, Openlaszlo, and Eclipse Automate Quickly with Rails
    Developing rich Internet applications with Rails, OpenLaszlo, and Eclipse Automate quickly with Rails Skill Level: Intermediate Robi Sen ([email protected]) Freelance Writer Department13 12 May 2006 Explore at a high level how to develop a rich Internet application using OpenLaszlo, Ruby on Rails, MySQL, and Eclipse to provide a common IDE to not only develop your application but also to automate many of the steps in developing a Rails or OpenLaszlo application. This will further speed up and streamline the already fast development cycle of Rails applications. Section 1. Before you start Ruby on Rails has over the past year become one of the fastest growing and most popular open source Web application development frameworks. But because of the focus on building HTML applications, some have criticized Rails as being inflexible. Especially with the emergence of rich Internet applications (RIAs), applications using technologies such as Flash for user interface development and XML for data transport to replicate desktop application functionality, open source developers have wondered if there is some way to easily create RIAs that can exploit the pure object-oriented language of Ruby and the unique rapid application development features of Rails. About this tutorial This tutorial will expose you to two of the hottest platforms in Web development: Ruby on Rails, for fun and rapid Web application development; and OpenLaszlo, the open source RIA server. You will see that creating visually appealing desktop-like Developing rich Internet applications with Rails, OpenLaszlo, and Eclipse © Copyright IBM Corporation 1994, 2008. All rights reserved. Page 1 of 28 developerWorks® ibm.com/developerWorks applications deployed and managed over the Web can be incredibly easy with these platforms.
    [Show full text]
  • The Effect of Ajax on Performance and Usability in Web Environments
    The effect of Ajax on performance and usability in web environments Y.D.C.N. op ’t Roodt, BICT Date of acceptance: August 31st, 2006 One Year Master Course Software Engineering Thesis Supervisor: Dr. Jurgen Vinju Internship Supervisor: Ir. Koen Kam Company or Institute: Hyves (Startphone Limited) Availability: public domain Universiteit van Amsterdam, Hogeschool van Amsterdam, Vrije Universiteit 2 This page intentionally left blank 3 Table of contents 1 Foreword ................................................................................................... 6 2 Motivation ................................................................................................. 7 2.1 Tasks and sources................................................................................ 7 2.2 Research question ............................................................................... 9 3 Research method ..................................................................................... 10 3.1 On implementation........................................................................... 11 4 Background and context of Ajax .............................................................. 12 4.1 Background....................................................................................... 12 4.2 Rich Internet Applications ................................................................ 12 4.3 JavaScript.......................................................................................... 13 4.4 The XMLHttpRequest object..........................................................
    [Show full text]
  • Pearls of XSLT/Xpath 3.0 Design
    PEARLS OF XSLT AND XPATH 3.0 DESIGN PREFACE XSLT 3.0 and XPath 3.0 contain a lot of powerful and exciting new capabilities. The purpose of this paper is to highlight the new capabilities. Have you got a pearl that you would like to share? Please send me an email and I will add it to this paper (and credit you). I ask three things: 1. The pearl highlights a capability that is new to XSLT 3.0 or XPath 3.0. 2. Provide a short, complete, working stylesheet with a sample input document. 3. Provide a brief description of the code. This is an evolving paper. As new pearls are found, they will be added. TABLE OF CONTENTS 1. XPath 3.0 is a composable language 2. Higher-order functions 3. Partial functions 4. Function composition 5. Recursion with anonymous functions 6. Closures 7. Binary search trees 8. -- next pearl is? -- CHAPTER 1: XPATH 3.0 IS A COMPOSABLE LANGUAGE The XPath 3.0 specification says this: XPath 3.0 is a composable language What does that mean? It means that every operator and language construct allows any XPath expression to appear as its operand (subject only to operator precedence and data typing constraints). For example, take this expression: 3 + ____ The plus (+) operator has a left-operand, 3. What can the right-operand be? Answer: any XPath expression! Let's use the max() function as the right-operand: 3 + max(___) Now, what can the argument to the max() function be? Answer: any XPath expression! Let's use a for- loop as its argument: 3 + max(for $i in 1 to 10 return ___) Now, what can the return value of the for-loop be? Answer: any XPath expression! Let's use an if- statement: 3 + max(for $i in 1 to 10 return (if ($i gt 5) then ___ else ___))) And so forth.
    [Show full text]
  • Guaranteeing Responsiveness and Consistency In
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Texas A&amp;M Repository GUARANTEEING RESPONSIVENESS AND CONSISTENCY IN DYNAMIC, ASYNCHRONOUS GRAPHICAL USER INTERFACES A Dissertation by CHARLES GABRIEL FOUST Submitted to the Office of Graduate and Professional Studies of Texas A&M University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY Chair of Committee, Jaakko J¨arvi Committee Members, Gabriel Dos Reis Paul Gratz Frank Shipman Head of Department, Dilma Da Silva May 2016 Major Subject: Computer Science Copyright 2016 Charles Gabriel Foust ABSTRACT This dissertation proposes a programming model for Graphical User Interfaces (GUIs) that relieves the programmer of a difficult and error-prone task: orchestrating concurrent responses to events to ensure data dependencies are always enforced correctly. In this programming model, rather than defining program responses to events, the programmer defines the data dependencies that exist in the GUI and the methods by which those depen- dencies may be enforced|a run-time system uses this specification to generate responses to events. The approach gives the following guarantee: the same sequence of events produces the same results, regardless of the timing of those events. The dissertation demonstrates the benefits of the proposed programming model with implementations of several example user interfaces. At the core of this programming model is a data structure known as a property model. A property model composes responses to individual events into a single reactive program that runs asynchronously. The program's results are used to update the GUI. The program is constructed in a manner that respects all data dependencies, thereby guaranteeing that results are consistent regardless of the length of time taken by individual responses.
    [Show full text]