Building Compiled Language Extensions for Javascript

Total Page:16

File Type:pdf, Size:1020Kb

Building Compiled Language Extensions for Javascript Bachelor Thesis Building Compiled Language Extensions for JavaScript Author Examiners Jonathan Immanuel Brachthäuser Prof. Walter Kriha Prof. Dr. Ansgar Gerlicher Andreas Stiegler, M. Sc. Stuttgart Media University (HdM) — February 27, 2012 Integrity Statement Herein I declare that this Bachelor Thesis was created entirely by myself. I only used the sources specifically stated in this document. Thoughts used, either by meaning or quoted, were marked as such. Stuttgart, February 27, 2012 Jonathan Immanuel Brachthäuser iii Acknowledgements This thesis would be impossible without the support of some great people. Marlen, I love you. Thank you for trying to understand what I am doing and especially for learning Lisp! Thank you, beloved family, for always supporting me unconditionally. Many thanks to Stephan Soller, Andreas Stiegler and Patrick Bader for all those intense and vivid discussions that helped my stay on track. I have truly learned a lot from you guys, even in times I did not want to. Patrick pointed my nose at OMeta which has been a great inspiration for this thesis. By the way, AST guessing is an awesome game to play. Alessandro Warth did a great work with his language OMeta. Thank you, it is so much fun to work with. Even if writing a thesis can be rough some time it is less of a burden when working in a comforting environment. Thank you Prof. Zimmermann for your trust and for tilting at the windmills of bureaucracy. I also have to thank Claus Gittinger for showing me that building Interpreters (and compilers in extension) is no voodoo. Last but not least I want to thank Prof. Walter Kriha and Prof. Dr. Ansgar Gerlicher for giving me the chance and freedom to do research on such an amazing topic. v Abstract The web is moving in an enormous speed. New standards like HTML5, CSS3 and the 6th edition of the ECMAScript are under development. Browser vendors have improved the performance of their JavaScript engines a lot which now serve as Petri dishes for the development of new languages and JavaScript derivatives. The term “transpiler” has been coined to subsume the cross-compilation from one edition of ECMAScript to another. Set in this volatile environment, the goal of this thesis is to provide a foundation to compose individual extensions. Thus, a custom language derivative can be built which fits the individual likings. It is not scope of this thesis to design such a language but to provide a framework supporting the creation of JavaScript language extensions. This thesis targets at intermediate JavaScript developers who are interested in creating their own language. No expert knowledge in building compilers is required. The thesis is designed as a guide and hence necessary theoretical knowledge of compilers and parser generators is briefly discussed in the first few chapters. OMeta/JS is chosen as parser generator in oder to experiment with language extensions in the most flexible and convenient way. Both a JavaScript parser and a translator are implemented in a way that allows an easy extension. JsonML is chosen to internally represent the abstract syntax tree. The creation of the tree is accomplished by the means of node-constructors. A generic walker grammar is provided in order to easily traverse the syntax tree. The design of the framework aims at the reuse of the single components. Hence, the re-factored implementation of OMeta/JS can be used as a standalone package for Node.js. The interdependencies between the different modules are clearly separated to allow reasonable maintainability. A fictional language EJS is introduced to demonstrate the possibilities of the framework at hand. For this purpose four example extensions are discussed, each with increasing complexity. The last extension finally introduces a class based object orientation. Many improvements of the framework are imaginable. Yet, the architecture renders itself to be a good foundation to quickly develop JavaScript language extensions. vii Contents Page 1 Introduction 1 1.1 JavaScript . 2 1.1.1 Outside of the Browser . 2 1.1.2 JavaScript as a Standard . 3 1.1.3 Problems and Solutions . 4 1.1.4 Compiled Language Extensions . 5 1.2 Scope of this Thesis . 6 2 The Compilation Process 9 2.1 Lexical Analysis . 10 2.2 Syntactical Analysis . 11 2.3 Tree Transformations . 12 2.4 Code Generation . 13 2.5 Summary . 13 3 A little more about Parsers 15 3.1 Recursive Decent Parsers . 16 3.2 Extending Recursive Decent Parsers . 19 3.2.1 Backtracking . 19 3.2.2 Memoization . 20 3.2.3 Left Recursion . 21 3.2.4 Parsing Expression Grammars . 22 3.2.5 Semantic Predicates . 23 3.3 Summary . 23 ix CONTENTS 4 Existing Parser Generators 25 4.1 Comparison of PEG-Parser Generators . 26 4.1.1 Concepts . 27 4.1.2 Documentation . 27 4.1.3 Error Reporting . 28 4.1.4 Extensibility . 28 4.1.5 Conclusion . 29 5 OMeta 31 5.1 Writing Grammars . 33 5.1.1 Differences to PEG . 33 5.1.2 Pattern Matching . 34 5.1.3 Semantic Predicates . 35 5.1.4 Semantic Actions . 36 5.1.5 Parametrized Rules . 38 5.1.6 Higher-Order Rules . 39 5.1.7 It’s all about Context: OMeta or JavaScript? . 40 5.1.8 Grammar Inheritance . 41 5.1.9 Foreign Rule Invocation . 42 5.2 Using OMeta/JS . 43 5.2.1 Usage of OMeta Grammar Objects . 44 5.2.2 Stateful Pattern Matching . 45 5.3 Summary . 46 6 Extending JavaScript 47 6.1 Five Steps to Create a Language Extension . 48 6.1.1 First Step: Set up the Environment . 49 6.1.2 Second Step: Write an ES5 Grammar . 51 6.1.3 Third Step: Specify the Format of the AST . 53 6.1.4 Fourth Step: Traverse the AST and Generate Code . 56 6.1.5 Fifth Step: Start Extending . 61 6.2 The Architecture . 64 6.2.1 The OMeta Package . 65 6.2.2 The JsonML Package . 66 6.2.3 The ES5 Package . 67 6.2.4 The EJS Package . 70 6.3 The Grammars . 72 6.4 Summary . 74 x CONTENTS 7 Usecase: Example Extension 75 7.1 Scope Forcing with !{} ............................. 76 7.1.1 Introducing a new Syntax . 78 7.1.2 Implementing the Syntax . 79 7.2 The Substitution Operator “#{}“ ........................ 80 7.2.1 Introducing a new Syntax . 81 7.2.2 Implementing the Syntax . 81 7.3 Lambda Expressions {||} ............................ 82 7.3.1 Introducing a new Syntax . 83 7.3.2 Implementing the Syntax . 85 7.4 Classes and Object Orientation . 86 7.4.1 Introducing a new Syntax . 88 7.4.2 Implementing the Syntax . 90 7.5 Summary . 93 8 Conclusions 95 8.1 Related Work . 95 8.2 Future Work . 96 A Code Samples 99 A.1 PEG-Grammars . 100 A.2 Visitor Based Implementation . 102 A.3 Recursive Descent Lisp Parser . 103 A.4 Implementation of Implicit Returns . 104 B OMeta/JS 105 B.1 OMeta/JS - Required Files for Compilation . 106 B.2 OMeta Base Grammar . 107 B.3 Object Pattern Matching in OMeta/JS . 108 Bibliography 110 List of Figures 118 List of Tables 119 Abbreviations 119 xi Chapter 1 Introduction Contents 1.1 JavaScript . 2 1.1.1 Outside of the Browser . 2 1.1.2 JavaScript as a Standard . 3 1.1.3 Problems and Solutions . 4 1.1.4 Compiled Language Extensions . 5 1.2 Scope of this Thesis . 6 For almost every developer there are times, when the question arises: “Why, tell me why, can’t I simply do it like in x?” In this saying, x can be replaced by any programming language that might have one additional feature to that language one is currently working with. This absent feature can be a complex one, unique to the language. However, these features often are of syntactical nature - in other words: just the way to express the things we want to happen. With every new programming language we have learned, we also possibly gain more frustration because there is no programming language that can fit all shoes. So most of the time we will be missing certain capabilities or ways to express our algorithms in a delightful manner. There are languages that make us feel more locked-in than others do. On the other hand, some existing languages are full of beautiful features, waiting to be discovered1. Additionally there is a third category of languages, providing us with all the necessary tools to change the language itself where it doesn’t fit our needs. A good example for this group is Lisp, where every programmer can create his own set of tools and redefine almost anything, according to his personal likings. Nevertheless, thsese shortcomings usually exist for a purpose. Sometimes “prosaic elegance” has been traded off against performance, security motives or internal consis- tency. So there are many good reasons that underly possible answers to the introductory question. Likely none of them will really comfort us in that kind of situation. We just have to keep in mind that languages are not born out of a singularity, somewhere in vacuo. Instead, languages are settled in a given environment as children of hard requirements 1According to my personal experiences, Ruby is a good example for this languages 1 CHAPTER 1. INTRODUCTION that have a large impact on design decisions. Occasionally, mostly due to improvements of the underlying hardware, some of these requirements become obsolete with time passing, but others still apply. 1.1 JavaScript JavaScript has been developed as language within the browser. With the magnificent gain of importance the Internet has received in the last decade, JavaScript has become one of the world’s most used programming languages.
Recommended publications
  • THE FUTURE of SCREENS from James Stanton a Little Bit About Me
    THE FUTURE OF SCREENS From james stanton A little bit about me. Hi I am James (Mckenzie) Stanton Thinker / Designer / Engineer / Director / Executive / Artist / Human / Practitioner / Gardner / Builder / and much more... Born in Essex, United Kingdom and survived a few hair raising moments and learnt digital from the ground up. Ok enough of the pleasantries I have been working in the design field since 1999 from the Falmouth School of Art and onwards to the RCA, and many companies. Ok. less about me and more about what I have seen… Today we are going to cover - SCREENS CONCEPTS - DIGITAL TRANSFORMATION - WHY ASSETS LIBRARIES - CODE LIBRARIES - COST EFFECTIVE SOLUTION FOR IMPLEMENTATION I know, I know, I know. That's all good and well, but what does this all mean to a company like mine? We are about to see a massive change in consumer behavior so let's get ready. DIGITAL TRANSFORMATION AS A USP Getting this correct will change your company forever. DIGITAL TRANSFORMATION USP-01 Digital transformation (DT) – the use of technology to radically improve performance or reach of enterprises – is becoming a hot topic for companies across the globe. VERY DIGITAL CHANGING NOT VERY DIGITAL DIGITAL TRANSFORMATION USP-02 Companies face common pressures from customers, employees and competitors to begin or speed up their digital transformation. However they are transforming at different paces with different results. VERY DIGITAL CHANGING NOT VERY DIGITAL DIGITAL TRANSFORMATION USP-03 Successful digital transformation comes not from implementing new technologies but from transforming your organisation to take advantage of the possibilities that new technologies provide.
    [Show full text]
  • Transmit Processing in MIMO Wireless Systems
    IEEE 6th CAS Symp. on Emerging Technologies: Mobile and Wireless Comm Shanghai, China, May 31-June 2,2004 Transmit Processing in MIMO Wireless Systems Josef A. Nossek, Michael Joham, and Wolfgang Utschick Institute for Circuit Theory and Signal Processing, Munich University of Technology, 80333 Munich, Germany Phone: +49 (89) 289-28501, Email: [email protected] Abstract-By restricting the receive filter to he scalar, we weighted by a scalar in Section IV. In Section V, we compare derive the optimizations for linear transmit processing from the linear transmit and receive processing. respective joint optimizations of transmit and receive filters. We A popular nonlinear transmit processing scheme is Tom- can identify three filter types similar to receive processing: the nmamit matched filter (TxMF), the transmit zero-forcing filter linson Harashima precoding (THP) originally proposed for (TxZE), and the transmil Menerfilter (TxWF). The TxW has dispersive single inpur single output (SISO) systems in [IO], similar convergence properties as the receive Wiener filter, i.e. [Ill, but can also be applied to MlMO systems [12], [13]. it converges to the matched filter and the zero-forcing Pter for THP is similar to decision feedback equalization (DFE), hut low and high signal to noise ratio, respectively. Additionally, the contrary to DFE, THP feeds back the already transmitted mean square error (MSE) of the TxWF is a lower hound for the MSEs of the TxMF and the TxZF. symbols to reduce the interference caused by these symbols The optimizations for the linear transmit filters are extended at the receivers. Although THP is based on the application of to obtain the respective Tomlinson-Harashimp precoding (THP) nonlinear modulo operators at the receivers and the transmitter, solutions.
    [Show full text]
  • Overview: * Conclusion Modules and Libraries Modern Perl Techniques
    Modern Perl Techniques to Build Distributed Web 2.0 Applications. Presented By: Matt Burns [email protected] * Conclusion Moose just makes things easier. Joose is just like moose but in javascript land. jQuery and Seamstress allow us to be free of clunky template languages. Customized Web Apps spun up on the fly that are stateful are super neato. CPAN modules make concurrent distributed web apps/service possible and straight-forward. Configuration UDC Joose, jQuery Communication Event Distributed Demultiplexing WDC Continuity, Seamstess Computing Dimensions Concurrency Moose, Coro, AnyEvent EDC Service Ideas Behind This: 1) Owning stock and trading options on that will beat owning stock alone. 2) The Web Browser is the new operating system. KiokuDB RDC 3) Distributed parallel programming allows us the ability to tackle very complicated problems. 4) Explore the ideas behind the "Modern Perl" movement. 5) Explore the benefits of the Moose Joose relationship. 6) Instead of templating languages HTML/XML/etc operate directly on the dom. 7) How to enable an ad-hoc system of services to be coordinated into runtime alliances to solve business processes. Distributed Business Component UDC WDC EDC RDC Messages Events Overview: *** Distributed Paradigm Friendly Joose, jQuery Perl, CPAN Dom About how simple(maybe even easy) it is to build a simple distributed application stack with these off the self of CPAN Component Execution Environment The decrease in the impedence mismatch between objects in perl land and objects in Javascript land. Serializing perl/js objects and marshelling them back and forth from the client and server and between server and server. When we think distributed apps there are often many servers working with the client that hosts the user level component of these distributed apps in a piece of dom tied to a Joose object.
    [Show full text]
  • Download the Basketballplayer.Ngql Fle Here
    Nebula Graph Database Manual v1.2.1 Min Wu, Amber Zhang, XiaoDan Huang 2021 Vesoft Inc. Table of contents Table of contents 1. Overview 4 1.1 About This Manual 4 1.2 Welcome to Nebula Graph 1.2.1 Documentation 5 1.3 Concepts 10 1.4 Quick Start 18 1.5 Design and Architecture 32 2. Query Language 43 2.1 Reader 43 2.2 Data Types 44 2.3 Functions and Operators 47 2.4 Language Structure 62 2.5 Statement Syntax 76 3. Build Develop and Administration 128 3.1 Build 128 3.2 Installation 134 3.3 Configuration 141 3.4 Account Management Statement 161 3.5 Batch Data Management 173 3.6 Monitoring and Statistics 192 3.7 Development and API 199 4. Data Migration 200 4.1 Nebula Exchange 200 5. Nebula Graph Studio 224 5.1 Change Log 224 5.2 About Nebula Graph Studio 228 5.3 Deploy and connect 232 5.4 Quick start 237 5.5 Operation guide 248 6. Contributions 272 6.1 Contribute to Documentation 272 6.2 Cpp Coding Style 273 6.3 How to Contribute 274 6.4 Pull Request and Commit Message Guidelines 277 7. Appendix 278 7.1 Comparison Between Cypher and nGQL 278 - 2/304 - 2021 Vesoft Inc. Table of contents 7.2 Comparison Between Gremlin and nGQL 283 7.3 Comparison Between SQL and nGQL 298 7.4 Vertex Identifier and Partition 303 - 3/304 - 2021 Vesoft Inc. 1. Overview 1. Overview 1.1 About This Manual This is the Nebula Graph User Manual.
    [Show full text]
  • Basex Server
    BaseX Documentation Version 7.8 BaseX Documentation: Version 7.8 Content is available under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0). Table of Contents 1. Main Page .............................................................................................................................. 1 Getting Started .................................................................................................................. 1 XQuery Portal .................................................................................................................... 1 Advanced User's Guide ..................................................................................................... 2 I. Getting Started ........................................................................................................................ 3 2. Command-Line Options ................................................................................................... 4 BaseX Standalone ..................................................................................................... 4 BaseX Server ............................................................................................................ 6 BaseX Client ............................................................................................................. 7 BaseX HTTP Server .................................................................................................. 9 BaseX GUI .............................................................................................................
    [Show full text]
  • Three Methods of Finding Remainder on the Operation of Modular
    Zin Mar Win, Khin Mar Cho; International Journal of Advance Research and Development (Volume 5, Issue 5) Available online at: www.ijarnd.com Three methods of finding remainder on the operation of modular exponentiation by using calculator 1Zin Mar Win, 2Khin Mar Cho 1University of Computer Studies, Myitkyina, Myanmar 2University of Computer Studies, Pyay, Myanmar ABSTRACT The primary purpose of this paper is that the contents of the paper were to become a learning aid for the learners. Learning aids enhance one's learning abilities and help to increase one's learning potential. They may include books, diagram, computer, recordings, notes, strategies, or any other appropriate items. In this paper we would review the types of modulo operations and represent the knowledge which we have been known with the easiest ways. The modulo operation is finding of the remainder when dividing. The modulus operator abbreviated “mod” or “%” in many programming languages is useful in a variety of circumstances. It is commonly used to take a randomly generated number and reduce that number to a random number on a smaller range, and it can also quickly tell us if one number is a factor of another. If we wanted to know if a number was odd or even, we could use modulus to quickly tell us by asking for the remainder of the number when divided by 2. Modular exponentiation is a type of exponentiation performed over a modulus. The operation of modular exponentiation calculates the remainder c when an integer b rose to the eth power, bᵉ, is divided by a positive integer m such as c = be mod m [1].
    [Show full text]
  • The Best of Both Worlds?
    The Best of Both Worlds? Reimplementing an Object-Oriented System with Functional Programming on the .NET Platform and Comparing the Two Paradigms Erik Bugge Thesis submitted for the degree of Master in Informatics: Programming and Networks 60 credits Department of Informatics Faculty of mathematics and natural sciences UNIVERSITY OF OSLO Autumn 2019 The Best of Both Worlds? Reimplementing an Object-Oriented System with Functional Programming on the .NET Platform and Comparing the Two Paradigms Erik Bugge © 2019 Erik Bugge The Best of Both Worlds? http://www.duo.uio.no/ Printed: Reprosentralen, University of Oslo Abstract Programming paradigms are categories that classify languages based on their features. Each paradigm category contains rules about how the program is built. Comparing programming paradigms and languages is important, because it lets developers make more informed decisions when it comes to choosing the right technology for a system. Making meaningful comparisons between paradigms and languages is challenging, because the subjects of comparison are often so dissimilar that the process is not always straightforward, or does not always yield particularly valuable results. Therefore, multiple avenues of comparison must be explored in order to get meaningful information about the pros and cons of these technologies. This thesis looks at the difference between the object-oriented and functional programming paradigms on a higher level, before delving in detail into a development process that consisted of reimplementing parts of an object- oriented system into functional code. Using results from major comparative studies, exploring high-level differences between the two paradigms’ tools for modular programming and general program decompositions, and looking at the development process described in detail in this thesis in light of the aforementioned findings, a comparison on multiple levels was done.
    [Show full text]
  • JSON Application Programming Interface for Discrete Event Simulation Data Exchange
    JSON Application Programming Interface for Discrete Event Simulation data exchange Ioannis Papagiannopoulos Enterprise Research Centre Faculty of Science and Engineering Design and Manufacturing Technology University of Limerick Submitted to the University of Limerick for the degree of Master of Engineering 2015 1. Supervisor: Prof. Cathal Heavey Enterprise Research Centre University of Limerick Ireland ii Abstract This research is conducted as part of a project that has the overall aim to develop an open source discrete event simulation (DES) platform that is expandable, and modular aiming to support the use of DES at multi-levels of manufacturing com- panies. The current work focuses on DES data exchange within this platform. The goal of this thesis is to develop a DES exchange interface between three different modules: (i) ManPy an open source discrete event simulation engine developed in Python on the SimPy library; (ii) A Knowledge Extraction (KE) tool used to populate the ManPy simulation engine from shop-floor data stored within an Enterprise Requirements Planning (ERP) or a Manufacturing Execution System (MES) to allow the potential for real-time simulation. The development of the tool is based on R scripting language, and different Python libraries; (iii) A Graphical User Interface (GUI) developed in JavaScript used to provide an interface in a similar manner to Commercial off-the-shelf (COTS) DES tools. In the literature review the main standards that could be used are reviewed. Based on this review and the requirements above, the data exchange format standard JavaScript Object Notation (JSON) was selected. The proposed solution accom- plishes interoperability between different modules using an open source, expand- able, and easy to adopt and maintain, in an all inclusive JSON file.
    [Show full text]
  • Functional C
    Functional C Pieter Hartel Henk Muller January 3, 1999 i Functional C Pieter Hartel Henk Muller University of Southampton University of Bristol Revision: 6.7 ii To Marijke Pieter To my family and other sources of inspiration Henk Revision: 6.7 c 1995,1996 Pieter Hartel & Henk Muller, all rights reserved. Preface The Computer Science Departments of many universities teach a functional lan- guage as the first programming language. Using a functional language with its high level of abstraction helps to emphasize the principles of programming. Func- tional programming is only one of the paradigms with which a student should be acquainted. Imperative, Concurrent, Object-Oriented, and Logic programming are also important. Depending on the problem to be solved, one of the paradigms will be chosen as the most natural paradigm for that problem. This book is the course material to teach a second paradigm: imperative pro- gramming, using C as the programming language. The book has been written so that it builds on the knowledge that the students have acquired during their first course on functional programming, using SML. The prerequisite of this book is that the principles of programming are already understood; this book does not specifically aim to teach `problem solving' or `programming'. This book aims to: ¡ Familiarise the reader with imperative programming as another way of imple- menting programs. The aim is to preserve the programming style, that is, the programmer thinks functionally while implementing an imperative pro- gram. ¡ Provide understanding of the differences between functional and imperative pro- gramming. Functional programming is a high level activity.
    [Show full text]
  • JSON JSON (Javascript Object Notation) Ecmascript Javascript
    ECMAScript JSON ECMAScript is standardized JavaScript. The current version is the 12th edition: Péter Jeszenszky Ecma International, ECMAScript 2021 Language Specification, Standard ECMA-262, 12th ed., June 2021. https://www.ecma- international.org/publications-and-standards/standards/ecma-262/ October 8, 2021 The next version currently under development is ECMAScript 2022: ECMAScript 2022 Language Specification https://tc39.es/ecma262/ Péter Jeszenszky JSON October 8, 2021 1 / 94 Péter Jeszenszky JSON October 8, 2021 3 / 94 JSON (JavaScript Object Notation) JavaScript Lightweight, textual, and platform independent data exchange format. Used for representing structured data. The term JavaScript is used for the implementations of ECMAScript by different vendors. Can be read and written easily by humans. See also: JavaScript technologies overview Can be generated and processed easily by computer programs. https://developer.mozilla.org/en- US/docs/Web/JavaScript/JavaScript_technologies_overview Originates from the ECMAScript programming language. Website: https://www.json.org/ Péter Jeszenszky JSON October 8, 2021 2 / 94 Péter Jeszenszky JSON October 8, 2021 4 / 94 JavaScript Engines (1) Node.js (1) SpiderMonkey (written in: C/C++; license: Mozilla Public License 2.0) https://spidermonkey.dev/ A JavaScript runtime environment built on the V8 JavaScript engine The JavaScript engine of the Mozilla Project. that is designed to build scalable network applications. V8 (written in: C++; license: New BSD License) https://v8.dev/ Website: https://nodejs.org/ https://github.com/nodejs/node https://github.com/v8/v8/ License: MIT License The JavaScript engine of Chromium. Written in: C++, JavaScript JavaScriptCore (written in: C++; license: LGPLv2) https://developer.apple.com/documentation/javascriptcore https: Platform: Linux, macOS, Windows //github.com/WebKit/webkit/tree/master/Source/JavaScriptCore The JavaScript engine developed for the WebKit rendering engine.
    [Show full text]
  • Classical Hypermedia Virtues on the Web with Webstrates
    Classical Hypermedia Virtues on the Web with Webstrates Niels Olof Bouvin Clemens Nylandsted Klokmose Department of Computer Science Center for Advanced Visualization & Interaction Aarhus University, Denmark Aarhus University, Denmark [email protected] [email protected] ABSTRACT We show and analyze herein how Webstrates can augment the Web from a classical hypermedia perspective. Webstrates turns the DOM of Web pages into persistent and collaborative objects. We demonstrate how this can be applied to realize bidirectional links, shared collaborative annotations, and in-browser authorship and development. Categories and Subject Descriptors H.4.5 [Hypertext/Hypermedia]: Architectures Figure 1: Webstrates persist and synchronize through opera- Keywords tional transformations any changes to the Document Object Web, hypermedia, collaboration, dynamic documents Model of pages, called Webstrates, served from the Web- strates server to all clients of the same webstrate (from [32]). Introduction The vision of hypermedia was to create a richly intertwingled world of words, ideas, and concepts; an all-encompassing found in the form of, e.g., wikis and Web-based productivity collection of documents and works readily available for the suites such as Google Docs, these are usually either limited information worker to peruse, structure, correlate, add to, in functionality, or closed proprietary platforms. and amend using powerful tools and abstractions [15, 23, 36]. Earlier attempts have been made to rectify some of the What we have ended up with is both less and far more. shortcomings of the Web, such as augmenting the hypermedia The modern Web is all-encompassing in scope, and available functionality available [13]. Invariantly, these attempts have to a high and growing percentage of the world’s population.
    [Show full text]
  • Xquery 3.0 69 Higher-Order Functions 75 Full-Text 82 Full-Text/Japanese 85 Xquery Update 87 Java Bindings 91 Packaging 92 Xquery Errors 95 Serialization 105
    BaseX Documentation Version 7.2 PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Sat, 24 Mar 2012 17:30:37 UTC Contents Articles Main Page 1 Getting Started 3 Getting Started 3 Startup 4 Startup Options 6 Start Scripts 13 User Interfaces 16 Graphical User Interface 16 Shortcuts 20 Database Server 23 Standalone Mode 26 Web Application 27 General Info 30 Databases 30 Binary Data 32 Parsers 33 Commands 37 Options 50 Integration 64 Integrating oXygen 64 Integrating Eclipse 66 Query Features 68 Querying 68 XQuery 3.0 69 Higher-Order Functions 75 Full-Text 82 Full-Text/Japanese 85 XQuery Update 87 Java Bindings 91 Packaging 92 XQuery Errors 95 Serialization 105 XQuery Modules 108 Cryptographic Module 108 Database Module 113 File Module 120 Full-Text Module 125 HTTP Module 128 Higher-Order Functions Module 131 Index Module 133 JSON Module 135 Map Module 140 Math Module 144 Repository Module 148 SQL Module 149 Utility Module 153 XSLT Module 157 ZIP Module 160 ZIP Module: Word Documents 162 Developing 164 Developing 164 Integrate 165 Git 166 Maven 172 Releases 174 Translations 175 HTTP Services 176 REST 176 REST: POST Schema 184 RESTXQ 185 WebDAV 189 WebDAV: Windows 7 190 WebDAV: Windows XP 192 WebDAV: Mac OSX 195 WebDAV: GNOME 197 WebDAV: KDE 199 Client APIs 201 Clients 201 Standard Mode 202 Query Mode 203 PHP Example 205 Server Protocol 206 Server Protocol: Types 210 Java Examples 212 Advanced User's Guide 214 Advanced User's Guide 214 Configuration 215 Catalog Resolver 216 Statistics 218 Backups 222 User Management 222 Transaction Management 224 Logging 225 Events 226 Indexes 228 Execution Plan 230 References Article Sources and Contributors 231 Image Sources, Licenses and Contributors 233 Article Licenses License 234 Main Page 1 Main Page Welcome to the documentation of BaseX! BaseX [1] is both a light-weight, high-performance and scalable XML Database and an XPath/XQuery Processor with full support for the W3C Update and Full Text extensions.
    [Show full text]