SlideShare a Scribd company logo
1 of 65
Download to read offline
JMP102 The Top Things All New IBM Lotus
Domino Developers Need To Know
Kathy Brown | Application Developer
Thomas “Duffbert” Duff | Application Developer
Agenda
●   Coding Best Practices
●   Application Architecture

●   Languages and Features

●   Learning

●   User Interface

●   Everything Else




               2
For the love of all that is holy...
    Option Declare




3
OR




    prevents...
4
5
Comment Your Code
(even the Matrix will have errors somewhere...)

           6
Better than nothing...




                         ... Better still
File >
    Preferences >
       Domino Designer >
           LotusScript Editor >
              Comment Templates
Error Handling... do it!
9
Example #1


10
Option Public
Option Declare
Use "OpenLogFunctions"
Sub Initialize
                                                    Example #2
                                                     OpenLog
     Dim session As New NotesSession
     Dim dbThis As NotesDatabase
     Dim viewThis As NotesView
     Dim docThis As NotesDocument
     Dim dtCutoffDate As NotesDateTime
     Dim varCutoffDate As Variant

     On Error Goto logError
     Call LogEvent("Purge Older Than 4 Months Agent Started", SEVERITY_LOW, Nothing)
      ' <insert your agent code here>

     Call LogEvent("Purge Older Than 4 Months Agent Ended", SEVERITY_LOW, Nothing)
     Exit Sub

logError:
    Call LogError
    Exit Sub
End Sub

                        11
All it takes are these
     two libraries to give you
     what you see below...




12
Thank you, Julian Robichaux, for OpenLog
http://www.openntf.org/projects/pmt.nsf/ProjectLookup/OpenLog
               13
No Hard Coding...
EVER!




  14
Users never change their minds, right?

   Can you change
   “Mommie Dearest”
   to “Mommy Dearest”      Jones made partner.
   in all field options?   We’ve changed the
                           company name.
                           Again.




      15
Good code can be re-used




       16
Hard coding Server Names -

It's the opposite of that sports slogan,

Just Don't Do It.




                            (we'll explain why later...)
         17
Test, Test, Test!
        18
●   Things to consider:
   Print statements in LotusScript
   @Prompt statements in Formula
   alert() in JavaScript
   LotusScript debugger (more to follow on that)
   Don't test your own code
   Test edge cases
   Load test... with more than 20 documents!
   Unfortunately, no xUnit for Notes...

              19
Use the LotusScript Debugger
      (it is your friend!)

   20
Agenda
●   Coding Best Practices

●   Application Architecture

●   Languages and Features

●   Learning

●   User Interface

●   Everything Else




               21
Plan for Replication, Clustering, and Save Conflicts




        22
Server names?
         Local replicas?
     Sequential numbering?
          (Just say no!)
23
Understand Business Requirements




      24
Things to Consider

●   Purpose of project
●   Who are the key players of the project?
●   Who are the end users?
●   Length of time given to complete project
Agenda
●   Coding Best Practices

●   Application Architecture

●   Languages and Features

●   Learning

●   User Interface

●   Everything Else




               27
n:=0;
@While (n > 1; Im:=gonna give you up)




     28
VS.




     VS.
           No Thanks!




29
●   You can use @Formula in Lotusscript with Evaluate
           ' For each document in a Notes database, use a Notes macro to
           ' compute the average for a list of numeric entries in the
           ' NumberList field. Evaluate returns a Variant, and Notes
           ' macros return an array. In this case, the array contains only
           ' 1 element (element 0). For more info, see the Notes
           ' documentation.

             Sub Click(Source As Button)
             ' The macro text must be known at compile time.
Remember Const NotesMacro$ = "@Sum(NumberList) / @Elements(NumberList)"
this line... Dim result As Variant, j As Integer
             Dim db As New NotesDatabase("", "MYSALES.NSF")
             Dim dc As NotesDocumentCollection
             Dim doc As NotesDocument
             Set dc = db.AllDocuments
             For j% = 1 To dc.Count
             Set doc = dc.GetNthDocument(j%)
             result = Evaluate(NotesMacro$, doc)
             MessageBox("Average is " & result(0))
             Next
             End Sub

       ●   And you can use @Formula in Xpages with SSJS!

                     30
LotusScript Is
  Not Scary



     31
32
DXL Is Not
  Scary




    33
DXL lets you view data and design elements in XML
                        format. You can export, transform, and import that XML
                        into and out of your Notes database... Imagine changing
                        all the occurrences of a font name or some other design
                        element by doing a Find/Replace!




But be careful!
DXL does not
have 100%
fidelity, so you
could lose
important data
from your
datab...




                   34
Layers Are
Not Scary




    35
36
Agenda
●   Coding Best Practices

●   Application Architecture

●   Languages and Features

●   Learning

●   User Interface

●   Everything Else




               37
Help! I Need Somebody!
        HELP!



   38
Help! I Need Somebody!




It doesn't matter how many years you've been developing...
F1 Help from Domino Designer is your best-est friend...

             39
Help Is Just a Click Away!




40
Resources:
PlanetLotus - http://www.planetlotus.org
OpenNTF – http://www.openntf.org
Twitter - http://www.twitter.com
DeveloperWorks - http://www.ibm.com/developerworks
Domino Designer Wiki - http://www-10.lotus.com/ldd/ddwiki.nsf
Martin Scott Domino Supersearch -
http://www.martinscott.com/dominosupersearch2.nsf/search?openform
Lotus Discussion Forums -
http://www.ibm.com/developerworks/lotus/community/#publicforums
Domino KnowledgeBase - http://www-01.ibm.com/support/search.wss?
rs=463&tc=SSKTMJ&q=&loc=en-us


JUST ASK!
                    41
42
Agenda
●   Coding Best Practices

●   Application Architecture

●   Languages and Features

●   Learning

●   User Interface

●   Everything Else




               43
It's Important
44
Important: Developers (plumbers) generally aren't very
              good designers (painters)




            45
So Easy, Even a N00b Can Do It!
  46
Low Fidelity Prototyping




       48
Agenda
●   Coding Best Practices

●   Application Architecture

●   Languages and Features

●   Learning

●   User Interface

●   Everything Else




               50
Basic Understanding
Of Admin Concepts




      51
52
Document Everything
          53
   Document the business requirements
   Document changes to the business requirements
   Document your proposed solution to the business
requirements
   Document acceptance/rejection from both you and
the client of proposed solution
   Document time projections
   Document changes to requirements made after time
projections
   Document anything and everything you can think of
             54
Change Control
   Process




        55
Security Through Obscurity...
is not security




       56
You may be familiar with the ACL,
but keep in mind that many design
elements have security too.
          57
Reader Fields




            A Double-Edged Sword
       58
Readers fields can...




                           Negatively affect
Restrict users access         performance

Span more than one field
Gotchas...




  Watch name formats
 Don't let users modify
Always have a back door
Understand Basic Performance Tuning
        61
●   SO many things you can look for...
●

●
    GetNthDocument vs GetNextDocument
●

●   NoCache on @DbLookups
●

●   AutoUpdate on views
●

●   Repeated @DbLookups
●

●   Refreshing form on each field
●

●   View indexing
●

●   @Today in views (@Now also)
●

●   @IsResponseDoc vs. @AllDescendents

                    62
Talk to Papa




    63
Question and Answer Time!

Contact Information:
Kathy Brown - kathysrunningnotes@gmail.com
Blog: Running Notes - http://www.runningnotes.net
Twitter: kjbrown13

Thomas “Duffbert” Duff - duffbert@gmail.com
Blog: Duffbert's Random Musings - http://www.duffbert.com
Twitter: duffbert




Don't forget to turn in your session evaluations! This was session JMP102 – Top Things All
New Notes and Domino Developers Need To Know
●  Legal Disclaimer
        ●
                 © IBM Corporation 2009. All Rights Reserved.
●
 The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS
IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for
any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or
representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.
●
 References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this
presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing
contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.
●Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon
many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be
given that an individual user will achieve results similar to those stated here.
●IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International Business Machines Corporation in the United States, other
countries, or both. Unyte is a trademark of WebDialogs, Inc., in the United States, other countries, or both.
●   Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

●   Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.

●
    UNIX is a registered trademark of The Open Group in the United States and other countries.

●
    Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
●
    Other company, product, or service names may be trademarks or service marks of others.




                                            65

More Related Content

What's hot

Margareth lota
Margareth lotaMargareth lota
Margareth lotamaggybells
 
Az ve Öz Kotlin - Beyza KOYULMUS
 Az ve Öz Kotlin - Beyza KOYULMUS Az ve Öz Kotlin - Beyza KOYULMUS
Az ve Öz Kotlin - Beyza KOYULMUSBeyzaKOYULMUS
 
Agile development with Ruby
Agile development with RubyAgile development with Ruby
Agile development with Rubykhelll
 
Database Refactoring
Database RefactoringDatabase Refactoring
Database RefactoringAnton Keks
 
From Programming to Modeling And Back Again
From Programming to Modeling And Back AgainFrom Programming to Modeling And Back Again
From Programming to Modeling And Back AgainMarkus Voelter
 

What's hot (6)

Margareth lota
Margareth lotaMargareth lota
Margareth lota
 
Az ve Öz Kotlin - Beyza KOYULMUS
 Az ve Öz Kotlin - Beyza KOYULMUS Az ve Öz Kotlin - Beyza KOYULMUS
Az ve Öz Kotlin - Beyza KOYULMUS
 
Agile development with Ruby
Agile development with RubyAgile development with Ruby
Agile development with Ruby
 
Programming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd editionProgramming and problem solving with c++, 3rd edition
Programming and problem solving with c++, 3rd edition
 
Database Refactoring
Database RefactoringDatabase Refactoring
Database Refactoring
 
From Programming to Modeling And Back Again
From Programming to Modeling And Back AgainFrom Programming to Modeling And Back Again
From Programming to Modeling And Back Again
 

Viewers also liked

Mooi Werk Middag 2015 - Case Machteld Buit
Mooi Werk Middag 2015 - Case Machteld BuitMooi Werk Middag 2015 - Case Machteld Buit
Mooi Werk Middag 2015 - Case Machteld Buitde baaningenieurs.
 
Sgp powerpoint notes
Sgp powerpoint notesSgp powerpoint notes
Sgp powerpoint notesDan Kohl
 
Improving Domino Designer ICON UK
Improving Domino Designer ICON UKImproving Domino Designer ICON UK
Improving Domino Designer ICON UKKathy Brown
 
UKLUG - Open The Toolbox - Tools for the Domino Developer
UKLUG - Open The Toolbox - Tools for the Domino DeveloperUKLUG - Open The Toolbox - Tools for the Domino Developer
UKLUG - Open The Toolbox - Tools for the Domino DeveloperKathy Brown
 
BP208 Fabulous Feats with @Formula
BP208 Fabulous Feats with @FormulaBP208 Fabulous Feats with @Formula
BP208 Fabulous Feats with @FormulaKathy Brown
 
Final Sgp powerpoint
Final Sgp powerpointFinal Sgp powerpoint
Final Sgp powerpointDan Kohl
 
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
10 Lines or Less; Interesting Things You Can Do In Java With Minimal CodeKathy Brown
 
Mooi Werk Middag 2015 - De meerwaarde van tooldata
Mooi Werk Middag 2015 - De meerwaarde van tooldataMooi Werk Middag 2015 - De meerwaarde van tooldata
Mooi Werk Middag 2015 - De meerwaarde van tooldatade baaningenieurs.
 
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014Kathy Brown
 
Learning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersLearning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersKathy Brown
 
Sgp powerpoint notes
Sgp powerpoint notesSgp powerpoint notes
Sgp powerpoint notesDan Kohl
 
Presentazione Mongolia
Presentazione MongoliaPresentazione Mongolia
Presentazione Mongolialucabass85
 
XPages: No Experience Needed
XPages: No Experience NeededXPages: No Experience Needed
XPages: No Experience NeededKathy Brown
 
Don't Roll Your Own, Integrate
Don't Roll Your Own, IntegrateDon't Roll Your Own, Integrate
Don't Roll Your Own, IntegrateKathy Brown
 
Twitter Bootstrap
Twitter BootstrapTwitter Bootstrap
Twitter BootstrapKathy Brown
 
Sgp presentation
Sgp presentationSgp presentation
Sgp presentationDan Kohl
 
Using Dashboards to Transform Application Data Visualization
Using Dashboards to Transform Application Data VisualizationUsing Dashboards to Transform Application Data Visualization
Using Dashboards to Transform Application Data VisualizationKathy Brown
 
Tools for the Domino Developer - BLUG presentation version
Tools for the Domino Developer - BLUG presentation versionTools for the Domino Developer - BLUG presentation version
Tools for the Domino Developer - BLUG presentation versionKathy Brown
 

Viewers also liked (18)

Mooi Werk Middag 2015 - Case Machteld Buit
Mooi Werk Middag 2015 - Case Machteld BuitMooi Werk Middag 2015 - Case Machteld Buit
Mooi Werk Middag 2015 - Case Machteld Buit
 
Sgp powerpoint notes
Sgp powerpoint notesSgp powerpoint notes
Sgp powerpoint notes
 
Improving Domino Designer ICON UK
Improving Domino Designer ICON UKImproving Domino Designer ICON UK
Improving Domino Designer ICON UK
 
UKLUG - Open The Toolbox - Tools for the Domino Developer
UKLUG - Open The Toolbox - Tools for the Domino DeveloperUKLUG - Open The Toolbox - Tools for the Domino Developer
UKLUG - Open The Toolbox - Tools for the Domino Developer
 
BP208 Fabulous Feats with @Formula
BP208 Fabulous Feats with @FormulaBP208 Fabulous Feats with @Formula
BP208 Fabulous Feats with @Formula
 
Final Sgp powerpoint
Final Sgp powerpointFinal Sgp powerpoint
Final Sgp powerpoint
 
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
 
Mooi Werk Middag 2015 - De meerwaarde van tooldata
Mooi Werk Middag 2015 - De meerwaarde van tooldataMooi Werk Middag 2015 - De meerwaarde van tooldata
Mooi Werk Middag 2015 - De meerwaarde van tooldata
 
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
 
Learning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersLearning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client Developers
 
Sgp powerpoint notes
Sgp powerpoint notesSgp powerpoint notes
Sgp powerpoint notes
 
Presentazione Mongolia
Presentazione MongoliaPresentazione Mongolia
Presentazione Mongolia
 
XPages: No Experience Needed
XPages: No Experience NeededXPages: No Experience Needed
XPages: No Experience Needed
 
Don't Roll Your Own, Integrate
Don't Roll Your Own, IntegrateDon't Roll Your Own, Integrate
Don't Roll Your Own, Integrate
 
Twitter Bootstrap
Twitter BootstrapTwitter Bootstrap
Twitter Bootstrap
 
Sgp presentation
Sgp presentationSgp presentation
Sgp presentation
 
Using Dashboards to Transform Application Data Visualization
Using Dashboards to Transform Application Data VisualizationUsing Dashboards to Transform Application Data Visualization
Using Dashboards to Transform Application Data Visualization
 
Tools for the Domino Developer - BLUG presentation version
Tools for the Domino Developer - BLUG presentation versionTools for the Domino Developer - BLUG presentation version
Tools for the Domino Developer - BLUG presentation version
 

Similar to Top Tips Every Notes Developer Needs To Know

BP206 - Let's Give Your LotusScript a Tune-Up
BP206 - Let's Give Your LotusScript a Tune-Up BP206 - Let's Give Your LotusScript a Tune-Up
BP206 - Let's Give Your LotusScript a Tune-Up Craig Schumann
 
Oh the compilers you'll build
Oh the compilers you'll buildOh the compilers you'll build
Oh the compilers you'll buildMark Stoodley
 
Introduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerNaoto Ono
 
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.Chris Laning
 
The View - The top 30 Development tips
The View - The top 30 Development tipsThe View - The top 30 Development tips
The View - The top 30 Development tipsBill Buchan
 
Blueprints: Introduction to Python programming
Blueprints: Introduction to Python programmingBlueprints: Introduction to Python programming
Blueprints: Introduction to Python programmingBhalaji Nagarajan
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy CodeAndrea Polci
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code cleanBrett Child
 
Autotools, Design Patterns and more
Autotools, Design Patterns and moreAutotools, Design Patterns and more
Autotools, Design Patterns and moreVicente Bolea
 
Lotusphere 2007 AD505 DevBlast 30 LotusScript Tips
Lotusphere 2007 AD505 DevBlast 30 LotusScript TipsLotusphere 2007 AD505 DevBlast 30 LotusScript Tips
Lotusphere 2007 AD505 DevBlast 30 LotusScript TipsBill Buchan
 
BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32OpenEBS
 
On component interface
On component interfaceOn component interface
On component interfaceLaurence Chen
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleikram_ahamed
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmerLeylimYaln
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5SSW
 

Similar to Top Tips Every Notes Developer Needs To Know (20)

BP206 - Let's Give Your LotusScript a Tune-Up
BP206 - Let's Give Your LotusScript a Tune-Up BP206 - Let's Give Your LotusScript a Tune-Up
BP206 - Let's Give Your LotusScript a Tune-Up
 
Lug
LugLug
Lug
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
 
Oh the compilers you'll build
Oh the compilers you'll buildOh the compilers you'll build
Oh the compilers you'll build
 
Introduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debugger
 
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.
 
The View - The top 30 Development tips
The View - The top 30 Development tipsThe View - The top 30 Development tips
The View - The top 30 Development tips
 
Blueprints: Introduction to Python programming
Blueprints: Introduction to Python programmingBlueprints: Introduction to Python programming
Blueprints: Introduction to Python programming
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code clean
 
Autotools, Design Patterns and more
Autotools, Design Patterns and moreAutotools, Design Patterns and more
Autotools, Design Patterns and more
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Ad505 dev blast
Ad505 dev blastAd505 dev blast
Ad505 dev blast
 
Lotusphere 2007 AD505 DevBlast 30 LotusScript Tips
Lotusphere 2007 AD505 DevBlast 30 LotusScript TipsLotusphere 2007 AD505 DevBlast 30 LotusScript Tips
Lotusphere 2007 AD505 DevBlast 30 LotusScript Tips
 
BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32
 
On component interface
On component interfaceOn component interface
On component interface
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5
 

Top Tips Every Notes Developer Needs To Know

  • 1. JMP102 The Top Things All New IBM Lotus Domino Developers Need To Know Kathy Brown | Application Developer Thomas “Duffbert” Duff | Application Developer
  • 2. Agenda ● Coding Best Practices ● Application Architecture ● Languages and Features ● Learning ● User Interface ● Everything Else 2
  • 3. For the love of all that is holy... Option Declare 3
  • 4. OR prevents... 4
  • 5. 5
  • 6. Comment Your Code (even the Matrix will have errors somewhere...) 6
  • 7. Better than nothing... ... Better still
  • 8. File > Preferences > Domino Designer > LotusScript Editor > Comment Templates
  • 11. Option Public Option Declare Use "OpenLogFunctions" Sub Initialize Example #2 OpenLog Dim session As New NotesSession Dim dbThis As NotesDatabase Dim viewThis As NotesView Dim docThis As NotesDocument Dim dtCutoffDate As NotesDateTime Dim varCutoffDate As Variant On Error Goto logError Call LogEvent("Purge Older Than 4 Months Agent Started", SEVERITY_LOW, Nothing) ' <insert your agent code here> Call LogEvent("Purge Older Than 4 Months Agent Ended", SEVERITY_LOW, Nothing) Exit Sub logError: Call LogError Exit Sub End Sub 11
  • 12. All it takes are these two libraries to give you what you see below... 12
  • 13. Thank you, Julian Robichaux, for OpenLog http://www.openntf.org/projects/pmt.nsf/ProjectLookup/OpenLog 13
  • 15. Users never change their minds, right? Can you change “Mommie Dearest” to “Mommy Dearest” Jones made partner. in all field options? We’ve changed the company name. Again. 15
  • 16. Good code can be re-used 16
  • 17. Hard coding Server Names - It's the opposite of that sports slogan, Just Don't Do It. (we'll explain why later...) 17
  • 19. Things to consider:  Print statements in LotusScript  @Prompt statements in Formula  alert() in JavaScript  LotusScript debugger (more to follow on that)  Don't test your own code  Test edge cases  Load test... with more than 20 documents!  Unfortunately, no xUnit for Notes... 19
  • 20. Use the LotusScript Debugger (it is your friend!) 20
  • 21. Agenda ● Coding Best Practices ● Application Architecture ● Languages and Features ● Learning ● User Interface ● Everything Else 21
  • 22. Plan for Replication, Clustering, and Save Conflicts 22
  • 23. Server names? Local replicas? Sequential numbering? (Just say no!) 23
  • 25.
  • 26. Things to Consider ● Purpose of project ● Who are the key players of the project? ● Who are the end users? ● Length of time given to complete project
  • 27. Agenda ● Coding Best Practices ● Application Architecture ● Languages and Features ● Learning ● User Interface ● Everything Else 27
  • 28. n:=0; @While (n > 1; Im:=gonna give you up) 28
  • 29. VS. VS. No Thanks! 29
  • 30. You can use @Formula in Lotusscript with Evaluate ' For each document in a Notes database, use a Notes macro to ' compute the average for a list of numeric entries in the ' NumberList field. Evaluate returns a Variant, and Notes ' macros return an array. In this case, the array contains only ' 1 element (element 0). For more info, see the Notes ' documentation. Sub Click(Source As Button) ' The macro text must be known at compile time. Remember Const NotesMacro$ = "@Sum(NumberList) / @Elements(NumberList)" this line... Dim result As Variant, j As Integer Dim db As New NotesDatabase("", "MYSALES.NSF") Dim dc As NotesDocumentCollection Dim doc As NotesDocument Set dc = db.AllDocuments For j% = 1 To dc.Count Set doc = dc.GetNthDocument(j%) result = Evaluate(NotesMacro$, doc) MessageBox("Average is " & result(0)) Next End Sub ● And you can use @Formula in Xpages with SSJS! 30
  • 31. LotusScript Is Not Scary 31
  • 32. 32
  • 33. DXL Is Not Scary 33
  • 34. DXL lets you view data and design elements in XML format. You can export, transform, and import that XML into and out of your Notes database... Imagine changing all the occurrences of a font name or some other design element by doing a Find/Replace! But be careful! DXL does not have 100% fidelity, so you could lose important data from your datab... 34
  • 36. 36
  • 37. Agenda ● Coding Best Practices ● Application Architecture ● Languages and Features ● Learning ● User Interface ● Everything Else 37
  • 38. Help! I Need Somebody! HELP! 38
  • 39. Help! I Need Somebody! It doesn't matter how many years you've been developing... F1 Help from Domino Designer is your best-est friend... 39
  • 40. Help Is Just a Click Away! 40
  • 41. Resources: PlanetLotus - http://www.planetlotus.org OpenNTF – http://www.openntf.org Twitter - http://www.twitter.com DeveloperWorks - http://www.ibm.com/developerworks Domino Designer Wiki - http://www-10.lotus.com/ldd/ddwiki.nsf Martin Scott Domino Supersearch - http://www.martinscott.com/dominosupersearch2.nsf/search?openform Lotus Discussion Forums - http://www.ibm.com/developerworks/lotus/community/#publicforums Domino KnowledgeBase - http://www-01.ibm.com/support/search.wss? rs=463&tc=SSKTMJ&q=&loc=en-us JUST ASK! 41
  • 42. 42
  • 43. Agenda ● Coding Best Practices ● Application Architecture ● Languages and Features ● Learning ● User Interface ● Everything Else 43
  • 45. Important: Developers (plumbers) generally aren't very good designers (painters) 45
  • 46. So Easy, Even a N00b Can Do It! 46
  • 47.
  • 49.
  • 50. Agenda ● Coding Best Practices ● Application Architecture ● Languages and Features ● Learning ● User Interface ● Everything Else 50
  • 52. 52
  • 54. Document the business requirements  Document changes to the business requirements  Document your proposed solution to the business requirements  Document acceptance/rejection from both you and the client of proposed solution  Document time projections  Document changes to requirements made after time projections  Document anything and everything you can think of 54
  • 55. Change Control Process 55
  • 57. You may be familiar with the ACL, but keep in mind that many design elements have security too. 57
  • 58. Reader Fields A Double-Edged Sword 58
  • 59. Readers fields can... Negatively affect Restrict users access performance Span more than one field
  • 60. Gotchas... Watch name formats Don't let users modify Always have a back door
  • 62. SO many things you can look for... ● ● GetNthDocument vs GetNextDocument ● ● NoCache on @DbLookups ● ● AutoUpdate on views ● ● Repeated @DbLookups ● ● Refreshing form on each field ● ● View indexing ● ● @Today in views (@Now also) ● ● @IsResponseDoc vs. @AllDescendents 62
  • 64. Question and Answer Time! Contact Information: Kathy Brown - kathysrunningnotes@gmail.com Blog: Running Notes - http://www.runningnotes.net Twitter: kjbrown13 Thomas “Duffbert” Duff - duffbert@gmail.com Blog: Duffbert's Random Musings - http://www.duffbert.com Twitter: duffbert Don't forget to turn in your session evaluations! This was session JMP102 – Top Things All New Notes and Domino Developers Need To Know
  • 65. ● Legal Disclaimer ● © IBM Corporation 2009. All Rights Reserved. ● The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. ● References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. ●Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here. ●IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International Business Machines Corporation in the United States, other countries, or both. Unyte is a trademark of WebDialogs, Inc., in the United States, other countries, or both. ● Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. ● Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. ● UNIX is a registered trademark of The Open Group in the United States and other countries. ● Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. ● Other company, product, or service names may be trademarks or service marks of others. 65