RPG Academy - Modernization: Guidelines for Modernization Goals, Part 2

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Ready to give your application a facelift? This article will help you understand how to set UI-related modernization goals.

As explained before, there are four ways to approach your modernization goals: replacement, reengineering, refacing, and refactoring. The last article covered the first two, and I’ll now discuss refacing or, in other words, how to “beautify” your ages-old IBM i application.

Time for a Facelift

After all, it’s only fitting: after a certain age, people sometimes seek the help of a plastic surgeon to make them feel better about themselves. Refacing is the equivalent process for your aging IBM i application. As you might have gathered, this approach focuses solely on the UI of the application. The idea here is rapidly improving flexibility and usability from the user’s point of view, without going into major code reengineering processes. The technology has been around for a while, and even people from IBM decided to pull a rabbit out of their HATS at a certain moment in time. (Pun intended—if you didn’t get it, here’s a hint: IBM has a product called Host Access Transformation Services.)

Anyway, changing the UI and nothing else is a quick solution to implement because you’re not going to touch the database or business rules. If you’re wondering if this is putting a coat of paint on an old car and calling it new, then you’re right. However, it can be a good first step toward modernization because it can quickly give a fresh face to an “old and outdated” application. Naturally, a second step that modernizes the code and/or the database should follow. If you’re still not convinced, here’s an example: using a refacing technology, you can potentially move a 5250 green-screen application to a web or mobile application in a matter of days.

Now let’s analyze two different types of refacing:

  • Screen scraping—This is the oldest type of refacing. It’s been around for quite some time. Screen scraping provides a “man-in-the-middle” approach between the 5250 green-screen and the new graphical UI. Basically, it translates mouse clicks, drags and drops, and other GUI operations into keystrokes and function key presses. It also scrapes the data sent to the green-screen by the application and displays it in a nicer UI. This is particularly useful when you no longer have access to the application’s source code and want to modernize it.
  • RPG Open Access—If you still have access to the source code and want more control over the way the new UI works, then RPG Open Access (RPG OA) is the way to go. I’ll talk a bit more about RPG OA later in the series, but for now, know that this is a free tool. (Yes, IBM initially charged for it, but now it’s free.) It enables you to bypass the 5250 data stream and direct the RPG’s program I/O buffer to the RPG OA handler.

More Than Just New Good Looks

As you might have guessed, a refacing approach has some benefits that can’t be overlooked:

  • It’s a quick start and potentially a quick win. Because you don’t need to understand the code or change the business logic, refacing is a fast way to modernize an application’s UI. It’s also a quick win because it might help you get that essential top management support that you’ll need for the rest of the modernization process.
  • Only the UI changes. Refacing focuses solely in the UI, without changing the application code at all in the screen-scraping approach or by performing minimal changes in the RPG OA approach. Naturally, limited changes dramatically reduce the risk of “breaking” something that you might not entirely understand: your legacy application.
  • It’s a nice prelude to the “real” modernization process. It might be OK in certain circumstances to start and end the modernization process with the UI, but in most cases, it’s simply not enough. Actually, most experts agree that changing the UI is a good first step, but it’s never enough. Business and management will want more. This means that you will need to take the plunge and dive deeper into the application’s depths to fulfill the new requirements.

Just Like Its Surgical Equivalent, Refacing Has Some Risks

I imagine that while you’re reading this, you’re thinking, “Sounds peachy! Let’s start refacing right now!” Well, not so fast…there are a few risks that you need to be aware of:

  • It’s nice but slow. After the refacing, your application will look much nicer, but it might also be considerably slower, because both refacing approaches take their tolls on the system. If you don’t change anything else, performance might be severely affected.
  • It’s beautifully dumb. The new UI is forced to follow the same flow as the old 5250 UI, which means that some of the old interaction logic might not fit nicely with the new UI. Interacting with a green-screen application is obviously different from interacting with a web or mobile application, but unless you go deeper and change the program’s flow, you’re limited to the existing 5250 UI flow. This limitation will make your beautiful new UI look a little dumb. If you take the RPG OA approach, this might not be entirely true, but it’ll require code changes as well, as I hope to explain later in this series.

Refacing can be a reasonable first step, but it hardy solves the challenges you’ll be faced with in a modernization process. It can be used to gather support, both from users and top management. You can then leverage that support to tackle the next, more-challenging steps toward modernizing your application. Just remember: a fresh coat of paint won’t make your ages-old application new again! You can complement it with one or more of the previously explained approaches or even the one I’ll discuss in the next TechTip: Refactoring.

 

Rafael Victoria-Pereira

Rafael Victória-Pereira has more than 20 years of IBM i experience as a programmer, analyst, and manager. Over that period, he has been an active voice in the IBM i community, encouraging and helping programmers transition to ILE and free-format RPG. Rafael has written more than 100 technical articles about topics ranging from interfaces (the topic for his first book, Flexible Input, Dazzling Output with IBM i) to modern RPG and SQL in his popular RPG Academy and SQL 101 series on mcpressonline.com and in his books Evolve Your RPG Coding and SQL for IBM i: A Database Modernization Guide. Rafael writes in an easy-to-read, practical style that is highly popular with his audience of IBM technology professionals.

Rafael is the Deputy IT Director - Infrastructures and Services at the Luis Simões Group in Portugal. His areas of expertise include programming in the IBM i native languages (RPG, CL, and DB2 SQL) and in "modern" programming languages, such as Java, C#, and Python, as well as project management and consultancy.


MC Press books written by Rafael Victória-Pereira available now on the MC Press Bookstore.

Evolve Your RPG Coding: Move from OPM to ILE...and Beyond Evolve Your RPG Coding: Move from OPM to ILE...and Beyond
Transition to modern RPG programming with this step-by-step guide through ILE and free-format RPG, SQL, and modernization techniques.
List Price $79.95

Now On Sale

Flexible Input, Dazzling Output with IBM i Flexible Input, Dazzling Output with IBM i
Uncover easier, more flexible ways to get data into your system, plus some methods for exporting and presenting the vital business data it contains.
List Price $79.95

Now On Sale

SQL for IBM i: A Database Modernization Guide SQL for IBM i: A Database Modernization Guide
Learn how to use SQL’s capabilities to modernize and enhance your IBM i database.
List Price $79.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: