Skip to main content
    Country/region select      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

Using the Eclipse-based Domino Designer, because the Notes application corresponds to an Eclipse project, various functions are available that apply to Eclipse projects generally.

I had a request recently to export all the code in a project to disk so that an automated code-checker tool could be run against it. My initial thought was to use DXL, but the DXL representation of some design elements doesn't make it easy to extract the code. JavaScript libraries, in particular, are hard to decode.* So I looked for an alternative. Here's what I found.

  1. First make sure the database is in your Designer navigator (if it's never been opened in Designer from that workstation, open it).
  2. To view the Notes applications as Eclipse projects, you have to open the Project Explorer view of Designer. Menu Windows / Show Eclipse Views / Other , then select General / Project Explorer.
    • Note: if you have as many databases in your outline as I have, it may take some time to populate this window. Be patient.
  3. Find your Notes database there.
  4. If it is not open (not expandable), right-click it and select Open Project.
  5. Right-click and select Export.
  6. Select File System as the export destination (it's under General) and click Next.
  7. In the next screen, you might choose to expand the project and deselect some things that you don't care about, for instance as highlighted here in yellow.
  8. Enter the directory you'd like to export to, and click Finish.
This should generally get you everything in the database, with each design element as a separate file and everything organized into folders by design element type. For file-based elements like stylesheets and XPages, the disk files contain the file contents, so you get to see the source XML of your XPage. Design elements that are essentially just a chunk of code (agents and script libraries), export with the source code only, so if there's an agent document selection criteria full-text query, you won't see it in the file. Other design elements, such as forms, views and outlines, are stored in DXL format.

* We're working on it.

Andre Guirard | 7 January 2010 10:32:12 AM ET | Home, Plymouth, MN, USA | Comments (0)

Search this blog 


    About IBM Privacy Contact