Learning To Run - XPages for Lotus Notes Client Developers


Published on

You’re an experienced Lotus Notes developer. You’ve been doing “classic” development for years. You know LotusScript better than your native language. You know @Formula like the back of your hand. But when it comes to Xpages and Javascript, you feel like you’re learning to walk all over again. This session will cover some tips and tricks to get you up and running in Xpages. Learn how to translate what you already know, into what you need to know for Xpages. Find out where to get the information to be just as skillful at Xpages as you are with Notes client development.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Learning To Run - XPages for Lotus Notes Client Developers

  1. 1. Learning To Run -XPages for Lotus Notes Client DevelopersAn IdoSphere webinarPresented by: Kathy Brown
  2. 2. Who am I... Kathy Brown Lotus Notes Developer, primarily for the Notes client, until recently Author for The View Co-author of the Lotus User Group’s Notes Developer Tips Newsletter Speaker at Lotusphere, The View’s Developer conference and several LUGs Twitter addict Runner
  3. 3. What this session is... Tips and transitions for Notes client developers
  4. 4. What this session is not... A step-by-step how to Best practices Advanced topics
  5. 5. What We’ll Cover Building Blocks Languages More
  6. 6. Building Blocks Forms Views Subforms Framesets Outlines Pages
  7. 7. Building Blocks Xpages Core controls Container controls Custom controls
  8. 8. Separation of Data and UI Traditional Notes Dev Forms combined data and UI Xpages Separate data from UI Create forms just as data holders, no need to prettify Create views for lookups, no need to prettify (no need for dual sorting!)
  9. 9. Customer NameCustomer IDCustomer AddressCustomer Purchases Customer Name Customer Address Widget ID Widget Name Widget Description Widget ID Widget Name Widget Description Widget Image
  10. 10. Data binding Because the data and the UI are separate, we have to “bind” data to our elements Xpage Can define a domino document or view as a data source Custom Controls and Container Controls like Panel Can define a domino document or view as a data source Repeat Controls and certain Core Controls Use data binding
  11. 11. Data binding Simple data binding Select a source from a list, or add another Select an item to bind to Example: select a document from the source and a field from that document to bind to Javascript Utilize the JavaScript editor to write server side javascript Example: database.getView("movies by genre").getAllDocumentsByKey(genre); Advanced Use expression language, scoped variable, component parameter or custom code for data binding
  12. 12. DDE
  13. 13. Quick Tip Window --> Reset Perspective is your friend
  14. 14. The Outline Easily locate items on the Xpage Drag & Drop items to new locations
  15. 15. Source Easily change values or properties See the Matrix
  16. 16. Design pane NOT DONE
  17. 17. Properties
  18. 18. Core Controls
  19. 19. What’s with the “group”controls?
  20. 20. Something familiar**Sort of Edit Box Rich Text Multiline Edit Box List Box Combo Box
  21. 21. Quick Tip When adding @formula values for a combo box (or list box) the default condition is “Compute on Page Load” Remember to change that to “Compute Dynamically” in the script editor OR go to the source and change the “$” to “#”
  22. 22. More Core Controls
  23. 23. Core Controls - Label Why Use a Label? More control More programmability
  24. 24. Core Controls - Errors Use to ... display errors Don’t forget to remove!
  25. 25. Panel Control Sort of, kind of, like a layer... on steroids. Or like an embedded view... on steroids. Or like if a layer and an embedded view had a baby.
  26. 26. Repeat Controls No Traditional Notes Client equivalent And that’s a good thing A repeat control allows you to put controls inside (like Edit boxes or computed values, but also more repeat controls!) that repeat on the page
  27. 27. Container Controls Include Page - allows you to include an Xpage inside another Xpage Table - We know all about this one! View - kind of like an embedded view, but better Tabbed Panel - multiple panels with...tabs! Section - We’ve seen this before, too
  28. 28. Custom Controls Closest traditional equivalent are subforms Create custom controls to hold other controls stored together Can be a “create once, use multiple times” control for footers or headers, for example
  29. 29. Quick Tip CTRL+SHIFT+F in the source
  30. 30. @Formula in XPages @Formula is available for use in Server Side JavaScript (SSJS) Not all @Formula are supported in XPages
  31. 31. @Functions Not Supported inXPages @AbstractSimple @CheckAlarms @DeleteField @DoWhile @Accessed @CheckFormulaSyntax @DialogBox @EditECL @ACos @Command @DocChildren @EditUserECL @AddToFolder @Compare @DocDescendants @EnableAlarms @AdminECLIsLocked @ConfigFile @DocFields @Environment @All @Cos @DocLength @Eval @AllChildren @DB2Schema @DocLevel @Exp @AllDescendants @DbCommand @DocLock @FileDir @Ascii @DbExists @DocMark @FloatEq @ASin @DbManager @DocNumber @FontList @ATan @DDEExecute @DocOmmittedLength @For @ATan2 @DDEInitiate @DocParentNumber @FormLanguage @BrowserInfo @DDEPoke @DocSiblings @GetAddressBooks @BusinessDays @DDETerminate @DocumentUniqueID @GetCurrentTimeZone @Certificate @DeleteDocument @Domain @GetDocField
  32. 32. @Functions Not Supported inXPages (cont.)@GetFocusTable @IsDocBeingRecalculated @Locale @OrgDir@GetHTTPHeader @IsDocTruncated @Log @Password@GetIMContactListGroupNames @IsEmbeddedInsideWCT @MailDbName @PasswordQuality@GetPortsList @IsExpandable @MailEncryptSavedPreference @Pi@GetProfileField @IsInCompositeApp @MailEncryptSentPreference @PickList@GetViewInfo @IsModalHelp @MailSavePreference @Platform@HardDeleteDocument @IsUsingJavaElement @MailSend @PolicyIsFieldLocked@HashPassword @IsValid @MailSignPreference @PostedCommand@InheritedDocumentUniqueID @IsVirtualizedDirectory @Matches @Power@IsAgentEnabled @Keywords @NameLookup @Prompt@IsAppInstalled @LanguagePreference @Narrow @RefreshECL@IsCategory @LaunchApp @NoteID @RegQueryValue@IsDB2 @LDAPServer @Nothing @Responses@IsDocBeingEdited @Like @OpenInNewWindow @ServerAccess@IsDocBeingMailed @Ln @OptimizeMailAddress @ServerName
  33. 33. @Functions Not Supported inXPages (cont.) @Set @TemplateVersion @URLHistory @ViewTitle @SetDocField @ThisName @URLOpen @WebDbName @SetEnvironment @ThisValue @UrlQueryString @WhichFolders @SetHTTPHeader @TimeMerge @UserAccess @While @SetProfileField @TimeToTextInZone @UserNameLanguage @Wide @SetTargetFrame @TimeZoneToText @UserNamesList @Zone @SetViewInfo @ToNumber @UserPrivileges DEFAULT @ShowParentPreview @ToTime @UserRoles ENVIRONMENT @Sign @Transform @V2If FIELD @Sin @Unavailable @V3UserName REM @Sort @UndeleteDocument @V4UserAccess SELECT @Soundex @UpdateFormulaContext @ValidateInternetAddress @Sqrt @URLDecode @VerifyPassword @StatusBar @URLEncode @Version @Tan @URLGetHeader @ViewShowThisUnread
  34. 34. @Formula Syntax Three syntactic changes to use @Formula in XPages: Use commas rather than semicolons Use exact case Example: var uname = @Name(“[CN]”, @UserName()) “null” should be used in place of 0 for formulas such as @Adjust Example: var adate = @Adjust (@Created(), null, null, 5, null, null, null)
  35. 35. @Formula Help
  36. 36. @Formula Help Help file is not very helpful! @Name(“[CN]”, name) – needs those quotes! But there is no example in the help file to demonstrate that! @UserName() – needs those parentheses! Again, no example in the help file to show that!
  37. 37. @Name in Help
  38. 38. Server Side Javascript(SSJS) Server Side JavaScript is not LotusScript Close enough to fool you Get this - http://bit.ly/XpagesMap Learn about recycling http://bit.ly/Recycle1 http://bit.ly/Recycle2
  39. 39. Close...
  40. 40. But not quite
  41. 41. Scoped Variables applicationScope sessionScope viewScope requestScope
  42. 42. Xpages Domino Object Map
  43. 43. Quick Tip Turn off “Synchronize Navigator with Editor Tab”
  44. 44. CSS and Themes Roll your own or Start with a framework* http://bit.ly/XpageFramework http://blueprintcss.org/ David Leedy may cover this in his session *Start with a framework
  45. 45. Firebug
  46. 46. Where to get help...or not Help files not so helpful http://www-10.lotus.com/ldd/ddwiki.nsf http://www-10.lotus.com/ldd/ddwiki.nsf/dx/ NotesDocumentCollection_sample_JavaScript_code_for _XPages
  47. 47. Quick Tip Create different search scopes for the Help file
  48. 48. Learn Javascript andJava Javascript http://www.w3schools.com/js/default.asp http://bit.ly/JavaScriptDefinitive Java http://bit.ly/HeadFirstJava
  49. 49. Test Server - Get one Typical Lotus Client development can get away with “testing” on a production server Doing that with Xpages...
  50. 50. Sample applications - get some Download applications and dig through them to see how they were created Frameworks on OpenNTF Matt White and Tim Clark’s Show and Tell sample app
  51. 51. Quick Tip Turn on “Select controls dialog box”
  52. 52. Quick Tip Visible versus Hide When
  53. 53. Quick Tip Upgrade whenever possible
  54. 54. Quick Tip Learn Eclipse
  55. 55. Resources http://xpages101.net/ http://notesin9.com/ Wikis - see earlier slide http://xpag.es/?cheatsheet PlanetLotus.org OpenNTF.org TLCC.com http://bit.ly/fIlpHn - all the bit.ly links bundled
  56. 56. THANK YOU!Any Questions? Your Logo
  57. 57. Kathy BrownHow to contact me: •E-mail: kathy@runningnotes.net •Twitter: kjbrown13 or NotesDevTips •My Website: http://runningnotes.net The Consultant in your Pocket webcast series: find us at http://consultantinyourpocket.com