Skip to Main Content

Making a Case for Code and Database Modernization

Cartoon that illustrates how businesses did not anticipate needing digital transformation, until Covid-19 made it an urgent need

The dawn of this decade witnessed drastic changes and the ways of doing business have been altered forever. In the face of such monumental changes, companies have realized that modernization and digital transformation are inevitable. Some had already started their modernization efforts, which made the transition easier, while many others, who thought they had plenty of time, had a rude awakening.

Modernization is about enhancing applications by applying best practices, creating resilient code, while also enabling better integration with mobile or cloud-based applications. A successful modernization undertaking can offer stakeholders direct access to valuable data and understand which tools help developers offer some innovative ways for the business to gain new capabilities.

For example, you can build API layers on top of existing applications or connect them with new cloud native or container-based workloads. This facilitates incredibly low latency communication with high bandwidth, added security and economic benefits, all the while leveraging your existing investments in technology, people, and skills.

The Need for Multi-Layered Architecture

Deconstructing an application into different tiers of smaller units (containers and microservices) – such as database, web & mobile, application servers – can help release units of working code or functionality into the hands of end-users much faster and give developers the flexibility to make changes in one area without affecting others.

Instead of taking months or years to implement major changes in monolithic applications (such as resizing a field), breaking the application into smaller parts can help deploy, operate and manage it in much shorter times.

The importance of creating multiple layers when you modernize your architecture cannot be stressed enough. Multilayered architectures give you:

  • Increased flexibility, scalability and agility
  • Ability to change one component without affecting others (separation of concerns) and successively reduce the time taken to make such changes
  • Establish a collaborative framework to specialize in areas with maximum ROI
  • Achieve CI/CD (continuous improvement/continuous development)
  • Implement better consistency and appropriate standards
Creating an Application Modernization Strategy

While considering your options, assess the applications that are running in your IBM i ecosystem to make a broad determination of what characteristics they have and the value they bring to the organization. This helps you come up with the best strategy for each component, one that also aligns with business goals. Different application characteristics require different strategies such as rewriting, modernizing or implementing replacement packages.

Helpful Questions to Ask: 

  • Is it a commodity application?
  • Does it support today’s business needs, or does it need to be improved?
  • Is this where you want to drive innovation in the business?
  • Do you want to preserve existing processes because they contain the secret sauce of your business, the thing that differentiates you from your competitors?
  • Do you need to retain control of the application architecture?

Implementing replacement packages are expensive and very disruptive to business processes and rewrites are often inherently dangerous and time consuming. Modernization is usually the least expensive and least risky option by far, as it lets you leverage your current investments and evolve them.

Most companies on IBM i using RPG as a language within their code base are now facing a fork in the road. You can choose between:

  • Remaining in RPG for the next couple of decades and evolve it to achieve a modular architecture that can improve agility and maintainability (or)
  • Making a shift in the open-source direction (such as Java, PHP, or Node)

Some decision makers also choose to do both: keep what they already have in RPG but build everything new in open-source languages.

When it comes to transforming your code and database, more than anything, the decision lies in choosing a language and finding the right people to handle both the architecture of the applications written in RPG and the language you choose for new development.

The Business Benefits of Automated Code and DB Transformation

Modern automation tools, techniques and technologies solve many IT-centric business problems. Depending on how much evolution you bring to the code base and database, there are many business benefits to reap:

  • Reduction of human error
  • Faster time to realize benefits
  • Maintain consistency in code quality
  • Lower long-term maintenance costs
  • Competitive time to market improvements
The Ideal Composition of Multi-Layered Architecture

The base is the database layer with indices, views and all the artifacts. Next is the data access layer, on top of which the business process services are built. At the very top, you will have the UI layer with support for APIs, web services, and restful applications.

Modern Reference Architecture – PHP

Modern Reference Architecture – PHP

Example: The use of Angular, where the UI can be defined. You can adapt the same architecture to PHP and accommodate future UI changes faster by simply replacing a layer, enhancing another application with the same components, or even building on those components.

Why Do You Need a Modernized Database?

Monolithic architecture on IBM i is usually a single program that has been built and added onto for the last 30+ years, which now needs to support certain database features to continue offering business value. Some of the reasons driving modernization include:

  • Security: A modern database is not only more secure but can also be set up to defend itself. For instance, if a programmer were to run an SQL statement to delete all rows in the customer master table by mistake, a database with referential integrity would stop the action and indicate that records in other tables depend on this customer identifier. In a Db2 instance that is relational with built-in referential integrity, you can secure and create better quality data, and make it more accessible to not only the IT department, but the rest of the organization as well.
  • Responsiveness: Modernizing your database can help you speed up the value you give back to the business and ramp up the ROI.
  • Innovation: A flexible architecture with a transformed DDL database can help you be more innovative with your business offerings.
  • Empowerment: Business users can gain access to crucial data and other valuable capabilities such as data visualization, that can further enhance the ways they interact with the data.
  • Futureproofing and Compliance: Once the database has been modernized, all future changes that you might need to make to the business logic might take half the time (or even less). This makes it database maintenance much easier. Modernizing might also, at a point, be the only way to ensure that the business is compliant with all the applicable regulations.
Modern RPG Development

These are some concepts to plan around when you’re considering new developments:

Tools: Rewriting the code or redoing the database by hand is a next-to-impossible task with very low ROI for the business. Investing in proper tools to develop a modern RPG makes all the difference: consider what you want the UI to look like in the end, what standards you want to set, and then configure the tools accordingly.

A broad set of advanced tools will have code transformation, test automation, analysis and planning capabilities to deconstruct business logic and design & then reconstruct them into a modern, layered architecture. They can help you deliver better value faster, ensure quality and offer better/new UIs.

code conversion vs. code transformation

Automated Testing: 

Testing shouldn’t take up 60% percent of project time – automating it helps lower your costs, speeds up time to market and increases business agility. In a layered architecture, test automation can help you implement automated regressions that guarantee quality as you release.

Standardizing Data Types:

Ensure that the different types of data (time stamps, dates, elements that can all be described in different ways) are detailed and consistent.

DDL Table Descriptions:

This can help futureproof your architecture and remove some of the more outdated parts of Db2. SQL particularly is a great standard.

If you have decided to stay in RPG, a modern, layered architecture can help address issues around agility. Also, modern free-format syntax is a cornerstone in supporting maintainability and being able to hire younger talent who can maintain your evolving applications.

Things to Keep in Mind
  • Look holistically at language and the database
  • Ensure that the business value is clear to get stakeholder buy-in and set the right expectations
  • Prioritize layered architecture – this is key to your database’s agility
  • Plan as intricately as you can to minimize the effort required and leverage techniques to avoid recompilation and make the transition as smooth as possible

Transforming your code and database is going to make your applications and systems agile and easier to maintain and adapt. To that end, a staged, incremental modernization plan allows you to focus on quick-win areas and deliver value to the business early. While there are many options to achieve your modernization goals, the most important thing is to break out of status quo and take action.

Every day, I help IT leaders map out strategies and roadmaps to make the best use of their resources and modernize their systems. It may be challenging to figure out where to begin – I and my team of experts at Fresche can you’re your figure out what is best for you and break down the steps for a smooth code and database modernization journey. Book a call with an expert to discuss your challenges and how to adapt your business for growth.

This article first appeared in Fresche’s Thoroughly Modern column for IT Jungle.

This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.