Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Blogs

photo

Yellow is the...

54 Entries |  Tim Tripcony
Updated 
No Ratings 0     Comments 22
photo

TexasSwede

66 Entries |  Karl-Henry Martinsso...
Updated 
No Ratings 0     Comments 59
photo

Lotus Nut

69 Entries |  Chris Whisonant
Updated 
Ratings 4     Comments 96
photo

Urs Meli

19 Entries |  Urs Meli
Updated 
No Ratings 0     Comments 14
photo

Uh Clem's Adm...

35 Entries |  Chris Mobley
Updated 
Ratings 5     Comments 42

Dogear Bookmarks

.Domino Framework

Blog Authors:  Peter Presnell  

Previous |  Main  | Next

Skinning An Application

Peter Presnell  |     |  Tags:  skin .dominoframework xslt  |  Comments (0)

I started work on extending the functionality of the .Domino Framework to provide the ability to "skin" an application for a Notes client based upon a style sheet.  The first challenge has been to develop an approach to take.  I had previously developed a solution for views that used the NotesDOMPaser.  Viewnify also uses this approach.  The downside to this is the lack of a standard way to define the "style".  Importing from a CSS was a possible options but what names should be applied to the classes/ids...

 

I decided to try XSLT.  It is an industry standard and the transformations could be defined as data rather than code.  Notes provides a way to transform DXL using an NotesXSLTTransformer class.  Using the Domino.reflections namespace I have extended the existing DominoDocummentCollectionDesign class to provide a Transform method.  This new method acts upon the selected design elements, exports them to DXL, applies an XSLT before importing the modified design elements back into teh database.  I also developed a debug option that exports the DXL to a file so it can be inspected.

Customizing Templates

Peter Presnell  |     |  Tags:  .dominoframework lotusscript customization template oop  |  Comments (0)
So this week I spent a lot of time trying to think of cool ways to make the .Domino Framework more easily customizable.  This following is the solution I have come up with and can apply to any template that uses OOP and want to make the code easily customized....

The .Domino Framework contains a LOT of classes.    Using one example, the Domino.Applications namespace contains classes for DomioSession, DominoDatabase, DominoDocument .... that extend the NotesSession, NotesDatabase, and NotesDocument ... classes.  I have added a lot of methods and properties that I have found to be useful, including a lot of ideas that came from other Notes developers.  But this is certainly not a complete list and other people may even want to change the definitions of some of the properties, methods, and events to improve or adapt the code for specific needs.
  1. I have copied all "My" code in a new LotusScript library called Base.Domino.Applications
  2. I have renamed all the classes to start with base.  e.g. baseDominoSession, baseDominoDatabase, baseDominoDocument
  3. Returning to the original Domino.Applications library, I have included Use "Base.Domino.Applications"
  4. I have then rewritten the class definitions to extend the base classes.  e.g. Class DominoSession as baseDominoSession
  5. And finally I have removed all the code from these class definitions except for an empty constructor.
  6. All the code in the .Dominio Framework continues to use the DominoSession, Dominodatabase, DominoDocument... classes as before so any customization added to the "Domino" classes will always become available.
Anyone adopting the .Domino Framework is now able to customize the classes with their own code without the need to modify any of the base code.  Customization can include adding new properties/methods/events as well as rewriting/overloading the existing properties/methods/events. 

The one thing a customizer needs to do is make sure that the Prohibit design refresh flag is set for the Domino.Applications library (I can probably set this as the default).  That way when a new version of the .Domino Framework is released it will update the Base.Domino.Applications library (and hence the base classes) without making any changes to the existing customization.

This technique could be applied to any template/code library.  Imagine if IBM were to apply this technique to their own templates such as the mail template.  We could customize the various classes developed by IBM without having to worry about how to merge the code again when a new release becomes available.  I could modify one of their methods in my ownh library and then their code would run my code...

Customizing Mail Template

Peter Presnell  |     |  Tags:  mail customization templates  |  Comments (2)

Part of the art of customizing the mail template is doing it in such a way that the maintenance effort is as little as possible each and every time IBM release a new version of the mail template.  The following is one suggestion for reducing the footprint of your customizations.

 

1) Add a "Custom" subform to the Memo & Response forms (either one each or one common subform)

2) Add any number hidden fields to the subform needed to add additional internal data to mail documents

3) Add any number of actions that you would like to appear.  Granted you do not full control over where these actions appear compared with modifying the forms themselves, but I can live with this compromise to reduce the impact of the changes.

 

4) Procedural Programmers:

4.1) Add code to each action to define what each action should do

4.2) Add code to the QueryOpen, PostOpen etc events of the subform as a way of customizing what happens when the form is processed.

 

5) Object Oriented Programmers:

5.1) Create two new classes one for the foreground document and one for the background document

 

e.g.

    Class DominoUIMemo

        Private iNotesUIDocument As NotesUIDocument

        ....

    Class DominoMemo As NotesDocument

        Private iNotesDocument As NotesDocument

        ....

5.2) Wire the QueryOpen event to instantiate the above classes

5.3) Modify the UI class to trap any form events as part of the constructor. 

 

e.g.

 

Sub New(Source As NotesUIDocument)

On Event PostOpen From Source Call OnPostOpen

On Event PostSave From Source Call OnPostSave

End

 

5.4) Add methods/properties to either class to support the custom Actions

 

The above will not handle all the likely mail customizations needed but it is a good start and each time a new mail template is released there is a single change needed to the existing IBM code - adding the "custom" subform.

 

Note: Adding subforms does have a performance impact, but given the number of subforms already included in the standard mail forms and the amount of processing that takes place it is unlikely to be noticeable.

Agent.RunOnServer And New Documents

Peter Presnell  |     |  Tags:  agent lotusscript  |  Comments (2)

When running and agent on a server it is often necessary to pass a reference to a document to be processed by an agent.  What I didn't realize is that at the time the PostSave event is executed (in Notes 6.0) the Source.Document.NotesID field still contains "0" for a newly created document.  In order to pass the NotesID of a new document it is necessary to instantiate the source document via NotesDatabase.GetDocumentByUNID.  When this is done the NotesID for the already saved document (this is after all a PostSave event!) becomes available....

 

e.g.

   If iDocument.IsNewNote Then Set iDocument = iDocument.ParentDatabase.GetDocumentByUNID(iDocument.UniversalID$) ' Ensures new Note ID is available

   Call Agent.RunOnServer(iDocument.NoteID$)


Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.