How to Convert Legacy Applications into Future Proof Applications
How to Convert Legacy Applications into Future Proof Applications
Are you tired of dealing with legacy code? Check out this tutorial on how to modernize your legacy applications with the CUBA-Platform.
Join the DZone community and get the full member experience.Join For Free
Legacy Applications Vs. Modern Applications
At the risk of over simplification, I believe that a "modern application" can be illustrated with the help of the image in Figure 1. For the most part, when legacy applications are mentioned, one usually thinks of monolithic applications that were written in older programming languages,. An example of this is COBOL, which is a terminal-based user interfaces that usually uses data stores such as ISAM, flat files, and proprietary database management systems. The left most bottom of the diagram shows this type of application. As the diagram demonstrates, application architectures have evolved into web and mobile user.
Figure 1 - Modern Application
Interfaces that can be loosely coupled with external applications are often based in the cloud. This diagram does not show that applications developed today are most often able to be hosted on virtualized servers and/or in containers. The diagram also does not show that applications developed today are developed with newer programming languages and with a number of different database technologies.
This dichotomy between legacy applications — both from a feature, usability, cost, and relative difficulty perspectives — provide increasingly strong motivations for stakeholders to replace and modernize these legacy applications.
What Is the CUBA-Platform?
The CUBA-Platform provides a full-stack architecture for building three tier applications. It includes widely used features for enterprise apps, such as soft deletion, data-aware components, file storage, and high level modules, including authentication, authorization, audit of data, and others. This class is most appropriate for developing ERP-like systems, line of business applications, or custom software for the corporate segment.
On the surface, the CUBA-Platform seems to be mainly suited to building custom applications from scratch. However, a closer look reveals a platform that provides the ability to reuse existing databases, auto generate domain models from existing databases, automatically create REST APIs from existing artifacts, standardize front-end by using prebuilt responsive UI templates, turn existing business logics into standard services, and, lastly, integrate any REST based third-party services without coding. These features make the CUBA-Platform well suited for the integration of a full stack Java framework with legacy applications.
What Are TransformixTools?
TransformixTools for CUBA-Platform are a number of custom engineering components and adapters that link legacy applications to the CUBA Platform. Among these are database adapters, terminal screen adapters, COBOL services integration components, and Eclipse plugins. These tools serve as CUBA-Platform plugins to facilitate the integration of the legacy application to CUBA features.
What is ModernizationInPlace™
For the stakeholders of legacy applications for enterprise customers, ModerinzationInPlace™ is an innovative approach to software development and efficient open source technology that helps developers integrate existing legacy applications with the full stack CUBA-Platform enterprise development framework. This non-invasive approach transforms the application into a multi-model development platform. Existing tools can be used to extend and enhance existing legacy application code, while, at the same time, modern development tools can be used to enhance and extend application functionality. Therefore, ModernizationInPlace™ makes customizations and upgrades to the application functionality relatively painless.
- ModernizationInPlace™ is a framework for enhancing the application's business layer (with web service APIs) and database
- Tools from Transformix allow the application user interface to be supplemented with browser access that allows combining existing internal applications screens, like Legacy applications (mainframe green screen applications), with external Web services and Web pages with standard websites designed without integration interfaces (APIs), XML information, and databases.
- The CUBA-Platform is an open source, full stack Java framework that provides an open source foundation.
- Based on a Java technology stack, this is compiled of the best practices for designing a business application's database, business layer object model, and Web API
- There is no hidden magic; the generated server application is a regular REST Web service that can be debugged using its source and the popular Java IDE's.
Toward the Multi-model Applications Platform
Figure 2 - Multi-model Applications Platform
Yes, Virginia. It is possible to have your cake and eat it too, at least, in so far as legacy applications are concerned. By that, I mean it is possible to allow for continuing development in the legacy paradigm in parallel with development in newer paradigms. Figure 2 illustrates an environment in which an application was built for an HP 3000 in COBOL with a proprietary HP TurboIMAGE database management system that has been migrated to Linux with a PostgreSQL RDBMS. This is done with only minimal changes to application sources. In this environment, the COBOL applications still use the same APIs they used on the HP 3000. For example, database calls are TurboIMAGE calls and screen IO calls are VPLUS calls. However, using the combination of the CUBA-Platform with the TransformixTools enhancements makes it possible to show the terminal based user interface in a Web browser and the database can be accessed using SQL. Therefore, at the same time that the legacy programs are used, the application can be enhanced in the same way as a newly developed Java-based CUBA application is enhanced. Furthermore, the developers who work on the application as a CUBA application do not need to have an HP 3000 knowledge or skills to do their jobs.
Five Steps to ModernizationInPlace™
Figure 3 provides a high level overview of how the multi-model applications platform is implemented. A SQL accessible database is needed in order to take full advantage of the features the CUBA-Platform has to offer. Therefore, the first step is to migrate the application data access to allow for multi-model SQL access. This means that the original application will still be able to access the data using the original APIs, while, at the same time, other applications, such as CUBA, will be able to use SQL to access that same data. Step two is to allow browser access to the application screens. In this second step, it also includes the installation of the CUBA-Platform alongside the application. The application takes on the characteristics of a multi-model application once the CUBA-Platform is installed. This means that from then on the application can be extended and enhanced with modern tools by developers with little or no knowledge of the legacy programming environment.
Below is an expanded version of the five steps towards creating a multi-model applications platform.
Step One: A Multi-model Data Platform
A commonly used "trick" in migrations is to provide a simulated legacy system API on top of a relational database. This allows the existing application to access the data using the same database calls or APIs. At the same time, this provides alternative industry standard interfaces to newer and commercially available off-the-shelf applications. This is the approach Transformix uses. Here are some examples:
HP 3000 TurboIMAGE or Eloquence Database to RDBMS
TransformixTools provides a TurboIMAGE API that allows applications that were originally written for the HP 3000 to have the data and schema's migrated to Oracle, PostgreSQL, MSSQL, IBM DB2, or IBM Informix with few or no changes to the application programs. Then, other applications can access the data using standard APIs such as SQL.
MS Access to RDBMS
Microsoft Access lets you easily create databases to store and present your data in forms and reports. When starting, a database may be very simple and trivial, but, over time, it may become more important as you add data, features, and even share it with others. It gains a life of its own and the overall design becomes critical.
Figure 3 - ModernizationInPlace 5 Steps
One of the most important architectural designs is splitting the database into a front-end and back-end database. This is how access is designed to let you support multi-user databases and significantly simplify how you enhance the application over time.
Separating your application and data databases enables you to support multiple users and upgrade the application without wiping out their data. Assuming the application doesn't change that often, the separation also makes it easier to just backup the data database since only that is changing every day.
Splitting a database is a relatively simple concept. You take an existing Access MDB/ACCDB database with its tables, queries, forms, reports, macros, modules, etc. and divide it into two databases:
The "Back-End" database that just contains the tables
The "Front-End" database that contains the application objects (everything except the tables) and links to the tables in the back-end database
This design is especially useful in multi-user environments where the back-end database is stored on a network and contains the shared data. Each user then has a copy of the front-end database on their desktop pointing to the shared database.
In multi-user environments, the front-end database can also contain tables that are private to the user. These local tables can store the user's settings, selections, temporary or intermediate tables for processing data or reports, etc.
Once the database is split, using ODBC to access it from MS Access and using MS Access as a frontend allows the backend to be accessed with the CUBA-Plaform.
Microfocus ISAM to Ctree
FairCom's No+SQL technology provides flexibility with an ISAM application's data architecture by allowing data ISAM of any type to be stored within your record structure, without any pre-defined schemas. At the same time, it supports industry-standard SQL (relational) interfaces and high-performance NoSQL (non-relational) interfaces to the same data at the same time.
c-treeACE is an ANSI-compliant SQL database with support for everything you expect from an RDBMS, including stored procedures, triggers, user-defined functions, ODBC, JDBC, and a wealth of standard interfaces. c-treeACE provides simultaneous access to the same data via NoSQL interfaces for the ultimate in performance.
TransformixTools provides a CUBA-Platform interface to C-tree SQL.
Informix 4GL to Aubit4gl and RDBMS
Once the database is in the RDBMS CUBA-Platform, it can be used to extend and enhance the application.
Step Two: Browser UI
TransformixTools provides solutions based on the CUBA-Platform and Vaadin that turn legacy application user interfaces into browser-based interfaces.
Our terminal emulation solution provides an instant Web browser based terminal emulator to key business systems, including UNIX or a VMS system on any device with zero client software installation. This will be centrally managed. The Transformix solution is based on the CUBA-Platform. Therefore, at this step, the CUBA-Platform is installed and made available to the application developers.
VPLUS API Intercept
Another technique we use is the terminal API intercept approach. The best example is our VPDM HP VPlus replacement. We convert the HP VPLUS forms file to Java classes and create an xmlrpc-based intercept library that implements a plug-compatible replacement for VPLUS calls.
MS Access Forms
This solution is based on the CUBA-Platform, as well. The TransformixTools DBForms solution includes software tools that turn MS Access forms to Web pages written in Java code and is available for viewing through your Internet browser. A prerequisite for this is to turn MS Access tables and queries into their turn and convert them to RDBMS. For now, this solution is limited to PostgreSQL.
Step Three: Enhanced Browser
A composite application (also known as a "Mashup") is a website component or application that displays mixed content combined from heterogeneous sources. End-users don't have to know which underlying sources and applications this aggregated information is coming. In its simplest implementation, adding relatively simple external enhancements to a legacy user interface, such as dropdowns or a type-ahead search, can greatly enhance the user experience with the application. These two features require database access that is separate from the original application and they can be implemented without modifying the original application. Figure 4 shows what the user sees on their desktop and is a further composite of the original application screen. On top of that, a Google Map is made available through a REST API and the CUBA-Platform. This, too, does not require a modification of the original application.
Figure 4 - Composite Application Screen
The use of the CUBA-Platform in Step Two is not only a benefit for creating the browser UI in the first place; it also makes it possible to extend and enhance the application from the user's point of view without changing the original application.
Step Four: Mobile and Web Services
The CUBA-Platform was introduced to the application environment in Step Two as a vehicle to facilitate enhancing the user interface to the application. Step Three gave us the opportunity to explore how CUBA can help further enhance user interfaces. In Step Four, we begin to look at the real power of the platform. It provides a no Code and Low Code Platform that allows you to reshape how you interact with your legacy UNIX or VMS system, as well as your Windows, Linux, or MAC system. With legacy terminal based applications, we have noticed that it gives us tools to help change green screen user experiences into contemporary interfaces that are delivered over the web. This gives you the freedom to adapt and evolve business processes, quickly realizing new efficiencies and gaining instant ROI and tactical advantages that are simply not available elsewhere. What's more, this can be done by a super user or Citizen Developer.
REST APIs are all the rage these days. The use of REST and other HTTP(S) based APIs have become the lingua franca of the world of computing. The CUBA-Platform is built on top of REST APIs and it plays very well with REST APIs provided by others. The use of CUBA as a modernization foundation for legacy systems transforms your host environment into a dynamic component of your business systems interface layer, which is normally confined to the transaction layer of the enterprise. These new tools will unleash the investment in your host system to freely interact with and feed tertiary business systems, increasing the availability, timeliness, and integrity of important business data.
A Bit More About Developing With the CUBA-Platform
At its highest level, the CUBA-Platform consists of the design time CUBA Studio, which works in concert with either Intellij IDEA IDE or Eclipse IDE. At runtime, it uses a Java application server, usually, Apache Tomcat.
Figure 5 - CUBA High Level Overview
The CUBA Studio is a specialized tool for rapid application development that streamlines building applications upon CUBA Platform. With Studio, applications are up and running within minutes. It also accelerates modernizing legacy applications by scaffolding the data model and CRUD UI on top of an existing database.
Studio is designed to be used in parallel with a Java IDE (Figure 6) , so developers do not have to abandon their beloved working environments. The focal point of the development process is the studio. Projects are open in Studio and most of the configuration and enhancement is managed with Studio in conjunction with the IDE. Moreover, testing and debugging are managed through Studio as well.
Figure 6 - Studio with IDE
Applications developed using the CUBA-Platform occupy three tiers as shown in Figure 7. They are the database tier, the middle tier, and the client tier. These tiers are connected using REST and HTTP APIs.
Figure 7 - CUBA High Level Application Architecture
Using this architecture, the same backend can be used for Web, desktop, mobile, and REST API applications.
Step Five: Loosely Coupled Web Services
One of the most important ideas in the world of software engineering is the concept of loose coupling. In a loosely coupled design, components are independent and changes in one will not affect the operation of others. This approach offers optimal flexibility and reusability when components are added, replaced, or modified. Components that can operate independently and have a well-defined communication channel are loosely coupled.
The architecture of the CUBA-Platform is built to support this loose coupling of components. Therefore, when legacy applications are integrated with the CUBA-Platform, it allows their features and components to be used with the same flexibility as more recently developed application components.
ModernizationInPlace™ is the Transformix Computer Corporation approach for converting legacy applications into future-proof enterprise applications with the CUBA-Platform. This approach helps organizations create multi-model applications platforms that allow legacy applications and application extensions written in the CUBA-Platform (provided by a full stack Java framework) to work side-by-side. Using this approach, the sought after benefits of application modernization are achieved quickly and at low risk.
Published at DZone with permission of Charles Finley . See the original article here.
Opinions expressed by DZone contributors are their own.