Working with Notes designer 9.0

IBM released their next version of Notes in public beta status on the 14th. Since then I’m busy playing around with the new client / designer on my home development box. I have to say they did a great job once again. The client starts very fast compared to the 8.5.x releases and the UI is a big change.

But what’s in for me as notes developer? And especially xPages? At first I was a bit disappointed. I opened up the designer and didn’t really saw something new. So I decided to look around on the net to see if fellow notes dev’s already played around with the designer and of course they did! I watched the excellent video on notesin9.com. I would say take a look yourself. But If you don’t want to watch a movie keep on reading. The new features in this notes designer are as follows:

  1. New Jar component in the notes designer.
    • Now you can add easily your jar files you need to the nsf by clicking on the import jar button in the following screen. Unfortunately this is only useful for xPages and can’t be used by Java agents. I hope sometime IBM decides to change this.jar
  2. Content assist in xPage source Editor!!
    • This is actually one of the best, or even the best, new feature in this version of designer. Now it is possible, when you are editing xPages using the source editor to issue type ahead. So for instance for SSJS. I haven’t been able to get it working for own Java classes yet. But I do hope there is somebody out there who knows if this is going to be possible or is possible already.
  3. Hyperlink navigation in xPage source editor
    • In default eclipse when developing Java you can ‘jump’ to another class / or its interface, by holding the CTRL key and click on it. This is very cool feature because you now can go to a separate part of your code without having to search for it in the package explorer. Finally this feature is available in the xPage source editor. How cool is that! No searching in your controls/xpage section anymore.( this is a pain when using lots of controls ).

As you can see alot of new features which will make the life of us developers a lot easier. I have to say after 3 days of playing around with the new designer I really don’t want to go back to 8.5.3 when I’m developing xPages. Because on top of all these great new features i’m noticing a big improvement in times I have to wait for my designer to become responsive again when I pressed ‘build project’.

But it’s a beta so there are some bugs! Atleast I found some.

1. I disabled ‘build automatically since this increases my productivity. When I want to see the result of my change(s) I build the project and go to my webbrowser. What I found is that somehow the build project option is disabled in the project menu. To reconstruct the issue: ¬†Open up a database in designer.

Open a xpage/custom control in source mode.

Close the working set pane and click again the source editor.

Sometimes the build project option will be grayed out and you have to select the project again ( in the working set pane ) to be able to build.

2. Content assist does not work for Java and SSJS resources

As stated above the content assist feature is very very cool and makes it easier. But the content assist is not aware of custom classes (java) I created. It is also not aware of functions defined in included resources. I can imagine this would be a performance drain because you have to parse the SSJS libraries but it would be nice if it could be included.

use of stackoverflow

This is gonna be a short post. A few months ago Niklas Heidloff spoke about the use of Stackoverflow in a session I attended. After a while I started to use it more regularly and I have to admit. It is one of the best sources of information when you want to search for any answers regarding development. I started to work on SugarCRM development a couple a weeks ago and without StackoverFlow it would have taken much much longer to find answers!

Yii: specify a default value in a CActiveForm control

This evening I’ve been working again on my measurement system. This is a little application I wrote using the Yii framework to keep track of the energy needs of our household.

It keeps track of the gas, water and eletricity usage per day. As said the site is build using the Yii framework. It features some nice charting generated by the highcharts jquery plugin. I wrote this litte application in just a few days during my free time. Therefore there are alot of things to tweak.

One of the things I wanted to change today is to have the current date pre filled in in the add form (see screenshot ):

Since the Yii framework makes use of the CActiveForm class methods to generate a textfield I dont know for sure how to add a default value to the date textbox. So I fired up google and started to search for how other Yii developers would solve this problem. The first hit gave me a post on the official forums where a developer said that the original topic starter should set the default value in the model object.

I dont really like this advise. Because a model should never be aware of the behaviours of the view it is being used in so I decided to check the second hit and the advice someone gave at that particular post was much better. Simple use the html options property of the textfield method to set the ‘value’ property directly into the HTML like this:

$form->textfield(‘label’,’valuebinding’,array(‘value’=>date(‘d-m-y’));

 

And we are back

After a few years of inactivity I decided to start a new blog on my website again. This blog will be about the things I encounter during my development hours. Mostly this will feature xPages, lotuscript or other Notes related development. But sometimes a little php will also show up occasionally.