eShopModernizing: Updating Legacy Web Apps with Modern Technology
eShopModernizing is an open-source project aimed at transforming older ASP.NET applications into modern solutions using Windows Containers and the Azure Cloud. This initiative provides sample scenarios for upgrading traditional ASP.NET WebForms and MVC applications, alongside N-Tier apps based on WCF services and WinForms desktop applications. The goal is to move these legacy systems into more flexible and scalable environments without altering their existing architecture or codebase.
Why Modernize?
Modernizing these apps leverages Windows Containers, which improve deployment processes and integration with DevOps practices significantly. It enables legacy applications to be better suited for cloud environments and enhances lifecycle management, scaling, and resource optimization.
Deployment Options
eShopModernizing presents several deployment options where these updated applications can be hosted:
- Local PC: Developers can build and deploy apps locally using Visual Studio in conjunction with Docker for Windows.
- Azure Container Instances (ACI): This option allows the apps to be deployed as containers in the Azure cloud on-demand, without provisioning any server infrastructure.
- Windows Server 2016 VM: Applications can be deployed on traditional virtual machines, maintaining a familiar environment for hosting.
- AKS Kubernetes: For those interested in container orchestration, AKS offers automatic scaling and load balancing.
- Azure Web App for Containers: This is a fully managed platform to run apps as containers on Windows without handling the server infrastructure.
The Sample Applications
The project includes simple web applications used for managing a product catalog in an eShop, ideal for testing modernization processes:
- ASP.NET WebForms and MVC: These develop CRUD functionalities to manage data in a SQL Server database.
- WinForms with WCF: This is a desktop application supported by a WCF backend, demonstrating the mix of UI and service-based architecture.
Starting Locally
The quickest way to get started is by running all the applications locally on a Windows 10 PC using "Docker for Windows." This involves running a build script via a command prompt, creating Docker images, and employing docker-compose
to start the services and corresponding SQL Server database.
This setup simulates real-world deployment scenarios, helping developers to get accustomed to containerized workflows.
Access and Configuration
To test applications, users can access them through specified ports linked to the internal container network. Additionally, the project offers flexibility to connect web apps with mock-data or a real SQL Server database, selectable via configuration files.
Overcoming Limitations
A noteworthy point about using Windows Containers is the localhost loopback limitation, meaning users cannot access their containers via localhost on the same host computer without some configuration tweaks, unless on Windows builds that support such features.
Resources
For comprehensive guidance, including detailed setup and deployment instructions, developers can explore the project's Wiki. Additionally, there is a freely available eBook providing further insights into the modernization process.
Embracing eShopModernizing ensures that legacy applications can step into the future, adapting to modern technological expectations while preserving existing functionality and stability.