You are previewing IBM Lotus Domino: Classic Web Application Development Techniques.
O'Reilly logo
IBM Lotus Domino: Classic Web Application Development Techniques

Book Description

This tutorial takes Domino developers on a straight path through the jungle of techniques to deploy applications on the web and introduces you to the classic strategies. Why Google it when it's all here?

  • Classic techniques used for Web-enabling traditional Domino applications

  • Demonstrates how to incorporate HTML, CSS and JavaScript into designs

  • Offers tips and suggestions for testing, debugging, and troubleshooting

  • Organized, easy to read, and well-illustrated, with numerous code examples

  • Instructions valid for Domino versions 6, 7, and 8

  • In Detail

    Domino is an application server that can be used as a standalone web server. As part of the Domino suite, it provides a powerful collaborative platform for the development of customized business applications. It provides enterprise-grade e-mail, messaging, and scheduling capabilities.

    There are many novice and moderately experienced developers who would like to enhance a Web-enabled Domino application, but to do so they need to learn the fundamentals of HTML, CSS, and JavaScript, and also how to use those technologies in the context of a Domino application. Information about how to do this is available on the Web, but the sheer volume of that information makes it very difficult for the newbie to get started.

    Topics and techniques presented in this book provide a comprehensive overview of all major design strategies used to Web-enable traditional Domino applications. Illustrations provide clear working examples of how HTML, CSS, and JavaScript can be incorporated into existing applications to improve both look and performance.

    Early chapters provide suggestions for working with users and for managing your development time and effort. Later chapters focus in detail on forms and pages, views, navigation, agents, security, performance, and troubleshooting. Examples demonstrate clearly how to incorporate HTML, CSS, and JavaScript into Domino designs. By the end of this book you will have learned what you need to know to quickly and competently tackle web application enhancement tasks.

    Beyond providing a good understanding, this book will continue to serve as a valuable source of ideas and techniques. This book brings together essential classic strategies and techniques used to deploy Domino applications to the Web. Chapters cover all major design elements, with a special emphasis on how to craft these elements to work well with web browsers. Many topics include alternative techniques for solving particular problems. Illustrations and examples can be used where appropriate, or they can serve as jumping off points for your own solutions.

    Classic and timeless tips and techniques for Web-enabling traditional Lotus Domino applications

    Table of Contents

    1. IBM Lotus Domino: Classic Web Application Development Techniques
      1. IBM Lotus Domino: Classic Web Application Development Techniques
      2. Credits
      3. About the Author
      4. About the Reviewers
      5. www.PacktPub.com
              1. Support files, eBooks, discount offers and more
              2. Why Subscribe?
              3. Free Access for Packt account holders
              4. Instant Updates on New Packt Books
      6. Preface
        1. Getting started
        2. What this book covers
        3. What you need for this book
        4. Who this book is for
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      7. 1. Preparation and Habits
        1. Preparing yourself as a developer
          1. Gather a list of public websites that use Domino
          2. Get certified in Lotus Notes / Domino application development
          3. Use Domino Help
          4. Consider using external editors and development tools
          5. Create sandbox applications
          6. Create a personal cookbook
            1. Create a personal document library
            2. Create a website
          7. Adopt new language and terms
          8. Pay attention to web programming developments and practices
        2. Standardizing applications
          1. Abide by your organization's web development guidelines
            1. Usability
            2. Style
            3. Mechanics and process
          2. Create libraries of common resources
        3. Planning your work
          1. Take notes
          2. Use to-do lists
            1. Keep a list of all active projects and tasks
          3. Report your progress
        4. Working the project
          1. Work with users, not against them
            1. Identify the champion and other players
            2. Don't start without clear requirements
            3. Understand the budget and timeline; provide an estimate
            4. Avoid scope creep
            5. Assume that all Notes applications will be web-enabled in the future
          2. Familiarize yourself with an unknown design
          3. Assess an existing application for web enablement
            1. Think like a user
            2. Think like a developer
            3. Write a report
          4. Keep an issues log
          5. Improve the application under the covers
            1. Enhance performance wherever possible
            2. Add error trapping
            3. Add diagnostic and repair aids
          6. Provide the customer with a summary of changes
        5. Documenting your applications
            1. Add comments to the code
            2. Create internal developer notes
            3. Add release notes to the About document
            4. Include external documentation in the design as file resources
            5. Create user-oriented help pages
        6. Summary
      8. 2. Design and Development Strategies
        1. Planning the design
          1. Understand the scope of the project
          2. Annotate the requirements document
          3. Understand the workflow
          4. Determine the need to access external databases
          5. Decide on one database or several
          6. Review existing designs
          7. Copy the design of an existing application
          8. Evaluate the security needs of the application
        2. Using consistent naming conventions
          1. Name databases so that URLs are easy to remember
          2. Use standard versioning for design templates
          3. Use standard versioning for major design elements
          4. Use unique names for all major design elements
            1. Name design elements sensibly
            2. Name form fields consistently and appropriately
          5. Create different versions of design elements for Notes and the Web
          6. Name Domino groups and roles appropriately
            1. Use Domino groups and roles appropriately
            2. Name roles consistent with other applications
        3. Attending to human factor issues
          1. Create clean and flexible designs
          2. Design for specific display characteristics
          3. Design for accessibility
          4. Add titles to pages, forms, and framesets
          5. Optimize the use of images
            1. Use image resources instead of pasted images
        4. Using appropriate design elements and techniques
          1. Consider alternate design strategies
          2. Learn the Properties dialog box
          3. Use hide-when formulas
          4. Avoid using the Java applets
          5. Avoid server refresh round trips
          6. Conform to HTML standards
            1. Avoid using non-standard, deprecated, and invalid HTML tags
            2. Avoid using HTML formatting tags
          7. Use configuration documents
        5. Developer testing
          1. Add diagnostic and repair tools
          2. Set up test IDs
          3. Test with browsers used by your users
          4. Clear the browser cache
        6. Promoting the design from testing to production
          1. Use a staging server for user acceptance testing
          2. Segregate administrative and developer duties
            1. Request that templates be signed by an authorized signing ID
            2. Understand how templates are applied to production applications
        7. Reviewing other sources of help
          1. Read the Notes and Domino release notes
        8. Summary
      9. 3. Forms and Pages
        1. Setting properties appropriately
          1. Set the content type (MIME) property
            1. Take full control with content type HTML
          2. Leave the "Use JavaScript when generating pages" option enabled
          3. Generate HTML for all fields
        2. Opening forms and pages directly
        3. Viewing the source in a browser to investigate anomalies
        4. Composing and saving documents
          1. Create documents
          2. Edit documents
          3. Save documents
            1. Save documents using $$Return to specify the next page
            2. Save documents using a WebQuerySave agent to specify the next page
        5. Improving the layout of design elements
          1. Identify all HTML tags
          2. Use view template forms to display views
          3. Use framesets for layout
          4. Use <div> tags to replace framesets
          5. Align fields
            1. Use tables to align fields
            2. Use <div> and <label> tags to align fields
            3. Use <fieldset> and <legend> tags to group related fields
        6. Using computed text
          1. Display a customized title bar
          2. Display customized messages
        7. Using hidden computed fields
          1. Add fields to provide access to key document attributes
          2. Access CGI variables
          3. Improve @DbLookup and @DbColumn formulas
        8. Using HTML to add value to a form or page
          1. Use special fields
          2. Convert between Notes and HTML
        9. Creating pseudo Action Bars for the Web
        10. Summary
      10. 4. Navigation
        1. General precautions
          1. Do not hardcode URLs, filenames, or UNIDs
            1. Use @WebDbName
            2. Use $Ref
          2. Use a "go forward" navigational strategy on the Web
          3. Avoid generating complex dynamic pages
        2. Application launch options
          1. Launch the About document
          2. Launch a specific homepage
          3. Launch a frameset
          4. Launch a view
          5. Launch a form
          6. Launch a graphical navigator
          7. Launch documents in context using Auto Frame
        3. Creating a custom application login form
        4. Creating menus
          1. Create Hotspots
          2. Create menus with outlines
          3. Create menus with tables
          4. Create menus with HTML and CSS
          5. Create dynamic menus with views
        5. Displaying a design element after exiting a document
          1. Use $$Return to select a design element
          2. Display the previous view
          3. Display the parent document
        6. Using response forms for interim workflow steps
        7. Coding default error pages
        8. Providing directions and help
          1. Add meaningful labels and guidance text
          2. Add titles to design elements
          3. Link to the About and Using documents
          4. Add customized help pages
        9. Opening another application in a separate window or tab
        10. Summary
      11. 5. Cascading Style Sheets
        1. Using CSS for styling design elements on the Web
          1. Learn basic CSS coding
          2. Associate CSS rules with design elements
        2. Locating style rules in applications
          1. Use a page design element
          2. Use Style Sheet Resources
          3. Add style (sparingly) to Properties
          4. Minimize the use of internal and inline styling
          5. Use common style sheets
            1. Use a Domino application as a style sheet repository
            2. Use the HTML directory on the server
        3. Developing CSS rules
          1. Work with an application rather than a template while writing CSS
          2. Make sure you have control over the style of an element
            1. Clear the browser cache
            2. Remove HTML formatting
            3. Remove conflicting inline and internal CSS rules
            4. Use fully qualified CSS selectors
          3. Accommodate different browsers
        4. Adding style to form and page elements
          1. Use color effectively
          2. Style text
            1. Style headings and labels
            2. Underline links in text but not in menus
          3. Style fields
            1. Highlight required fields
          4. Style buttons
            1. Replace the default Action Bar buttons with hotspot buttons
            2. Style the default Action Bar buttons
          5. Style borders and margins
          6. Work with images
          7. Style menus
          8. Style printed pages
          9. Add more than one class to an element
        5. Summary
      12. 6. JavaScript
        1. Using JavaScript in web applications
          1. Keep it simple, comment the complex
          2. Be alert for disabled JavaScript and other options in browsers
          3. Be alert for inconsistent JavaScript behavior in different browsers
          4. Use browser object detection
          5. Use browser detection only when really necessary
        2. Locating JavaScript in applications
          1. Place functions in JavaScript libraries
          2. Add JavaScript in the JS Header
          3. Add JavaScript to web events
          4. Use a page for JavaScript
          5. Use a subform for JavaScript
          6. Consolidate and co-locate JavaScript
        3. Developing and debugging scripts
          1. Use browser debugging tools
          2. Validate JavaScripts
        4. Using JavaScript to enhance forms and pages
          1. Run JavaScript on load
          2. Access CGI variables
          3. Validating fields
            1. Validate number fields
            2. Use a date picker for date fields
          4. Warn users before leaving an un-submitted form
          5. Use Ajax calls to avoid server round trips
        5. Summary
      13. 7. Views
        1. General guidelines
          1. Create some diagnostic views
            1. Display documents in a hierarchy
            2. Display Replication or Save conflict documents
          2. Specify a default view
          3. Use view templates
            1. Use the same view template for several views
            2. Compute the view title
        2. Exploring view options for the Web
          1. Understand view Action buttons
          2. Use Domino-generated default views
            1. Include HTML tags to enhance views
          3. Use the "Treat view contents as HTML" option
            1. Structure HTML views as tables
            2. Code links to open documents
            3. Structure HTML views as lists
            4. Set the view line count
            5. Create Notes versions of HTML views
          4. Use the View Applet (with caution)
        3. Creating Action buttons
          1. Provide view navigation buttons
            1. Code next and previous navigation buttons
            2. Code first and last buttons
            3. Let users specify a line count
            4. Code expand and collapse buttons for categorized views
            5. Co-locate and define all Action buttons
            6. Create your own Action buttons
        4. Adding style to views
          1. Style Domino default views
          2. Style HTML views
        5. Opening documents in a separate window
        6. Adding view scrollbars dynamically
        7. Summary
      14. 8. Agents
        1. General LotusScript agent guidelines
          1. Give agents meaningful names and aliases
          2. Structure and document agents
          3. Use agent subroutines and LotusScript libraries
          4. Harvest ideas from Designer Help
        2. Setting agent attributes
          1. Set who can view and run an agent
          2. Set an agent's runtime context
          3. Set an agent's runtime privileges
          4. Hide unused agents
        3. Developing agents
          1. Use web safe @formulas and LotusScript
          2. Include a basic error trap
          3. Write messages to the browser as a web page
          4. Write messages to the browser with a JavaScript alert
          5. Write messages to an agent log file
        4. Working with documents
          1. Use WebQuerySave
          2. Access a document from an agent
            1. Access a document open in the browser
            2. Access a document not open in the browser
          3. Detect the type of client invoking the agent
          4. Detect whether a document is in Read or Edit mode
          5. Prevent a document from being saved
          6. Redirect the browser to the next page
          7. Process selected documents in a view
        5. Writing special purpose agents
          1. Send e-mail notifications
          2. Export data to a spreadsheet on the Web
        6. Summary
      15. 9. Security and Performance
        1. Security
          1. General guidelines
            1. Plan your security
            2. Manage Domino groups
            3. Specify anonymous access
            4. Set the maximum Internet access level
            5. Manage the application ACL
            6. Enable SSL
            7. Prevent opening an application in a browser
            8. Hiding is not securing Use element access lists
            9. Understand application backup and restore procedures
          2. Add security to forms and documents
            1. Understand the "Generate HTML for all fields" attribute
            2. Prevent users from reading existing documents
            3. Prevent users from editing existing documents
            4. Prevent users from editing selected fields using a Controlled Access Section
            5. Prevent users from editing selected fields using hide-when formulas
            6. Do not use field encryption
            7. Track document changes
            8. Make a form available to anonymous users
          3. Control navigation options
            1. Code an explicit logoff
          4. Manage agent security
        2. Performance
          1. General guidelines
            1. Listen to your users
            2. Design for ease of use
            3. Archive or delete old documents
            4. Remove obsolete code and design elements
            5. Clean up and optimize code
            6. Use tools to assess response time
          2. Improve forms
            1. Limit the use of images
            2. Use Ajax calls to retrieve data
            3. Use simpler hide-when formulas
            4. Validate fields with JavaScript
          3. Improve views
            1. Remove unused or redundant views from the design
            2. Limit the data displayed in views
            3. Remove unnecessary view column sorting
            4. Minimize the use of view column formulas
            5. Avoid time-based view column formulas
            6. Create views as an alternative to common searches
          4. Modify database properties
          5. Investigate Domino server options
        3. Summary
      16. 10. Testing and Debugging
        1. Testing
          1. Test with different browsers
          2. Test with different user privileges
          3. Craft the staging environment to resemble the production environment
          4. Engage other people for testing
          5. Test every feature if possible
          6. Test responsiveness
          7. Create a written test plan
          8. Track defects
          9. Create detailed user documentation while testing
          10. Require user sign-off
          11. Monitor the application after Go Live
        2. Debugging
          1. General guidelines
            1. Reproduce the problem
            2. Isolate the failure
            3. Code a $$ReturnGeneralError form
            4. Check the Domino Log
            5. Use the Web
            6. Use Design Synopsis
          2. Troubleshoot forms
            1. Dynamically display hidden fields on the Web
            2. Expire the cache
            3. Debug CSS
            4. Use browser-based debugging tools
          3. Troubleshoot agents
            1. Incorporate dynamic debugging messages
            2. Create troubleshooting tools display scheduled agent information
          4. Troubleshoot problems with data
            1. View field values in Document Properties
            2. Create diagnostic views
            3. Write document repair agents
          5. Document problems and solutions
            1. Keep a personal problem solving journal
            2. Report back to the user
        3. Summary