Slide deck from IBM ConnectED 2015 session BP105: Take Your XPages Development to the Next Level
This intermediate-level session is for anyone who has a little bit of XPages experience. In the session, we dug deeper into a number of features that are built into XPages and can help improve application responsiveness, streamline design with code reuse, and take more control over the output that is generated by XPages controls.
There was way too much content to fit into a single session, but the slide deck includes all of the extra material that was prepared.
Topics:
Application Responsiveness
Server-Side JavaScript
Modifying Component Output
Java
Custom Controls
Debugging Tips
Event Handlers
Dojo
BP204 It's Not Infernal: Dante's Nine Circles of XPages HeavenMichael McGarel
Do not abandon all hope, ye who enter here! Your very own Dante and Virgil will take you through a divine comedy of nine circles that show that XPages is more paradise than perdition. We'll show how XPages and related concepts like OSGi plugins make XPages a modern and vibrant development technology for web, mobile and rich client. On the way we'll guide you past some pitfalls to avoid becoming one of the lost souls. When we re-emerge, you'll see the sky's the limit with star-studded opportunities. (Presented at IBM Connect 2014)
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...Jesse Gallagher
Though Domino makes working with build servers and CI/CD pipelines difficult, it is possible to do so even with complex applications. This session will discuss the specifics of using several OpenNTF projects - NSF ODP Tooling, the Jakarta XPages Runtime, and XPages Jakarta EE Support - as well as open-source technologies such as Docker to build, test, and deploy Java-based Domino applications for testing and staging. This builds on previous sessions about the NSF ODP Tooling and Maven generally.
BP204 It's Not Infernal: Dante's Nine Circles of XPages HeavenMichael McGarel
Do not abandon all hope, ye who enter here! Your very own Dante and Virgil will take you through a divine comedy of nine circles that show that XPages is more paradise than perdition. We'll show how XPages and related concepts like OSGi plugins make XPages a modern and vibrant development technology for web, mobile and rich client. On the way we'll guide you past some pitfalls to avoid becoming one of the lost souls. When we re-emerge, you'll see the sky's the limit with star-studded opportunities. (Presented at IBM Connect 2014)
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...Jesse Gallagher
Though Domino makes working with build servers and CI/CD pipelines difficult, it is possible to do so even with complex applications. This session will discuss the specifics of using several OpenNTF projects - NSF ODP Tooling, the Jakarta XPages Runtime, and XPages Jakarta EE Support - as well as open-source technologies such as Docker to build, test, and deploy Java-based Domino applications for testing and staging. This builds on previous sessions about the NSF ODP Tooling and Maven generally.
This presentation introduces application developers to the use of XPages in IBM Lotus
Notes and Domino applications for the Web. It is accompanied by a series of exercises. For more information, see http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Tutorial-intro-to-XPages.htm
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!ddrschiw
This session gives you the grand tour of XPages in the Lotus Notes client. You'll discover how easy it is to take your XPages Web apps offline, and then add custom client behaviors that really adapt your application to Lotus Notes client platform. Spread your wings and integrate your application with other client components using real-world use cases that can make a real difference to your business. Learn how to test and debug your XPages client app along the way, and see how XPages supports traditional Lotus Notes client features and get a glimpse of where these integration points will lead in the future. If you have plans for XPages on the Lotus Notes client, this session is a must for you!
CDI portable extensions are one of greatest features of Java EE allowing the platform to be extended in a clean and portable way. But allowing extension is just part of the story. CDI opens the door to a whole new eco-system for Java EE, but it’s not the role of the specification to create these extensions.
Apache DeltaSpike is the project that leads this brand new eco-system by providing useful extension modules for CDI applications as well as tools to ease the creation of new ones.
In this session, we’ll start by presenting the DeltaSpike toolbox and show how it helps you to develop for CDI. Then we’ll describe the major extensions included in DeltaSpike, including 'configuration', 'scheduling' and 'data'.
Node.js Development with Apache NetBeansRyan Cuprak
This session covers the basics of developing Node.js applications with NetBeans. NetBeans includes fully integrated support for both JavaScript and Node.js. You’ll get a tour of the features and learn how NetBeans can accelerate your projects. The presentation looks at basic code editing capabilities provided by the IDE, tool integration (npm/Grunt/Bower/Webpack), frameworks such as Express, and debugging capabilities. You’ll see why NetBeans is the best free JavaScript/Node.js IDE.
Play Framework workshop: full stack java web appAndrew Skiba
The slides of Play Framework workshop from the meetup on Google Campus Tel Aviv on January 2014. Includes 5 hands-on assignments mixed with 5 additional steps to create a full application for remotely controlling YouTube on another computer. Demonstrates usage of AngularJS, Twitter Bootstrap, WebSockets. Discusses forms-based and single page web applications.
Java 9 ships in July, are you ready for Java 9 modules? Java 9 modules (aka Project Jigsaw) is the biggest fundamental change to the Java runtime. Code that use Oracle/Sun private APIs will break. This session will cover the basics of Java 9 modules and also the current state of tooling. The ramifications to existing and legacy applications will be covered along with the steps you’ll need to take to harness the power of modules and write more maintainable systems.
MWLUG 2015 - AD114 Take Your XPages Development to the Next Levelbalassaitis
Slides from MWLUG session on XPages development. Digging into features already available in XPages, but not as widely used. Topics include JSON RPC, taking control of component output, SSJS, Java, custom controls, event handlers, and more.
This presentation introduces application developers to the use of XPages in IBM Lotus
Notes and Domino applications for the Web. It is accompanied by a series of exercises. For more information, see http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Tutorial-intro-to-XPages.htm
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!ddrschiw
This session gives you the grand tour of XPages in the Lotus Notes client. You'll discover how easy it is to take your XPages Web apps offline, and then add custom client behaviors that really adapt your application to Lotus Notes client platform. Spread your wings and integrate your application with other client components using real-world use cases that can make a real difference to your business. Learn how to test and debug your XPages client app along the way, and see how XPages supports traditional Lotus Notes client features and get a glimpse of where these integration points will lead in the future. If you have plans for XPages on the Lotus Notes client, this session is a must for you!
CDI portable extensions are one of greatest features of Java EE allowing the platform to be extended in a clean and portable way. But allowing extension is just part of the story. CDI opens the door to a whole new eco-system for Java EE, but it’s not the role of the specification to create these extensions.
Apache DeltaSpike is the project that leads this brand new eco-system by providing useful extension modules for CDI applications as well as tools to ease the creation of new ones.
In this session, we’ll start by presenting the DeltaSpike toolbox and show how it helps you to develop for CDI. Then we’ll describe the major extensions included in DeltaSpike, including 'configuration', 'scheduling' and 'data'.
Node.js Development with Apache NetBeansRyan Cuprak
This session covers the basics of developing Node.js applications with NetBeans. NetBeans includes fully integrated support for both JavaScript and Node.js. You’ll get a tour of the features and learn how NetBeans can accelerate your projects. The presentation looks at basic code editing capabilities provided by the IDE, tool integration (npm/Grunt/Bower/Webpack), frameworks such as Express, and debugging capabilities. You’ll see why NetBeans is the best free JavaScript/Node.js IDE.
Play Framework workshop: full stack java web appAndrew Skiba
The slides of Play Framework workshop from the meetup on Google Campus Tel Aviv on January 2014. Includes 5 hands-on assignments mixed with 5 additional steps to create a full application for remotely controlling YouTube on another computer. Demonstrates usage of AngularJS, Twitter Bootstrap, WebSockets. Discusses forms-based and single page web applications.
Java 9 ships in July, are you ready for Java 9 modules? Java 9 modules (aka Project Jigsaw) is the biggest fundamental change to the Java runtime. Code that use Oracle/Sun private APIs will break. This session will cover the basics of Java 9 modules and also the current state of tooling. The ramifications to existing and legacy applications will be covered along with the steps you’ll need to take to harness the power of modules and write more maintainable systems.
MWLUG 2015 - AD114 Take Your XPages Development to the Next Levelbalassaitis
Slides from MWLUG session on XPages development. Digging into features already available in XPages, but not as widely used. Topics include JSON RPC, taking control of component output, SSJS, Java, custom controls, event handlers, and more.
3 Tips to Deliver Fast Performance Across Mobile WebDynatrace
3 Tips to Deliver Fast Performance Across Mobile Web
On-Demand Webinar
Seems like everyone’s doing Responsive Web Design these days! Are you using React, Angular or others to create a mobile-friendly web experience?
Newsflash: Mobile-friendly doesn’t always equal customer-friendly, when it comes to performance. We’re talking about 60% of your traffic—how do you avoid disaster?
Learn the basics of high-performance mobile development through the examination of real-world, performance-killing code examples. You’ll also hear about:
Why 4.5 seconds on Chrome can be 15 seconds on a Galaxy S5 Chromium
How to identify major issues within mobile page construction
Best practices for managing CSS and JavaScript
Things to consider going global with your Web application
Join web performance experts Klaus Enzenhofer and Stefan Baumgartner from Dynatrace to ensure your mobile properties are delighting your customers!
Let's explore all the features that Oracle Application Express Dynamic Actions have to offer.
Dynamic Actions (DA) in Oracle Application Express provide a declarative approach to using the JavaScript programming language in your browser. But, what does it mean to be able to use JavaScript in your browser? In this session, we'll cover the basics and then quickly move on to as many real life examples as we can. Whether you're not using DA yet, or you only use the most basic features, this session is sure to help you take your DA knowledge to the next level.
We'll cover the many options offered by Dynamic Actions. How to correctly specify a condition. The difference between True and False actions. How to use multiple Actions. Execution Scope. Plus many different real life examples that users can apply right away in their APEX projects.
Live slidedeck: http://slides.com/rimblas/practical-dynamic-actions-intro
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...DevOpsDays Tel Aviv
One of the critical factors for development velocity is software correctness. Our ability to develop and ship new features fast is bounded by our ability to validate several aspects of the change: * Does the feature meet the requirements? * How does the feature affect existing code, and how can it affect the production environment? With continues codebase growth and new features being added, naturally our productivity decreases, and our need to improve the guarantees for quality and correctness increase.
In this talk, I’ll focus on testing environments: why developers need a self-serve platform to create a full functioning environment on-demand, how such environments should be managed, and how can one restore part of the lost velocity. I’ll cover an internal system we use at AppsFlyer called ‘Namespaces’ that addresses the issue with the help of Mesos / Marathon, Docker, Traefik, and Consul.
Max Voloshin - "Organization of frontend development for products with micros...IT Event
While our product was growing our team came to need to implement microservices. Later it became obvious that our approaches on organization of frontend development should be rethought and significantly improved.
The report contains our team's solutions for simple and comfortable frontend product development with microservices. Also, this talk is about how we along with the way updated frontend framework, separated frontend and backend, solved internalization problem and started using Docker for front end tasks.
This is a presentation of the Perl module Workflow available on CPAN. All examples mentioned are available as part of the workflow distribution.
http://search.cpan.org/~jonasbn/Workflow/lib/Workflow.pm
http://sourceforge.net/apps/mediawiki/perl-workflow/index.php?title=Main_Page
Get a brief overview of the SharePoint Framework, in this session we will discuss why SharePoint Framework is valuable, what is the tool chain available today to start developing, what are the moving pieces that constitute a client side web part, what resources are available to continue learning and enhancing your skills. The goal is to show you what it takes to write your first SPFx web part, possible deploy if time permits.
Web Development Foundation
- backend & frontend
- RESTful API
- MVC and Seperation of Concern
Team Collaboration
- Why do we need unit test & TDD
- git basics and workflow
James Turner (Caplin) - Enterprise HTML5 Patternsakqaanoraks
Most HTML5 web applications are relatively small scale – they are maintained by a single team and contain relatively little JavaScript, CSS and HTML5 code.
At Caplin we build "thick client" replacement financial trading systems containing considerable business logic implemented by hundreds of thousands of lines of JavaScript code. The code is maintained by multiple development teams spread across multiple business units. The talk describes the problems faced and how they can be solved using componetization, loose coupling, services, event bus, design patterns, BDD, the best open source libraries, test by contract, and test automation etc.
Presentations includes following topics :-
Introduction of ReactJS.
Component workflow.
State management and useful life-cycles.
React hooks.
Server Side Rendering.
Similar to Take Your XPages Development to the Next Level (20)
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Enhancing Performance with Globus and the Science DMZGlobus
ESnet has led the way in helping national facilities—and many other institutions in the research community—configure Science DMZs and troubleshoot network issues to maximize data transfer performance. In this talk we will present a summary of approaches and tips for getting the most out of your network infrastructure using Globus Connect Server.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Welcome to the first live UiPath Community Day Dubai! Join us for this unique occasion to meet our local and global UiPath Community and leaders. You will get a full view of the MEA region's automation landscape and the AI Powered automation technology capabilities of UiPath. Also, hosted by our local partners Marc Ellis, you will enjoy a half-day packed with industry insights and automation peers networking.
📕 Curious on our agenda? Wait no more!
10:00 Welcome note - UiPath Community in Dubai
Lovely Sinha, UiPath Community Chapter Leader, UiPath MVPx3, Hyper-automation Consultant, First Abu Dhabi Bank
10:20 A UiPath cross-region MEA overview
Ashraf El Zarka, VP and Managing Director MEA, UiPath
10:35: Customer Success Journey
Deepthi Deepak, Head of Intelligent Automation CoE, First Abu Dhabi Bank
11:15 The UiPath approach to GenAI with our three principles: improve accuracy, supercharge productivity, and automate more
Boris Krumrey, Global VP, Automation Innovation, UiPath
12:15 To discover how Marc Ellis leverages tech-driven solutions in recruitment and managed services.
Brendan Lingam, Director of Sales and Business Development, Marc Ellis
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™UiPathCommunity
In questo evento online gratuito, organizzato dalla Community Italiana di UiPath, potrai esplorare le nuove funzionalità di Autopilot, il tool che integra l'Intelligenza Artificiale nei processi di sviluppo e utilizzo delle Automazioni.
📕 Vedremo insieme alcuni esempi dell'utilizzo di Autopilot in diversi tool della Suite UiPath:
Autopilot per Studio Web
Autopilot per Studio
Autopilot per Apps
Clipboard AI
GenAI applicata alla Document Understanding
👨🏫👨💻 Speakers:
Stefano Negro, UiPath MVPx3, RPA Tech Lead @ BSP Consultant
Flavio Martinelli, UiPath MVP 2023, Technical Account Manager @UiPath
Andrei Tasca, RPA Solutions Team Lead @NTT Data
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
2. Your Speakers – Brad Balassaitis
Senior Consultant for PSC Group
Certified Notes developer since R4
2014 and 2015 IBM Champion
Blog: xcellerant.net
3. Your Speakers – Paul T. Calhoun
I have been working with Lotus/IBM technologies for the past 25 years.
I have been certified in both Administration and Development on every major release of
Notes/Domino since release 3.
My focus has always been on training and enablement of Administrators and Developers,
but I also provide mentoring and consulting services.
Most recently as co-owner of QDiligence I have been focused on supporting a hosted
XPages solution for public companies that need to gather data from their board of
directors.
When not working, my passion is spending all my spare time with my awesomely
wonderful grand-kids. (WARNING: I have pictures ! Lots and Lots of Pictures !!)
7. (Not That Kind of) Responsive
Functionally Responsive
– Minimize Server Requests
– Minimize Blocking
– Minimize Page Refreshing
Application Responsiveness
Improving Performance – Client Side
8. Functionally Responsive
Client-side execution
– Prevent page submission where possible
Asynchronous processing
Application Responsiveness
Improving Performance – Client Side
9. JSON RPC
Remote procedure call
– Client / server interaction
Asynchronous (not blocking)
Faster
– No page submission or refresh
Simple
Application Responsiveness
Improving Performance – Client Side
10. JSON RPC
Optionally accept parameters
Send response
Optionally attach callback
Did I mention it’s asynchronous?
Caveats
– No knowledge of page changes*
– Changes made to in-memory document may not be preserved**
Application Responsiveness
Improving Performance – Client Side
16. JSON RPC
Tips
– Add script via property editor (not the blue diamond to compute the value)
– Call a library function
Application Responsiveness
Improving Performance – Client Side
17. AJAX / Custom REST
AJAX
– Asynchronously get or post data
– Display update when done
Custom REST Service
– Process updates server-side
– Return response when done
– Requires R9 or newer Ext Lib (“custom” option not in 8.5.3 UP1)
Application Responsiveness
Improving Performance – Client Side
22. Mixing Server-Side Logic into Client-Side JavaScript
Evaluated on server; result rendered into page source
Component ID: #{id: }
– XPages Source: alert('Generated ID: #{id:phoneNumber1}');
– RenderedOutput: alert('Generated ID: view:_id1:_id2:_id3:phoneNumber1');
Computed Logic:
– #{javascript: }
Expression Language
– #{currentDocument.fieldName}
Tip: Does not work in script libraries
– Evaluate on page and pass to script library function
Application Responsiveness
Improving Performance – Client Side
25. Quick Tips
Goto specific line number in an open code editor
– <ctrl> L
SSJS
26. SSJS: Server Side JavaScript
Every “Component” added to an XPage has a corresponding API
This API allows developers access to a Components properties
All Components API’s are accessible via the “Resources” tab in the
SSJS Editor
SSJS
27. SSJS
Double clicking the component in the reference window will add the component to the
script window and assign it a variable name
Methods can then be called against those variable names.
SSJS
29. SSJS – Using libraries
Once you have been coding XPages a while
– Code Patterns will emerge
– Same code used over and over
– This is the universe telling you it’s time to evolve to using libraries
Once the library is created
– It can be re-used easily in multiple applications.
– Over time you will develop your “standard” library
• A library added to the beginning of every application development project
One of the most common libraries needed / used is for validation
SSJS
30. Create the library
In Domino Designer
– Expand the Code section
– Select “Script Libraries
– Click “New Script Library” action
– Provide a Name
– Set Type
• Type CANNOT be changed
once library is created
SSJS
31. SSJS Libraries are typically a series of functions
Create the functions that provide the functionality needed from the calling XPage
Libraries can have multiple functions defined
Each function is callable separately from the XPage that includes it.
SSJS
32. Add the Library to the XPage
Open the XPage that will use the library
On the Properties tab select “Resources”
Click the “Add” button
Choose “JavaScript Library…”
from the list
SSJS
33. Add library to XPage
From the dialog
– Select the SSJS library to add to the XPage
SSJS
34. Call the functions of the Library
Once the Library has been added to the XPage
– Any of the defined functions are callable from SSJS code editors
SSJS
37. tagName
Computed Field (xp:text) or Panel property
Default is <span> (computed field) or <div> (panel)
Choose from list or manually enter
Modifying Component Output
Improving Performance – Client Side
38. Suppressing Control Output Tag
disableOutputTag property
– Repeat – prevents <div> tag
– Panel – prevents <div> tag
– Computed Field – prevents any output
Note: Cannot use control as partial refresh target
Modifying Component Output
Improving Performance – Client Side
39. Suppressing <form> Tag
createForm property of XPage
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" createForm="false">
Add your own <xp:form> tags to scope submission
<form id="view:_id4" method="post" action= "/ConnectED.nsf/FormText.xsp"
class="xspForm" enctype="multipart/form-data">
Use carefully!
– Client side events will run
– No server-side events / page submission without an xp:form tag
Modifying Component Output
Improving Performance – Client Side
40. Specifying the <body> class
styleClass property of XPage
– Adds the class to the <body> tag
– <body class="myClass xspView tundra">
styleClass property of Custom Control
– Adds a <div> with the class
Modifying Component Output
Improving Performance – Client Side
41. Control Attributes
Useful for adding attributes for HTML5 data-*, Bootstrap, jQueryUI etc
attrs
– name=value pairs to pass through
– source:
1 <xp:inputText id="inputText1“> <xp:this.attrs>
2 <xp:attr name="myFirstAttribute" value="value1"></xp:attr>
3 <xp:attr name="mySecondAttribute" value="value2"></xp:attr>
4 </xp:this.attrs></xp:inputText>
– output:
<input type="text" id="view:inputText1"
name="view:inputText1" class="xspInputFieldEditBox"
myFirstAttribute="value1" mySecondAttribute="value2" >
Modifying Component Output
Improving Performance – Client Side
42. attrs – Example
dijit.TitlePane - HTML
HTML – Declarative
1 <div id="div0" data-dojo-type="dijit/TitlePane" data-dojo-props="title: 'TitlePane'">
2 Declarative
3 </div>
Modifying Component Output
Improving Performance – Client Side
45. Themes
Implement application-wide changes
Conditionally render stylesheets
1 <resources>
2 <script src="/ssjsMyLibrary.jss" clientSide="false"></script>
3 <styleSheet href="/myStylesheet.css"
rendered="#{javascript:context.getUserAgent().isFirefox()}">
4 </styleSheet>
5 </resources>
isIE() does not work with IE11
– http://openntf.org/XSnippets.nsf/snippet.xsp?id=detect-ie-11-in-xpages
Modifying Component Output
Improving Performance – Client Side
46. Themes
Style fields consistently
<!-- Set all inputs to bootstrap styling by adding the form-control class -->
1 <control>
2 <name>InputField.EditBox</name>
3 <property mode="concat">
4 <name>styleClass</name>
5 <value>form-control</value>
6 </property>
7 </control>
Modifying Component Output
Improving Performance – Client Side
47. Converters
Modify data display
Several built-in
<xp:convertDateTime type="date"></xp:convertDateTime>
<xp:convertNumber type="currency" integerOnly="false”
currencySymbol="$“></xp:convertNumber>
<xp:convertMask mask="(###) ###-####"></xp:convertMask>
Modifying Component Output
Improving Performance – Client Side
48. Custom Converters
Modify data display (not the output tags) and storage
– data > converter > xp:customConverter
– SSJS
• getAsString() - modify data to display
• getAsObject() – modify data to store
• Both required; both receive a value argument to modify and return
– Java
• http://tobysamples.wordpress.com/xpages-custom-converters-change-the-data-change-the-world/
Modifying Component Output
Improving Performance – Client Side
49. Custom Renderers
Modify data and tags
1. Create Java class for renderer to extend existing class for component
– Receives component argument– use to get value
2. Register the renderer in faces-config
3. Set the rendererType property of a control to the renderer class
– Or, set it application-wide via theme
Modifying Component Output
Improving Performance – Client Side
50. Custom Renderers
Examples
– NotesIn9 by Jesse Gallagher
• http://www.notesin9.com/2014/10/02/notesin9-156-introduction-to-custom-renderers-in-xpages/
– Naveen Maurya
• http://www.pipalia.co.uk/xpages-2/creating-custom-renderers-for-xpages-controls/
– Keith Strickland
• https://www.socialbizug.org/blogs/keithstric/entry/add_custom_style_classes_to_ibm_renderers
Modifying Component Output
Improving Performance – Client Side
52. Java: Why?
We won’t debate whether you should or should not learn Java.
– (You should. Yesterday, today, tomorrow NOW !!!!)
XPages is built upon a Java framework (JSF/JSP)
– Even if you NEVER write a single line of Java code, you are executing Java code in the
background
The more you know about the framework(JSF/JSP) the better you will understand how to
bend the framework to your will !! (insert evil laugh here)
If you want to integrate XPages with non-Domino data/architectures then most of the code
to do so is implemented in Java
– JDBC
– JSON
– XML
Java
53. Java Code in XPages
Java code can not be added directly to an XPage
– This is largest barrier to entry for most developers
Java code can be “called” from SSJS to execute java code methods
Therefore;
– Java code does NOT interact with the UI
– Data (variables) passed to the back end java code comes from data input into the XPage and
scope variables set prior to executing the code
Java
54. Java code execution from XPages
The primary design pattern for executing Java code from an XPage is;
– Call java code from an “event”
• Like a buttons onClick() event
– Call an “XAgent”
Java
55. What is an XAgent?
An XAgent is an XPage with the rendering turned off
– In Java terms, the XPage becomes a servlet
– This requires the developer to handle the request/response
– All of the code is in either the “beforeRenderResponse” or “afterRenderResponse” event
What is this good for?
– Many JavaScript frameworks require data sources that are only accessible by URL
• An XAgent that returns JSon or XML can be used in conjunction with JavaScript graphing,
charting and grid components
– Incorporating Third Party Java Libraries
• JDBC
• APACHE POI
– Excel and Word Document processing
Java
56. Create an XAgent
Create an XPage
– Set the “rendered” Property to false
– This disables the output stream
Java
57. Tip: Document the XAgent
Document the XAgent where you would normally place content
Java
58. Code in the beforeRenderResponse event
The code in the beforeRenderResponse event will
– Import Java code if needed
– Get JSF components
– Set the response type
– Call methods of the Java code
– Close the response object
Java
61. Custom Controls != Subforms
Conditional display
– rendered property
Custom properties = flexibility for reuse
Combine with repeat controls for dynamic output
Custom Controls
Improving Performance – Client Side
62. Custom Properties
Provide ability to customize
each instance
Data types
Property editors
Optionally required
Single or multi-valued
Combine into groups
Custom Controls
Improving Performance – Client Side
63. Getting Custom Control Properties
Within the Custom Control
– compositeData.propertyName
Outside of the Custom Control (SSJS)
– Add an ID to the custom control instance
<xc:myCC propertyName="myValue" id="ccID"></xc:myCC>
– Access via getComponent()
getComponent('ccID').getPropertyMap().getProperty(‘propertyName');
Outside of the Custom Control (Client-Side JavaScript)
"#{javascript:getComponent('ccID').getPropertyMap().getProperty(‘propertyName’')}"
Custom Controls
Improving Performance – Client Side
64. Setting Custom Control Properties
Within the Custom Control
compositeData.myProperty = 'newValue';
Outside of the Custom Control
getComponent('ccID').getPropertyMap().setProperty(‘myProperty', 'newValue');
Custom Controls
Improving Performance – Client Side
65. Setting Default Custom Property Values Via Theme
Use themeId
Custom Control
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" themeId="CC_ThemeID">
<xp:text escape="true" id=“myField1” value="#{javascript:return
compositeData.foo;}"></xp:text>
</xp:view>
Theme
<control>
<name>CC_ThemeID</name>
<property>
<name>foo</name>
<value>bar</value>
</property>
</control>
Custom Controls
Improving Performance – Client Side
66. Setting Default Custom Property Values Via Theme
Custom Control can have a themeId
Each instance can have a themeId (but it has no effect)
Property value defined in theme overrides value defined on custom control instance
Custom Controls
Improving Performance – Client Side
67. Custom Controls as Reusable Fields
Dynamic field binding – design once and reuse!
– Cannot compute within EL, but can compute CC property to pass
Steps
– 1. Add a custom property to custom control for fieldName
– 2. Add a field to the custom control and set value binding dynamically via EL
<xp:inputText id=“myID”
value=“#{currentDocument[compositeData.fieldName]}”>
</xp:inputText>
– 3. On custom control instance, pass in name of field to use
<xc:ccMyControl fieldName=“myFieldName”></xc:ccMyControl>
Example: Time picker on scheduling form
Custom Controls
Improving Performance – Client Side
69. Resources
Sample Data Generation Tool
– http://www.generatedata.com/
JavaScript Code Beautifier
– http://jsbeautifier.org/
Notes in Nine
– http://www.notesin9.com
– Episode Guide
• http://www.mindmeister.com/280533435/notesin9
TLCC
– www.tlcc.com
70. Resources
Head First Books
– Java
– JavaScript
– Programming
xcellerant.net
– Brad’s Blog
• Gridx in XPages
• Dojo in XPages
• Data Views in XPages
• Much More !!!
74. Debugging Java XPages
If XPages make calls to Java Code elements then that Java code can be debugged using
a similar process to debugging agents.
In order to debug Java code called by an XPage add the following lines to the notes.ini
– JavaEnableDebug=1
– JavaDebugOptions=transport=dt_socket,server=y,suspend=n,address=<port to listen on>
GOTCHA !!
– If the previous ports are enabled for java agent debugging then “connecting” to the port above will
never work
– Disable the Java Debug Ports and restart your Notes, Designer client prior to debugging Java
called from XPages
Debugging Tips
75. Debug Configuration
Create a new Debug Configuration to “listen” on the port that was set in the notes.ini file
Preview the XPage to start the local web preview
Start the debugger
Debugging Tips
76. Execute XPage action
Set breakpoints in the java code to be debugged
In the XPage in the browser
– Execute the action that will call the Java code
If not already in the Debug perspective you will be prompted to switch to that perspective
Step through your code reviewing the variable values at each breakpoint
Clear breakpoints and resume to end
Dis-connect from Debugger when done.
Debugging Tips
77. Switch to the Debug Perspective
If not already in the Debug Perspective a dialog will open prompting to switch to that
perspective
– Choose “Yes”
– Optionally choose “Remember my decision” to suppress this dialog from popping up every time.
Debugging Tips
79. Debugging
The Code will stop at the first breakpoint
From there you can…
– Inspect variables
– Step through the code using the icons
Debugging Tips
80. Stop the Debugger
After the debugging session is complete the debugger is still “listening” on the open port
In the debug perspective make sure to “Disconnect” from the listening port to turn
debugging off
Debugging Tips
84. Conditional Server-Side Event Execution
Can have client-side and server-side event handlers on same component event
return false; from client-side event to prevent server-side event execution
1 <xp:eventHandler event="onclick" submit="true" refreshMode="complete">
2 <xp:this.script><![CDATA[
3 return confirm('Run the server-side event handler?');]]>
4 </xp:this.script>
5 <xp:this.action><![CDATA[
6 #{javascript:print ('Running server-side event handler');}
7 ]]></xp:this.action>
8 </xp:eventHandler>
Note: If the client-side code displays a non-blocking prompt, server-side event will not wait
Event Handlers
Improving Performance – Client Side
85. Conditionally Render Event Handler
Select <xp:eventHandler> tag in source and compute the rendered property
Example: Alphabet Bar
Tip: Combine with conditional style class
Event Handlers
Improving Performance – Client Side
86. Getting Value and ID of Component Triggering Event
Example: onChange event – take action based on selected value
this keyword returns an XspEventHandler (com.ibm.xsp.component.xp.XspEventHandler)
Component Value
– this.getParent().getValue()
Component ID
– this.getParent.getId()
Event Handlers
Improving Performance – Client Side
87. Event Parameters
Send information to event handling code; can be computed
Parameter vars available to reference directly in SSJS
1 <xp:eventHandler event="onclick" submit="true”
refreshMode="complete">
2 <xp:this.parameters>
3 <xp:parameter name="myEventParam" value=
"#{javascript:return session.getEffectiveUserName();}">
4 </xp:parameter>
5 </xp:this.parameters>
6 <xp:this.action>
7 <![CDATA[#{javascript:print ('User: ' + myEventParam);}]]>
8 </xp:this.action>
9 </xp:eventHandler>
Event Handlers
Improving Performance – Client Side
88. Run Client-Side JavaScript After Server-Side Event Handler
onComplete property (select <xp:eventHandler> tag in source)
– Attaches a callback
1 <xp:button value="Label" id="button1">
2 <xp:eventHandler event="onclick" submit="true“ refreshMode="partial"
3 refreshId="myPanel” onComplete="console.log('onComplete');">
4 <xp:this.action><![CDATA[#{javascript:// Do Stuff}]]></xp:this.action>
5 </xp:eventHandler>
6 </xp:button>
Use case – display growl-style message; trigger refresh on component outside of target
Note: Will not run if event performs full page refresh
onStart and onError callbacks also available
Event Handlers
Improving Performance – Client Side
89. Order of Client-Side Event Execution
5 ways to run client JS on an event handler
– Client JS event script, onstart, oncomplete, onerror*, view.postScript (SSJS)
– onstart, onerror, and oncomplete are callbacks related to the server-side event
Conditionally triggered based on event handler refresh mode
– Full Refresh – client script, view.postScript
– Partial Refresh – client script, onstart, view.postScript, oncomplete
– No Update – client script, onstart, oncomplete
– No Submission – client script
Event Handlers
Improving Performance – Client Side
90. Add Event Handler to Components Without Event Properties
Use case: Computed Field (no event properties)
Add an event to some other control; move <xp:eventHandler> within control in page source
Tip: Finish event logic before moving event handler
– Cannot properly edit within computed field component – will not add CDATA block
Tip: Style cursor as pointer when clickable
<xp:text escape="false" id="computedField1" tagName="h1"
value="#{javascript:return 'Computed Text';}“ style="cursor:pointer;" >
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[console.log('Clicked computed text');]]>
</xp:this.script>
</xp:eventHandler>
</xp:text>
Event Handlers
Improving Performance – Client Side
92. Dojo Modules
Many more modules available on server
– Charting, animation, enhanced grid, etc.
Dojo Module Resource (xp:dojoModule) adds a dojo.require() to include module
Example:
<xp:this.resources>
<xp:dojoModule name="dojo.fx"></xp:dojoModule>
</xp:this.resources>
Output
<script type="text/javascript">dojo.require('dojo.fx')</script>
Dojo
Improving Performance – Client Side
93. Using a Module Not on the Server
Dojo Module Path
– Used to make Dojo plugins available to XPages
– Specify location where additional Dojo files are located
– Examples: Gridx, dGrowl
• <xp:dojoModulePath url="/gridx" prefix="gridx"></xp:dojoModulePath>
Dojo
Improving Performance – Client Side
94. Dijits (Dojo Widgets)
dojoType – automatically turns an element into a dijit
– Must match a Dojo module name
– parseOnLoad will parse and generate dijit
– May need to set dojoTheme to true for styling
Dojo Attributes
– Define dijit properties
dijit.byId() (not dojo.byId())
– Use “#{id: }” syntax
Dojo
Improving Performance – Client Side
95. Dijit Example – Declarative HTML
dijit.TitlePane
HTML – Declarative
1 <div id="div0" data-dojo-type="dijit/TitlePane" data-dojo-props="title: 'TitlePane'">
2 Declarative
3 </div>
Dojo
Improving Performance – Client Side
96. Dijit Example – XPages dojoType and dojoAttributes
dijit.TitlePane
xp:div - dojoType and dojoAttributes
1 <xp:div id="div1" dojoType="dijit.TitlePane">
2 <xp:this.dojoAttributes>
3 <xp:dojoAttribute name="title" value="Title Pane"></xp:dojoAttribute>
4 </xp:this.dojoAttributes>
5 dojoType and dojoAttributes
6 </xp:div>
Dojo
Improving Performance – Client Side
98. Dojo Controls
Many available in extension library / 8.5.3 UP1 / Notes9
Layout Controls
– Accordion Container, Border Container, Stack Container
Display Controls
– Data Grid, Tab Container
Input Controls
– Filtering Select, Name Text Box, Slider, Number Spinner, etc.
Dojo
Improving Performance – Client Side
99. Engage Online
SocialBiz User Group socialbizug.org
– Join the epicenter of Notes and Collaboration user groups
Social Business Insights blog ibm.com/blogs/socialbusiness
– Read and engage with our bloggers
Follow us on Twitter
– @IBMConnect and @IBMSocialBiz
LinkedIn http://bit.ly/SBComm
– Participate in the IBM Social Business group on LinkedIn
Facebook https://www.facebook.com/IBMConnected
– Like IBM Social Business on Facebook