About Lotus Notes and Domino and more... provided by the Emcon company.

IBM Domino and Open Source #codefortim

Fredrik Malmborg  May 21 2014 03:42:10 PM
Since the early days of Notes, when it was developed by the company Lotus, it has been a tradition to share solutions with the community. Maybe you have heard about notes.net or Lotus sandbox. Lotus sandbox is still available even if the content is rather old.

Today most of the sharing is administered by the OpenNTF community. It was launched in 2002 and today it hosts about 400 different projects and about 1000 shared snippets. There are about 65 000 registered users. IBM invests in the organization by providing staff working for the community and releasing code as open source.


Foreword

This article was originally written in Swedish. I am making it available in English to honor the spirit of Tim Tripcony, a very talented man that recently passed away. He was eagerly sharing his knowledge and was always ready to support the community.


How to share code with IBM Notes/Domino

An application is a database, which is a file. A solution can contain multiple applications/databases. Earlier they were just called databases, but IBM changed it to be called applications instead.
There is a built in system for template management. Templates are simply copies of applications that can be used to create new instances of the application. Normally you only save design and code in templates, but you can also include data in the form of Notes documents and attached file resources.
Because of the fact that an application/template is a file, it is very easy to distribute it. There are also connections to systems for source control like Git.


License used for sharing is important

When you want to share code or solutions, it is important to select and announce under which license it is being published. If you fail to provide that information then you stop further development and sharing. The reason for that is that if you want to publish something as open source, all parts used in your solution must also be covered by the license you want to publish your new solution under. If you used some code that was not published with a suitable license, you cannot share your new solution with open source license.

The most used licenses are Apache License Version 2. (ALv2) and GPL Licensing.
Usually ALv2 is easier to use than GPL, because the later has a more complex set of rules when third part is included.
If you are interested in learning more about licenses for open source, you find information at OpenNTF. You find the address in the resources list below.


Social intranet developed by a Swede

A couple of years ago Thomas Adrian launched his project ”Intrapages”. It is a social intranet built with the XPages framework on IBM Domino. He has chosen to share his work and maintains it with updates, fixes and new features.

It is a file that you can download for free and put on your IBM Domino server. When you have done that you have your own social intranet with a lot of features like:

–        Sharing of files, photos and other internal or external information.
–        Easy access and security management. You can use the Domino account to login, but also possible to use your Facebook,  Linkedin or Twitter account.
–        Solution to the problem with users mailing files. You now got a place to share files.
–        Every user got his own profile and can create content.
–        Separate teamrooms for projects, departments, countries...
–        Common calendar for bookings, adverts, meetings, events and more.

The solution is configurable. You can change look and feel, and select what parts should be active for users. If you are curious about it, there is a demo site where you can create your own account and try out the features.


XPages

When IBM released version 8.5 of Notes/Domino there was a new framework included called XPages. It is a totally new way of building web and mobile applications hosted by Domino.
A key component are the Custom Controls. It is configurable parts that can be put together in an XPage. Simply put it enables drag and drop to build a page with connections to relational databases, integrate with Twitter, Facebook and much more. There are even templates for layouts like Twitter.
Most of the time you use JavaScript to code in XPages. Both client side and server side. At OpenNTF you find loads of code and information in the category XPages.


Resources:


Archived Lotus Sandbox

http://www.bananahome.com/ldd/sandbox.nsf

OpenNTF

http://openntf.org

OpenNTF - Intellectual Property Policy (licensing)

http://openntf.org/main.nsf/page.xsp?name=IPPolicy

Intrapages demo

http://www.intrapages.com

Categorized links/news related to IBM Collaboration Solutions

http://collaborationtoday.info/


IBM Domino och öppen källkod

Fredrik Malmborg  April 11 2014 07:21:39 PM
Då var min andra artikel för Data3 - Common Sweden publicerad i Medlemsbladet Nr 216. Denna gången har jag skrivit om traditionen att dela med sig av lösningar baserat på IBM Notes/Domino.

Image:IBM Domino och öppen källkod

Länk till hela numret som PDF:  Medlemsbladet Nr 216

Länk till min artikel på Data3:s webb: IBM Domino och öppen källkod

Om Data3

Data3 är användarföreningen för Power System, (tidigare System i, iSeries & AS/400) i Sverige.
Data3 är en förlängning av COMMON, den USA- och Europabaserade användarorganisation som finns i samarbete med IBM.
Villkor för medlemskapet är att företaget arbetar med ett IBM datorsystem i allmänhet och IBM Power i, i synnerhet.

Recycling in Java, or The importance of not cutting the branch you sit on

Fredrik Malmborg  April 7 2014 02:41:13 PM
I have been coding rather advanced Java applications a couple of years ago. It was then totally out of the Domino sphere.
Recently I have began to code some Java agents for Domino, and the basic principles are not that hard to get. Anyway I did hit an issue with recycle and response documents.

It started off with a "NotesException: Object has been removed or recycled". I examined the code over and over again and could not understand what was the problem. Decided that I had to read up on Java on Domino in general and recycle in particular.

Luckily I found a page written by Bob Balaban (Geek-o-Terica 5: Taking out the Garbage (Java)) about the recycle mechanism and what to keep in mind. When reading it I did not directly connect it with my problem but it did finally ring a bell. I also had help from a Technote. In fact it was this that got the bell ringing: "recycling a parent document also recycles its children". My problem was not exactly that but related to responses.


I was updating a document from sibling responses created from a specific form. The sibling responses was looped and data collected.
--------------------------------------------------------------------------------------
DocumentCollection dc = currentDocument.getResponses();
doc = dc.getFirstDocument();
while (doc != null) {
       if (doc.isValid() && !doc.isDeleted()) {
               formName = doc.getItemValueString("Form");
               if (!doc.hasItem("$Conflict") && formName.equals("formIngredient")) {
                       stringList.add(doc.getItemValueString("ingredient_id") + "#" + doc.getItemValueString("ingredient_percent"));
               }
       }
       tmpdoc = dc.getNextDocument(doc);
       recycleObject(doc);
       doc = tmpdoc;
}
--------------------------------------------------------------------------------------


The problem is that I recycled every response, and one of the responses is the target for the collected data from the siblings with form = "formIngredient". Thus I got the "NotesException: Object has been removed or recycled" when trying to access the response where I want to store the collected data.


I solved it by moving the recycle call to only be done on specific sibling responses.
--------------------------------------------------------------------------------------
while (doc != null) {
       tmpdoc = dc.getNextDocument(doc);
       if (doc.isValid() && !doc.isDeleted()) {
               formName = doc.getItemValueString("Form");
               if (!doc.hasItem("$Conflict") && formName.equals("formIngredient")) {
                       stringList.add(doc.getItemValueString("ingredient_id") + "#" + doc.getItemValueString("ingredient_percent"));
                       recycleObject(doc);
               }
       }
       doc = tmpdoc;
}
--------------------------------------------------------------------------------------

Finally I want to highlight another vital point made by Bob Balaban in his article:

"Of course, even when you leak megabytes of memory in this way, Notes (and the operating system) get it all back when the Agent terminates. Why? Because the CurrentDatabase and the Session objects that Notes created for your Agent to use get recycled automatically when the Agent is done, and therefore all other objects "owned" by that Session and Database (i.e., all of them) get recycled automatically. Of course, if you run out of memory before that point, you're screwed. "

My conclusion is be very careful with how you recycle documents in a parent/child/siblings perspective.

IBM Connect 2014 - replay index

Fredrik Malmborg  January 28 2014 01:34:57 PM
There are things to wish for regarding the web experience (reminds me I have to do something about the experience on THIS site) on the IBM Connect 2014 site.
To make the streamed content easier to find I made my own list of links below.

Update: I have added links for recordings added by IBM on day 3 but I get confused by the titles. Not sure if they have added recordings from earlier days on day 3 or they just messed up with the titles.

Day 1

Opening Session Edited http://livestre.am/4KUXe

Social Next: The evolution of Collaboration to the Leading Social Platform http://livestre.am/4KU4q

IBM Messaging and Collaboration: Innovations and Priorities for Today and Tomorrow http://livestre.am/4KUnO

IBM Mobile Collaboration Strategy and Advancements for a Mobile World http://livestre.am/4KUz4

The IBM Sametime Roadmap: Because Social isn't Social if you can't communicate http://livestre.am/4KV4O

CONNECTING THE ECOSYSTEM: Sandy Carter Live http://livestre.am/4KVxg

Avoid Being a Social Zombie in a Global World http://livestre.am/4KWwT

Day1_Talking_Social_Mobile_Analytics_Cloud2014 http://livestre.am/4KWx1


Day 2

Opening Session http://livestre.am/4KWTd

Scott Adams http://livestre.am/4KWTe

Key107 Building Exceptional and Visionary Digital Experiences for Better Business Results http://livestre.am/4KWYv

IBM Collaboration Solutions Application Development Strategy - Key 109 http://livestre.am/4KX6U

The Power of Social Software in the Enterprise Key 103 http://livestre.am/4KXqj

SwanSB205 - Strategies for Connecting the Global Workforce Through The Cloud http://livestre.am/4KXUY

CONNECTING THE ECOSYSTEM: Sandy Live Show Tuesday http://livestre.am/4KY7c


Day 3
General Session http://livestre.am/4L02p

Smarter Workforce Mythbusters http://livestre.am/4L0wE

BrkOut - SW403 - Put the Smarter in Your Workforce with the IBM Social Learning Solution http://livestre.am/4L0Tw

Social Business in the Context of IBM's Overall Strategy http://livestre.am/4L0wD

IBM Worklight for IBM Domino Developpers http://livestre.am/4L0wC

What's New in IBM iNotes Social Edition http://livestre.am/4L0W0

IBM Notes Traveler: 2013 and Beyond http://livestre.am/4L0VZ

Ethan McCarty 1749-1 http://livestre.am/4L0W1

Patterns in Achieving Social Business Success http://livestre.am/4L0W2


The Domino Effect - What is it?

Fredrik Malmborg  December 25 2013 07:35:01 PM
Recently version 9.0.1 of IBM Notes / Domino was released. We have a modern interface that is available for both the traditional Notes client, web, and mobile devices.The development environment is Eclipse. Much of the new development is done in Java and JavaScript, but LotusScript and @ Formulas / @ Functions are still powerful tools. XPages has matured, a new development environment as a complement to the traditional. Support for integration with IBM Lotus Connections, Facebook, Twitter, etc. are added continuously. In contrast to other solutions, we have fantastic platform and backward compatibility. Upgrading a Domino Server and all its services are normally ridiculously easy and fast accomplished. It is a fact that IBM is investing heavily in this software, even if it drowns a bit in the gigantic portfolio of solutions they bring to market.


The Bad News

There's no need to lie about Lotus Notes losing quite a few users recent years. There are several reasons for that. Unfortunately it is often the result of ignorance and herd behavior. The same goes for the big consulting firms. Today few of those have relevant knowledge of IBM Notes / Domino in their staff. In the public sector and public authorities in Sweden have a large shift occurred from Notes / Domino email to Outlook / Exchange. Microsoft's targeted efforts, including "Microsoft Municipality Design" (MSKD) has paid off. Smarter Planet and Smarter Cities are some of IBM's efforts to meet the challenges for the public sector and government. They have not a primary focus on solutions based on Notes / Domino.


The Good News

With a single server installation, you get access to an entire application platform that can
deliver to virtually all currently available systems and devices. Name an industry standard, and you can almost be sure that the Domino server supports it, or will very soon. There are solutions for social intranet, logistics, budgeting, quality documentation, contract management and much more. If you look 10 years back, it was common that even end users built solutions with Notes for effective management of any routine / documentation. Unfortunately this opportunity is often forgotten. Today even the developer license is included in the Notes User license. Consider the possibility that a user with fairly rudimentary knowledge can build an effective application with built-in security management, that can be easily shared with colleagues. It can also be made available offline with a few clicks. And with some more knowledge you can build a web interface. Everything is connected and requires only one server. That server could be an IBMi, but that is just one of the supported OS. And of course there are mail functionality built in for those that wants to consilidate or utilize even more. Do not forget that the email feature is just a tiny part of what is offered. For those that for different reasons prefer Outlook as mail client, the good news is that IBM is developing a completely new connection between Outlook and Domino. It uses ActiveSync within the Notes Traveler service and will provide a very thight integration for mail and calendar.


Ingenious Concepts

There are a number of concepts in IBM Notes / Domino which is relatively unique . Categorization is one. It can be compared to ”tags” used widely on the Web. The principle is that a document can belong to one or more categories. One does not define categories in advance, the structure is created by entering one or more keywords in one or several  documents. In this way, one can introduce a single document in one or more categories simultaneously without copying data.
Replication is one of the most valuable concepts. It's about allowing update of documents on different servers and also locally without being online. Then it synchronizes manually or scheduled between the sites so that all have the same information. What we really are talking about is applications. You can deploy an application and run it on several sites independently, with synchronization of data.
Views are a way to gather and present collections of documents. Documents are not stored in the views and a document can live in multiple views simultaneously. What I see in companies today is that they still have not resolved document management properly. They are stuck in the ”File Explorer swamp” with several different versions of the same documents scattered as copies in different folders on different servers . They need to rethink. Think views, replication and categories.


The Tech - How things are stored in a Notes application.

One note is the smallest unit of data in Notes. There are a number of different types of these data units with their specific properties and methods, and each note has a name that is used to communicate with it. We package several notes in a document. The documents a put in a file with the extension .nsf. We put the file in the data directory on a Domino server or locally in Note Client. This file contains not only the data but also the definition of how data should be presented and organized. Even the code for business logic, etc. are in this file, now termed Notes Application. Formerly simply called a Notes
Database. When you copy or move an application it is by "normal" file management. You now realize how portable and manageable a Notes Application is. Of course, the content can be encrypted in several ways.
What is unique compared to many other solutions is that these data units - notes, do not have hard bound relations, except that they are together in a specific document. Nor is it that all documents in an application needs to have the same set of notes. A note can also be added to or removed afterwards, per document. Each document in a application can thus be quite different in structure and set of data units.
To get some structure in this we use forms, folders and views . The forms defines how we want our data to be fed into the document and how it is presented. They also contain logic. Each document is linked to a form, but this link may easily be changed. Thus, we can easily replace the entire definition of a document by replacing the assigned form. This can be done for just a single display of the document, need not to be permanent. Note that we do not affect saved data somehow when we change form in a document. In the form we use fields to define the relationship with the underlying data units ( notes ).
The views we use to display a collection of documents based on a specific condition. For example, all documents related to a specific form and have a note with name "Status" containing the text "Published". Folders are just as it sounds, a collection of documents that the user has selected. There is no condition defined, all documents contained in the application is qualified to end up in one or more folders . Important to remember is that neither views or folders are solid structure that defines data. They only display custom content from a number of documents.


Want to know more?

Below you find a list of some valuable resources and information related to IBM Notes and Domino.
Do not forget that there are a lot of professionals in the community that are more than happy to help you into the world of IBM Notes and Domino.

http://planetlotus.org

http://collaborationtoday.info

http://openntf.org

http://www.ibm.com/developerworks/lotus/

http://socialbizug.org

http://xpages.info

http://stackoverflow.com

Dominoeffekten 9.0.1

Fredrik Malmborg  December 5 2013 10:31:22 PM
På uppdrag av Data3 har jag skrivit en artikel om IBM Notes/Domino. Målet med artikeln är att sprida kunskap om plattformen och dess unika egenskaper.

Image:Dominoeffekten 9.0.1

Länk till hela numret som PDF:  Medlemsbladet Nr 214

Länk till min artikel på Data3:s webb: Dominoeffekten



Om Data3

Data3 är användarföreningen för Power System, (tidigare System i, iSeries & AS/400) i Sverige.
Data3 är en förlängning av COMMON, den USA- och Europabaserade användarorganisation som finns i samarbete med IBM.
Villkor för medlemskapet är att företaget arbetar med ett IBM datorsystem i allmänhet och IBM Power i, i synnerhet.

The need of new shoes

Fredrik Malmborg  April 15 2013 09:16:04 AM
So you think you need a new pair of shoes?

The ones you are wearing are starting to look old and worn out. Maybe you have neglected or not prioritized the periodic shoe care that would have prevented them from being in this state. Could be you bought them a very long time ago. Then the model was fashionable and very well-fitting. Today they look dull and the perfect fit is gone since long time.

You have been looking at the hot sneakers that "all" the others are wearing. Even knowing that they will make your knees hurt after a long walk it is very hard to not consider them. Most of your friends got them already and you have to admit they look sporty and fresh (at least when they are new). Then there is the fact that you got a lot of unpleasant comments about your shoes. Especially from the people that never even tried something else than sneakers.

Finally you get back to your own sane conclusion. If you have neglected the care too long it might be best to buy a new fresh pair of shoes, well-fitted with great support for your feet. In better cases it will be good enough to let a shoemaker recondition them. You will be suprised how good they look afterwards.


If you see an allegory in the text above you might be right.

Searchresult with AJAX from $$SearchTemplateDefault without Domino generated HTML

Fredrik Malmborg  April 9 2013 09:09:52 AM
I have a searchform that sends the query to a view with some simple AJAX. The result is displayed in a div below the search filter without reloading the page from the server.

The result is formatted by a $$SearchTemplateDefault and using "Treat view content as HTML". In the view I generate HTML for table rows and cells.

The $$SearchTemplateDefault also got search specific fields like TotalHits that I use for pagination and more.

This has been working fine until IE10. Then it stopped accepting the somewhat badly structured HTML that was generated from this. The responseText from the AJAX call contained all HTML from the $$SearchTemplateDefault, like some JavaScript and form tags. Nested form tags is not good, but has been working until now.

I came up with the following solution that is very easy to implement and lets you reuse much of what you already have created.

1. Put the content you want from the $$SearchTemplateDefault inside a div.

Image:Searchresult with AJAX from $$SearchTemplateDefault without Domino generated HTML

2. Modify the code that processes results from the AJAX call. Extracting the content from inside the div we just created in the $$SearchTemplateDefault.

Image:Searchresult with AJAX from $$SearchTemplateDefault without Domino generated HTML

Looking at the resulting HTML after the AJAX call, we now see that it is clean and bright. The search result is embedded nicely and without the Domino generated HTML we dont want in this setup.

Image:Searchresult with AJAX from $$SearchTemplateDefault without Domino generated HTML

This trick can be used in many other cases. For example you could use it to get a list from a $$ViewTemplate for a categorized view.

Maybe you noticed the DOCTYPE being used. It is not optimal for IE10 but that is another story.
Some will probably prefer to use JSON instead, but that will force you to change a lot more of the code you already have.

Good old R5 Best Practices

Fredrik Malmborg  April 8 2013 10:38:31 AM
One of the most useful books about Notes development I ever read is the Yellowbook "R5 Best Practices Guide". It gives a lot of valuable tips and tricks and let any developer new to Notes understand the concept. Of course a lot has happened since it was printed but I still consider it as useful. I do not find the current development wiki to be as good as it should be (and yes I know I can participate to improve it if I like to).

I should have the PDF-version somewhere, but I cannot find it. I did find the NSF-version of it and I would like to share it even if there is a risk IBM will mind.

R5 Best Practices Guide (50BPG.zip)

Image:Good old R5 Best Practices
Part No. CT8N2NA

IBM Notes 9.0 Expert chat: Power of simple

Fredrik Malmborg  March 15 2013 11:14:27 AM
Just had the opportunity to watch the recorded expert chat regarding IBM Notes and Domino 9.0 Social Edition. There were some very interesting views and information. I try to sum them up here for you.

IBM is very happy with what they did with the new Discovery Page that is how you get to know your Notes client. The welcome page never really took off in earlier releases.

The migration tools have been totally remade and regarding to Scott Sounder it is now a very strong and useful tool to help others to get into Notes.

The "Embedded experience" is part of what we could say is how we get "Social" into the users daily work without them really knowing what happened. IBM is taking "Social" to the inbox. Then with widgets like Connections Files & Profiles, Sametime and LiveText the inbox is extended instead of moving the users to something totally new and different.

Notes/Domino continues to be OS "flexible". And now even on mobile devices. It does give companies the option to start small and not having to buy high end hardware to get it going. What was very interesting to hear was that Scott Sounder mentioned "Bring your own client". He did not want to say too much about it yet.

And if you wonder where you will find Notes and Domino inside IBM, you should look for "Collaboration solutions" instead of "Lotus".

Finally IBM Notes 9.0 has Ctrl+Shift+v to paste as simple text. That is one of the "Power of simple" that they have been working on for this very fresh release.

Expert chat participants: Victor Toal, Bruce Elgort, Scott Souder/IBM and Steve Farnsworth.

Resources:
The expert chat on YouTube
IBM Connect 2013: Messaging and Collaboration Roadmap
Ibm connect2013 id100-whats-newnotes9