EWD Custom Tag Development. Built-in Custom Tags for defining and manipulating Javascript
|
|
- Aubrey Bennett
- 6 years ago
- Views:
Transcription
1 EWD Custom Tag Development Built-in Custom Tags for defining and manipulating Javascript Build 790 Introduction A number of very powerful custom tags have been added to EWD. Unlike many of the built-in primitive Custom Tags, these new ones are intended for use in Custom Tag Processors and allow the Custom Tag developer to manipulate Javascript as XML tags. There are several reasons for introducing these Custom Tags into EWD: Most modern UI widgets rely on complex Javascript to control and define their behaviour EWD s parser treats anything inside <script> tags as text nodes and therefore Javascript is otherwise treated as simple strings of text. As a result, encapsulating UI widgets as EWD Custom Tags originally involved complex and tortuous string handling which ultimately was limiting and difficult to maintain. The new Javascript Custom Tags rely on the fact that EWD s compiler will repetitively re-analyse an EWD page DOM until it can no longer find any tags that it needs to process. This allows the developer to build custom tag processors that are defined using other custom tags: in this case it allows the developer to insert Javascript into the page DOM by adding Javascript-handling Custom Tags. In fact EWD s tag processing takes place in two phases, and it deals with certain Custom Tags in its second phase of processing: the Javascript Custom Tags are in this secondphase category. This is important because the Custom Tag developer needs to be sure that the Javascript custom tags remain in place until all his/her work is complete, after which they can be converted into the actual Javascript they represent. A good example of why these new Javascript Custom Tags are so powerful is the common situation where the handling of a particular UI widget will rely on not only the addition of some Javascript for each instance of that widget, but also a single instance of some other Javascript irrespective of the number of instances of those widgets. By simply adding a unique id to the one-off bit of Javascript, it is easy to later determine whether or not that chunk has already been added simply see if the getelementbyid() method returns a null or non-null value. If it returns a null value, the block cannot have been added yet. The Javascript Custom Tags also make it easy to progressively add Javascript inside other Javascript containers such as Object Constructors, Objects, Arrays or Functions: the DOM API methods make it simple and easy to embed tags inside each other and manipulate their attributes and position in the page. Tedious, tortuous and difficult to 1
2 understand string manipulation is replaced with slick, intuitive manipulation of tags within the EWD page DOM. Important: these <ewd:js*> tags are not intended to be used explicitly within an EWD page or fragment (though they could be). Their intended purpose is to be tags that are generated programmatically by tag processors, and therefore they will usually be created using DOM API methods such as addelementtodom or createelement. As such these tags will normally neither be seen in the original EWD fragment nor in the resulting compiled routine or page, but will exist only during the compilation phase as an intermediate step to the creation of the final compiled page. This, of course, means that debugging of a tag processor can be tricky, but the simplest technique is to add break commands to the tag processor at critical places and then view the state of the DOM at each break point using the outputdom() method. Generating Unique Ids within an EWD page DOM A common thing you ll need to do within an EWD Custom Tag processor is to create a unique Id for use as an id attribute within a fragment. The trick is to ensure that the Id will not clash with any other Id that might have been injected into the container page by another fragment. The recommended approach is to use the built-in uniqueid method, eg: s functionid=$$uniqueid^%zewdapi(nodeoid,filename) Note that the variable filename will automatically available to you within your Tag Processor provided you write it as an extrinsic function. filename will contain the name of the current fragment (without the.ewd file extension) 2
3 Summary of EWD Javascript Custom Tags The Javascript Custom Tags that are available in EWD are as follows: <ewd:js> <ewd:jssection> <ewd:jsline> <ewd:jsfunction> <ewd:jsconstructor> <ewd:jsmethod> <ewd:jsparameters> <ewd:jsobject> <ewd:jsnvp> <ewd:jsarray> <ewd:jsliteral> <ewd:jsvariable> <ewd:jsset> 3
4 <ewd:js> Defines an outer wrapper for the main block of Javascript within a fragment. This tag is ultimately replaced with <div id="ewdscript"> which is the container for all Javascript in a fragment.. None Most UI widget tag processors will first determine whether or not an <ewd:js> tag already exists in the page: s jsoid=$$gettagoid^%zewddom("ewd:js",docname) If jsoid returns a null value, this indicates that the tag being processed must be the first instance of a UI widget and therefore an <ewd:js> tag must be added to the page. The following is the recommended approach to creating the <ewd:js> tag: s docname=$$getdocumentname^%zewddom(docoid) s configoid=$$gettagoid^%zewddom("ewd:config",docname) s pagetype=$$getattribute^%zewddom("pagetype",configoid) i isajax!($$zcvt^%zewdapi(pagetype,"l")="rawcontent") d. n nsoid. s nsoid=$$getnextsibling^%zewddom(configoid). s jsoid=$$createelement^%zewddom("ewd:js",docoid). s jsoid=$$insertbefore^%zewddom(jsoid,nsoid) e d. n headoid. s headoid=$$gettagoid^%zewddom("head",docname). i headoid'="" s jsoid=$$addelementtodom^%zewddom("ewd:js",headoid) 4
5 <ewd:jssection> Defines a container for a chunk of Javascript. This tag doesn t actually generate or represent any Javascript per se, but is used to provide a target container into which you can later inject new Javascript Custom Tags as child nodes of the <ewd:jssection> Typically you ll uniquely identify the <ewd:jssection> by giving it a unique id attribute. This tag makes it easy to have chunks of Javascript for different purposes in your fragment, and allows you to add new lines of Javascript into that section each time you process a new instance of a UI widget. id Allows you to uniquely identify and find the jssection Most UI widget tag processors will first determine whether or not a particular <ewd:jssection> tag already exists in the page, eg: s nodeoid=$$getelementbyid^%zewddom("yui-datatable",docoid) If a null value is returned, this indicates that the jssection doesn t yet exist and probably needs to be added. The following is a typical approach to getting a pointer to a specific jssection, and creating the <ewd:jssection> tag if it doesn t yest exist. In this case we re making sure that we ve created a jssection with an id of yui-datatable which is embedded inside another jssection with an id of yuiwidgetloaders. The pointer sectionoid can then be used to manipulate the Javascript in the jssection: s sectionoid=$$getelementbyid^%zewddom("yui-datatable",docoid) i sectionoid="" d. n attr,widgetloadersoid. s widgetloadersoid=$$getelementbyid^%zewddom("yuiwidgetloaders",docoid). s attr("id")="yui-datatable". s sectionoid=$$addelementtodom^%zewddom("ewd:jssection",widgetloadersoid,,.attr) 5
6 <ewd:jsline> A very simple tag that just represents a line of Javascript. This is a lowest common denominator approach and should be used where you just want to add a line of JavaScript that won t require subsequent manipulation. The advantage is that it can represent any line of Javascript. This tag usually just has a text node that represents the line of Javascript However you can optionally add an id attribute to uniquely identify this line within the page DOM. Typically you ll use this tag to add a line of Javascript at the end of a specific jssection or jsfunction. In the following example we have a pointer to the required jssection (see <ewd:jssection> above): sectionoid. s text="ewd.yui.resourceloader.datatable() ;" s lineoid=$$addelementtodom^%zewddom("ewd:jsline",sectionoid,,,text) 6
7 <ewd:jsfunction> Defines the outer wrapper of a Javascript function. The idea is that you can subsequently add lines of Javascript into this function. Note that the current version is limited to functions that do not have any input parameters. If you need more complex functions, use a set of <ewd:jsline> tags. This tag will generate: var return = function() { }; or return = function() { }; id return addvar Allows you to uniquely identify and find the jsfunction The returnvalue for the function If set to true, the generated function call will be prefixed with var. If set to false, the var prefix will be suppressed. s functionoid=$$getelementbyid^%zewddom("myfunction",docoid) s functionpresent=0 i functionoid="" d. s functionobj="freturn"_$$uniqueid^%zewdapi(nodeoid,filename). s attr("return")=functionobj. s attr("addvar")="true". s attr("id")="myfunction". s functionoid=$$addelementtodom^%zewddom("ewd:jsfunction",sectionoid,,.attr) e d. s functionobj=$$getattribute^%zewddom("return",functionoid). s functionpresent=1 Note the use of the uniqueid method to create a unique returnvalue for the function that won t clash with any other that you create in other instances of this widget. 7
8 <ewd:jsconstructor> Defines a container that represents an object constructor. This is a particularly important and useful tag, since most Javascript-based UI widgets are defined using constructors and their input parameters can be quite complex JSON definitions. These JSON inputs are represented using a set of nested parameter tags. id object addvar Allows you to uniquely identify and find the jsconstructor The name of the object that is to be constructed If set to true, the generated constructor call will be prefixed with var. If set to false, the var prefix will be suppressed. Default if omitted is false return The returnvalue from the constructor, ie the pointer to the instance of the object that is constructed. The following is a typical approach to defining a constructor. In this case an instance of a YUI.widget.DropdownCellEditor object is being defined inside a jsfunction tag identified by functionoid. s attr("object")="yahoo.widget.dropdowncelleditor" s attr("return")="editorobj" s editorcoid=$$addelementtodom^%zewddom("ewd:jsconstructor",functionoid,,.attr) This will create the basic Constructor wrapper: editorobj = new Yahoo.widget.DropdownCellEditor() ; The parameters should be defined using the <ewd:jsparameters> tag. 8
9 <ewd:jsmethod> Defines a container that represents a Javascript method call. This is a particularly important and useful tag, since the input parameters of method calls can be quite complex JSON definitions. These JSON inputs are represented using a set of nested parameter tags. id name Allows you to uniquely identify and find the jsmethod The name of the method being invoked The following is a typical approach to defining a method call. In this case a call to the method YAHOO.util.Event.onAvailable is being added into the jssection identified by sectionoid. The method has two parameters, the first being a literal value and the second a reference to a Javascript variable: if 'functionpresent d. n methodoid. s attr("name")="yahoo.util.event.onavailable". s methodoid=$$addelementtodom^%zewddom("ewd:jsmethod",sectionoid,,.attr). s jspoid=$$addelementtodom^%zewddom("ewd:jsparameters",methodoid). s attr("value")=menuname_"div". s varoid=$$addelementtodom^%zewddom("ewd:jsliteral",jspoid,,.attr). s attr("name")=functionobj. s varoid=$$addelementtodom^%zewddom("ewd:jsvariable",jspoid,,.attr) This will create something like: YAHOO.util.Event.onAvailable( mydiv,thefunction) ; As shown above, the parameters of the method should be defined using the <ewd:jsparameters> tag. The individual parameters of the method call can be any combination of: <ewd:jsobject> defines a JSON object <ewd:jsarray> defines an array <ewd:jsvariable> defines a variable <ewd:jsliteral> defines a string literal 9
10 <ewd:jsparameters> Provides the container for the parameters of an <ewd:jsconstructor> or <ewd:jsmethod> tag This tag is appended as the first (and only) child of an <ewd:jsconstructor> or <ewd:jsmethod> tag. None The following is a typical approach to defining a constructor and its parameters tag. In this case an instance of a YUI.widget.DropdownCellEditor object is being defined inside a jsfunction tag identified by functionoid. s attr("object")="yahoo.widget.dropdowncelleditor" s attr("return")="editorobj" s editorcoid=$$addelementtodom^%zewddom("ewd:jsconstructor",functionoid,,.attr) s editorpoid=$$addelementtodom^%zewddom("ewd:jsparameters",editorcoid) The individual parameters are then defined as children of the <ewd:jsparameters> tag There are four parameter tags that you can use: <ewd:jsobject> defines a JSON object <ewd:jsarray> defines an array <ewd:jsvariable> defines a variable <ewd:jsliteral> defines a string literal You may have as many of these tags in any combination as children of the <ewd:jsparameters> tag. Furthermore, the jsobject and jsarray tags are further nestable allowing you to construct any JSON object of whatever complexity. 10
11 <ewd:jsobject> This tag is used to create the container for a Javascript object. The code it generates is {} The contents of the object that go inside the {..} are defined using <ewd:jsnvp> tags as child nodes, each <ewd:jsnvp> tag being used to define an individual name/value pair. None The following is a typical approach to defining a constructor and its parameters tag. In this case an instance of a YUI.widget.DropdownCellEditor object is being defined inside a jsfunction tag identified by functionoid. This constructor has a single object as its parameter. s attr("object")="yahoo.widget.dropdowncelleditor" s attr("return")="editorobj" s editorcoid=$$addelementtodom^%zewddom("ewd:jsconstructor",functionoid,,.attr) s editorpoid=$$addelementtodom^%zewddom("ewd:jsparameters",editorcoid) s editorooid=$$addelementtodom^%zewddom("ewd:jsobject",editorpoid) 11
12 <ewd:jsnvp> This tag is used to create the container for an individual name/value pair that belongs to an object. Each name/value pair has a declared type, the available types being: object: a Javascript object (ie JSON) array: a Javascript array literal: a string literal value variable: a Javascript variable name boolean: a name with a value of true or false If an <ewd:jsnvp> tag is defined as type array, then it will act as a container around an <ewd:jsarray> tag. This nesting can be repeated to any depth required eg: <ewd:jsnvp name= myarray type= array > <ewd:jsarray>..etc </ewd:jsarray> </ewd:jsnvp> If an <ewd:jsnvp> tag is defined as type object, then it will act as a container around an <ewd:jsobject> tag. This nesting can be repeated to any depth required eg: <ewd:jsnvp name= myobject type= object > <ewd:jsobject>..etc </ewd:jsobject> </ewd:jsnvp> If an <ewd:jsnvp> tag is defined as type literal, then it generates: name: value (where name is the value of the name attribute), eg: <ewd:jsnvp name= lastname value= Tweed type= literal /> would generate: lastname: Tweed 12
13 If an <ewd:jsnvp> tag is defined as type variable, then it generates: name:varname (where name is the value of the name attribute, and varname is the name of the variable), eg: <ewd:jsnvp name= reference value= myvar type= variable /> would generate: reference:myvar If an <ewd:jsnvp> tag is defined as type boolean, then it generates: name:value (where name is the value of the name attribute, and value is true or false), eg: <ewd:jsnvp name= hidden value= true type= boolean /> would generate: hidden:true id name value Optional lattribute that allows you to uniquely identify and find the name/value pair The name of the name/value pair The value of the name/value pair Note: this attribute is not used if the type is object or array type The type of the name/value pair: object array literal variable Boolean The following is a typical approach to defining a constructor and its parameters tag. In this case an instance of a YUI.widget.DropdownCellEditor object is being defined inside a jsfunction tag identified by functionoid. This constructor has a single object as its parameter. This object has a single boolean name/value pair. 13
14 s attr("object")="yahoo.widget.dropdowncelleditor" s attr("return")="editorobj" s editorcoid=$$addelementtodom^%zewddom("ewd:jsconstructor",functionoid,,.attr) s editorpoid=$$addelementtodom^%zewddom("ewd:jsparameters",editorcoid) s editorooid=$$addelementtodom^%zewddom("ewd:jsobject",editorpoid) i $g(ddattrs("disablebtns"))'="" d. s attr("name")="disablebtns". s attr("type")="boolean". s attr("value")=ddattrs("disablebtns"). s ddoid=$$addelementtodom^%zewddom("ewd:jsnvp",editorooid,,.attr) 14
15 <ewd:jsarray> This tag is used to create the container for a Javascript array. The code it generates is [] The elements of the array that go inside the [..] are defined using any of the following as child nodes: <ewd:jsvariable> <ewd:jsliteral> <ewd:jsobject> <ewd:jsarray> When compiled, each element that is generated from the above tags is separated by a comma. None The following is a typical approach to defining a constructor and its parameters tag. In this case an instance of a YUI.widget.DropdownCellEditor object is being defined inside a jsfunction tag identified by functionoid. This constructor has a single array as its parameter. s attr("object")="yahoo.widget.dropdowncelleditor" s attr("return")="editorobj" s editorcoid=$$addelementtodom^%zewddom("ewd:jsconstructor",functionoid,,.attr) s editorpoid=$$addelementtodom^%zewddom("ewd:jsparameters",editorcoid) s editoraoid=$$addelementtodom^%zewddom("ewd:jsarray",editorpoid) 15
16 <ewd:jsliteral> This tag is used to define a string literal value as either a member element of an array or as a parameter of an constructor or method. <ewd:jsliteral> tags are therefore always immediate children of an either an <ewd:jsarray> tag or an <ewd:jsparameters> tag. This tag simply generates the value of the name attribute wrapped in double quote, eg: <ewd:jsarray> <ewd:jsliteral name= hello /> <ewd:jsliteral name= world /> </ewd:jsarray> generates [ hello, world ] name value The value of the string literal if the <ewd:literal> is used as a child node of an <ewd:jsarray> tag The value of the string literal if the <ewd:literal> is used as a child node of an <ewd:jsparameters> tag The following is a typical approach to defining a constructor and its parameters tag. In this case an instance of a YUI.widget.DropdownCellEditor object is being defined inside a jsfunction tag identified by functionoid. This constructor has a single array as its parameter, and two array elements have been defined s attr("object")="yahoo.widget.dropdowncelleditor" s attr("return")="editorobj" s editorcoid=$$addelementtodom^%zewddom("ewd:jsconstructor",functionoid,,.attr) s editorpoid=$$addelementtodom^%zewddom("ewd:jsparameters",editorcoid) s editoraoid=$$addelementtodom^%zewddom("ewd:jsarray",editorpoid) s attr("name")= hello s varoid=$$addelementtodom^%zewddom("ewd:jsliteral",editoraoid,,.attr) s attr("name")= world s varoid=$$addelementtodom^%zewddom("ewd:jsliteral",editoraoid,,.attr) 16
17 <ewd:jsvariable> This tag is used to define a reference to a Javascript variable as either a member element of an array or as a parameter of an constructor or method. <ewd:jsvariable> tags are therefore always immediate children of an either an <ewd:jsarray> tag or an <ewd:jsparameters> tag. This tag simply generates the unquoted value of the name attribute, eg: <ewd:jsarray> <ewd:jsvariable name= hello /> <ewd:jsvariable name= world /> </ewd:jsarray> generates [hello,world] name The name of the Javascript variable The following is a typical approach to defining a constructor and its parameters tag. In this case an instance of a YUI.widget.DropdownCellEditor object is being defined inside a jsfunction tag identified by functionoid. This constructor has a single array as its parameter, and two array elements have been defined s attr("object")="yahoo.widget.dropdowncelleditor" s attr("return")="editorobj" s editorcoid=$$addelementtodom^%zewddom("ewd:jsconstructor",functionoid,,.attr) s editorpoid=$$addelementtodom^%zewddom("ewd:jsparameters",editorcoid) s editoraoid=$$addelementtodom^%zewddom("ewd:jsarray",editorpoid) s attr("name")= hello s varoid=$$addelementtodom^%zewddom("ewd:jsvariable",editoraoid,,.attr) s attr("name")= world s varoid=$$addelementtodom^%zewddom("ewd:jsvariable",editoraoid,,.attr) 17
18 <ewd:jsset> This tag is used to assigns a value of some type to a Javascript variable, object or array. By using <ewd:jsobject> and <ewd:jsarray> tags as child nodes, it is possible to build an assignment that creates a JSON object of any complexity and level of nesting. If an <ewd:jsset> tag is defined as type array, then it will act as a container around an <ewd:jsarray> tag. This nesting can be repeated to any depth required eg: <ewd:jsset return= myarray type= array > <ewd:jsarray>..etc </ewd:jsarray> </ewd:jsset> The generated code will be: myarray = [.etc ]; If an <ewd:jsset> tag is defined as type object, then it will act as a container around an <ewd:jsobject> tag. This nesting can be repeated to any depth required eg: <ewd:jsset return= myobject type= object > <ewd:jsobject>..etc </ewd:jsobject> </ewd:jsset> The generated code will be: myobject = {.etc }; 18
19 If an <ewd:jsset> tag is defined as type literal, for example <ewd:jsset return= lastname value= Tweed type= literal addvar= true /> this would generate: var lastname= Tweed ; id type Optional attribute that allows you to uniquely identify and find the jsset The type to be returned: object array literal addvar If set to true, the generated assignment call will be prefixed with var. If set to false, the var prefix will be suppressed. Default if omitted is false return The returnvalue from the assignment, ie the name of the variable, object or array that is created by the assignment The following is a typical example where an assignment is added to the DOM, the assignment instantiating a JSON object: mydatasrc.responseschema = {resultslists: records,totalrecords: 200 }; 19
20 s attr("return")=datasourceobj_".responseschema" s attr("addvar")="false" s attr("type")="object" s setoid=$$addelementtodom^%zewddom("ewd:jsset",functionoid,,.attr) s attr("name")="resultslist" s attr("value")="records" s attr("type")="literal" s nvpoid=$$addelementtodom^%zewddom("ewd:jsnvp",setoid,,.attr) s attr("name")="totalrecords" s attr("value")=200 s attr("type")="literal" s nvpoid=$$addelementtodom^%zewddom("ewd:jsnvp",mfoid,,.attr) 20
extc Web Developer Rapid Web Application Development and Ajax Framework Using Ajax
extc Web Developer Rapid Web Application Development and Ajax Framework Version 3.0.546 Using Ajax Background extc Web Developer (EWD) is a rapid application development environment for building and maintaining
More informationLesson: Web Programming(6) Omid Jafarinezhad Sharif University of Technology
Lesson: Web Programming(6) Omid Jafarinezhad Sharif University of Technology React QUICK START QUICK START ADVANCED GUIDES React QUICK START Installation Hello World Introducing JSX Components and Props
More informationCSC Web Technologies, Spring Web Data Exchange Formats
CSC 342 - Web Technologies, Spring 2017 Web Data Exchange Formats Web Data Exchange Data exchange is the process of transforming structured data from one format to another to facilitate data sharing between
More informationJavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects
JavaScript CAC Noida is an ISO 9001:2015 certified training center with professional experience that dates back to 2005. The vision is to provide professional education merging corporate culture globally
More informationJavaScript: Sort of a Big Deal,
: Sort of a Big Deal, But Sort of Quirky... March 20, 2017 Lisp in C s Clothing (Crockford, 2001) Dynamically Typed: no static type annotations or type checks. C-Like Syntax: curly-braces, for, semicolons,
More informationDecaf Language Reference Manual
Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented
More informationIntroduction to Programming Using Java (98-388)
Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;
More informationXML Processing & Web Services. Husni Husni.trunojoyo.ac.id
XML Processing & Web Services Husni Husni.trunojoyo.ac.id Based on Randy Connolly and Ricardo Hoar Fundamentals of Web Development, Pearson Education, 2015 Objectives 1 XML Overview 2 XML Processing 3
More informationWelcome to CS50 section! This is Week 10 :(
Welcome to CS50 section! This is Week 10 :( This is our last section! Final project dates Official proposals: due this Friday at noon Status report: due Monday, Nov 28 at noon Hackathon: Thursday, Dec
More informationJavaScript CS 4640 Programming Languages for Web Applications
JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation
More informationImport Statements, Instance Members, and the Default Constructor
Import Statements, Instance Members, and the Default Constructor Introduction In this article from my free Java 8 course, I will be discussing import statements, instance members, and the default constructor.
More informationBruce Merry. IOI Training Dec 2013
IOI Training Dec 2013 Outline 1 2 3 Outline 1 2 3 You can check that something is true using assert: #include int main() { assert(1 == 2); } Output: test_assert: test_assert.cpp:4: int main():
More informationCSCE 120: Learning To Code
CSCE 120: Learning To Code Manipulating Data I Introduction This module is designed to get you started working with data by understanding and using variables and data types in JavaScript. It will also
More informationFlow Control. CSC215 Lecture
Flow Control CSC215 Lecture Outline Blocks and compound statements Conditional statements if - statement if-else - statement switch - statement? : opertator Nested conditional statements Repetitive statements
More informationJava How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.
Java How to Program, 10/e Education, Inc. All Rights Reserved. Each class you create becomes a new type that can be used to declare variables and create objects. You can declare new classes as needed;
More informationClient-Side Web Technologies. JavaScript Part I
Client-Side Web Technologies JavaScript Part I JavaScript First appeared in 1996 in Netscape Navigator Main purpose was to handle input validation that was currently being done server-side Now a powerful
More informationContents. Chapter 1 Overview of the JavaScript C Engine...1. Chapter 2 JavaScript API Reference...23
Contents Chapter 1 Overview of the JavaScript C Engine...1 Supported Versions of JavaScript...1 How Do You Use the Engine?...2 How Does the Engine Relate to Applications?...2 Building the Engine...6 What
More informationJavascript Arrays, Object & Functions
Javascript Arrays, Object & Functions Agenda Creating & Using Arrays Creating & Using Objects Creating & Using Functions 2 Creating & Using Arrays Arrays are a type of object that are ordered by the index
More informationWPF and MVVM Study Guides
1. Introduction to WPF WPF and MVVM Study Guides https://msdn.microsoft.com/en-us/library/mt149842.aspx 2. Walkthrough: My First WPF Desktop Application https://msdn.microsoft.com/en-us/library/ms752299(v=vs.110).aspx
More informationLesson 10A OOP Fundamentals. By John B. Owen All rights reserved 2011, revised 2014
Lesson 10A OOP Fundamentals By John B. Owen All rights reserved 2011, revised 2014 Table of Contents Objectives Definition Pointers vs containers Object vs primitives Constructors Methods Object class
More informationDecision Making in C
Decision Making in C Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed
More informationIntroduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p.
Preface p. xiii Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. 5 Client-Side JavaScript: Executable Content
More informationChapter 11. Categories of languages that support OOP: 1. OOP support is added to an existing language
Categories of languages that support OOP: 1. OOP support is added to an existing language - C++ (also supports procedural and dataoriented programming) - Ada 95 (also supports procedural and dataoriented
More informationJavaScript CS 4640 Programming Languages for Web Applications
JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation
More informationJavascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010
Lecture 14 Javascript Announcements Project #2 New website Exam#2 No. Class Date Subject and Handout(s) 17 11/4/10 Examination Review Practice Exam PDF 18 11/9/10 Search, Safety, Security Slides PDF UMass
More informationJAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)
Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 4 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA
More informationInstrumental Documentation
Instrumental Documentation Release 0.5.1 Matthew J Desmarais February 08, 2016 Contents 1 Introduction 3 1.1 What is instrumental?.......................................... 3 1.2 What s the problem?...........................................
More informationDeveloping Ajax Applications using EWD and Python. Tutorial: Part 2
Developing Ajax Applications using EWD and Python Tutorial: Part 2 Chapter 1: A Logon Form Introduction This second part of our tutorial on developing Ajax applications using EWD and Python will carry
More informationHierarchical inheritance: Contains one base class and multiple derived classes of the same base class.
1. What is C#? C# (pronounced "C sharp") is a simple, modern, object oriented, and type safe programming language. It will immediately be familiar to C and C++ programmers. C# combines the high productivity
More informationPart 1: jquery & History of DOM Scripting
Karl Swedberg: Intro to JavaScript & jquery 0:00:00 0:05:00 0:05:01 0:10:15 0:10:16 0:12:36 0:12:37 0:13:32 0:13:32 0:14:16 0:14:17 0:15:42 0:15:43 0:16:59 0:17:00 0:17:58 Part 1: jquery & History of DOM
More informationReact.js. a crash course. Jake Zimmerman January 29th, 2016
React.js a crash course Jake Zimmerman January 29th, 2016 Key Features of React.js Easily express user interfaces Richly express the visual elements of a design, as well as the interactions users can
More informationCOMS 469: Interactive Media II
COMS 469: Interactive Media II Agenda Review Data Types & Variables Decisions, Loops, and Functions Review gunkelweb.com/coms469 Review Basic Terminology Computer Languages Interpreted vs. Compiled Client
More informationCHAPTER 7 OBJECTS AND CLASSES
CHAPTER 7 OBJECTS AND CLASSES OBJECTIVES After completing Objects and Classes, you will be able to: Explain the use of classes in Java for representing structured data. Distinguish between objects and
More informationCSE450. Translation of Programming Languages. Lecture 11: Semantic Analysis: Types & Type Checking
CSE450 Translation of Programming Languages Lecture 11: Semantic Analysis: Types & Type Checking Structure Project 1 - of a Project 2 - Compiler Today! Project 3 - Source Language Lexical Analyzer Syntax
More informationWhat is it? CMSC 433 Programming Language Technologies and Paradigms Spring Approach 1. Disadvantage of Approach 1
CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Singleton Pattern Mar. 13, 2007 What is it? If you need to make sure that there can be one and only one instance of a class. For example,
More informationFor example, when we first started Java programming we described the HelloWorld class:
Classes and Methods We have already been using classes in Java as we have seen, a class corresponds to an object. Classes encourage good programming style by allowing the user to encapsulate both data
More informationCHAPTER 2 MARKUP LANGUAGES: XHTML 1.0
WEB TECHNOLOGIES A COMPUTER SCIENCE PERSPECTIVE CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0 Modified by Ahmed Sallam Based on original slides by Jeffrey C. Jackson reserved. 0-13-185603-0 HTML HELLO WORLD! Document
More informationMATLAB-to-ROCI Interface. Member(s): Andy Chen Faculty Advisor: Camillo J. Taylor
MATLAB-to-ROCI Interface Member(s): Andy Chen (chenab@seas.upenn.edu) Faculty Advisor: Camillo J. Taylor (cjtaylor@cis.upenn.edu) Abstract The Remote Objects Control Interface, or ROCI, is a framework
More informationChild Items. Adding Child Items to plugin control panels. File Structure 4. Hacking childitems.html 7. Hacking childitem.html (without the s) 14
Child Items Child Items 1 Adding Child Items to plugin control panels. 1.1 1.2 1.3 File Structure 4 Hacking childitems.html 7 Hacking childitem.html (without the s) 14 Adding Child Items to plugin control
More informationChapter 3 Data Types and Variables
Chapter 3 Data Types and Variables Adapted from JavaScript: The Complete Reference 2 nd Edition by Thomas Powell & Fritz Schneider 2004 Thomas Powell, Fritz Schneider, McGraw-Hill Jargon Review Variable
More informationLearning Objectives. Description. Your AU Expert(s) Trent Earley Behlen Mfg. Co. Shane Wemhoff Behlen Mfg. Co.
PL17257 JavaScript and PLM: Empowering the User Trent Earley Behlen Mfg. Co. Shane Wemhoff Behlen Mfg. Co. Learning Objectives Using items and setting data in a Workspace Setting Data in Related Workspaces
More informationCOMP519 Web Programming Lecture 12: JavaScript (Part 3) Handouts
COMP519 Web Programming Lecture 12: JavaScript (Part 3) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool
More informationBrief Summary of Java
Brief Summary of Java Java programs are compiled into an intermediate format, known as bytecode, and then run through an interpreter that executes in a Java Virtual Machine (JVM). The basic syntax of Java
More information12/22/11. Java How to Program, 9/e. public must be stored in a file that has the same name as the class and ends with the.java file-name extension.
Java How to Program, 9/e Education, Inc. All Rights Reserved. } Covered in this chapter Classes Objects Methods Parameters double primitive type } Create a new class (GradeBook) } Use it to create an object.
More informationIntroduction to scripting with Gig Performer Draft V0.51. Dr. David H Jameson Nebojsa Djogo. Deskew Technologies, LLC May 4, 2018
Introduction to scripting with Gig Performer Draft V0.51 Dr. David H Jameson Nebojsa Djogo Deskew Technologies, LLC May 4, 2018 Introduction The Gig Performer scripting language, which we have rather unimaginatively
More informationJAVASCRIPT - CREATING A TOC
JAVASCRIPT - CREATING A TOC Problem specification - Adding a Table of Contents. The aim is to be able to show a complete novice to HTML, how to add a Table of Contents (TOC) to a page inside a pair of
More informationThe Lorax Programming Language
The Lorax Programming Language Doug Bienstock, Chris D Angelo, Zhaarn Maheswaran, Tim Paine, and Kira Whitehouse dmb2168, cd2665, zsm2103, tkp2108, kbw2116 Programming Translators and Languages, Department
More informationIntro. Scheme Basics. scm> 5 5. scm>
Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if
More informationXML JavaScript Object Notation JSON Cookies Miscellaneous What Javascript can t do. OOP Concepts of JS
LECTURE-4 XML JavaScript Object Notation JSON Cookies Miscellaneous What Javascript can t do. OOP Concepts of JS 1 XML EXTENDED MARKUP LANGUAGE XML is a markup language, like HTML Designed to carry data
More informationCS 251 Intermediate Programming Methods and Classes
CS 251 Intermediate Programming Methods and Classes Brooke Chenoweth University of New Mexico Fall 2018 Methods An operation that can be performed on an object Has return type and parameters Method with
More informationCS 251 Intermediate Programming Methods and More
CS 251 Intermediate Programming Methods and More Brooke Chenoweth University of New Mexico Spring 2018 Methods An operation that can be performed on an object Has return type and parameters Method with
More information(Refer Slide Time: 01:40)
Internet Technology Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No #25 Javascript Part I Today will be talking about a language
More informationA Framework for Creating Distributed GUI Applications
A Framework for Creating Distributed GUI Applications Master s Project Report Derek Snyder May 15, 2006 Advisor: John Jannotti Introduction Creating distributed graphical user interface (GUI) applications
More informationLecture 8. ReactJS 1 / 24
Lecture 8 ReactJS 1 / 24 Agenda 1. JSX 2. React 3. Redux 2 / 24 JSX 3 / 24 JavaScript + HTML = JSX JSX is a language extension that allows you to write HTML directly into your JavaScript files. Behind
More informationCSC Web Programming. Introduction to JavaScript
CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its
More informationSPARK-PL: Introduction
Alexey Solovyev Abstract All basic elements of SPARK-PL are introduced. Table of Contents 1. Introduction to SPARK-PL... 1 2. Alphabet of SPARK-PL... 3 3. Types and variables... 3 4. SPARK-PL basic commands...
More information2/6/2012. Rich Internet Applications. What is Ajax? Defining AJAX. Asynchronous JavaScript and XML Term coined in 2005 by Jesse James Garrett
What is Ajax? Asynchronous JavaScript and XML Term coined in 2005 by Jesse James Garrett http://www.adaptivepath.com/ideas/essays/archives /000385.php Ajax isn t really new, and isn t a single technology
More informationTest Requirement Catalog. Generic Clues, Developer Version
Version 4..0 PART 1: DATA TYPES Test Requirement Catalog SIMPLE DATA TYPES... 4 BOOLEAN... 4 CASES... 4 COUNTS... 5 INTERVALS... 5 [LOW, HIGH] an interval that contains both LOW and HIGH... 6 [LOW, HIGH)
More information/ Introduction to XML
Introduction to XML XML stands for Extensible Markup Language. It is a text-based markup language derived from Standard Generalized Markup Language (SGML). XML tags identify the data and are used to store
More informationwelcome to BOILERCAMP HOW TO WEB DEV
welcome to BOILERCAMP HOW TO WEB DEV Introduction / Project Overview The Plan Personal Website/Blog Schedule Introduction / Project Overview HTML / CSS Client-side JavaScript Lunch Node.js / Express.js
More informationStatic Methods. Why use methods?
Static Methods A method is just a collection of code. They are also called functions or procedures. It provides a way to break a larger program up into smaller, reusable chunks. This also has the benefit
More informationPHP and MySQL for Dynamic Web Sites. Intro Ed Crowley
PHP and MySQL for Dynamic Web Sites Intro Ed Crowley Class Preparation If you haven t already, download the sample scripts from: http://www.larryullman.com/books/phpand-mysql-for-dynamic-web-sitesvisual-quickpro-guide-4thedition/#downloads
More informationFRAC: Language Reference Manual
FRAC: Language Reference Manual Justin Chiang jc4127 Kunal Kamath kak2211 Calvin Li ctl2124 Anne Zhang az2350 1. Introduction FRAC is a domain-specific programming language that enables the programmer
More informationLanguage Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */
Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,
More informationitunes Extras/iTunes LP Development: TuneKit Programming Guide v1.0
itunes Extras/iTunes LP Development page 1 itunes Extras/iTunes LP Development: apple 11-18-2009 itunes Extras/iTunes LP Development page 2 Contents TuneKit Reference 3 TKController 3 View 3 Outlets 3
More informationNode.js Training JavaScript. Richard richardrodger.com
Node.js Training JavaScript Richard Rodger @rjrodger richardrodger.com richard.rodger@nearform.com A New Look at JavaScript Embracing JavaScript JavaScript Data Structures JavaScript Functions Functional
More informationDrag and Drop Form Builder. Data Verity #2 Erikka Baker James Miller Jordan Schmerge
Drag and Drop Form Builder Data Verity #2 Erikka Baker James Miller Jordan Schmerge June 21, 2016 Table of Contents Introduction Requirements System Architecture Technical Design Component Highlighting
More informationCIS 194: Homework 6. Due Friday, October 17, Preface. Setup. Generics. No template file is provided for this homework.
CIS 194: Homework 6 Due Friday, October 17, 2014 No template file is provided for this homework. Download the markets.json file from the website, and make your HW06.hs Haskell file with your name, any
More informationWorking with JavaScript
Working with JavaScript Creating a Programmable Web Page for North Pole Novelties 1 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page 2 Objectives
More informationSERIOUS ABOUT SOFTWARE. Qt Core features. Timo Strömmer, May 26,
SERIOUS ABOUT SOFTWARE Qt Core features Timo Strömmer, May 26, 2010 1 Contents C++ refresher Core features Object model Signals & slots Event loop Shared data Strings Containers Private implementation
More informationBasic Steps for Creating an Application with the ArcGIS Server API for JavaScript
Chapter 4: Working with Maps and Layers Now that you have a taste of ArcGIS Server and the API for JavaScript it s time to actually get to work and learn how to build some great GIS web applications! The
More informationReact. HTML code is made up of tags. In the example below, <head> is an opening tag and </head> is the matching closing tag.
Document Object Model (DOM) HTML code is made up of tags. In the example below, is an opening tag and is the matching closing tag. hello The tags have a tree-like
More informationTopics. Java arrays. Definition. Data Structures and Information Systems Part 1: Data Structures. Lecture 3: Arrays (1)
Topics Data Structures and Information Systems Part 1: Data Structures Michele Zito Lecture 3: Arrays (1) Data structure definition: arrays. Java arrays creation access Primitive types and reference types
More informationSprite an animation manipulation language Language Reference Manual
Sprite an animation manipulation language Language Reference Manual Team Leader Dave Smith Team Members Dan Benamy John Morales Monica Ranadive Table of Contents A. Introduction...3 B. Lexical Conventions...3
More informationSession 3: JavaScript - Structured Programming
INFM 603: Information Technology and Organizational Context Session 3: JavaScript - Structured Programming Jimmy Lin The ischool University of Maryland Thursday, September 25, 2014 Source: Wikipedia Types
More informationCOMP284 Scripting Languages Lecture 14: JavaScript (Part 1) Handouts
COMP284 Scripting Languages Lecture 14: JavaScript (Part 1) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool
More informationQUIZ. What is wrong with this code that uses default arguments?
QUIZ What is wrong with this code that uses default arguments? Solution The value of the default argument should be placed in either declaration or definition, not both! QUIZ What is wrong with this code
More informationOCA Java SE 7 Programmer I Certification Guide By Mela Gupta. Arrays
1 OCA Java SE 7 Programmer I Certification Guide By Mela Gupta In the OCA Java SE 7 programmer exam, you ll be asked many questions on how to create, modify, and delete String, StringBuilder, arrays, and
More informationCE221 Programming in C++ Part 1 Introduction
CE221 Programming in C++ Part 1 Introduction 06/10/2017 CE221 Part 1 1 Module Schedule There are two lectures (Monday 13.00-13.50 and Tuesday 11.00-11.50) each week in the autumn term, and a 2-hour lab
More informationJavascript. Many examples from Kyle Simpson: Scope and Closures
Javascript Many examples from Kyle Simpson: Scope and Closures What is JavaScript? Not related to Java (except that syntax is C/Java- like) Created by Brendan Eich at Netscape later standardized through
More informationUnderstanding Angular Directives By Jeffry Houser
Understanding Angular Directives By Jeffry Houser A DotComIt Whitepaper Copyright 2016 by DotComIt, LLC Contents A Simple Directive... 4 Our Directive... 4 Create the App Infrastructure... 4 Creating a
More informationJAVA: A Primer. By: Amrita Rajagopal
JAVA: A Primer By: Amrita Rajagopal 1 Some facts about JAVA JAVA is an Object Oriented Programming language (OOP) Everything in Java is an object application-- a Java program that executes independently
More informationChapter 3: Programming with MATLAB
Chapter 3: Programming with MATLAB Choi Hae Jin Chapter Objectives q Learning how to create well-documented M-files in the edit window and invoke them from the command window. q Understanding how script
More informationPrincess Nourah bint Abdulrahman University. Computer Sciences Department
Princess Nourah bint Abdulrahman University 1 And use http://www.w3schools.com/ JavaScript Objectives Introduction to JavaScript Objects Data Variables Operators Types Functions Events 4 Why Study JavaScript?
More informationEXERCISE: Introduction to client side JavaScript
EXERCISE: Introduction to client side JavaScript Barend Köbben Version 1.3 March 23, 2015 Contents 1 Dynamic HTML and scripting 3 2 The scripting language JavaScript 3 3 Using Javascript in a web page
More informationDue: 9 February 2017 at 1159pm (2359, Pacific Standard Time)
CSE 11 Winter 2017 Program Assignment #2 (100 points) START EARLY! Due: 9 February 2017 at 1159pm (2359, Pacific Standard Time) PROGRAM #2: DoubleArray11 READ THE ENTIRE ASSIGNMENT BEFORE STARTING In lecture,
More informationA4: HTML Validator/Basic DOM Operation
A4: HTML Validator/Basic DOM Operation Overview You are tasked with creating a basic HTML parser to perform a *very* limited subset of what a web browser does behind the scenes to setup the DOM for displaying
More informationSuch JavaScript Very Wow
Such JavaScript Very Wow Lecture 9 CGS 3066 Fall 2016 October 20, 2016 JavaScript Numbers JavaScript numbers can be written with, or without decimals. Extra large or extra small numbers can be written
More informationTutorial 10: Programming with JavaScript
Tutorial 10: Programming with JavaScript College of Computing & Information Technology King Abdulaziz University CPCS-665 Internet Technology Objectives Learn the history of JavaScript Create a script
More informationTemplates and Databinding. SWE 432, Fall 2017 Design and Implementation of Software for the Web
Templates and Databinding SWE 432, Fall 2017 Design and Implementation of Software for the Web Today What are templates? What are frontend components? How can I use these with React? 2 What s wrong with
More informationCS50 Quiz Review. November 13, 2017
CS50 Quiz Review November 13, 2017 Info http://docs.cs50.net/2017/fall/quiz/about.html 48-hour window in which to take the quiz. You should require much less than that; expect an appropriately-scaled down
More informationHTML 5 and CSS 3, Illustrated Complete. Unit L: Programming Web Pages with JavaScript
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript Objectives Explore the Document Object Model Add content using a script Trigger a script using an event handler Create
More informationLOON. Language Reference Manual THE LANGUAGE OF OBJECT NOTATION. Kyle Hughes, Jack Ricci, Chelci Houston-Borroughs, Niles Christensen, Habin Lee
LOON THE LANGUAGE OF OBJECT NOTATION Language Reference Manual Kyle Hughes, Jack Ricci, Chelci Houston-Borroughs, Niles Christensen, Habin Lee October 2017 1 Contents 1 Introduction 3 2 Types 4 2.1 JSON............................................
More informationpyramid_assetmutator Documentation
pyramid_assetmutator Documentation Release 1.0b1 Seth Davis February 22, 2017 Contents 1 Overview 1 2 Installation 3 3 Setup 5 4 Usage 7 5 Mutators 11 6 Settings 13 7 Asset Concatenation (a.k.a Asset
More informationData Collections. Welcome to the Fourth Dimension (and beyond) Martin Phillips Ladybridge Systems Ltd. International Spectrum Conference, 2014
Data Collections Welcome to the Fourth Dimension (and beyond) International Spectrum Conference, 2014 Martin Phillips Ladybridge Systems Ltd Multivalue Are we at its limits? We all understand the power
More informationdo fifty two: Language Reference Manual
do fifty two: Language Reference Manual Sinclair Target Jayson Ng Josephine Tirtanata Yichi Liu Yunfei Wang 1. Introduction We propose a card game language targeted not at proficient programmers but at
More information10.1 Overview of Ajax
10.1 Overview of Ajax - History - Possibility began with the nonstandard iframe element, which appeared in IE4 and Netscape 4 - An iframe element could be made invisible and could be used to send asynchronous
More informationJavaScript Fundamentals_
JavaScript Fundamentals_ HackerYou Course Syllabus CLASS 1 Intro to JavaScript Welcome to JavaScript Fundamentals! Today we ll go over what programming languages are, JavaScript syntax, variables, and
More informationstructure syntax different levels of abstraction
This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital
More informationHere is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this
This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital
More information