Replace your Classic ASP Application Iteratively

Are you frustrated by the instability of your company’s Classic ASP website? Does it seem like any time a change is made (even the tiniest of bug fixes) the application breaks? You probably wish you could just replace Classic ASP with newer technologies across the entire organization, but you cannot because it is cost prohibitive to do complete rewrites of your custom software.

 

Frustration

 

Luckily, it doesn’t have to be this way. You are not stuck with legacy technologies from Microsoft, such as Access, Active Server Pages (ASP), or even Windows Forms. You don’t have to completely rewrite your application from scratch. You can make changes to your application in phases, resulting in better, more maintainable, code with each step.

Get Our Classic ASP Upgrade Game Plan

This game plan checklist will help you get organized and reduce the risk of problems when upgrading your Classic ASP application. Request the document and it will be delivered to you instantly.

Powered by Kit

 

Step Change

 

In fact, you might not even need to introduce new technologies at all during early phases. If your legacy application is the proverbial “gun to your head,” then there are 150 things you can do other than just replace it. Below are 5 such examples:

harvey specter quote

Refactor for Consistency & Centralization

Sometimes the problem with older technology is not that it is merely out-of-date, it’s that it is code that is so difficult to understand it cannot be maintained. One of the first things that can be done to resolve this issue is to refactor your application with the intention of centralizing common code.

What is refactoring? Martin Fowler defines it as:

“a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior”

You can even do this in Classic ASP by separating ASP files, consolidating into functions, and moving markup to CSS. As you are working to centralize, or reuse, your ASP code, you can make superficial changes that ensure consistency. If you didn’t understand what a variable was used for when you started, rename it (and all its references) to something that makes more sense. If the code is poorly formatted, clean it up. Just remember that as you make these changes, the behavior of the application shouldn’t change. You are just making it easier to maintain.

Use Design Patterns

The best-written software programs, regardless of language, implement many of the classic design patterns. These design patterns represent tried-and-true strategies for keeping code clean and flexible. If your legacy application is causing headaches, it’s probably safe to say that it could benefit from being updated with specific patterns.

As mentioned in the previous tip, common code should be consolidated into functions. Accordingly, the pattern to keep in mind is the Single Responsibility principle. Try not to have one function do too many things or it may become confusing.

Some patterns leave large portions of working code unchanged. As an example, the facade pattern can be leveraged to wrap existing code into a better-organized collection of function calls.

Modernize the Back-End

Fix Data Source

Up until now, our strategy hasn’t involved any new technology. We’ve just improved the existing code in a way that makes it easier to upgrade later. Still, improving legacy code can only do so much. Now it is time to upgrade the back-end database technology.

To improve the reliability, performance, and code flexibility of your application’s database, move your Access data into the latest version of Microsoft SQL Server. Making the switch in your ASP pages to connect to the new type of database should be simple, especially if the above steps were taken to centralize common code to connect to databases.

If necessary, now is as good a time as any to make changes to the database structure to make it easier to understand. However, it is important to exercise extreme caution during this step. Make sure to perform changes in a development copy of the database first so no data is lost while testing.

Modernize the Front-End (e.g. Put Angular into ASP)

The nice thing about being stuck on a Classic ASP application is that it still gets rendered on a regular Internet browser. Therefore, it is rather easy to incorporate newer, JavaScript-based technologies into the legacy code.

Take AngularJS, or another JavaScript framework like Ember or React, and insert it into an ASP page. You will be surprised how much code flexibility that is uncovered. The new frameworks can be seemingly isolated from the noise of the old code. Suddenly, you can improve your application’s user experience with faster page loads and new behaviors that meet your users’ expectations.
Angular JS also improves the technical design of an application by applying a common pattern named Model-View-Controller.

Implement New Features in New Technology

So far you have improved your old code and introduced some modern technology. Maintaining your old code is hopefully reasonable at this point but what do you want to do about new features? Do you want to add more old code to your legacy system? An alternative is to choose a modern technology and implement new features in the new technology.

Are you building a new module that can somewhat stand alone from the rest of your ASP site? Build it in ASP.NET MVC. Do you need to leverage Angular JS to capture and display data from the database? Create a RESTful Web Service interface in .NET Web API. Your web service can even use tools like Entity Framework to query the data since that is supported with SQL Server (but not Access).

To some, these latest technologies in software development may sound like jargon or abstract acronyms. To others, these terms represent excitement, flexibility, and productivity.

Delight

All these steps directly improve the maintainability of your application but also make future upgrades easier. Without taking on the full cost of replacing Classic ASP, you CAN reap the benefits of its modern successors.

Start typing and press Enter to search