Notes Object Services

Download Report

Transcript Notes Object Services

®
JMP-106
Lotus Domino Architecture and
Programmability
Rohit Mehta, Manager
George Langlais, Project Leader
Domino Programmability Team
Session Goal
Better programming …
… through a better understanding
of the Notes/Domino architecture
and its progammability features
2
Who Should Benefit From This Presentation?
 Application developers who …
 Design and develop Domino applications
 Integrate non-Domino systems (eg, J2EE) to Domino systems
 But there’s stuff in here useful for others as well
 Project managers
 Domino administrators
 Business people involved with evaluating and purchasing Domino
3
Agenda
 Highlights of Notes / Domino Architecture
 Goals and requirements
 Primary components and their relationships
 Security
 Domino Programmability
 For Domino application developers
• Use the Domino Designer to create Domino apps
 For system integrators
• Extend and interface with the Domino server
5
Notes / Domino
Architecture
6
Will Give A High-Level Overview Of …
 The 3-level software architecture common to all clients and
servers
 Notes databases
 Notes Object Services (NOS)
 Client and server programs
 The Notes/Domino security model
 ID files
 Authentication
 Authorization
7
Architecture ? What’s That?
 An intermediate step in product development
 A set of components (and how they interact) for constructing a
product that satisfies some given requirements
 Often many possible architectures for a given set of requirements
concept
8
requirements
architecture
construction
product
Concept = “Groupware”
 Software which enhances the work performance of a group by
facilitating collaboration among its members
 Groupware enables a group to define, organize, and share information in
timely and relevant ways
 Based on shared databases designed specifically for groupware
 Connected access to shared databases
 Offline access coupled with replication to shared databases
 Common groupware applications
 Mail, threaded discussions, teamrooms, chat sessions,
instant messaging, learning centers, etc.
9
Considerations When Designing Practical Groupware
 Groups
 Hierarchical organizations with multiple sublevels and units
 Knowledge is distributed and encompasses many subjects
 Members may be mobile and/or stationary
 Technologies
 Ever-evolving computer, network, OS, and language choices
 Industry standards
 Obvious groupware product requirements
 Security
 Configurability and programmability
10
Some Basic Groupware Product Requirements
 Dynamic, shared online databases + offline use of replicas
 Flexible “document oriented” content
 Create / view / modify documents using various forms
 A rich set of datatypes (simple text, richtext, links, etc.)
 Response hierarchies
 Multiplatform – both programming products and databases
 Security via encryption and Access Control Lists
 Data integrity via transaction logging and cluster replication
 Programmability
11
The Classic Client-Server Model …
 … is one of two models for accessing databases
 Both Notes clients and Domino servers can use a network to
access remote databases residing on Domino servers
 A database is called “remote” if it resides on a computer other than the
one running the program that accesses it.
network
databases
Notes Client
Domino
Server
Domino
Server
 Supported network protocols:
 TCP/IP, NETBIOS, SPX/IPX, XPC (dialup), VINES
12
Offline Model For Accessing “Local” Databases
 A database is called "local" if it resides on the same computer
as the program that accesses it.
network
Notes Client
 To do this ...
Domino
Server
Domino
Server
 Each client contains the same lightweight, but industrial-strength
database software that runs on a server.
 Each database contains a copy of its design and administrative
information so it can be used off-line.
 Databases can be replicated (resynchronized).
13
Replication Makes Distributed Data/Control Possible
 A process of distributing and resynchronizing databases
 Solves many groupware issues
 Offline access to data by the mobile or telecommuting user
 Collaboration of groups that do not need constant connection
 Control of administration and other distributed processes
 Works because conflicts tend to be rare
 Often only the original author edits an existing document
 Others tend to add "response" notes
14
Clients and Servers Both Use The Same
3-level Software Architecture
Notes Clients
Domino
Servers
network
15
1
Program
level
Notes Client
Domino Designer
Domino Administrator
Domino Server
and server tasks
2
NOS level
Notes Object Services
Notes Object Services
3
File level
Local databases
Local files
network
Shared databases
Local files
A Common 3-level Architecture
C/C++
code
Programs that create,
use, and/or interpret
Notes/Domino
applications
Programs:
Notes, Domino Designer,
Domino Server, etc
function calls
Notes Object Services
data
design notes,
admin notes,
documents
16
Notes/Domino
applications
Core N/D service software:
Notes Storage Facility (NSF),
Notes Index Facility (NIF),
NRPC Client, etc.
Portable, shareable,
replicateable, secure,
document-oriented
local databases
Let’s Look At Files And Databases
Programs
Notes Object Services
(NOS)
Files
17
The NOTES.INI File Is Used To Specify
Configuration And Operating Parameters
* * *
MailServer=Gump
MailFile=mail\jdoe.nsf
Domain=PPS
LAN0=NETBIOS,0,15,2000,,12288,
COM1=XPC,1,15,2000
COM2=XPC,2,15,2000
COM3=XPC,3,15,2000
COM4=XPC,4,15,2000
COM5=XPC,5,15,2000
DisabledPorts=COM1,COM2,COM3,COM4,COM5
DESKWINDOWSIZE=-4 3 356 491
* * *
18
Contents Of An NSF File (Notes Database)
a Notes Database
Database header
per-database
information
Replication history *
Internal structures
list of notes *
Database Header
- Contents
ODS (On Disk Structures) version
Database class (nsf, ntf, etc.)
Information buffer (title, template, etc.)
Database ID
Database Instance ID
Replication ID and settings
Replication History
- List of replication servers and times
(speeds up the replication process)
Internal Structures
- Keep track of the database’s content
- Not directly accessible by any APIs
- Vary from release to release
- Indicated by header’s ODS version
* optional
19
Types of Notes In A Database
 3 categories, many classes, and lots and lots of types
Category
Data
Administration
Design
Elements
NOTE_CLASS_***
Note Types
DOCUMENT
Document
ACL*
Access Control List
REPLFORMULA
Replication Formula
FIELD
Shared Field
FILTER
Agent, Outline, Database script, Script library, etc.
FORM
Form, Frameset, Page, Subform, etc.
VIEW
Folder, Navigator, View
DESIGN *
Design Collection (structured like a view)
ICON *
Icon
INFO *
“Help About” Information
HELP
Designer Help Information
HELP_INDEX *
Product Help Information
* An asterisk means that there can be at most only one of the indicated type of note
20
Every Note, Regarless Of Type, Has Same Structure
 Designed to support replication and collaboration
a Note
Note header
list of
items *
list of
response
NOTEIDs *
* optional
21
Note Header
- Contents
NOTEID within the database
UNID used by replication and design refresh
NOTE_CLASS_xxx flags
Attribute flags (readonly, etc.)
Creation, modified, accessed times
Parent note’s NOTEID
Number of responses
Replication time and sequence number
Note Item
- Contents
Item name and name’s length
Item’s attribute flags
Item’s type (text, richtext, etc.)
Item’s value (depends on type)
Replication sequence number
The Life Cycle Of A Notes Application (Database)




Step 1 – Create an application “template” using Domino Desiger
Step 2 – Deploy the application databases
Step 3 – Use the applications (create/view/modify documents)
Step 4 – Replace or refresh the application template
Domino
Designer
develop
design
administrators
deploy
application 2
databases
Applications
(nsf files)
1
Template
(ntf file)
N/D app
developer
22
revise
design
4
refresh
design
3
N/D app user
Notes And Domino Come With Many Applications
 Some are part of the basic products
 Mail template, log template, etc.
 Generic applications useful to all customers
 Discussion template, teamroom template, etc.
 All are customizable by the end users
 Even the product templates (like the mail template)
 Use the Domino Designer to create/modify an application
23
Notes Databases Are Portable
 On-Disk-Structure (ODS) format is used on all platforms
 Complete binary compatibility regardless of where created
• Create a database on an NT server
• Move it to an IBM 390 server to balance your system
• Replicate it to your MAC and then work off-line
 Embedded programs interpreted the same on all platforms
 Formula language, LotusScript, Java
24
Let’s Look At Notes Object Services (NOS)
Programs
Notes Object Services
(NOS)
Files
25
Notes Object Service (NOS)
 The key software component used by all instances of Notes
and Domino
 Notes Storage Facility (NSF) creates/maintains databases
 Notes Indexing Facility (NIF) maintains database indices
 Replication services
 NRPC (for client-to-server and server-to-server interaction)
 etc.
 The key to Notes/Domino multiplatform capabilities
 Portability layer interface to many operating systems
26
Inside NOS
Client or Server Programs
Notes Object
Services
(NOS)
ACL
Addin
DN
Event
SECFM
AdminReq
Agent
Mail
NAME
CompoundText
ConvertItem
NIF
REG
EnumComposite
Folder
Replicate
Sch
FT
Log
Subform
Alarm
MQ
NSF
NRPC Client
Font ID Net NLS ODS OS List Time Miscellaneous
27
Operating System
Note: Client and server
programs can use NOS‘
Extension Manager to
"hook“ callback functions
into many NOS services
portability
layer
NOS Is Key To N/D Multiplatform Capabilities
 NOS's portability layer makes it easier to port NOS' clients
 NOS itself has been ported to many platforms
 A representative sample of past and present configurations:
Operating
System
28
Processor
NOS
Client
Programs
Server
Programs
Mac OS
Power PC
x
x
OS/2
Intel x-86
x
x
x
Windows 95/98
Intel x-86
x
x
x
Windows NT
Intel x-86, DEC Alpha
x
x
x
Solaris
Intel x-86, Sun Sparc
x
x
x
AIX
IBM RS6000
x
x
x
HPUX
HP PA
x
x
x
OS/400
IBM AS400
x
x
OS/390
IBM 390
x
x
Linux
Intel x-86
x
x
Notes Remote Procedure Calls (NRPC)
 For accessing NOS services running on remote servers
 NRPC "client request" logic is in NOS
 NRPC "server response" logic runs only on the server
 Programming is no different whether service is local or remote
NRPC server
Any Program Using NOS
NOS
NSF
NRPC Client
NOS
NSF
NRPC Client
NOS Portability Layer
NOS Portability Layer
Operating System
Operating System
Notes Client or Domino Server
29
Domino Server Program
Domino Server
Let’s Look At Notes / Domino Programs
Programs
Notes Object Services
(NOS)
Files
30
Client Programs And Their Supporting Databases
Notes Client
- Create and modify local and
remote data
Domino Designer
- Create and modify Notes and
Domino app designs
Domino Administrator
- Add / remove / modify server
and user info
- Control overall system security
and operations
Programs
Notes
Client
read/write
HEADLINE.NSF
USER.DIC
MAIL\username.NSF
read/write
DOMADMIN.NSF
USERREG.NSF
Domino
Designer
Domino
Administrator
function
calls
Common Client
Software
31
Databases
common
client
databases
read/write
NAMES.NSF
BOOKMARK.NSF
CACHE.DSK
DESKTOP5.DSK
MAIL.BOX
SMTP.BOX
Server Tasks – Processes And Threads
A Domino Server
Builtin
PROCESSES and THREADS
spawned by the
primary server task
server
console
NRPC
server tasks
PROCESSES
loaded and unloaded
by the server console task
based on operator commands
HTTP
load
Replica
Update
Console task
monitor
etc.
Misc builtin
server tasks
etc.
The specific set spawned
depends on server
configuration settings
Notes Object Services (NOS)
notes.ini file
32
Notes databases
Builtin Server Tasks Spawned By Server Program
 OS processes in early versions of Domino, mostly threads now
Tasks
33
Description
Cluster Manager
Probes availability of cluster members and updates cluster statistics
Console
Manages server console input and display
DB Cache Ager
Ages cached databases (those pended for closing)
DB Cache Processor
Reopens cached databases and closes fully-aged databases
DB Fixup
Fixes inconsistent and/or bad databases listed in the fixup queue
Loadmon
Updates server load-balancing statistics
Name Server
Maintains a list of networked servers and the services they provide
NRPC Listener
Listens for connection requests by NRPC clients (one per NRPC port)
NRPC User
Manages a user's connection to the server (one per NRPC user)
Poll
Performs periodic housekeeping - for example, scheduling other tasks to run
RM Checkpoint
Recovery Manager task prepares transaction-log checkpoint record
RM Flush
Recovery Manager task flushes cached DB info in order to free log space
UBMIO
"Cleans" modified database information cached in the UBM by writing DBs
UBM Cleaner
Ages modified database information in the UBM and schedules cleaning
Server Processes Loadable By Console Task
Category
34
Server Tasks
Database maintenance
Agent manager, cataloger, designer, directory
cataloger, replicator, update, updall
Server and admin
management
Admin process, cluster directory database manager,
cluster replicator, cluster admin process, map
generator, server console
Mail, calendaring,
and scheduling
Calendar connector, IMAP, POP3, router, schedule
manager, SMTP
Connectivity and protocols
DIIOP, DECS, HTTP, LDAP
Server health
Billing, database statistics, events, ISPY, mail
tracking, reporter, statistics collector, stats
Notes / Domino Security
35
Notes / Domino Security Is Based On Three Principles
Identification
Authorization
Access Control
An ID file
identifies a named
entity and its place in
an organizational
hierarchy
IDs are securely
authenticated using
public-private key
technology
Multiple places
where access to
data or services can
be granted or
restricted
The server program
plays a key role in
Domino security
client
server
36
person’s
ID file
server’s
ID file
2-way
authentication
server
server
program
server’s
ID file
server
deny list
Server
access list
a database
ACL
You Are Who Your ID File Says You Are
 An ID file contains info for securely communicating with others
 The entity's name
 The entity's public and private keys
 Certificates which validate the entity's name and public key
 An ID file can (and should) be password protected
 The password encrypts/decrypts the contents of the ID file
 Once compromised, an ID file should be destroyed and replaced
 Just changing the password won't repair the damage done
37
Public-Private Key Technology Is Used To
Secure Both Data And Communications
 To securely send information to a known entity
 Encode with the entity’s public key, entity decodes with its private key
 To sign information and to authenticate
 Encode with your private key, other party decodes with your public key
 The same algorithm both encrypts and decrypts
sender uses recipient’s
public key to transmit
encrypted
message
encrypt /
decrypt
recipient uses own
private key to
understand message
encrypt /
decrypt
plain text
message
plain text
message
encrypt /
decrypt
encrypt /
decrypt
sender uses own
private key to sign
38
signature
recipient uses
sender’s public key
to verify signature
Add A Digital Signature
To Indicate Approval Or Validity Of Data
 To sign information ...
 Hash the information into a smaller value called a “digest”
 Encrypt the digest using your private key
 Add the encrypted digest as the signature
 To verify a signature ...
 Hash the information into a smaller value called a “digest”
 Decrypt the signature using signer's public key
 The decrypted signature should match the digest
• If not, then the content has probably changed since being signed.
39
Notes Server Authentication Is a 2-Way Process
 Client authenticates the server and vice-versa
 Exchange of public keys and certificates
 Exchange of random numbers encrypted with private keys
 Switch to a more-efficient session encryption key
ServerBob's public key and random number challenge
Alice's certificate list
ServerBob's certificate list
Alice's random number challenge encrypted with ServerBob's private key
ServerBob's signature on previous message
ServerBob's random number challenge encrypted with Alice's private key
Long-term secret (Alice's random number challenge, session key)
40
Server Bob
Client Alice
Alice's public key and random number challenge
Once An ID Is Authenticated …
 ... Security is base on passing through a series of roadblocks
 Server and database services enforce various access control lists
• Server inclusion and exclusion lists
• Database Access Control List (ACL)
− Manager, designer, editor, author, reader, depositor,
no-access
• Author and reader lists in documents
• etc.
 General rule:
 The most-restrictive access applies if there are ambiguities
41
Domino
Programmability
42
Domino Programmability
 What it is
 Who uses it
 How it works
 All the different ways to program Domino
 Common programming scenarios and solutions
 Resources and Help
43
Programmability = Customizability
 Customize your Domino applications
 Data content
 Application design
• User Presentation
• Business Logic
 Customize the Domino server itself
 Add and/or enhance server tasks
• Connection protocols, server management tasks, etc.
 Extend core functionality
• Use the C API’s Extension Manager
44
Two Basic Programming Communities
 Notes / Domino application developers
 Define application-specific data and its presentation
 Define views that organize data in useful ways
 Add workflow and business-process logic
 System integrators
 Enhance existing Domino applications
 Enhance Domino server functionality
 Access Domino data and apps from non-Domino systems
 Integrate non-Domino data into Domino apps
45
Symbols Used Throughout The Presentation
 These reflect the common 3-level architecture used by every
Notes/Domino program
Notes
A Notes Client
A Domino Designer
A Domino Server
46
Designer
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
Notes / Domino Application Developers
 Use Domino Designer to create / maintain Domino applications
Applications are then “run” by a Notes Client or by the server’s
HTTP task connected to a browser
browser
HTTP
Notes
NRPC
N/D app user
Designer
N/D app developer
47
NRPC
d
s h i a r
v t i m e …
r t o g p
p p r l
Notes/Domino
applications
System Integrators
 Use any and all programmability features to create, enhance,
and/or connect to Domino apps
non-Domino system
HTTP
browser
HTTP
NRPC
Notes
NRPC
N/D app user
modify
design
IIOP
1
Designer
extend
Domino
48
NRPC
2
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
HTML or XML
based program
C/C++, VB,
“local” Java
N
C
S
O
3
add
server
tasks
Notes/Domino
applications
“remote”
Java
program
4
5
6
connect
to
Domino
The “Local” Programmability Stack (LPS)
 Provides linkage to a local copy of NOS via various computer languages
 You need to have Notes or Domino installed on the computer
you write
programs in
these
languages
Formula
program
the local
programmability
stack
interfaces
to NOS
Formula
Engine
Formulas
LotusScript
program
Java
program
VB
program
LotusScript
Engine
JVM *
COM *
LSX-BE
notes.jar
COM-BE
Backend Classes
Notes Object Services
* not built by Lotus
49
C or C++
program
C API
Domino Backend Classes
 C++ classes that give a generic object-oriented API onto NOS
 Methods
 Properties
 Events
 Notes/Domino provides adaptors to the Domino backend
classes for several object-oriented languages
 LotusScript
 Java
 Visual Basic
50
The LPS Does Not “Expose” Everything In NOS
 There are many features in NOS unavailable to formulas,
backend classes, and the C API
 LPS exposes only those NOS features …
• That have settled down and are unlikely to change
• That are core N/D features that cannot be easily duplicated
• For which our customers have indicated a real need
 Why?
 LPS development is difficult and time consuming
• There are dozens of Domino programmers involved in developing,
testing, and documenting programmability features
• It is hard to keep up with changes in NOS
 We pledge to support exposed LPS features forever (see next slide)
51
Our Pledge
 Complete backward compatibility for existing binaries
 A new version of Notes/Domino will continue to run binaries for
applications compiled under all older versions
 If a new version of Notes/Domino breaks an existing app,
that is a bug that we need to fix
 We have deprecated a few features at source level from time to time
 This does not violate the pledge for binary compatibility
 We keep the original feature in N/D, but discontinue bug fixes
 We remove source-level support from programming APIs
 We often provide newer, better ways to do the same thing
52
Notes / Domino
Application
Development
53
The Domino Designer
 The primary tool for creating and maintaining Domino apps
Usually create locally and then deploy to a Domino server
Notes
NRPC
Designer
NRPC
HTTP
N/D app user
N/D app developer
create and
maintain
N/D apps
browser
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
Notes/Domino
applications
54
Notes Apps versus Domino Web Apps
 Develop for Notes, develop for the web, or develop for both
A short (and very simplified) history lesson
The “Domino” project
“Rich”
Notes
Client
HTTP task created
for server-side
interpretation
of a Notes design
Browser features
added to the
Notes Client
time
World Wide
Web invented
55
Web design elements
and “hide when”
support added
Continued improvements
to the HTTP task and
to the Notes Client as
web standards evolve
Notes Apps versus Domino Web Apps
 Develop for Notes, develop for the web, or develop for both
A short (and very simplified) history lesson
The “Domino” project
“Rich”
Notes
Client
HTTP task created
for server-side
interpretation
of a Notes design
Browser features
added to the
Notes Client
time
World Wide
Web invented
56
Web design elements
and “hide when”
support added
Continued improvements
to the HTTP task and
to the Notes Client as
web standards evolve
Notes Apps versus Domino Web Apps
 Develop for Notes, develop for the web, or develop for both
A short (and very simplified) history lesson
The “Domino” project
“Rich”
Notes
Client
HTTP task created
for server-side
interpretation
of a Notes design
Browser features
added to the
Notes Client
time
World Wide
Web invented
57
Web design elements
and “hide when”
support added
Continued improvements
to the HTTP task and
to the Notes Client as
web standards evolve
Notes Apps versus Domino Web Apps
 Develop for Notes, develop for the web, or develop for both
A short (and very simplified) history lesson
The “Domino” project
“Rich”
Notes
Client
HTTP task created
for server-side
interpretation
of a Notes design
Browser features
added to the
Notes Client
time
World Wide
Web invented
58
Web design elements
and “hide when”
support added
Continued improvements
to the HTTP task and
to the Notes Client as
web standards evolve
Notes Apps versus Domino Web Apps
 Develop for Notes, develop for the web, or develop for both
A short (and very simplified) history lesson
The “Domino” project
“Rich”
Notes
Client
HTTP task created
for server-side
interpretation
of a Notes design
Browser features
added to the
Notes Client
time
World Wide
Web invented
59
Web design elements
and “hide when”
support added
Continued improvements
to the HTTP task and
to the Notes Client as
web standards evolve
Notes Apps versus Domino Web Apps
 Develop for Notes, develop for the web, or develop for both
A short (and very simplified) history lesson
The “Domino” project
“Rich”
Notes
Client
HTTP task created
for server-side
interpretation
of a Notes design
Browser features
added to the
Notes Client
time
World Wide
Web invented
60
Web design elements
and “hide when”
support added
Continued improvements
to the HTTP task and
to the Notes Client as
web standards evolve
Notes Apps versus Domino Web Apps
 Develop for Notes, develop for the web, or develop for both
A short (and very simplified) history lesson
The “Domino” project
“Rich”
Notes
Client
HTTP task created
for server-side
interpretation
of a Notes design
Browser features
added to the
Notes Client
time
World Wide
Web invented
61
Web design elements
and “hide when”
support added
Continued improvements
to the HTTP task and
to the Notes Client as
web standards evolve
Notes Apps versus Domino Web Apps
 RUX = “Reach versus User Experience”
 There is a spectrum of clients
• Small clients have a large reach but a poor user experience
• Large clients have limited reach but a “rich” user experience
small clients
medium clients
fat clients
Big User
Experience
Big
“Reach”
PDAs and cell phones
browsers + plugins
desktop apps
 There will always be a gap in user experience between
Notes Client apps and Domino Web apps
 We hope to narrow the gap as web technologies improve
• Will make more use of DHTML, stylesheets, etc.
• Will continue to try to simplify “webification” of Notes Client apps
62
Primary N/D Application Design Elements
 Forms
 Used to create, view, and modify data documents
 Can contain logic for computing data values
 Can be used to present the same document in many ways
 Views
 Used to select and navigate relevant subsets of documents
 Support categories and subcategories
 Support sort-by-column and other indexing/searching features
 Agents
 Perform specific tasks within a database
 Can be scheduled, run on demand, or run in response
to events
63
Forms
Form example
- The Reply form
from a mail
template
- Note the formula
(at lower right) for
including the
computed subform
selected at the
top of the layout
window
64
Views
View example
- The ByAuthor
view from a
teamroom template
- Note the formula
(at lower right) for
computing the
values shown in
the Topic column
65
Views
View example
- Example of the
ByAuthor view
within a real
teamroom
66
Agents
Agent example
- Example of an
agent used to
test Domino’s
DXL exporter
67
Logic You Can Add To Your Notes/Domino Designs
 Formulas, LotusScript, and Java
used by N/D integrators
used by N/D app developers
Formula
program
Formula
Engine
LotusScript
program
Java
program
VB
program
LotusScript
Engine
JVM
COM
LSX-BE
Formulas
notes.jar
COM-BE
Backend Classes
Notes Object Services
68
C or C++
program
C API
Example: Notes Runs Some LotusScript
script
1
2
3
Pass the script
and context to
the LotusScript
Engine
69
Context data is
available to the
Session class
3
Lotus Notes
2
Read script
from the database
into a local buffer
Create the
Session context
4
context
1
4
LotusScript
Engine
LSX-BE
Backend Classes
Notes Object Services
Database with compiled
LotusScript, Java, and Formulas
The Session Class Provides Runtime Context
 Some often-used properties of the NotesSession class
 Some properties have meaningful values only in some contexts
•
•
•
•
CurrentDatabase
DocumentContext
EffectiveUsername
etc.
Httpurl
Isonserver
NotesVersion
 Session also has methods for creating important objects and
accessing the environment
•
•
•
•
70
CreateDatetime
CreateName
CreateStream
etc.
GetDatabase
GetDBDirectory
GetEnvironmentString
There is Lots Of Info About Domino Programmability
 Designer help and the corresponding Domino Programmability
document set
 Lotus Domino Domain (LDD)
 Domino class diagrams
 Various publications (e.g., The View)
 Business partner forums
 Numerous Red Books, white papers, and best-practices guides
 Lotusphere (of course)
71
Integrating
Domino
and non-Domino
Products
72
System Integrators
 Use any and all programmability features to create, enhance,
and/or connect to Domino apps
non-Domino system
HTTP
browser
HTTP
NRPC
Notes
NRPC
N/D app user
modify
design
IIOP
1
Designer
extend
Domino
73
NRPC
2
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
HTML or XML
based program
C/C++, VB,
“local” Java
N
C
S
O
3
add
server
tasks
Notes/Domino
applications
“remote”
Java
program
4
5
6
connect
to
Domino
Integrating Domino With Other Products
1 Use the Domino Designer
 To extend and integrate new features into existing Domino applications
2/3 Use the CAPI and its Extension Manager
 To add your own server tasks and to enhance the behavior of a Domino server
4 Use a program that interfaces with Domino’s HTTP task
 To get Domino data back as HTML or XML and to invoke Domino application agents
5 Use a locally-installed Notes client or Domino server to use NRPC
 To have C/C++, VB, and Java programs work with remote Domino apps via NRPC
6 Use NCSO.jar and Domino’s DIIOP task
 To have your Java programs work with remote Domino apps without having to have a
locally-installed copy of the Notes client or the Domino server
74
Will Also Show Integration With DB2 And Other RDBs
 RAD non-programmatic Tools
 LEI
 DECS
 DCRs
 Programmatic
 LC LSX
 LS:DO
 JDBC
75
System Integrators – Modify Design
1
Domino Designer is the tool of choice
non-Domino system
HTTP
browser
HTTP
NRPC
Notes
NRPC
N/D app user
modify
design
IIOP
1
Designer
extend
Domino
76
NRPC
2
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
HTML or XML
based program
C/C++, VB,
“local” Java
N
C
S
O
3
add
server
tasks
Notes/Domino
applications
“remote”
Java
program
4
5
6
connect
to
Domino
System Integrators – Modify Design
 Notes/Domino ships with templates for mail, discussion,
team room, resource reservation etc.
 Default Templates are modified
 Company standardization (logos, UI changes)
 Addition of specific features (expense report forms)
 Virus checking
 Use code from templates in new applications
 Pros – quickly come up with tested functionality
 Cons – Need modifications with new versions of Notes/Domino.
77
System Integrators – Extend Domino
2
Use Extension Manager to extend Domino functionality
non-Domino system
HTTP
browser
HTTP
NRPC
Notes
NRPC
N/D app user
modify
design
IIOP
1
Designer
extend
Domino
78
NRPC
2
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
HTML or XML
based program
C/C++, VB,
“local” Java
N
C
S
O
3
add
server
tasks
Notes/Domino
applications
“remote”
Java
program
4
5
6
connect
to
Domino
Extending Domino Via C API’s Extension Manager
 Allows an executable program library in an application to register
a callback routine that will be called before or after selected
internal operations are performed by Domino or Notes
 One needs to keep track of context and to deregister the
callback function once finished with EM
 Avoid compute intensive usage – can cause impact on Domino
performance
 Used for – virus checking, logging, event signaling, status
reporting as the system is running
79
System Integrators – Add server tasks
3
Typically called server addins
non-Domino system
HTTP
browser
HTTP
NRPC
Notes
NRPC
N/D app user
modify
design
IIOP
1
Designer
extend
Domino
80
NRPC
2
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
HTML or XML
based program
C/C++, VB,
“local” Java
N
C
S
O
3
add
server
tasks
Notes/Domino
applications
“remote”
Java
program
4
5
6
connect
to
Domino
Adding Server Tasks Via The C API
 Usually add-in tasks perform operations periodically
 Adding Server tasks
 An executable program that can run with other server tasks.
 Need to follow naming conventions listed in the platform guidelines.
 Add-in tasks can be started automatically at startup or manually
 For automatic startup - Edit the “Server Tasks= “ field in Notes.ini
and add your add-in.
 For manual startup – type “Load <taskname>” at the server console.
 “SHOW TASKS” command at server console displays all tasks.
 “tell <taskname> quit at Server console will exit the add-in task.
 One can debug Server add-in task in a separate window or session
81
C API toolkit – What it is





Over 100 Cross platform header files.
Platform specific libraries.
Up to 4 files per operating system.
Database documentation files.
Reference and User Guide databases containing thousands of
functions, datatypes, symbolic values & Extension Manager
callbacks with detailed documentation and instruction.
 Sample program code.
 Over 100 sample programs to illustrate basic to advanced Domino C API
programming techniques.
 Sample Domino databases.
 Over 60 databases and templates to be used in conjunction with the sample
applications.
82
C API toolkit – what can you do with it
 You can do almost anything with the C API
 It offers the lowest level of access to Domino and Notes.
 Applications created using the C API make calls directly into the
Domino DLLs.
 Programmatic access to all the major Domino/Notes features.
 LDAP
 DSAPI
 SMTP
 Backup and Recovery
 Single Server Sign-On
 DXL and XSLT
83
C API toolkit – Some typical uses
 One can easily automate many System Administration tasks.
 Password authentication.
 Administration Process (Adminp) Requests.
 Extension Manager Notifications.
 Use a certain Domino feature with your own UI
 Automate Domino tasks
 Build a server add-in task or a client task
 Low-level granular access to Domino
84
Logic Outside of Notes/Domino Designs
 Java, Visual Basic, C, and C++
used by N/D integrators
used by N/D app developers
Formula
program
Formula
Engine
LotusScript
program
Java
program
VB
program
LotusScript
Engine
JVM
COM
LSX-BE
Formulas
notes.jar
COM-BE
Backend Classes
Notes Object Services
85
C or C++
program
C API
System Integrators – Server tasks
4
HTTP
non-Domino system
HTTP
browser
HTTP
NRPC
Notes
NRPC
N/D app user
modify
design
IIOP
1
Designer
extend
Domino
86
NRPC
2
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
HTML or XML
based program
C/C++, VB,
“local” Java
N
C
S
O
3
add
server
tasks
Notes/Domino
applications
“remote”
Java
program
4
5
6
connect
to
Domino
System Integrators – HTTP
 Domino Web applications use HTTP
 Programs using HTML or XML
 Use HTTP facilities to make requests for HTTP tasks (applications from a
browser – e.g DWA)
 URL command ReadViewEntries - one gets view data in XML form without
appearance attributes (font, date setting etc.)
HTTP://www.lotus.com/sample.nsfe/File?Readviewentries
 URL command OpenImageResource – open any graphic resource in an app,
access imaged called Image1
HTTP://www.lotus.com/sample.nsfe/Image1?OpenImageResource
 Integration with Websphere Application Server (WAS)
 Ability to use Apache or IIS HTTP server with Domino 6.02
 HTTP Server provides the execution environment for Web Services
 ?OpenWebService
 ?OpenWSDL
87
Sessions on Web Services
 For more information on the Web Services please attend
the sessions:
JMP 103
Introduction to Web Services
Sunday Jan. 25 at 10:30pm
Swan 1-4
AD205
Web Services and Lotus Domino
Wednesday Jan 28, 2:30pm
Dolphin – Hemisphere I & II
88
System Integrators – Server tasks
5
NRPC
non-Domino system
HTTP
browser
HTTP
NRPC
Notes
NRPC
N/D app user
modify
design
IIOP
1
Designer
extend
Domino
89
NRPC
2
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
HTML or XML
based program
C/C++, VB,
“local” Java
N
C
S
O
3
add
server
tasks
Notes/Domino
applications
“remote”
Java
program
4
5
6
connect
to
Domino
Server tasks - NRPC
 Applications using NRPC
 Most widely used mechanism
 Use C APIs or VB to make request on remote Domino Servers.
 Local Java classes (specifying remote server)
 Cross platform support for all applications.
 Better Security – you need ID file since you will be
using Notes. Notes security stronger than Web.
90
System Integrators – Server tasks
6
DIIOP
non-Domino system
HTTP
browser
HTTP
NRPC
Notes
NRPC
N/D app user
modify
design
IIOP
1
Designer
extend
Domino
91
NRPC
2
s h
v t
r t
p
d
i
i
o
p
a
m
g
r
r
e …
p
l
HTML or XML
based program
C/C++, VB,
“local” Java
N
C
S
O
3
add
server
tasks
Notes/Domino
applications
“remote”
Java
program
4
5
6
connect
to
Domino
Server Tasks - DIIOP
 In Domino 5.0x DIIOP needed HTTP task
 Concern for some users
 In Domino 6.0x no need for HTTP
 Very significant scalability improvements
 Performance bottlenecks removed
 We will address session timeout issue in the next release
 Strong offering for Java developers (tickler)
 Useful for Websphere applications leveraging Domino data
using JSP tags.
 Needed for Portal applications using Domino infrastructure
92
Server tasks – DIIOP – what is it
 Common Object Request Broker Architecture (CORBA)
 It’s a specification and not a product
 Controlled by OMG consortium (Object Management Group)
 Main purpose
• Allow objects on servers invoked remotely by Clients
• Data transfer between Object Oriented systems
 Internet Inter-Orb Protocol
 Defines how Orbs talk across the wire to each other
93
Server tasks - DIIOP – details
 Server Orbs
 Passes any "Object requests" to the appropriate Objects on the
server
 The Server Object runs and passes the result to the Orb
 Orbs talk to the Server Objects by use of IDL (Interface
Definition Language)
 IDL –
 IDL is Language Independent Syntax
 use IDL to define the methods and properties of each Object
 use an IDL compiler to translate IDL to your target language source
code (skeletons & stubs)
94
Tools to integrate Domino with DB2
 RAD non-programmatic Tools
 LEI
 DECS
 DCRs
 Programmatic
 LC LSX
 LS:DO
 JDBC
95
Virtual Fields Technology
96
Tools to integrate Domino with DB2 - LEI
 Industrial-strength server for real time data access and data
transfer & synchronization
 Advanced Real Time activities allow DB2 data and business logic
to be exposed as Domino objects
 Data Management activities support transfer & synchronization of
DB2 data
 Rapid Application Development (no programming req'd!!)
 Requires Domino 6 server and Notes 6 client
 Notes R5 clients and Domino R5 servers can access real time
enabled applications on the Domino 6/LEI 6 server
97
Tools for Domino-DB2 integration – LC LSX
 Lotus Connector LSX (LC LSX)
 Installed with Domino and Notes
 Works with standard Lotus Connectors
 Programmatic real time or data management access
 LEI vs. LC LSX
 Use LC LSX for things you can’t do with LEI
 No license fees for LC LSX
 LEI better performance (written in C vs. Lotuscript)
98
Tools for Domino-DB2 integration - JDBC
 JDBC technology lets you access relational data from the
Java programming language
 Integrate with Domino
 Java agents
 Java servlets
 Applications
 What you need to connect with JDBC
 Java 2 SDK
 JDBC technology-enabled driver
 Or, use the JDBC-ODBC bridge if you already have ODBC
connectivity
99
Session on LC LSX
 For more information on the LC LSX topic please attend the
session
AD 208
Accessing Relational Data with Lotus
Connecters LSX
Thursday Jan. 29 at 12:15pm
Dolphin – Southern Hemisphere
Ballroom I & II
100
XML – What is it
 eXtensible Markup Language
 A "meta language"
 Syntax rules only, with no predefined tags
 Uses
 For describing data, not presentation
 Used to exchange data between disparate systems
 DXL
 = Domino data expressed as XML (Domino XML Language)
 Process it as any XML (text editor, XML tools etc.)
101
XML – What can you do with it in Domino
 Export Domino data as XML and vice versa
 Publish any XML to HTML
books.xml
XSL
Transformer
books.html
 Publish any XML to FO (Formatting Objects) to PDF
books.xml
102
XSL
Transformer
FO
FO to PDF
Composer
books. pdf
XML And DXL – What can you do with it in Domino
 Import any XML to Domino
books.xml
DXL
XSL
Transformer
DXL
Importer
books. nsf
XSL
Transformer
books. xml
 Export Domino Data to any XML
books.nsf
103
DXL
Exporter
DXL
XML – What can you do with it in Domino
 Publish Domino Data to PDF
books.nsf
DXL
Exporter
DXL
XSL
Transformer
FO
FO to PDF
Composer
books. pdf
 Publish Domino data to HTML
books.nsf
104
DXL
Exporter
DXL
XSL
Transformer
HTML
books. html
Session on XML
 For more information on XML topic please attend the
session
AD 206
DXL as a Lotus Domino Integration Tool
Wednesday Jan. 28 at 4:30pm
Swan – Pelican
105
Your Turn
JMP106
Lotus Domino Architecture
and Programmability
Questions ?
106