PacSol UK Blog

Is MAW the right solution to modernise your iSeries? • PacSol

Written by Mark Wheadon | Jul 28, 2021 8:21:43 AM

Back in May, Mike Coulthard (PacSol’s MD) wrote a blog on Migrating software from legacy systems. In this follow up, Mark Wheadon (PacSol’s Technical Director) looks at potential ways forward with IBMi:

A modernisation option for IBM i (AS/400, iSeries) is to write a web presentation layer that still uses the underlying database or APIs.  This approach has several advantages:

  • It uses the tried, tested and stable backend code base.
  • The new GUI interface can be implemented alongside the existing, easing migration woes.
  • Modernisation can be in ‘bite-sized’ chunks. This keeps costs manageable and each phase can benefit from lessons previously learnt.
  • It saves the astronomical cost of migrating to what is perceived to be a more modern platform. 

IBM i has full support for Java and as one of the world’s most used programming languages it is ideal for writing web front ends for IBM i applications, especially when combined with a GUI framework such as Vaadin.

I used to be agnostic but now I’m not so sure …

In computing terms, being agnostic simply means not knowing (or caring) about other parts of the system. It may sound like a drawback, but in reality it is very helpful when you want to modernise your systems. This is normally achieved by two interacting modules using an interface to communicate. Each module adheres to the interface (often a set of programs to call or rules to follow) and doesn’t know or care how other modules achieve what they do.

A useful example in the Java ecosystem is Hibernate. Hibernate talks to all the common databases and also supports flavours. We are probably interested in support for IBM DB2 and it is good to know that Hibernate has a DB2/400 flavour. This means that if we write a Java application to use Hibernate to talk to our DB, then later we will be able to move that Java application to talk to another DB by just changing a setting in the Hibernate configuration. By using Hibernate you can take a major step forward in making it easier to modernise and relocate your applications.

One word of caution though, Hibernate is very flexible but it will work best if your DB is normalised (designed with integrity and logic) and doesn’t use unusual data types or data types for purposes for which they were not intended. Having said that, you can make it work but it increases the likelihood of having to fall back to native SQL, which of course may well be less portable than using the Hibernate API.

Java, Java everywhere

Why use Java when there are lots of new modern alternatives? Here’s why:

  • It is a very mature language and has a very mature and extensive ecosystem to go with it.
  • IBMi has supported Java for many years and continues to do so with enthusiasm.
  • There are lots of Java programmers out there.
  • Java itself is being modernised with each new release.
  • No single company has control over Java.
  • It is very well suited for server side computing.

Java on IBM i can use a vast array of third party open and closed source products which the heritage IBM i compilers just cannot ever hope to offer. If you have a business need, the Java ecosystem will be able to provide a solution.

Enter Vaadin

Just so you know, I’m not paid by Vaadin in any way. Why Vaadin and what is it?

In brief terms, Vaadin is a way of writing a full function GUI web application using just Java. You won’t need to know any HTML or Javascript or anything else on the browser side. During development you can even debug your GUI application in your development environment (for example an IDE such as Eclipse). You can construct your GUI by method calls or using the Vaadin designer. At run time, Vaadin will render your GUI in the browser and notify your application of events (button presses etc.), just as you would expect.

The IBM i Java Toolbox

The Java Toolbox is a package that provides full access to your IBMi from Java. This includes authentication and access to IBMi specific objects such as Data Queues and Data Areas. If you have portability in mind then you probably want to move away from using IBMi specific objects but in the meantime it is good to know that they can be accessed with ease.

Putting it all together

By using Java we can make our application code portable. Using Hibernate means that we can switch DB in the future with relative ease. Vaadin allows us to write business web applications just knowing Java and run those applications on our IBM i. You might want to migrate in the future to another platform, although with the power, scalability and security of IBM i you might feel that your critical line of business applications are in just the right place. At the end of the day, you are giving yourself more choice.

 Mark Wheadon, Director. July 2021.

 

 

 

#PacSolUK #IBMi #iSeries #Vaadin #Java #DocumentManagement #ECM