TexasSwede
texasswede@gmail.com
  • About this blog
  • My Website
  • My Resume
  • XML Export Tool
  • Photos

Monthly Archives: December 2017

Convert US state abbreviations in Javascript

Posted on December 12, 2017 by Karl-Henry Martinsson Posted in #IBMChampion, Javascript, NetSuite, Programming Leave a comment

I was working on a NetSuite project today, and I ran into a problem. I used DataTables to display sales orders. The data is retrieved through an Ajax call to a RESTlet on the server.

One of the columns to display is the state of the shipping address. The table had a number of columns, so I was happy that the state coming over during the early testing were the abbreviated state. But today I noticed that after real data had been entered into the system, the state was the full name. And I had no space left in the table for that.

So I did a quick search and found a snippet of code that converted between abbreviation and full name and vice versa. I made some minor modifications to the code, mainly to clean it up and also make the code easier to read. I introduced two constants to indicate which kind of conversion to use, and replaced the traditional loop through the array with a for…of iteration.

You can find the code here: https://github.com/TexasSwede/stateAbbreviations

And this is how you use it:

var stateName = convertRegion("TX",TO_NAME);                       // Returns 'Texas"
var stateAbbreviation = convertRegion("Florida",TO_ABBREVIATED):   // Returns "FL"

This code is of course not specific to NetSuite, it is plain Javascript. You can use it in a Domino web application or even in a Notes form. And naturally you can use it in pretty much any web application where you can use Javascript.

Enjoy!

Domino 10 and Beyond – my thoughts

Posted on December 3, 2017 by Karl-Henry Martinsson Posted in #Domino2025, #IBMChampion, App Modernization, IBM/Lotus, Javascript, Lotusscript, Notes/Domino, Watson, Web Development 5 Comments

It has now been a little over a month since IBM announced the new direction of IBM Notes, Domino, Verse and Sametime. I have been thinking through what I think this means for the product and the ecosystem of third-party tools and business partners. Some people view the move of development from IBM to HCL Technologies as an abandonment of the product family. But that is not how I see it.

IBM has, despite their size, limited resources to dedicate to development of the Domino family of products. They have new products and services they are trying to bring to market, and by having HCL take over the development and add more resources, this is a win both for IBM and for Notes/Domino.

With more developers dedicated to the product, I expect to see more frequent updates and new features added quicker than we have been used to the last 5-6 years. The product management and future direction of the platform is still managed by IBM, but with more non-IBM resources at their hands I hope the product managers will be able to push harder for the addition of new technology and updates, bringing Domino back to a first class development platform.

Domino was an outstanding product, but for the last 6-8 years the innovation mostly stopped. New technologies were not added at the pace they were adapted by the rest of the world, and the support for new protocols like TLS 1.2 was lagging. IBM also but on Dojo as the framework for XPages, while the rest of the world mostly went to jQuery.

But if IBM allows HCL to update some aging parts and add new functions, requested by the community, I can see this being a great platform. And IBM says they will listen to the community and the users. Starting this month, IBM is bringing the Domino 2025 Jam to four cities in North America: Toronto on 12/8, Dublin (Ohio) on 12/13, Chicago on 12/14 and Dallas on 12/15. here will also be several events in Europe as well as a virtual Jam sometime in the future.

At the Domino 2025 Jam developers and users will be able to suggest what features they find important, what needs to be fixed, and where they want to see the product go in the future. I don’t think the Jam will have a huge impact on the upcoming Domino 10 release next year, but it may help IBM prioritize where to put their effort. Where I see the Domino 2025 Jam being helpful is in the longer timeframe, especially if it is repeated every 12 to 18 months to verify that the product direction is still what the market is looking for.

I also would like to see IBM addressing at least the most requested changes on IdeaJam.

Let me describe some of the functions and features I want to see in an upcoming version of IBM Domino.

Javascript Everywhere

For the last 20+ years we have mainly been using Lotusscript, both in the client and for agents on the server. It is a powerful language, but if you have been working with other more modern languages (Lotusscript is based on Visual Basic) there are many limitations and functions you are missing.

I would like to see Javascript made into a fully supported language everywhere. Both in the client and on the server. Add support for jQuery, to make it easy to address elements, and create a Javascript API to complement the Lotusscript functions.

In addition to making it easier to create and parse JSON (used in and by most web applications today), it would open up the product to new developers who may come from a more traditional web development background.

I would love to see Lotusscript get a modernization, but I doubt that will happen. In order to improve Lotusscript, a quite lot of changes are needed. Instead I think the future improvements should be on the Javascript API side.

External API

Any modern product needs a public API so other tools and applications can integrate with it. I would like to see support in Domino for LoopBack, like IBM is doing in LiveGrid. When you create a view, there would be a matching API created to create, read, update and delete documents, as well as list all records, perform searches, etc.

But there should also be additional more specialized API:s available, perhaps the most common functions should be exposed as API calls out of the box.

Integration with External Services

Notes and Domino also needs integration with external services, e.g IBM Watson, Mongo DB or Node-RED. Why not support for IFFTT? Expose the calendar as a Google Calendar feed. But also make it easy to connect external services to Notes and Domino. Make it easy to use Oauth 2.0 to login to a Domino-hosted service and vice versa.

New Domino Designer

Unlink Domino Designer from the Notes client. Create a Eclipse plug-in (and make sure it stays updated to work with new versions of Eclipse). This will help new developers to start working with Domino, using tools they are already familiar with. The goal should be that someone familiar with Javascript should be able to open Eclipse and start writing code for Domino, and the only thing they need to learn is the Domino Object Model.

Add ready-to-use web components/plugins, so the developer can easily add for example a name-lookup into Domino Directory or a date/time selector. Support CSS frameworks like Bootstrap, and make it easy to modify the look of the applications.

Notes Client

The Notes client makes it easy to quickly build applications. You get a lot of the core functionality of the applications “for free”, like views, forms, etc. But you are also limited in how the application looks. You can change the look of views somewhat by selecting background colors, fonts and a few other attributes. On forms you can select between two different looks for some of the fields, while other fields can not be modified at all. What I would like to see is a way to easily restyle everything by using CSS. Then you can make the forms and views look much more modern. Let the developer create “themes”, a set of CSS rules and perhaps images that can be applied to new applications in seconds. These themes could be published online, for other developers to use.

These are just some of the ideas I have for improvements to Domino. What are you ideas?

IBM Bluemix is now IBM Cloud

Posted on December 3, 2017 by Karl-Henry Martinsson Posted in #IBMChampion, Cloud, IBM/Lotus, Watson Leave a comment

IBM recently renamed IBM Bluemix, their PaaS (Platform as a Service) offering, to IBM Cloud. This new name makes more sense, and much better describes what it is. From a marketing view, this is a good change.

From a technical point, nothing changes. You still have a huge amount of different services and API:s to pout together in any way you like. At MWLUG 2017 in Washington, DC I demonstrated how to build a translation tool and a text-to-speech tool in a few minutes using IBM Cloud (back then still called Bluemix) and then use that functionality in your web applications or even in the IBM Notes client.

I was just scratching the surface on IBM Cloud, using Node-RED and IBM Watson to make this possible. If you haven’t signed up for a free IBM Cloud account, go ahead and do it. Spend a few hours looking around, and I am sure you will find several useful tools.

Why not use IBM Cloud to host your Mongo DB or SQL database? Or take advantage of the powerful Watson API? You can focus on developing your applications, instead of having to build the infrastructure yourself. I see this modular approach as a good way to build applications in the future.

 

HCL Ambassador 2020

HCL Ambassador 2020

IBM Champion 2014-2020

Stack Exchange

profile for Karl-Henry Martinsson on Stack Exchange, a network of free, community-driven Q&A sites

Notes/Domino Links

  • Planet Lotus Planet Lotus
  • IBM dW Forums IBM dW Forums
  • StackOverflow StackOverflow

Recent Posts

  • Notes and Domino v12 is here!
  • NTF Needs Your Help
  • Helpful Tools – Ytria EZ Suite (part 2)
  • Busy, busy – But wait: There is help!
  • Semantic UI – An alternative to Bootstrap?

Recent Comments

  • Lotus Script Multi-thread Message Box [SOLVED] – Wanted Solution on ProgressBar class for Lotusscript
  • Viet Nguyen on Keep up with COVID-19 though Domino!
  • Viet Nguyen on Keep up with COVID-19 though Domino!
  • Mark Sullivan on Looking for a HP calculator? Look no further!
  • Lynn He on About This Blog

My Pages

  • How to write better code in Notes

Archives

  • June 2021 (1)
  • April 2021 (2)
  • March 2021 (1)
  • August 2020 (3)
  • July 2020 (2)
  • April 2020 (2)
  • March 2020 (1)
  • December 2019 (2)
  • September 2019 (1)
  • August 2019 (2)
  • July 2019 (2)
  • June 2019 (3)
  • April 2019 (2)
  • December 2018 (1)
  • November 2018 (1)
  • October 2018 (5)
  • August 2018 (2)
  • July 2018 (3)
  • June 2018 (2)
  • May 2018 (1)
  • April 2018 (2)
  • March 2018 (1)
  • February 2018 (2)
  • January 2018 (4)
  • December 2017 (3)
  • November 2017 (2)
  • October 2017 (2)
  • September 2017 (1)
  • August 2017 (2)
  • July 2017 (6)
  • May 2017 (4)
  • February 2017 (1)
  • January 2017 (2)
  • December 2016 (2)
  • October 2016 (3)
  • September 2016 (4)
  • August 2016 (1)
  • July 2016 (2)
  • June 2016 (2)
  • May 2016 (3)
  • April 2016 (1)
  • March 2016 (4)
  • February 2016 (2)
  • January 2016 (4)
  • December 2015 (3)
  • November 2015 (2)
  • October 2015 (1)
  • September 2015 (2)
  • August 2015 (1)
  • July 2015 (5)
  • June 2015 (2)
  • April 2015 (2)
  • March 2015 (3)
  • February 2015 (2)
  • January 2015 (10)
  • December 2014 (1)
  • November 2014 (3)
  • October 2014 (3)
  • September 2014 (13)
  • August 2014 (6)
  • July 2014 (5)
  • May 2014 (3)
  • March 2014 (2)
  • January 2014 (10)
  • December 2013 (5)
  • November 2013 (2)
  • October 2013 (5)
  • September 2013 (4)
  • August 2013 (7)
  • July 2013 (3)
  • June 2013 (1)
  • May 2013 (4)
  • April 2013 (7)
  • March 2013 (8)
  • February 2013 (9)
  • January 2013 (5)
  • December 2012 (7)
  • November 2012 (13)
  • October 2012 (10)
  • September 2012 (2)
  • August 2012 (1)
  • July 2012 (1)
  • June 2012 (3)
  • May 2012 (11)
  • April 2012 (3)
  • March 2012 (2)
  • February 2012 (5)
  • January 2012 (14)
  • December 2011 (4)
  • November 2011 (7)
  • October 2011 (8)
  • August 2011 (4)
  • July 2011 (1)
  • June 2011 (2)
  • May 2011 (4)
  • April 2011 (4)
  • March 2011 (7)
  • February 2011 (5)
  • January 2011 (17)
  • December 2010 (9)
  • November 2010 (21)
  • October 2010 (4)
  • September 2010 (2)
  • July 2010 (3)
  • June 2010 (2)
  • May 2010 (3)
  • April 2010 (8)
  • March 2010 (3)
  • January 2010 (5)
  • November 2009 (4)
  • October 2009 (7)
  • September 2009 (1)
  • August 2009 (7)
  • July 2009 (1)
  • June 2009 (4)
  • May 2009 (1)
  • April 2009 (1)
  • February 2009 (1)
  • January 2009 (3)
  • December 2008 (1)
  • November 2008 (1)
  • October 2008 (7)
  • September 2008 (7)
  • August 2008 (6)
  • July 2008 (5)
  • June 2008 (2)
  • May 2008 (5)
  • April 2008 (4)
  • March 2008 (11)
  • February 2008 (10)
  • January 2008 (8)

Categories

  • AppDev (9)
  • Blogging (11)
    • WordPress (5)
  • Design (5)
    • Graphics (1)
    • UI/UX (2)
  • Featured (5)
  • Financial (2)
  • Food (5)
    • Baking (3)
    • Cooking (3)
  • Generic (11)
  • History (5)
  • Hobbies (10)
    • LEGO (4)
    • Photography (4)
  • Humor (1)
  • IBM/Lotus (175)
    • #Domino2025 (14)
    • #DominoForever (8)
    • #IBMChampion (46)
    • Administration (7)
    • Cloud (7)
    • CollabSphere (8)
    • Community (47)
    • Connect (33)
    • ConnectED (12)
    • Connections (3)
    • HCL (12)
    • HCL Master (1)
    • IBM Think (1)
    • Lotusphere (46)
    • MWLUG (25)
    • Notes/Domino (97)
      • Domino 11 (7)
    • Sametime (8)
    • Verse (14)
    • Volt (2)
    • Watson (6)
  • Life (8)
  • Microsoft (7)
    • .NET (2)
    • C# (1)
    • Visual Studio (1)
  • Movies (3)
  • Old Blog Post (259)
  • Personal (23)
  • Programming (83)
    • App Modernization (11)
    • Formula (4)
    • Lotusscript (46)
    • NetSuite (4)
      • SuiteScript (3)
    • node.js (4)
    • XPages (4)
  • Reviews (9)
  • Sci-Fi (4)
  • Software (24)
    • Flight Simulator (2)
    • Games (4)
    • Open Source (2)
    • Utilities (6)
  • Technology (37)
    • Aviation (3)
    • Calculators (2)
    • Computers (6)
    • Gadgets (7)
    • Mobile Phones (7)
    • Science (3)
    • Tablets (2)
  • Travel (6)
    • Texas (2)
    • United States (1)
  • Uncategorized (15)
  • Web Development (50)
    • Frameworks (23)
      • Bootstrap (14)
    • HTML/CSS (12)
    • Javascript (32)
      • jQuery (23)

Administration

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Tracking

Creeper
MediaCreeper
  • Family Pictures
© TexasSwede 2008-2014