Monthly Archives: November 2011

Flattr custom control released

Today I have released another custom control on openntf.org

It’s the Flattr control this control makes it simple to add a flattr buttons to your webpages created with XPages. And get micro payments from flattr users that likes what you or your customers do. 

 

 

 

 

 

 

 

QR Code Custom control is released

URL QR Codes for you web applications just got very easy.

Just drag and drop add your URL, and you got a QRCode and they work in the Client too.

Link to the Project at OpenNTF.org

 

 

 

 

 

 

 

 

 

Load once functionality for client js script libs

If you have a custom control and this control can be added more that once on a page.
You will probably get problems if it relies on some clientside libraries.

There is at least three ways to this problem.

1. Don’t add the client lib to the Custom Control add it to the XPage instead
Is  this a good approach, no I don’t think so because you need to remember to add it, and also update it.

2. Add it in a theme globally
If you do it this way your library will always be added to all pages even if you do not need it.

3. Add it inside the Custom Control
This is the best approach in my opinion   

Just add a computed text to your custom control

Add this code to check a requestScope var if it has a value if not add script lib.

if(requestScope.loadonce==null){
requestScope.loadonce="Y"
return "<script type=\"text/javascript\" src=\"clientscript.js\"></script>"
}

 You could evolve this code by inserting it into the head tag but It will work. 

@TextToNumber Decimal Warning

If you run this formula in traditional Domino

@Text(@TextToNumber(“20,40”)*2)

You will get 80,40 back into the field

But if you run this in some XPage Code you will get

0

Why is this you might ask, well probably because javascript do not recognize comma as a decimal delimiter

So you need to change the formula to this.

@Text(@TextToNumber(@ReplaceSubstring(“20,40″,”,”,”.”))*2)

Then you will get 40,8 back. Not that when you do @Text() on the number the comma is back 😉

Two new interesting CLFAD:s in XPages today

I had some strange problems today in 8.5.2FP1 that resulted in error 500.

CFLAD0246: Exception and CFLAD0134E:

The error occurred when executing this line of code currentDocument.save()
Crap I thought some internal error inside the XPages engine. I was searching for the error and thought
perhaps I should see if the error still occurs in 8.5.3. Yes box it did but in 8.5.3, I got and more developer friendly error .

Could not save the document 18B1E NotesException: Vector must contain objects all of the same class

Aha I thought I have some fields that contains multi value so I started to search there and found that I had
an array that contained numbers but in one case JS added text to this array. That was the problerm in this case.

Perhaps if there were a list of the most common CFLADS and what causes the problem would be good to have!

So hurry and upgrade to 8.5.3 and perhaps you will also benefit from some more developer friendly errors. 

xTrain – XPages seminar in Sweden

IBM in Sweden is going to host an XPages day on the 12:th of December in Stockholm.
With Ed Brill as the main speaker.

If you are interested this is the link to sign up for it.

xtrain.lotisverige.com 

Perhaps a DAOS inside can be the solution

I had a problem with growing Domino databases and didn’t have the option to turn DAOS. And I thought how could this problem be solved if I did some database design. What is the problem today with large Domino databases or large attachments today?

1. Large or many Attachments makes the database slow
2. Opening documents become slow.

DAOS solves these issues by extracting the attachment out of the database and creating a file with a hash name to get a single copy solution, Very clever. The hashing of files solution original developed by and MIT professor named Ron Rivest. He was one of the founders of RSA (the R is from his name ) 

I tough if you could have a DAOS like solution stored inside a single NSF file then you could benefit from this when if you server didn’t have DAOS enabled. And also if you did a local replica.

If the attachments were extracted from the actual document like they are in DAOS, I belive that the performance would increase. This because the attachments are only touched in they are needed and not every time the document fetched like today. But this is just a wish from me 😉  

It will be interesting to see what new features IBM will implement into the NSF container in the next ODS version. So the Domino NSF container can show that it’s the largest NoSQL database what I know of.

Have a great NSF Day!!

Applications of the future

How will applications of the future work.

I believe that applications of the future is webbased, component based and autoupdated.

text editor

I think there will be better way to separate an application into pieces and only those pieces that you need will be downloaded into your local application framework runner. I also believe that these application framework runners will run inside the web browser (i.e Chrome frame) or be apart of the web browser.

The pieces will also auto update after every time you have used them not before you use them or if you check for an update. The updates can be checked against a internet based update site or a specified local update server.
And because the application is component based, no problem adding new formats to load or save data from. A new macro language can be docked in because the customers like to develop macros in java instead of .Net.

Major release updates is old news, Users demands a constant flow of improvements. But I don’t say that all IT Administrators want this, but can they stop it?

What is your idea of future application design?

Social Development in Domino Designer

I haven’t seen any development addons for Domino Designer that could make it more social.
It would be great to have some integration that you easy could update what design elements or/and databases you are working with.
Also a easy way to update status in your projects.

I would be happy if you could have integration points in the designer that don’t require the use of creating a plugin.
Perhaps a side panel that can load an xpage and some scoped variables gives integration with the designer.

Java UI API support from XPages in the client wouldn’t be bad either.