Thursday, June 8, 2017

IBM Domino Application Transformation Jumpstart Workshop at MWLUG 2017 on Tuesday, August 8, 2017




Announcing one of two workshops at MWLUG 2017. Our Platinum Sponsor, panagenda is having a workshop on Tuesday morning on August 8, 2017 from 9:30 AM to 1:30 PM, "IBM Domino Application Transformation Jumpstart". This free workshop covers a number of important topics including ApplicationInsights which is now shipped with Domino. To register for this workshop go to: 

https://www.panagenda.com/news-events/events/ibm-domino-application-transformation-jumpstart/





Dave Navarre Welcomes you to MWLUG 2017 and Washington DC

We are starting process of reviewing all the abstract submissions for MWLUG 2017.  We received close to 80 submissions. Thank you to all the submitters for taking the time to submit their abstracts.

I would like to introduce Dave Navarre, our local representative from the Washington DC area.  He would like to welcome you to his town.


Friday, May 26, 2017

New Presentation Track for MWLUG 2017, Watson Work

For MWLUG 2017 we have a new presentation track, Watson Work.  This track will include presentations on Watson Workspace and Work Services.  So stay tuned for more information on many new things coming to MWLUG 2017

MWLUG 2017 Abstract Submission deadline extended to June 2, 2017, 6:00 pm CST

Due to the holidays and request from a number of potential speakers, abstract submission for MWLUG 2017 has been extended to June 2, 2017, 6:00 PM CST.  So if you are planning to submit an abstract for MWLUG 2017, you have another extra week.  But don't wait to the last minute !!!

To submit go to: http://mwlug.com/mwlug/mwlug2017.nsf/sessionabstract.xsp

Monday, May 22, 2017

Abstract Submission for MWLUG 2017 closes this Friday, May 26, 2017

Abstract Submission for MWLUG 2017 closes this Friday, May 26, 2017 at 5:00 PM CDT. So get your abstracts in as soon as you can.

Are you new to speaking? Well here is your chance to speak at a conference on a topic that you know well. Every year we reserve a number of speaking slots for new speakers. So take this unique opportunity to speak at a MWLUG conference and submit an abstract.

To submit your abstract go to: http://mwlug.com/mwlug/mwlug2017.nsf/sessionabstract.xsp

We look forward to getting everyone's abstract.


Sunday, May 14, 2017

Engage 2017 and Presentation - Unleash the Power of REST APIs with Dojo

At the beginning of this week, I was fortunate enough to attend Engage 2017. This was the first time that I had not only presented at Engage, but also attended Engage.  Theo does an amazing job in creating this premier event.  The turnout for my session, "Unleash the Power of REST APIs with Dojo"  was more than I expected.

It has been awhile since I was in Europe.  So I took a couple days off before Engage to visit Amsterdam which I have never been to and a couple days after Engage to visit Belgium.  Amsterdam, though it has a lot of history, I found it too much of a tourist trap.  After the first day, I wandered off to the outskirt of the city where there were less tourist and had great time.  I got the Amsterdam Card and got into most of the museums and places at no additional cost.  I was able to ride the metro and trams with this card at no extra charge.  However, it does not work for some buses.  The lockers in Amsterdam station are great for tourist to leave their luggage while you tour the city.  Just make sure your credit card works with the lockers, before you close it.  Also bring coins with you because water closets ( rest rooms ) are not free in the train station.

Antwerp, Belgium is a beautiful European city.  Rather than walking throughout the city, I rented a bike for the two days after Engage and biked about 140 km mostly in the countryside where I found it to be more interesting.  My adventure in Antwerpen was more of getting lost and trying to get back to the Cyclant Bike store where I rented the bike from before they close each day. Jona and Nicolas are great.  I would recommend them if you need a bike for the day.  They are located in the Antwerp Train Station.

I have enclosed a link to my presentation plus the source code for all the demos.

https://www.dropbox.com/s/6tentwxi8vcwtxe/Unleash%20the%20Power%20of%20REST%20APIs%20with%20Dojo-Engage%202017.pdf?dl=0

https://www.dropbox.com/s/5ou0dn8u6xx6pev/Engage%202017%20-%20Demos.zip?dl=0

Tuesday, May 2, 2017

MWLUG 2017, "Moving Collaboration Forward", The New is Old and the Old is New

MWLUG 2017 mark the ninth annual ICS user group conference that we as a community are coming together to network and learn for each other.  It will be held at the beautiful Hilton Mark Center in Alexandria, VA near Washington DC from August 8 - 10, 2017. Like always we are planning many activities at MWLUG.

Unlike previous years, MWLUG 2017 will be held from Tuesday through Thursday rather than the previous years where the conference was held from Wednesday until Friday.  This was one of the feedback that we receive last year.

Our ICS community is in a state of transition as the market is changing and new technologies are introduced not just by IBM but from open source environment and other technology vendors.  No one vendor can silo themselves within their own technology.  Users are looking for the best breed.  IBM has answered this call with new solutions derived from open source technology like Docker, MongoDB, and Node.

However as the same time, these new technologies also remaking existing our ICS technologies like Domino to become innovative solutions for organizations and allow them to improve and grow.

In tune with the MWLUG 2017 theme "Moving Collaboration Forward", we are planning sessions this year to include new IBM technologies like:

  • IBM Pink Connections
  • Watson Workspace
in addition to existing IBM technologies:
  • IBM Cloud
  • IBM Connections
  • IBM Domino
  • IBM Sametime
  • IBM Traveler
  • IBM Verse
and open source technologies that are enhancing and are the key to the future success of  both existing and newer ICS solutions:
  • Angular
  • Docker
  • Graph
  • Node
  • Linux
  • Loopback
  • MongoDB
  • MVC
  • ReactJS
  • REST API
  • Web Security
(HINT: MY WISH LIST)



So come join us and share your knowledge, registration is open. Take the time to submit your abstract. Don't be afraid. We are always open to new speakers. Abstract submission ends on Friday, May 26, 2017.

Register:

Submit your abstract:


Friday, April 28, 2017

Unleash the Power of REST APIs with Dojo, Engage 2017, May 8-9, 2017

For the first time, I will be attending Engage 2017 in Antwerp, Belgium.  It has been awhile since I have been in Europe and it will be nice to take a few days to visit Amsterdam and Belgium and then see many friends and colleagues at Engage.  Phora Group is a Bronze Sponsor and I will be speaking on my favorite subject, Dojo/MVC/REST.

My presentation is entitled "Unleash the Power of REST APIs with Dojo"  I have 22 demos that walks attendees through the process of creating a number of commonly used controllers, implementing data binding and react in Dojo. Then, we will combine all what we have learned with IBM Domino REST services and other open source projects to create a dynamic interface that we would not expect with Domino and Dojo.

Theo mentioned that there is still a few available attendee slots left.  So take the opportunity to come to Engage 2017, learn and network.  See everyone soon.

Monday, April 24, 2017

Data Binding and React with Dojo

If you have developed with XPages, this might have been your first experience with the Dojo framework.  However, for many the experience have been frustrating and negative. Unfortunately, IBM's implementation of Dojo into XPages was limited and really restricted the potential of Dojo. It never implemented the newer AMD design approach nor the many of the capabilities of Dojo.

Many developers who went towards the JavaScript Framework/REST approach with Domino implemented Angular, React, and even Vue for interfacing to the Domino server and bypassed frameworks like Dojo.  One of the big buzzwords for these newer frameworks is react and single/two-way data binding.

As a designer and developer who uses Dojo to create UIs  that work with RESTful APIs /Domino, it is frustrating to see all this attention to Angular and React when all the cool things they are known for has been in Dojo for years and in many ways before these frameworks.

Recently, I presented a session called "Unleash the Power of Dojo" where I showed that there are four different ways of doing data binding and reacts with Dojo including:

  • Observables
  • On/emit
  • Topic/subscribe
  • Watch
With four different ways, Dojo provides developer more options on how to implement data binding and reaction to better match their needs.

As part of the presentation, I walked attendees through the process of creating Dojo controllers in combination with Bootstrap, Fontawesome, ChartJS and other open source projects to create dynamic and reactive interfaces.  I have enclosed the presentation and demo source code here which includes the Bootstrap, Dojo, ChartJS, and Fontswesome distribution files which are owned by their respective owners and are licensed accordingly.  Included in the demos are a number of examples on how to use Dojo to perform one and two way data-binding which was the craze when developers were demonstrating Angular, plus react with Charts and also data-binding with data models.  

I will be presenting a more comprehensive session called "Unleash the Power of REST APIs with Dojo" at the Engage Conference in Belgium May 8-9, 2017, https://engage.ug/engage.nsf/Pages/Event20170508_Sessions5. Hope to see you there.

Presentation:

Demo:










Thursday, January 26, 2017

Creating Beauty with UglifyJS

For the past five years, we have been using a Notes-client base tool called iPhora Application Designer, that we created to build our iPhora applications written for our Dojo-based iPhora-MVC platform. This tool is written entirely in LotusScript and @Formula language.

With this tool we compile the  XML/JS view code into pure JavaScript onto a targeted application server all without opening Domino Designer.  Rarely do we venture into using Domino Designer. We only use Domino Designer to enhance our tool or fix a bug. Since this tool is Notes-client based, a key advantage of this tool is the ability to replicate every day our code to a backup server and when we are at home we can replicate to our computer at home.

Currently, our JavaScript MVC platform has over a 1,000,000 lines of Dojo/Javascript code and it grows every day as we add new widgets and modules. Majority of the code is automatically generated by our iPhora Application Designer. Can not imagine generating the code manually.

As part of the compilation process, we created a code HTML/JS minimifier in LotusScript to compress the code.  However, it never really worked the way that we wanted it to and it could not obfuscate the code. So we decide to look elsewhere for help.

There are many JS minimifier out there, but we wanted the ability to integrate it with our development process and also our iPhora Application Designer.  So we looked into integrating tools that we can run using the LotusScript Shell command to process the JavaScript.

After researching different alternatives, we decided to tried a node-based solution called UglifyJS which has a command line interface which we can invoke using the LotusScript Shell command.

First, you need to download and install the latest version of Node.  Make sure that you include the NPM manager during the installation process.

https://nodejs.org/en/download/

After installing node and npm, open a command line window and install uglifyJS from the NPM depository using the following command line.


npm install uglify-js -g

Now that you have installed UglifyJS, you need to confirm that it is working correctly. Create a simple JavaScript file called test.js and run UglifyJS using the following command.

uglifyjs test.js -c -m -o test.min.js

-c : compress the code
-m : mangle the code
-o : declare that there is output file with the following name

If the resulting test.min.js is a compressed mangled version of test.js then it is working.  

We could manually create files and then uglify them one at a time and then uploaded them to the server, but that is time consuming and laborious. Automation is key to reducing the time that you need to spend coding. So we needed to figure out a way to automate the process.

Our XML/JS code are stored in Notes Rich-text fields. When the code is compiled, the generated compiled code is pushed into the targeted Domino server using good old DXL. 

In order to minimify the code using UglifyJS we needed to change our process. Rather than compressing the code using the LotusScript and then pushing it up to the server, we needed a way to get it into the format that the Node-based uglifyJS can use, compress and mangle the code, read the code and push it into the server all in one single operation.  Show below is the process and code that we created to achieve our goal.

Read JavaScript Code from Rich Text

To get the code from the rich-text field using "GetUnformattedText()" Lotusscript rich text item method.

Set ritem = doc.GetFirstItem(fieldName)
If Not(ritem Is Nothing) Then
code = ritem.GetUnformattedText()
else 
code = ""
end if
fileName = tempGetNotesDirectory() & |\| & |input.js|
Dim fn%
fn = FreeFile
Open fileName For Output As fn
Print #fn,code
Close fn

Create Batch File to Process the JavaScript

cmdLine = |uglifyjs input.js -c -m -o output.js|

Create a batch file that has the command to run UglifyJS, UglifyJS.bat


cmdLine = |uglifyjs input.js -c -m -o output.js|

fileName = tempGetNotesDirectory() & |\| & |UglifyJS.bat|

Dim fn%

fn = FreeFile
Open fileName For Output As fn
Print #fn,cmdLine
Close fn

Run the batch using the LotusScript Shell command to create the file "output.js"

batchInstance = Shell("UglifyJS.bat",0);

The problem that you have running a batch file using Shell is that there is no way to know if the process has been completed using LotusScript. However, an easy way to check if the process is done is determine if the file output.js has been created.  If not, wait and check again. The following code allows you to query the file system for completion. The uglifying process is very fast, but a large JavaScript file may take longer. The code waits for 1 second and checks the file system. It tried this 10 times and if it can't find it the entire process is killed off.

Function runBatch() as Boolean
Dim tempdir As String
Dim i As Integer
i = 0
On Error GoTo ProcessError
batchInstance = Shell(tempdir &"\node_batch.bat", 6)
Do While i < 10
Sleep(1)
If Dir$("output.js",0) <> "" Then
Exit Do
End If
i = i + 1
Loop
If i > 10 Then
runBatch = false ' process timeout
Else
runBatch = true  ' process ran successful
End if

End Function

After the process completes we need to read the output.js file so that we can push it up to the Domino server.

Function readJSFile() As String
Dim tempdir As String
Dim fileName As String
Dim uglifiedCode As String
On Error GoTo ProcessError
tempdir = tempGetNotesDirectory()
fileName = tempdir & |\output.js|
Dim fn%
fn = FreeFile
Open fileName For Input As fn
uglifiedCode = Input(LOF(fn), fn)
Close fn
readJSFile = uglifiedCode
End Function

Using our DXL-based methods we stream the compressed and mangled file up to the Domino server.

There is one more step that is required. We need to delete all the files that we created in the temporary directory so that we can process another file. If not, the process can not be repeated since there will always be a output.js file.

Function removeTempFiles() as Boolean
tempdir = tempGetNotesDirectory()
kill tempdir & |\uglifyjs.bat|
kill tempdir & |\input.js|
kill tempdir & |\output.js|
End Function

tempGetNotesDirectory(), function to find the Notes temporary directory

The inclusion of UglifyJS to our iPhora Application Designer has been so successful that we have added other Node-based developer tools to it using the same method to connect our Notes-based tool to new and modern development tools. So far we have added CSSLint and Minifier to cleanup and compress our CSS file. We are looking for other Node modules that we can include to help us automatic the development and testing process. There are thousands of npm modules that run on Node. There are many to choose from.

If you are using the Domino Designer, you should look at this Node-based tools to add new capabilities in your developer's toolbox. How that can be done is beyond my skills.