SlideShare a Scribd company logo
www.uniface.comlectures.
lectures.
JavaScript
Michael Taylor
Product Manager
April 15, 2016
lectures.
www.uniface.comlectures.
Agenda
• JavaScript Basics
• Using Uniface’s JavaScript API
• Integrating DSP’s into existing websites
www.uniface.comlectures.
What is JavaScript
• Programming language
ď‚§ High-level, weakly-typed, dynamic, interpreted
ď‚§ Standards based - ECMAScript
• Started as a web automation language
• Highly optimized
ď‚§ Google v8 engine
• Full access to (D)ocument (O)bject (M)odel
• It is not Java
 Java is like Star Trek – JavaScript is like Star wars
www.uniface.comlectures.
My First JavaScript
• Defined inside <script> tag
• Can be in head or body
• Normally in-line as the page is passed
• Can be set to async
www.uniface.comlectures.
JavaScript Variables
• JavaScript variables are containers for storing data
• Should be declared
ď‚§ Or it will be created globally
• No data type specified
ď‚§ Can contain anything
ď‚§ String, Number, Boolean, Array, Object, undefined
 var myArray = [“Volvo”, “Saab”, “Ford”];
ď‚§ myArray[0];
 var myObject = {myProperty1: “ABC”, myProperty2: 1000};
ď‚§ myObject.myProperty1;
 myObject[“myProperty1”];
www.uniface.comlectures.
JavaScript Functions
A JavaScript function is a block of code
designed to perform a particular task.
A JavaScript function is executed when
"something" invokes it (calls it).
www.uniface.comlectures.
JavaScript Functions
• Name
• Parameters
ď‚§ only input
• Can return a value
www.uniface.comlectures.
Separate JS files
• Improve loading times
• Readability
• Encapsulate functionality
• Include 3rd party utilities
www.uniface.comlectures.
Conditions
www.uniface.comlectures.
Operators
== equal to
=== equal value and equal type
!= not equal
!== not equal value or not equal type
> greater than
< less than
>= greater than or equal to
<= less than or equal to
? ternary operator
www.uniface.comlectures.
Loops
• break/continue {label}
www.uniface.comlectures.
More (advanced) Information
• Objects
ď‚§ Constructors
ď‚§ Prototypes
• Closures
• Errors and exceptions
www.uniface.comlectures.
Agenda
• JavaScript Basics
• Using Uniface’s JavaScript API
• Integrating DSP’s into existing websites
www.uniface.comlectures.
Uniface JavaScript API
• uniface
ď‚§ Instance
ď‚§ Entity
ď‚§ Occurrence
ď‚§ Field
• Enables interaction with fields and data in
browser
• Frames within frames
ď‚§ Similar to Client/Server
Documentation: Uniface Reference -> APIs: JavaScript
www.uniface.comlectures.
Data types (Examples)
• String
ď‚§ get/setValue
• Object
ď‚§ get/setProperties
• Array
ď‚§ Get/setValrepArray
www.uniface.comlectures.
webOperation/webtrigger
• Instructs Uniface to
• Client side JavaScript operation
• Callable from API or web activate
• Attach an event (onClick, OnChange, detail)
• Scope (Optional – defaults to
input/output)
• Params (Optional – IN/INOUT only)
• JavaScript/EndJavaScript (optional)
www.uniface.comlectures.
Context
• weboperation
 “this” is the instance
• webtrigger
 “this” is the field
• getParent()
www.uniface.comlectures.
Promises
A promise represents the eventual result of
an asynchronous operation. It is a
placeholder into which the successful result
value or reason for failure will materialize.
www.uniface.comlectures.
What do they look like
www.uniface.comlectures.
Agenda
• JavaScript Basics
• Using Uniface’s JavaScript API
• Integrating DSP’s into existing
websites
www.uniface.comlectures.
Uniface in an existing website
• Client/Server communication
• State
• Scoping
• Blocking
• Re-use
www.uniface.comlectures.
Configure Uniface
• wasv.asn
ď‚§ Set the location of the Uniface JS/CSS runtime
ď‚§ $uniface_runtime_base_url
ď‚§ Set the location to load dspjs files
ď‚§ $js_base_url
• web.xml
 Security – CORS
ď‚§ Google - tomcat CORS
www.uniface.comlectures.
Sample CORS section
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>
org.apache.catalina.filters.CorsFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
www.uniface.comlectures.
Using uniface.js
www.uniface.comlectures.
Thank You / Q & A
Thank You!
Q & A
www.uniface.comlectures.
Follow us online
uniface.com
unifaceinfo.com/forum

More Related Content

PDF
Uniface Anywhere Webinar Presentation
PDF
Uniface10 developers new favorite christian weber brno_9_jun2015
PDF
Uniface mobile mike taylor brno_9_jun2015
PDF
Product roadmap mike taylor brno_9_jun2015
PPTX
Uniface Lectures Webinar - Mobile
PDF
Making Multisite Work for You
PPTX
NetBeans Platform for Rich Client Development
PDF
Dot Net Framework An Overview
Uniface Anywhere Webinar Presentation
Uniface10 developers new favorite christian weber brno_9_jun2015
Uniface mobile mike taylor brno_9_jun2015
Product roadmap mike taylor brno_9_jun2015
Uniface Lectures Webinar - Mobile
Making Multisite Work for You
NetBeans Platform for Rich Client Development
Dot Net Framework An Overview

What's hot (15)

PPTX
Evolve18 | Kanika Gera | "Eureka" : Adobe Sensei in AEM search for multilingu...
PDF
Introduction about mozilla
PPTX
Introduction to portable class libraries
PDF
DevTeach Ottawa - Silverlight5 and HTML5
PPTX
MOBILE QUESTIONS & ANSWER WEBSITE
PPTX
2019 devconfza - legacy js
ODP
Netbeans65 Osum Slides
PPT
Device channels v/s Responsive web design
PPTX
Rev it up with php on windows
PDF
Building software using Rich Clients Platforms Rikard Thulin
PPTX
Scaling WordPress on Microsoft
PPT
Wordpress On Windows
PDF
Silverlight
PPTX
Presentation asp.net development
PDF
Joomladay Netherlands 2012 - Joomla in the Cloud
Evolve18 | Kanika Gera | "Eureka" : Adobe Sensei in AEM search for multilingu...
Introduction about mozilla
Introduction to portable class libraries
DevTeach Ottawa - Silverlight5 and HTML5
MOBILE QUESTIONS & ANSWER WEBSITE
2019 devconfza - legacy js
Netbeans65 Osum Slides
Device channels v/s Responsive web design
Rev it up with php on windows
Building software using Rich Clients Platforms Rikard Thulin
Scaling WordPress on Microsoft
Wordpress On Windows
Silverlight
Presentation asp.net development
Joomladay Netherlands 2012 - Joomla in the Cloud
Ad

Viewers also liked (15)

PPTX
Introduction to JavaScript Programming
PDF
Hugo - Introduction
PDF
1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d
PDF
Even more java script best practices
PDF
Web Development best practices
PDF
Show & tell - Who is Hugo?
PPTX
JavaScript Full-Stack Development Course Session 01
PPTX
Graphic Design For Web
PPT
Starting with Reactjs
PPTX
003. ReactJS basic
PPTX
Reactjs
PPTX
Getting Started with Pelican
PPTX
Presentation on Gatsby to SF Static Web Tech Meetup
PDF
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
PPTX
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Get...
Introduction to JavaScript Programming
Hugo - Introduction
1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d
Even more java script best practices
Web Development best practices
Show & tell - Who is Hugo?
JavaScript Full-Stack Development Course Session 01
Graphic Design For Web
Starting with Reactjs
003. ReactJS basic
Reactjs
Getting Started with Pelican
Presentation on Gatsby to SF Static Web Tech Meetup
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Get...
Ad

Similar to U97 JavaScript Webinar (20)

PDF
Introduction to ASP.NET MVC
DOC
Santosh_Resume_Java
PPTX
Introduction to web application development with Vue (for absolute beginners)...
PPTX
Java script
PDF
Targeting Mobile Platform with MVC 4.0
PDF
Typesafe stack - Scala, Akka and Play
PDF
PLAT-8 Spring Web Scripts and Spring Surf
PPTX
Untying the Knots of Web Dev with Internet Explorer
PPTX
Automated UI Testing
PDF
WEB MODULE 3.pdf
PPTX
Progressive Web Apps and React
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PPTX
Galenframework
PPTX
Galenframework
PPTX
Galen Framework - Responsive Design Automation
PPTX
2011 NetUG HH: ASP.NET MVC & HTML 5
PDF
Awesome html with ujs, jQuery and coffeescript
PDF
Server Side JavaScript on the Java Platform - David Delabassee
PDF
AngularJS Basics
Introduction to ASP.NET MVC
Santosh_Resume_Java
Introduction to web application development with Vue (for absolute beginners)...
Java script
Targeting Mobile Platform with MVC 4.0
Typesafe stack - Scala, Akka and Play
PLAT-8 Spring Web Scripts and Spring Surf
Untying the Knots of Web Dev with Internet Explorer
Automated UI Testing
WEB MODULE 3.pdf
Progressive Web Apps and React
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
Galenframework
Galenframework
Galen Framework - Responsive Design Automation
2011 NetUG HH: ASP.NET MVC & HTML 5
Awesome html with ujs, jQuery and coffeescript
Server Side JavaScript on the Java Platform - David Delabassee
AngularJS Basics

More from Uniface (20)

PDF
Ubg Uniface 10 Version Control and Additions 2019
PDF
Ubg Uniface 10 Community Edition 2019
PDF
Ubg Roadmap 2019
PDF
Ubg eLearning 2019
PDF
Ubg Business Update 2019
PDF
Uniface 10 Around the world by Jason Huggins
PDF
Software imaging by Peter Lismer CEO
PDF
Uniface 10 Now is the time by David Akerman
PDF
Roadmap by Mike Taylor
PDF
Uniface I0 IDE Custom Menus and Worksheets
PDF
E learning jason huggins
PPTX
Uniface 10
PPTX
Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...
PPTX
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
PPTX
Uniface Lectures Webinar - Extending Applications for Mobile
PPTX
Customer Case Study: Synapse Innovation
PPTX
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...
PPTX
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
PPTX
Uniface Lectures Webinar - Uniface Mobile
PPTX
Uniface Lectures Webinar - Uniface 10 Technical Deep Dive
Ubg Uniface 10 Version Control and Additions 2019
Ubg Uniface 10 Community Edition 2019
Ubg Roadmap 2019
Ubg eLearning 2019
Ubg Business Update 2019
Uniface 10 Around the world by Jason Huggins
Software imaging by Peter Lismer CEO
Uniface 10 Now is the time by David Akerman
Roadmap by Mike Taylor
Uniface I0 IDE Custom Menus and Worksheets
E learning jason huggins
Uniface 10
Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface Lectures Webinar - Extending Applications for Mobile
Customer Case Study: Synapse Innovation
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Uniface Mobile
Uniface Lectures Webinar - Uniface 10 Technical Deep Dive

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
 
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPT
Teaching material agriculture food technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Unlocking AI with Model Context Protocol (MCP)
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation_ Review paper, used for researhc scholars
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Weekly Chronicles - August'25 Week I
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
 
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectral efficient network and resource selection model in 5G networks
MYSQL Presentation for SQL database connectivity
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Teaching material agriculture food technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Chapter 3 Spatial Domain Image Processing.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Unlocking AI with Model Context Protocol (MCP)

U97 JavaScript Webinar