SlideShare a Scribd company logo
3/11/2010




  Advanced Programming
  With Notes/Domino
  COM Classes

 EntwicklerCamp, March, 2010




Bob Balaban
Looseleaf Software LLC
bbalaban@gmail.com
                                           Copyright 2010 Looseleaf Software




    Agenda
    • Speaker intro
    • COM and OLE
    • Notes “front-end” and “back-end” objects
    • Where can you use Notes COM/OLE classes?
       • Vb.net
       • C#
       • C++
    • Why?
    • Demos and samples
    • Q &A


       Copyright 2010 Looseleaf Software




                                                                                      1
3/11/2010




Speaker Introduction
• 15+ years as a Lotus/Iris/IBM developer (1-2-3,
  Notes/Domino)
  • Wrote the original LotusScript/Java back-end classes (Notes
    v4.0)
  • Notes/SAP integration (v7.x, 2006)
• 9+ years as an independent consultant/developer/author
  • Frequent speaker at LUGs and Lotusphere
  • Many trade journal articles
  • Expertise in N/D programmability, plugins, J2ee, system
     integration, messaging, appdev in general


   Copyright 2010 Looseleaf Software




COM – Component Object Model
• A way to provide “interfaces” for other code to use
  • Kind of like Web Services, for Windows programs
• “Provider” (“server”):
  • Create a component in c++ or a .NET language,
  • Describe the interface in IDL (interface definition language),
  • Compile IDL to a “type library”, register it under some ID and/or
     name
  • COM objects can be DLL or EXE (“in-proc”, “out-of-proc”)
• “Consumer” (“client”):
  • Use Visual Studio (it generates a lot of code for you)
  • Get an instance of the root object (by ID or name, or…)
  • Use it to get other objects


   Copyright 2010 Looseleaf Software




                                                                               2
3/11/2010




 COM, the Big Picture
                                 My Program
                                    (.exe)
IPC Broker
                                                IF 1          In-Process
Out-of-Process
                          IF 2



 Other                                                     Some
Program
                            Typelib
                                           Typelib
                                                            DLL
                                             1
 (.exe)                       2




                      Windows Registry
      Copyright 2010 Looseleaf Software




  COM and OLE
  • Object Linking and Embedding
     • Very UI-oriented
     • Standards and practices for putting “live” objects into composite
       “documents”
  • ALL based on COM objects
     • Container (e.g., Word or Notes) supplies embedding interfaces (pre-
       defined) to the contained object (picture, Visio, something)
     • Persistent storage, access to menu, location, etc. etc.
     • Embedded object provides pre-defined interfaces to the container
       (launch, quiesce, open, save…)
  • We’re not going to do much with OLE in this session
     • (too much typing…)


      Copyright 2010 Looseleaf Software




                                                                                    3
3/11/2010




Notes “Front-end” and “Back-end”
• Front-end is UI
  • NotesUIWorkspace, NotesUIDatabase, etc.
  • Can only operate in the context of a running Notes Client
  • (otherwise there’s no UI!)
  • No equivalent in Java, LotusScript and COM only
• Back-end classes have no UI
  • NotesSession, NotesDatabase, etc.
  • Can run either in Client or in Server
  • Java, LotusScript, COM, CORBA



   Copyright 2010 Looseleaf Software




Front-end and Back-end COM
• BOTH sets of classes are available to COM-consuming
  programs
• Each one has it’s own “typelib”
  • Front-end classes launch the Notes Client, “out-of-proc”
    • “Lotus Notes Automation Classes” library
  • Back-end classes load the LSXBE DLL “in-proc”
    • “Lotus Domino Objects” library




   Copyright 2010 Looseleaf Software




                                                                       4
3/11/2010




  Front-end / Back-end COM libs
    My COM program

                                               NLNOTES.exe
                             IPC Broker
                        Front-end
                    (UIWorkspace, etc.)

                                               LSXBE
                                                 dll
                        Back-end
                      (Session, etc.)


      Copyright 2010 Looseleaf Software




   COM Consumers
• Use Visual Studio.net!
  • 2005, 2008 (2003 works, but not as well)
• CLR languages (VB.net, C#)
  • Easy!
• C++ - some tricks required


              Demo 1: Front-end with CLR

              Demo 2: Back-end with CLR


      Copyright 2010 Looseleaf Software




                                                                    5
3/11/2010




Why Do This: Use Cases
• You want to write a standalone program (.exe) that uses
  Notes objects, and you don’t want to write Java
• You want to write a standalone program (.exe) that uses
  front-end objects (not an option with Java)
• You’re writing an Extension Manager plugin or Server Addin
  (or anything that requires C/C++) and want to use higher-
  level objects than you get in Notes CAPI
• You are writing something that requires .NET (ASPX, Web
  part, whatever)


   Copyright 2010 Looseleaf Software




More Demo
          Demo 3: Front-end COM in C++
          (launch new Memo form in mail db)


          Demo 4: Back-end COM in C++
          (export dxl from a data document)




   Copyright 2010 Looseleaf Software




                                                                      6
3/11/2010




Summary
• COM is difficult to explain thoroughly
  • But pretty easy to use
  • If you get the right tools (Visual Studio!)
• COM gives you access to both Front- and Back-end objects
  from “outside” the product
• CLR languages (C#, VB.net) are the easiest to use
• C++ also possible, requires a bit of extra work




   Copyright 2010 Looseleaf Software




References
• “Essential COM” by Don Box (1988)
  • The best and most thorough reference on all things COM
• “COM Together” – Lotus Redbook, 2000
  • http://www.redbooks.ibm.com/abstracts/sg245670.html?Op
    en
• “In Theory” blog – couple of articles on using COM and C#
  with Notes CAPI
  • http://www.bobzblog.com




   Copyright 2010 Looseleaf Software




                                                                     7
3/11/2010




Questions




       How to contact me:
       Bob Balaban (not the actor)
       bbalaban@gmail.com
       Blog – http://www.bobzblog.com
     Copyright 2010 Looseleaf Software




                                                8

More Related Content

PDF
Introduction to python
PPTX
What's the "right" PHP Framework?
PPTX
Chapter 1
PPTX
Reviewing CPAN modules
PPTX
CPAN Exporter modules for Perl 5
PPTX
C++ l 1
PPT
Dotnet framework
PPTX
Csharp introduction
Introduction to python
What's the "right" PHP Framework?
Chapter 1
Reviewing CPAN modules
CPAN Exporter modules for Perl 5
C++ l 1
Dotnet framework
Csharp introduction

What's hot (18)

PDF
PHP Frameworks Review - Mar 19 2015
PPTX
Electronic Publishing 2.0: Reimagining the Publication and Preservation of E ...
PPTX
Java byte code & virtual machine
DOCX
The seven pillars of aspnet
PPTX
Architecture diagram of jvm
PPT
Introduction to .NET Framework
PPTX
.Net framework
PDF
PPTX
Java byte code presentation
PDF
Java introduction with JVM architecture
PPTX
JAVA BYTE CODE
PPTX
CPAN Curation
PPT
Java-java virtual machine
PPTX
Java architecture
PDF
Threads presentation
PDF
Java Virtual Machine - Internal Architecture
PPTX
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
PHP Frameworks Review - Mar 19 2015
Electronic Publishing 2.0: Reimagining the Publication and Preservation of E ...
Java byte code & virtual machine
The seven pillars of aspnet
Architecture diagram of jvm
Introduction to .NET Framework
.Net framework
Java byte code presentation
Java introduction with JVM architecture
JAVA BYTE CODE
CPAN Curation
Java-java virtual machine
Java architecture
Threads presentation
Java Virtual Machine - Internal Architecture
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
Ad

Viewers also liked (14)

PDF
Lotusphere 2007 AD505 DevBlast –30 LotusScript Tips
PDF
T4 S1 Lotus Notes On Citrix
PDF
THE COST OF MOVING TO ADVANCED COLLABORATION
PPTX
Presenting Data Effectively in XPages - ATLUG May 2013
PPT
Binding to multiple datasources on a single xPage
PDF
Only an IBM Domino Server can take this much beating and still run
PDF
computerarchiv-muenchen.de - Jahrekalender 2017 | C.Habermueller
PDF
Fine tuning Lotus Script (german)
PDF
Mehr Performance für WordPress - WordCamp Köln
PPTX
The Lotus Code Cookbook
PDF
Ein Entwickler ist mehr als nur ein Applications-Coder | C.Habermueller
PDF
Java & Notes - Mit Eclipse neue Features für Notes entwickeln | C.Habermueller
PDF
Rapid Application Development | C.Habermueller
PDF
FMK2015: Von Skriptparametern Variablen und Globalen by Patrick Risch
Lotusphere 2007 AD505 DevBlast –30 LotusScript Tips
T4 S1 Lotus Notes On Citrix
THE COST OF MOVING TO ADVANCED COLLABORATION
Presenting Data Effectively in XPages - ATLUG May 2013
Binding to multiple datasources on a single xPage
Only an IBM Domino Server can take this much beating and still run
computerarchiv-muenchen.de - Jahrekalender 2017 | C.Habermueller
Fine tuning Lotus Script (german)
Mehr Performance für WordPress - WordCamp Köln
The Lotus Code Cookbook
Ein Entwickler ist mehr als nur ein Applications-Coder | C.Habermueller
Java & Notes - Mit Eclipse neue Features für Notes entwickeln | C.Habermueller
Rapid Application Development | C.Habermueller
FMK2015: Von Skriptparametern Variablen und Globalen by Patrick Risch
Ad

Similar to Advanced Programming With Notes/DominoCOM Classes (20)

PDF
MWLUG 2011: The Never Ending Integration Story
PDF
“Kum Bah Yah” meets “Lets Kick Butt” : The Integration of IBM Lotus Notes and...
PDF
BP214 IBM Lotus Symphony : Finally, A Developer's Friend
PDF
IamLUG 2011: The Never Ending Integration Story: How to Integrate Your Lotus ...
PDF
Building a Cross-Platform Mobile SDK in Rust.pdf
PDF
MMLUG 2009 Integration And Coexistence Session
PPT
Best DotNet Training in Delhi
DOC
Dotnet ch1
PDF
Iam Lug 2009 Integration And Coexistence Session
PDF
TriState LUG 2010 integration and coexistence session
PDF
JMP106 “Kum Bah Yah” Meets “Lets Kick Butt” : The Integration of IBM Lotus No...
PDF
FILEgrain: Transport-Agnostic, Fine-Grained Content-Addressable Container Ima...
PDF
Tri State Lug 2009 - Integration And Coexistence Session
PPT
Introduction to .net
PPT
PPTX
VSTO + LOB Apps
ODP
Plug yourself in and your app will never be the same (2 hour edition)
ODP
Plug yourself in and your app will never be the same (2 hr editon)
PPTX
Session i
PDF
Italian Alt.Net Conference MonoTouch Session
MWLUG 2011: The Never Ending Integration Story
“Kum Bah Yah” meets “Lets Kick Butt” : The Integration of IBM Lotus Notes and...
BP214 IBM Lotus Symphony : Finally, A Developer's Friend
IamLUG 2011: The Never Ending Integration Story: How to Integrate Your Lotus ...
Building a Cross-Platform Mobile SDK in Rust.pdf
MMLUG 2009 Integration And Coexistence Session
Best DotNet Training in Delhi
Dotnet ch1
Iam Lug 2009 Integration And Coexistence Session
TriState LUG 2010 integration and coexistence session
JMP106 “Kum Bah Yah” Meets “Lets Kick Butt” : The Integration of IBM Lotus No...
FILEgrain: Transport-Agnostic, Fine-Grained Content-Addressable Container Ima...
Tri State Lug 2009 - Integration And Coexistence Session
Introduction to .net
VSTO + LOB Apps
Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hr editon)
Session i
Italian Alt.Net Conference MonoTouch Session

More from dominion (20)

PDF
What is a itil and how does it relate to your collaborative environment uklug
PDF
iOS enterprise
PDF
cloud session uklug
ODP
Uklug 2011 administrator development synergy
PDF
Uklug 2011 client management
PDF
JavaScript blast
PDF
Populating your domino directory or any domino database with tivoli directory...
ODP
Uklug2011 Know your Notes
ODP
Quickr
ODP
Taking themes to the next level
ODP
Supersize me
ODP
Aussie outback
PDF
Learning to run
PPT
Implementing xpages extension library
PDF
Abb presentation uklug
PDF
Uklug2011.lotus.on.linux.report.technical.edition.v1.0
PPT
Domino testing presentation
PDF
Composite applications tutorial
PDF
Maximizing application performance
PDF
Error handling in XPages
What is a itil and how does it relate to your collaborative environment uklug
iOS enterprise
cloud session uklug
Uklug 2011 administrator development synergy
Uklug 2011 client management
JavaScript blast
Populating your domino directory or any domino database with tivoli directory...
Uklug2011 Know your Notes
Quickr
Taking themes to the next level
Supersize me
Aussie outback
Learning to run
Implementing xpages extension library
Abb presentation uklug
Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Domino testing presentation
Composite applications tutorial
Maximizing application performance
Error handling in XPages

Recently uploaded (20)

PDF
Hybrid model detection and classification of lung cancer
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
A Presentation on Touch Screen Technology
PPTX
Tartificialntelligence_presentation.pptx
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Hybrid model detection and classification of lung cancer
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TLE Review Electricity (Electricity).pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Getting Started with Data Integration: FME Form 101
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
A comparative study of natural language inference in Swahili using monolingua...
A Presentation on Touch Screen Technology
Tartificialntelligence_presentation.pptx
WOOl fibre morphology and structure.pdf for textiles
1 - Historical Antecedents, Social Consideration.pdf
Group 1 Presentation -Planning and Decision Making .pptx
cloud_computing_Infrastucture_as_cloud_p
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Assigned Numbers - 2025 - Bluetooth® Document
SOPHOS-XG Firewall Administrator PPT.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Advanced Programming With Notes/DominoCOM Classes

  • 1. 3/11/2010 Advanced Programming With Notes/Domino COM Classes EntwicklerCamp, March, 2010 Bob Balaban Looseleaf Software LLC bbalaban@gmail.com Copyright 2010 Looseleaf Software Agenda • Speaker intro • COM and OLE • Notes “front-end” and “back-end” objects • Where can you use Notes COM/OLE classes? • Vb.net • C# • C++ • Why? • Demos and samples • Q &A Copyright 2010 Looseleaf Software 1
  • 2. 3/11/2010 Speaker Introduction • 15+ years as a Lotus/Iris/IBM developer (1-2-3, Notes/Domino) • Wrote the original LotusScript/Java back-end classes (Notes v4.0) • Notes/SAP integration (v7.x, 2006) • 9+ years as an independent consultant/developer/author • Frequent speaker at LUGs and Lotusphere • Many trade journal articles • Expertise in N/D programmability, plugins, J2ee, system integration, messaging, appdev in general Copyright 2010 Looseleaf Software COM – Component Object Model • A way to provide “interfaces” for other code to use • Kind of like Web Services, for Windows programs • “Provider” (“server”): • Create a component in c++ or a .NET language, • Describe the interface in IDL (interface definition language), • Compile IDL to a “type library”, register it under some ID and/or name • COM objects can be DLL or EXE (“in-proc”, “out-of-proc”) • “Consumer” (“client”): • Use Visual Studio (it generates a lot of code for you) • Get an instance of the root object (by ID or name, or…) • Use it to get other objects Copyright 2010 Looseleaf Software 2
  • 3. 3/11/2010 COM, the Big Picture My Program (.exe) IPC Broker IF 1 In-Process Out-of-Process IF 2 Other Some Program Typelib Typelib DLL 1 (.exe) 2 Windows Registry Copyright 2010 Looseleaf Software COM and OLE • Object Linking and Embedding • Very UI-oriented • Standards and practices for putting “live” objects into composite “documents” • ALL based on COM objects • Container (e.g., Word or Notes) supplies embedding interfaces (pre- defined) to the contained object (picture, Visio, something) • Persistent storage, access to menu, location, etc. etc. • Embedded object provides pre-defined interfaces to the container (launch, quiesce, open, save…) • We’re not going to do much with OLE in this session • (too much typing…) Copyright 2010 Looseleaf Software 3
  • 4. 3/11/2010 Notes “Front-end” and “Back-end” • Front-end is UI • NotesUIWorkspace, NotesUIDatabase, etc. • Can only operate in the context of a running Notes Client • (otherwise there’s no UI!) • No equivalent in Java, LotusScript and COM only • Back-end classes have no UI • NotesSession, NotesDatabase, etc. • Can run either in Client or in Server • Java, LotusScript, COM, CORBA Copyright 2010 Looseleaf Software Front-end and Back-end COM • BOTH sets of classes are available to COM-consuming programs • Each one has it’s own “typelib” • Front-end classes launch the Notes Client, “out-of-proc” • “Lotus Notes Automation Classes” library • Back-end classes load the LSXBE DLL “in-proc” • “Lotus Domino Objects” library Copyright 2010 Looseleaf Software 4
  • 5. 3/11/2010 Front-end / Back-end COM libs My COM program NLNOTES.exe IPC Broker Front-end (UIWorkspace, etc.) LSXBE dll Back-end (Session, etc.) Copyright 2010 Looseleaf Software COM Consumers • Use Visual Studio.net! • 2005, 2008 (2003 works, but not as well) • CLR languages (VB.net, C#) • Easy! • C++ - some tricks required Demo 1: Front-end with CLR Demo 2: Back-end with CLR Copyright 2010 Looseleaf Software 5
  • 6. 3/11/2010 Why Do This: Use Cases • You want to write a standalone program (.exe) that uses Notes objects, and you don’t want to write Java • You want to write a standalone program (.exe) that uses front-end objects (not an option with Java) • You’re writing an Extension Manager plugin or Server Addin (or anything that requires C/C++) and want to use higher- level objects than you get in Notes CAPI • You are writing something that requires .NET (ASPX, Web part, whatever) Copyright 2010 Looseleaf Software More Demo Demo 3: Front-end COM in C++ (launch new Memo form in mail db) Demo 4: Back-end COM in C++ (export dxl from a data document) Copyright 2010 Looseleaf Software 6
  • 7. 3/11/2010 Summary • COM is difficult to explain thoroughly • But pretty easy to use • If you get the right tools (Visual Studio!) • COM gives you access to both Front- and Back-end objects from “outside” the product • CLR languages (C#, VB.net) are the easiest to use • C++ also possible, requires a bit of extra work Copyright 2010 Looseleaf Software References • “Essential COM” by Don Box (1988) • The best and most thorough reference on all things COM • “COM Together” – Lotus Redbook, 2000 • http://www.redbooks.ibm.com/abstracts/sg245670.html?Op en • “In Theory” blog – couple of articles on using COM and C# with Notes CAPI • http://www.bobzblog.com Copyright 2010 Looseleaf Software 7
  • 8. 3/11/2010 Questions How to contact me: Bob Balaban (not the actor) bbalaban@gmail.com Blog – http://www.bobzblog.com Copyright 2010 Looseleaf Software 8