Bill Buchan, a CEO and consultant with experience in LotusScript since 1995, gave a presentation on LotusScript. He discussed that LotusScript is an older language that is no longer a priority for development. However, it is still used to maintain many existing Domino applications. The presentation covered LotusScript basics like variables, classes, lists and the NotesSession object. It also discussed advanced topics such as calling C APIs, using the Execute statement, and creating web services with LotusScript.
RESTful services on IBM Domino/XWork (ICON UK 21-22 Sept. 2015)John Dalsgaard
Loose coupling of systems is key to future development! Why? Because it will allow us to change the "components" as we go along instead of creating monster big systems that are tied together using all sorts of different technologies. Webservices have been a way to obtain this over the last decade. More recently a special variant has become very popular, namely the JSON based REST service. Imagine you could extend your data out to the world outside your Domino environment? - in an easy way....! And imagine those data could easily be incorporated into other systems via standardized interfaces... Could that extend the value of your current systems further? Could this be a way to use new technologies to modernize your users' experience of working with your systems? Come and take away knowledge about how to open your Domino/XWork based systems up to the world outside using JSON based REST services. They are going to be key to future development in Domino/XWork - whether you want to use data in browser solutions (e.g. based on angular.js or ExtJS) or native mobile apps (built in whatever technology is best).
This talk will introduce new CFEngine 3.6 features, we have these bullet points:
User promises
TLS protocol
Math expressions
Dynamic inputs
New language functions
Tags
Data containers
File templating
Presentation by Kristian Amlie of CFEngine
LavaCon 2012 presentation about creating eBooks from DocBook XML. This presentation provides details of the XML Press process for creating eBooks. A companion presentation (From XML to eBooks Part 2: Overview) is an introduction.
RESTful services on IBM Domino/XWork (ICON UK 21-22 Sept. 2015)John Dalsgaard
Loose coupling of systems is key to future development! Why? Because it will allow us to change the "components" as we go along instead of creating monster big systems that are tied together using all sorts of different technologies. Webservices have been a way to obtain this over the last decade. More recently a special variant has become very popular, namely the JSON based REST service. Imagine you could extend your data out to the world outside your Domino environment? - in an easy way....! And imagine those data could easily be incorporated into other systems via standardized interfaces... Could that extend the value of your current systems further? Could this be a way to use new technologies to modernize your users' experience of working with your systems? Come and take away knowledge about how to open your Domino/XWork based systems up to the world outside using JSON based REST services. They are going to be key to future development in Domino/XWork - whether you want to use data in browser solutions (e.g. based on angular.js or ExtJS) or native mobile apps (built in whatever technology is best).
This talk will introduce new CFEngine 3.6 features, we have these bullet points:
User promises
TLS protocol
Math expressions
Dynamic inputs
New language functions
Tags
Data containers
File templating
Presentation by Kristian Amlie of CFEngine
LavaCon 2012 presentation about creating eBooks from DocBook XML. This presentation provides details of the XML Press process for creating eBooks. A companion presentation (From XML to eBooks Part 2: Overview) is an introduction.
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)John Dalsgaard
Loose coupling of systems is key to future development! Why? Because it will allow us to change the "components" as we go along instead of creating monster big systems that are tied together using all sorts of different technologies. Webservices have been a way to obtain this over the last decade. More recently a special variant has become very popular, namely the JSON based REST service. Imagine you could extend your data out to the world outside your Domino environment? - in an easy way....! And imagine those data could easily be incorporated into other systems via standardized interfaces... Could that extend the value of your current systems further? Could this be a way to use new technologies to modernize your users' experience of working with your systems? Come and take away knowledge about how to open your Domino/XWork based systems up to the world outside using JSON based REST services. They are going to be key to future development in Domino/XWork - whether you want to use data in browser solutions (e.g. based on angular.js or ExtJS) or native mobile apps (built in whatever technology is best).
Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...GeeksLab Odessa
16.4.16 Java/Scala Lab
Upcoming events: goo.gl/I2gJ4H
В докладе будет расммотрена идеология использования неявных классов в Scala, рассмотрен пример построения DAO слоя с поддержкой нативной нотации MongoShell, показана лекость организации тестирования при таком подходе на примере DAO слоя взаимодействия с MongoDB через ReactiveMongo драйвер. В заключение будут представлены положительные и отрицательные стороны предложенного подхода
A powerful web application server (intravision IBM Connect 2013 Update) Febru...Per Henrik Lausten
I gave this presentation at the IBM Connect 2013 Update seminar hosted by Intravision on February 25 at IBM in Copenhagen.
http://per.lausten.dk/blog/2013/02/ibm-connect-2013-update-with-intravision.html
memcached Distributed Cache. memcached is the most popular cache solution for low latency high throughput websites. improves the read timings drastically.
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013John Dalsgaard
Learn how you can improve your coding in IBM XPages by using the Model-View-Controller (MVC) design pattern. This is my advice on how to take advantage of the XPages (i.e. JSF) architecture to prepare for much better applications (separate database access, business rules and view components).
Slides from a lecture I just gave on ActiveRecord 2.3. Describes configuration, methods, CRUD, finders, updating, associations, and a bunch of things that I wish I had known when I started with ActiveRecord.
Rails is a great Ruby-based framework for producing web sites quickly and effectively. Here are a bunch of tips and best practices aimed at the Ruby newbie.
Node Summit 2016: Building your DevOps for Node.jsChetan Desai
Chetan shares best practices and lessons learned on Intuit’s two year journey in introducing Node.js to their TurboTax technology stack. He will specifically be focusing on Intuit’s build and deploy principles in hosting Node.js services. Chetan will also share steps in how to build a Node.js service using enterprise best practices, including reliable deployment practices.
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)John Dalsgaard
Loose coupling of systems is key to future development! Why? Because it will allow us to change the "components" as we go along instead of creating monster big systems that are tied together using all sorts of different technologies. Webservices have been a way to obtain this over the last decade. More recently a special variant has become very popular, namely the JSON based REST service. Imagine you could extend your data out to the world outside your Domino environment? - in an easy way....! And imagine those data could easily be incorporated into other systems via standardized interfaces... Could that extend the value of your current systems further? Could this be a way to use new technologies to modernize your users' experience of working with your systems? Come and take away knowledge about how to open your Domino/XWork based systems up to the world outside using JSON based REST services. They are going to be key to future development in Domino/XWork - whether you want to use data in browser solutions (e.g. based on angular.js or ExtJS) or native mobile apps (built in whatever technology is best).
Java/Scala Lab 2016. Григорий Кравцов: Реализация и тестирование DAO слоя с н...GeeksLab Odessa
16.4.16 Java/Scala Lab
Upcoming events: goo.gl/I2gJ4H
В докладе будет расммотрена идеология использования неявных классов в Scala, рассмотрен пример построения DAO слоя с поддержкой нативной нотации MongoShell, показана лекость организации тестирования при таком подходе на примере DAO слоя взаимодействия с MongoDB через ReactiveMongo драйвер. В заключение будут представлены положительные и отрицательные стороны предложенного подхода
A powerful web application server (intravision IBM Connect 2013 Update) Febru...Per Henrik Lausten
I gave this presentation at the IBM Connect 2013 Update seminar hosted by Intravision on February 25 at IBM in Copenhagen.
http://per.lausten.dk/blog/2013/02/ibm-connect-2013-update-with-intravision.html
memcached Distributed Cache. memcached is the most popular cache solution for low latency high throughput websites. improves the read timings drastically.
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013John Dalsgaard
Learn how you can improve your coding in IBM XPages by using the Model-View-Controller (MVC) design pattern. This is my advice on how to take advantage of the XPages (i.e. JSF) architecture to prepare for much better applications (separate database access, business rules and view components).
Slides from a lecture I just gave on ActiveRecord 2.3. Describes configuration, methods, CRUD, finders, updating, associations, and a bunch of things that I wish I had known when I started with ActiveRecord.
Rails is a great Ruby-based framework for producing web sites quickly and effectively. Here are a bunch of tips and best practices aimed at the Ruby newbie.
Node Summit 2016: Building your DevOps for Node.jsChetan Desai
Chetan shares best practices and lessons learned on Intuit’s two year journey in introducing Node.js to their TurboTax technology stack. He will specifically be focusing on Intuit’s build and deploy principles in hosting Node.js services. Chetan will also share steps in how to build a Node.js service using enterprise best practices, including reliable deployment practices.
node.js in production: Reflections on three years of riding the unicornbcantrill
My presentation at #NodeSummit, December 3, 2013. Video is at http://www.joyent.com/developers/videos/reflections-on-three-years-of-nodejs-in-production
This fast-paced presentation is for the medium-level and higher LotusScript programmer who wants bite-sized lessons from the field. It's presented in three categories, covering tips you should be using, tips you should know, and finally tips that you should be aware of.
This presentation was also used for the speedgeeking session. I had to give a 60 minute presentation in 4.5 minutes, 12 times. I managed to complete it once, and averaged getting throught 22 tips. The fun thing about speedgeeking is that it does force you to think how you can compress down a presentation, and make each word fight for survival..
The presentation "Development for Administrators" was presented at AdminCamp 2006 in Germany, and a revised version presented at SoftSphere in Frankfurt in October 2007. This presentation intends to show Administrators:
Introduce proper development, UAT and production environments
show some basic @Formula language agents
Show some basic LotusScript functions
Lotusphere 2008 - Jumpstart 206 - Web Services BootcampBill Buchan
Learn all there is to know about web services -- Lotuscript-based, Java-based, and RESTful ones. Come see how to construct web services using nothing more than an IBM Lotus Notes agent, and parse XML and debug SOAP calls. Learn the pitfalls, the traps, the SOAP encoding methods! Learn the shortcuts as well as the benefits! Not working with web services yet ? Find out how these industry standard techniques will allow you to get data in and out of IBM Lotus Domino from all your other corporate applications. Web services is the ''new black''. Be fashionable!
The presentation can be downloaded from here, the example database can be downloaded from here, and the source code for the Java Web Service Servlet can be downloaded from here
Note:
I really wasnt happy with the code to make an agent act as a web service, so I've removed it.
The Servlet source code is a ZIP file containing a snapshot of my eclipse v3.3.2 project. You also need to add:
Java v1.3.1 as a compilation environment for Domino v6.5
Notes.Jar
LotusXML.jar
No support can be given for any of this code. Basically, you need to know what your doing java-wise to get any benefit from this..
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.
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.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-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/
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
2. Who am I?
• Bill Buchan, CEO of hadsl - one of the
sponsors of this show
• Come visit the booth - we don’t bite
• Dual PCLP in v3, v4, v5, v6, v7, v8, and v8.5
• Enterprise-level consultant on Domino
since 1995
Thursday, 22 March 12
3. Agenda
• What is LotusScript? Where is it going?
• LotusScript Basics
• LotusScript Advanced
• Web Services
Thursday, 22 March 12
4. What is LotusScript
• LotusScript is:
• A p-code partially compiled, partially
interpreted language
• Syntactically identical toVisual Basic 3
• In most Notes Applications.
Thursday, 22 March 12
5. What is LotusScript
• LotusScript
• is old. It was introduced with Notes v4,
and was first implemented in Ami Pro
• Supports Object Orientated techniques
• Is fast, scalable, robust
• Is Multi-Platform
Thursday, 22 March 12
6. Where is it going?
• Number of LotusSphere 2012 sessions that
mentioned LotusScript: one
• No language modifications since Notes v4.6
• (Every version has had class extensions
to support some new version features)
• Its fair to say that it is not considered a
priority for Lotus
Thursday, 22 March 12
7. So why are we here?
• I wanted to give you a single session that
covered everything I knew about
LotusScript
• We still have to maintain applications
Thursday, 22 March 12
8. Agenda
• What is LotusScript? Where is it going?
• LotusScript Basics
• LotusScript Advanced
• Web Services
Thursday, 22 March 12
9. Basics: How to code
• Code for maintenance.
• You will change this code.This code will
run for 10+ years. Unchanged.
• Log everything.
• If the users find out before you, you’ve
lost.
• Good log information means faster
debugging
Thursday, 22 March 12
10. Basics: How to code
• Bugs cost money.The closer to production,
the more expensive they are. More testing
and debugging and logging costs less
• Isolate business logic from display logic.
Your look and feel WILL change
• Simplicity is cheap
Thursday, 22 March 12
11. Basics: Option Declare
• You should use ‘Option Declare’ when
possible.Why?
• Not using Option declare, and not
declaring your variables in advance,
makes every variable aVARIANT
• Variants move all errors to run-time
• Variants are slower to use.
Thursday, 22 March 12
12. Basics: lsi_info
• LSI_Info was a student intern project, and is
a global variable created and maintained by
the LotusScript environment
• It contains lots of ‘interesting’ values
• Superseded by getThreadInfo
• Its not thread-safe. Heavily loaded servers
may crash if its accessed.
Thursday, 22 March 12
13. Basics: lsi_info
• lsi_info(10) gives the calling class
• lsi_info(11) gives the calling function.
• So we can write a pretty cool error
handler..
Thursday, 22 March 12
14. Function RaiseError()
Dim thisType As String Dim es as String
thisType = Typename(Me)
' Not a class, use the calling module instead
If (thisType = "") Then thisType = Getthreadinfo(11)
es = thisType & "::" & Getthreadinfo(10) & ": "
If (Err = 0) Then
es = es + "Manually raised an error"
Else
es = es + "Run time error: (" + Trim(Str(Err)) + ") "
+ _
Error$ + " at line: "+ Trim(Str(Erl)) End If
Print es
end function
' calling code...
ExitFunction:
exit function
errorhandler:
Call RaiseError()
resume exitFunction
end function
Thursday, 22 March 12
15. Basics. NotesSession
• This piece of code:
dim s as new NotesSession
• Doesn’t actually create anything. It just
references the same global NotesSession
object, built in advance
• No performance hit for declaring it
(But that doesn’t excuse bad code!)
Thursday, 22 March 12
16. Basics:AdminP
• AdminP documents have
special fields for ReplicaID
• Stored as Notes Date/
Time fields
Dim dt As New NotesDateTime(targetDatabase.ReplicaID)
Call doc.replaceItemValue("ProxyReplicaID", dt)
Thursday, 22 March 12
18. Basics: Performance
• A crude agent profile mechanism was
introduced in Notes 7
• You enable it from the agent/web service
properties pane:
Thursday, 22 March 12
20. Basics: Lists
• A list is a
collection
of values,
which has
a fixed
lookup
value
dim Surnames list as String
Surnames(“Bill”) = “Buchan”
Surnames(“Paul”) = “Mooney”
Surnames(“Chris”) = “Coates”
Print “Bill’s surname is: “ + Surnames(“Bill”)
if (isElement(Surnames(“Charlie”))) then
Print “Charlies Surname is: “ + Surnames(“Charlie”)
else
Print “I can’t find a surname for Charlie”
end if
forall thisName in Surnames
Print listtag(thisName) + “ “ + thisName
end forall
erase Surnames(“Buchan”)
Thursday, 22 March 12
21. Basics: Lists
• So lists can collect together similar values
in an ordered way
• Lists have no real overhead
• Lists can contain millions of items
• Lists are very fast
Thursday, 22 March 12
22. Basics: Lists
• You cannot read and write Lists directly
from Documents
• Convert into a array first, and store as a
multi-value
• You have to iterate a list to see how many
items it contains
• Lists can only store values of the same type
Thursday, 22 March 12
23. Agenda
• What is LotusScript? Where is it going?
• LotusScript Basics
• LotusScript Advanced
• Web Services
Thursday, 22 March 12
24. Advanced: Classes
• LotusScript allows you to define classes:
• Classes allow you to bundle variables and
code together in reusable objects
• Classes can inherit from other classes (but
not the ‘notes*’ classes)
• Classes can help build complex systems
quickly and easily
Thursday, 22 March 12
25. Advanced: Classes
• Example class: define ‘Person’
class Person
public personName as NotesName
public UNID as String ‘ UNID to doc in NAB
sub new(doc as NotesDocument)
set personName = new NotesName( _
doc.getItemValue(“FullName”)(0) )
set UNID = doc.UniversalID
end sub
end class
Thursday, 22 March 12
26. Advanced: Classes
dim P as new Person(personDoc)
print “Person: “ + P.personName.Common + _
has document ID: “ + P.UNID
• Example class: Using ‘Person’ class
Thursday, 22 March 12
27. • Create another class that encapsulates
‘Person’
class People
public people list as Person
public count as long
sub new(nabView as NotesView)
dim doc as NotesDocument
set doc = nabView.getFirstDocument()
while not doc is nothing
dim P as new Person(doc)
set people(P.personName.Abbreviated) = P
count = count + 1
set doc = nabView.getNextDocument(doc)
wend
end sub
end class
Thursday, 22 March 12
28. Advanced: Classes
• Using ‘People’
dim folks as new People(nabView)
forall thisPerson in folks.people
print “Person: “ + thisPerson.personName.Common + _
has document ID: “ + thisPerson.UNID
end forall
Thursday, 22 March 12
29. Advanced: Classes
• Lets add logging functionality to these
classes by creating a new ‘layer’.
Class log
sub new()
end sub
public sub logMsg(msg as String)
print msg
end sub
end class
Thursday, 22 March 12
30. class Person as log
public personName as NotesName
public UNID as String ‘ UNID to doc in NAB
sub new(doc as NotesDocument)
set personName = new NotesName( _
doc.getItemValue(“FullName”)(0) )
set UNID = doc.UniversalID
logMsg(“created new person: “ + P.personName.Common)
end sub
end class
• We can ‘inherit’ ALL functionality from ‘log’
by creating ‘Person’ as a subclass of log.
Advanced: Classes
Thursday, 22 March 12
31. Advanced: Classes
• You can only ‘inherit’ from one class at a
time (other languages have mechanisms for
more)
• Every class you inherit from gets to run its
constructor in the sequence you defined
inheritance
• This allows you to quickly segment large
problems and delegate work
Thursday, 22 March 12
32. Advanced: Calling C-API
• Not all Lotus Notes API calls are defined in
LotusScript. Sometimes you want to
execute these.
• You can define ANY library/DLL function in
LotusScript and call it
• Its dangerous...
Thursday, 22 March 12
33. • You have to define EXACTLY the function
using the correct sized primitive variable
types (such as integer, etc)
• If you get any part of it wrong, you will
crash the client. Badly.
• Its Platform-specific. So you have to rewrite
this for every single platform you support
Advanced: Calling C-API
Thursday, 22 March 12
34. • Example:
NSFGetServerLatency
• Find out how many milliseconds it takes to
ping a Domino server.
• Defined as:
Advanced: Calling C-API
STATUS LNPUBLIC NSFGetServerLatency(
char far *ServerName,
DWORD Timeout,
DWORD far *retClientToServerMS,
DWORD far *retServerToClientMS,
WORD far *ServerVersion);
Thursday, 22 March 12
35. • We can define this in LotusScript using:
Advanced: Calling C-API
' This is a constant for our windows-based
' Library file:
Const LIB_W32 = "nnotes.dll"
' Declare our function for windows
Declare Function W32_NSFGetServerLatency _
Lib LIB_W32 Alias {NSFGetServerLatency} (_
Byval ServerName As Lmbcs String, _
Byval Timeout As Long, _
retClientToServerMS As Long, _
retServerToClientMS As Long, _
ServerVersion As Integer) As Integer
Thursday, 22 March 12
36. • And we can use this (on a 32-bit windows
client or server at least) by:
Advanced: Calling C-API
' A function to get network latency time...
Public Function getServerLatency (strServer As String) As Long
Dim nnServer As New NotesName(strServer)
Dim ToServer As Long, fromServer As Long
Dim ver As Integer
Dim timeout As Long
timeout = 1000 ' 1000ms == 1 second
Call W32_NSFGetServerLatency(nnServer.Canonical,_
timeout, toServer, fromServer, ver)
' Return both directional latencies added together
getServerLatency = fromServer + ToServer
End Function
Thursday, 22 March 12
37. • C-API can get to functionality that would
be impossible to implement in LotusScript
alone
• It requires FAR more testing than anything
else - use it as a last resort
• Good reference: http://www.ls2capi.com
Advanced: Calling C-API
Thursday, 22 March 12
38. Advanced: Execute
• ‘Evaluate’ in LotusScript allows you to evaluate
@Formula language:
myString = Evaluate(|@Unique|)
• Execute allows you to execute LotusScript
code
• You can write code that writes code
Thursday, 22 March 12
39. Advanced: Execute
Dim executeString as String
executeString = |
print “Hello world”
dim s as new NotesSession
dim db as NotesDatabase
set db = s.currentDatabase
print “Current Database name is: “ + db.Title
|
execute (executeString)
• Example
Thursday, 22 March 12
40. Advanced: Execute
• I use it to dynamically calculate C-API
function signatures
• http://www.hadsl.com/HADSL.nsf/
Documents/LS2CAPI+-+Calling+Notes
+C-API+from+LotusScript
• It can also be used for evil...
Thursday, 22 March 12
41. Advanced:TriggerHappy
• Imagine we wish to profile ALL our agents
in ALL our databases,ALL the time.
• We could monitor each database to see
when a profile document with form name
$BEProfileR7 is saved
• Save it in a central database...
Thursday, 22 March 12
42. Advanced:TriggerHappy
• Damien Katz (now of CouchDb, ex-Iris)
wrote a server addin called ‘TriggerHappy’,
available on OpenNtf.
• It allows you to define lotusscript which
gets executed on ANY database event at a
server level.
• RunningWithScissors++
Thursday, 22 March 12
43. Advanced:TriggerHappy
• Its detailed (with some code) on my blog
at:
• http://www.billbuchan.com/imported-20091119232548/2010/2/2/
universal-agent-profiling-in-domino.html
• We ran it in our TEST environment for
months without issue
• It also tracked Web services as well as
LotusScript and Domino agents
Thursday, 22 March 12
44. Agenda
• What is LotusScript? Where is it going?
• LotusScript Basics
• LotusScript Advanced
• Web Services
Thursday, 22 March 12
45. Web Services: Introduction
• Web services are a language and platform
independent way of wiring applications
together
• Fundamentally they’re usually web service
http calls passing back and forth XML
encoded information
Thursday, 22 March 12
46. • Lotus Domino 7 (now out of support!)
provided a simple lotusscript based Web
services provider
• Lotus Domino nd8 provides a consumer
and a provider
Web Services: Introduction
Thursday, 22 March 12
47. Web Services:
Experience
• They’re fast. 10+ calls per second. Much
faster than I expected
• But if you want performance, implement
xPages REST based web service
providers - 5x faster
• Reliable
• Look and feel like an agent
Thursday, 22 March 12
48. Web Services: Example
• A single function that returns a single string
Thursday, 22 March 12
50. Web Services:Authentication
• Two general types of Domino
Authentication:
• Session based - uses cookies back and
forth
• Username and Password based -
username and password is sent with each
transaction
Thursday, 22 March 12
51. • Client Example:
• We use Flex as a client
• It automatically inherits cookies from the
web page its launched from
• Launch it from an Authenticated page
• Keep the session active by pinging every
10 minutes
Web Services:Authentication
Thursday, 22 March 12
52. • Server Example:
• We use a windows-based service to
perform work
• We encrypt a username/password pair in
the registry, and use username/password
authentication
• It wakens up every 5 minutes and calls
home
Web Services:Authentication
Thursday, 22 March 12
53. Web Services: Complex
• You can pass back simple types. Or classes.
• Lotuscript limitation - you cannot return an
array
• So how can I return an array?
Thursday, 22 March 12
54. • Define a class which contains an Array
Web Services: Complex
Thursday, 22 March 12
56. Web Services:Thoughts
• Web service clients are not under your
control
• Decide how complicated your client can
handle
• More granular == more likely to change
• Choose wisely
Thursday, 22 March 12
57. Resources
• The LS to C-API programming manual
• http://www.ls2capi
• Calling C-API from LotusScript resource:
• http://www.hadsl.com/HADSL.nsf/Documents/LS2CAPI+-+Calling
+Notes+C-API+from+LotusScript
• Steve McConnell, Code Complete 2 (MS
Press, 2004).
• http://www.amazon.com/gp/product/0735619670
Thursday, 22 March 12
58. The End?
• This presentation, like all my others, is
available at
• http://www.hadsl.com
Thursday, 22 March 12