Wednesday, January 15, 2014

IBM Connect 2014

This year I have the privilege of being able to attend IBM Connect 2014.    This will be my third 'Sphere that I have attended, and the first this century.  My last Lotusphere was in 1999, and before that 1996. Back then there were loads of people, and it was very hard to score a ticket.

When I went in 1996, I had just started working with Notes just a month or two before, and my manager comes to me and hands me a ticket and says, 'Guess what, you are going to Orlando'.   He had bought the ticket for himself, but had a conflict, and I got to go.  Everything was so new that year, I just remember taking tons and tons of notes (no pun intended).  I remember well all the cheering and clapping when the features of Notes 4 were revealed.  Good times.

In 1999, I got to go again and learned a ton more.  I think that was the year that Notes 5 was introduced to great fanfare.  That was also the year that I almost accidentally knocked over Ray Ozzie.  I was entering a door and it was sunny and I couldn't see someone about to come out due to the reflection, and I nearly knocked him over with the door.  Thankfully Ray was nimble of feet and jumped out of the way just in time. Lotusphere was always fun for meeting people all over the world, I remember hanging that year with several Norwegians and Brits.  Good times again.

For many years after that, I was either an hourly contractor or worked at a company that didn't put value in conferences.  If I was to attend Lotusphere it would have to be on my own $.  With my current job, I am a salaried employee, and at a company that puts value in training, so I am able to go this year.

In addition to the sessions, I hope to meet lots of people.  I have tried to be more active in the Notes community, and hope to meet many that I have interacted with on Twitter, Stack Overflow, or blogs (there's or mine).   If you see me, please come by and say Hi.  If you have a get together, I am open to invites, I am @szavocki on twitter.

My Connect 2014 Schedule (subject to change):


Life is full of conflict

I know that time conflicts are inevitable, but there are several sessions that I really wanted to attend that I can't due to conflicts.  These sessions are ones I can't attend due not being able to be in two places at once.

  • Creating a Great XPages User Interface (really hoping they add a second Sunday session for this one)
  • Creating State of the Art Web Applications with REST services
  • End-to-End Quality Processes for Top Notch XPages apps
  • Improving your IBM Designer Experience
  • IBM Domino App Dev: Today and Tomorrow
  • Rapid XPages Dev using the Application Layout Control
  • Creating a Mobile Application Framework with XPages (This one pains me the most)

Free Certifications

In addition to the sessions, I also plan on taking two certification tests since they are offered for free.  I am already an 8.5 Application Developer, so I plan on taking the update test to make me a Certified Application Developer in Notes 9.   I also plan on taking the Notes Admin Test LOT-406, which if I pass will make me and Advanced Certified Application Developer in Notes 9.  Right now, I am studying for both tests.  I hope to take the first on on Monday, and the second on Wednesday.  

Again, I hope to meet many of you that I have come to know virtually these last few years since I decided to become more involved.  See you all in 11 days.

Tuesday, January 7, 2014

Creating a PDF dynamically from an XPage - Part 3

In this my third post on how to dynamically create a PDF from an Xpage, I am going to explain my use of tools for creating the XSL stylesheet.  Part 1 is here, and Part 2 is here.

Overview

The XSL stylesheet is what is used to layout the design of the data onto the page.  It reads an XML file, and transforms it using the XSL with the result being a PDF document.

In the past, I have used this flowchart that I made.  This post will focus on the stylesheet creation in the big gray box.

You can create your own XSL stylesheets without using a tool, but it is like writing java without an IDE.   There are several tools that I know of to create XSL for you.  Most of these tools do much more that just XSL and that is reflected in the price.  This page links to companies that make these tools.  The prices for these range from $400 to ~$1000 for a single user license.   There is also a inexpensive solution to use which is called FO Designer which is about $60.  We went with FO Designer, with the thinking being that this tools just does what we want without paying for features we wouldn't use.  I will save my commentary of it for the opinions sections at the end.

The FO Designer works this way.  You visually layout on the screen your form, then you push a button to generate the XSL-FO.  I would then copy the generated FO into a stylesheet within Domino Designer.  I would then refresh my page, and test the PDF.  The tool had a way to test PDFs but I needed it to work within Domino, and I didn't consider the tools PDF generation a true test.

FO Designer

The Opinion Section

This section is named such so I can tell you what I really think.  Here are the major obstacles that I faced.

1) FO Designer might have been great in the year 2000, but it is inadequate now.  I regret thinking that I could make it work.  I wish I pushed for one of the modern higher $$$ options.  It doesn't seem to support tables, and vertical lines don't render.  It has no undo, and is very clunky to use.  When you create an element and set the Xpath to "absolute", and then copy and paste that element it resets to "relative" which causes the PDF creation to fail in Domino.

2) PDF creation in Domino is an all or nothing proposition.  If there is any part of the code not exactly 100% perfect then the PDF creation will fail, and you won't know why.  I found myself having to examine the generated XSL in sublime text prior to copying into my application.

The Recommendation Section

If you find yourself needing to create PDF's this way then I recommend the following.

1) Choose one a different tool than FO Designer.  It will cost you or your company more money, but it will save a lot of frustration.  I can't offer a recommendation as I haven't tried the others.

2) Test your work NOT in Domino, but using web based tools like this one http://www.utilities-online.info/foprender/#.UsxyvPRDuSo   This tool will give you a hint of what is wrong, when something is wrong, as opposed to just not working.   Once it looks right here, then you can copy it into Domino and test it there.

3) The XSL will transform a single XML file.  If you have multiple document that need to be combined into a single XML file, I found the following to be a quick and easy way to do it.

  • In your java method that generated the XML, do a lookup and get a handle to the related documents
  • Loop through the related documents, and copy the values you want on the PDF onto the main document
  • Once the items are copied to the main document then run the generateXML() method
  • Don't save the main document with all the new values on it, you want the PDF to only have the latest data each time you create it.
As for me, we are putting this part of the project on hold.  I hope we come back to it, as I have invested a lot of time and effort in getting this far.  In another sense I am relieved to move on.