This, that and the other (may contain nuts)

Leicestershire in Winter - December 2008

Steve Castledine  8 December 2008 13:14:35 GMT
Some photos from being out and about yesterday in Leicestershire. We do not get much snow so frost is the best we can hope for to add the wintery "whiteness" (and most of that had melted by 9am).

Image:Leicestershire in Winter - December 2008Image:Leicestershire in Winter - December 2008Image:Leicestershire in Winter - December 2008

Santa on his "horse".

Image:Leicestershire in Winter - December 2008

Openntf and Idea Jam

Steve Castledine  4 December 2008 14:42:39 GMT
Don't forget there is an openntf.org idea jam. I did until today.

Image:Openntf and Idea Jam

We are currently looking at ways projects like openntf can be best utilised by IBM, so any ideas put there between now and Lotusphere may just be listened to. If you don't want to put them on a public site - then feel free to email them to me (steve dot castledine at uk dot ibm dot com).

Lotus Notes Domino templates and open source

Steve Castledine  11 November 2008 11:57:00 GMT
Its an age old discussion and on/off has been discussed to death within this community, however I have been thinking about "templates" again recently.

As a developer who has had the opportunity of developing applications inside and outside IBM, I have strong, probably "fan boy",  views on their upkeep and also how important they are for stimulating the use of and development of new Lotus Notes/Domino applications.

I have an opportunity, together with a few colleagues, to think about how we could possibly utilise templates (and other development components) in the future, for everyone's benefit, whilst at the same time promoting new development opportunities around XPages, composite applications etc.

Obviously I would promote a biased, spend billions on them view, and let the world see how great we all are. However passionate views are not always the correct ones (or financially sound ones) and a more balanced version is probably better. So I'm asking an open question really on people's thoughts on the current templates and how we could best improve on them, and at the same time use them to promote additional development on the Notes/Domino platform especially around the new technologies. These opinions I can then capture and see if there is any opportunities to enhance the template world we live in by using this data to present an internal report.

I have added some themes below that I am interested in, however this is not an exclusive list for discussion:

1) If template features were missing and they could be delivered quicker via unsupported or lower support level outlets would this make a difference/help adoption/be acceptable to organisations for use?

2) Do more template's translate into higher visibility for Notes/Domino and create more development opportunities within your organisations?

3) How can templates receive higher visibility within your organisation? Are users allowed to create new applications? Would a template wizard that was "one click" to create solutions make an impact instead of "File > Application > New blah blah"?

4) What's your organisations take on open source templates, say at openntf. Is it easy to gain acceptance for using them or are there hurdles - if so what are they? Is there a role IBM could play to reduce these hurdles (in terms of what level of association/guarantee from IBM for these templates would it take). Maybe a multi-tiered open source system with varying levels of quality and guarantee would help?

5) Can open source go too far and have the reverse effect by "strangling" ISV's that are trying to make a living from producing Notes/Domino solutions?

6) Commercial templates - If it was easy to get recognised, would people add their templates to a template catalogue if it provided enough exposure in terms of banners/links etc to their corporate home page? Niklas Heidloff has provided a posting similar to this question here.

If you want to add a lengthy post and feel a blog comment does not do it justice then you can use this discussion db - I will then merge the discussion together.

Another java view property template developers should be aware of

Steve Castledine  10 November 2008 10:55:36 GMT
When developing applications using the standard client framework there is, I think little known, a switch/property that is really important and it is not set by default. This one is the "bookmark default" property.

By default this uses "NRPC" for the bookmark settings, which in my experience does not work well (performance wise and some usability issues) and also mean's the correct icon is not picked up when user's do bookmark a custom/template application.

So if you ever create a custom application and want to reuse the standard client framework then you must set "com.ibm.rcp.bookmark_level" to "selection" (you will need to add it). This has the effect of making sure the bookmarks use the proper notes url's.

This is set within the "page" properties within the composite application editor:

Image:Another java view property template developers should be aware of
Image:Another java view property template developers should be aware of

Switching off the default switcher in templates when using java views

Steve Castledine  10 November 2008 10:05:59 GMT
I dislike the phrase "java views", but I never know a better one. If I mention "java view" I am referring to the standard client framework that was used from Lotus Notes 8.0, and originally was the basis of the new mail client and was also used for the blog template from 8.01 (and others from 8.5).

As mentioned previously, I have a document waiting to be published which has a lot of detail on how you can reuse this framework within your own templates. I am just waiting on feedback on "where" best to host it (it my end up as a developerWorks article).

Anyway, originally if you tried to reuse the framework in your templates, you were stuck with the default "switcher":

Image:Switching off the default switcher in templates when using java views
This is not great if you want to develop custom applications as it might not be relevant. Supported from 8.5 (and my memory fades me but I think I had this inserted for 8.02) is the switch "com.ibm.rcp.showSwitch=false". Setting this in the composite application editor (Actions > Edit Application) for the "navigator" will ensure this is not displayed:

Image:Switching off the default switcher in templates when using java views
So within the composite application editor, select your navigator component (see below) and right click "Edit Component Properties".

Image:Switching off the default switcher in templates when using java views
Under "Advanced" add the property "com.ibm.rcp.showSwitch" and set to "false".

Image:Switching off the default switcher in templates when using java views

XPages - webQuerySave equivalent or using Lotusscript to process data

Steve Castledine  7 November 2008 09:28:52 GMT
Image:XPages - webQuerySave equivalent or using Lotusscript to process data

I'm planning some "how to" XPages posts for "Domino Developers", in the meantime here's something for this week's "tip" theme.

You may currently have a lot of logic sitting in Lotusscript agents or libraries, and you want to use these when trying out XPages, as its probably a big job to rewrite all of them from scratch in server side JavaScript etc (especially just for the purpose of testing or proof of concept).

Whilst in the long term, using the XPages way of doing things is probably better, and I'm told there will also be improvements in this area, there is a way of leveraging say LotusScript based webQuerySave agents or script libraries etc.

You can do this by using the agent.RunOnServer(docid) command (as when the agent executes we do not have the usual documentcontext handle) to run your agent after an xPage document save. The difference to note, is when you perform any actions on the document (via your code) it has already been saved so you are not able to do anything before save (these are the actions you will need to write in XPages javascript).

To do this you would create an agent as normal, and instead of collecting the document reference via session.documentContext, instead use agent.ParameterDocID via Set doc = db.GetDocumentByID(agent.ParameterDocID):

Image:XPages - webQuerySave equivalent or using Lotusscript to process data
Then in your XPage, navigate to "Events > Data > Your Document as specified already as a data source > postSaveDocument" add an action "Basic > Execute Script".

You can then use the code var agent=database.getAgent("youragent"); to get a handle to the agent and then agent.runOnServer(document1.getNoteID()); to pass the document reference to your agent (which we collected using agent.ParameterDocID).

Image:XPages - webQuerySave equivalent or using Lotusscript to process data

Image:XPages - webQuerySave equivalent or using Lotusscript to process data

Automatically send emails to users who post comments on your site when you reply

Steve Castledine  7 November 2008 09:00:00 GMT
Something I often forget exists, is the ability to send an email to someone automatically when you respond to their comment (Notes Client Only) within the blog template.

To set this up, you need to go into the configuration document, tabs "Discussion > Basic". The field is right down the bottom (UI best practice this stuff) and is called "Email Prompt for Notes Comment Response?":

Image:Automatically send emails to users who post comments on your site when you reply
Set to "Yes" and it will try and send an email to everyone you respond to with the detail of the response (and link to the site). Setting to "Yes but Prompt" will ask you first:

Image:Automatically send emails to users who post comments on your site when you reply

Accessing the standard/java view properties in Designer

Steve Castledine  6 November 2008 09:48:25 GMT
Another ini setting that may be useful for developers is "Designer_ShowPropForJavaViewsUI=1". This setting exposes the properties in Designer for standard client/java views.

I have written a large document on building/converting your applications to use Notes Mail v8+ standard/java views etc as it now is supported (with caveats) from 8.5. I am just waiting on finding out where we are going to publish this.

Image:Accessing the standard/java view properties in Designer
Image:Accessing the standard/java view properties in Designer

Upgrading local Lotus Notes templates

Steve Castledine  6 November 2008 09:41:30 GMT
No tips yesterday, busy day and I'm guessing the whole election thing was crowding out the news/blogs anyway.

Anyway, I was in a meeting yesterday where a couple of customers mentioned (running Notes 8.5) that their bookmark templates had not updated. They resolved this by using Replace Design and restarting.

What you can also do is reset an "ini" setting in "notes.ini" -  "TemplateSetup".

For example, mine currently is set to "TemplateSetup=850004". If I changed that to a number less than 850000, then when I start the Notes Client it will do a template update of the local address book (contacts), bookmarks and for 8.5 Notebook. I'm guessing just setting to zero will work for everyone no matter what version you are using.

Lotus Notes 8.5 Feature - Notebook

Steve Castledine  6 November 2008 09:20:53 GMT
One of the new features for Notes 8.5 is "Notebook". It gets less coverage than other "new" stuff as essentially it is the old Personal Journal with a new colour lipstick.

Visually it is a huge improvement, feature wise there's not much "new" but it gives a good base to go from.

Its templates like these that a lot of people do not realise exist. I for one never used Personal Journal "at all" but Notebook now is part of everything I work on (and there's less scraps of paper on my desk).

So when you upgrade to 8.5 your local personal journal will get an automatic update to the new template, and the home page will show the change of name:

 Image:Lotus Notes 8.5 Feature - Notebook
The interface also follows the Notes 8 mail standard so we go from the old to the new:

Image:Lotus Notes 8.5 Feature - Notebook
Image:Lotus Notes 8.5 Feature - Notebook
The Form has a similar update:

Image:Lotus Notes 8.5 Feature - Notebook
Image:Lotus Notes 8.5 Feature - Notebook
Right Click Context Menu's:

Image:Lotus Notes 8.5 Feature - Notebook

Accessing the Web Client for the Blog Template

Steve Castledine  4 November 2008 10:01:58 GMT
Publishing something I replied to in an email yesterday:

You can access the web client for the blog template via the "admin" link (within the default "yellow" theme) which can be found in the top right corner:

Image:Accessing the Web Client for the Blog Template

This goes to the url ".nsf/webadmin?open&login":

Image:Accessing the Web Client for the Blog Template
You will need the following roles to access (and at least Author access):

Image:Accessing the Web Client for the Blog Template
You then get to:

Image:Accessing the Web Client for the Blog Template
Image:Accessing the Web Client for the Blog Template
Image:Accessing the Web Client for the Blog Template

Hiding advanced sections in blog template for users

Steve Castledine  4 November 2008 09:43:10 GMT
Just a quick tip today, I have a lot of work I need to complete by close and its my wife's birthday so I guess I should finish work before 10pm (kidding).

By default the blog template is a "personal tool" and there is no real restriction on what you can do. User's can go into the configuration, they can also change the theme etc at will. Most of this is accessed via the "advanced" link.

Image:Hiding advanced sections in blog template for users
Within the enterprise, administrators (don't you just love them ;) ) like to add restrictions. So in order to distract them whilst you update a live system with your "new feature" we have a role "[basic]" (added at 8.01) which restricts what the user sees. Note that this is a visual restriction and not "security" against. A knowledgeable user could poke around in the "innards" of the database and find ways of changing stuff.

So by adding the role to a user or a group (in standard client you may need to restart to take effect), this advanced link is no longer shown:

Image:Hiding advanced sections in blog template for users
Image:Hiding advanced sections in blog template for users
This also hides the "Show HTML Options" section when you create content:

Image:Hiding advanced sections in blog template for users
Image:Hiding advanced sections in blog template for users