News

Microsoft's New Cloudy Java: The Modern Web App Pattern and 'Strangler Fig'

Having introduced its Modern Web Application (MWA) pattern for Java developers late last year, Microsoft is now promoting the cloud-centric concept further by highlighting the benefits of the "Strangler Fig" approach.

The company's Microsoft on Java team in November 2024 introduced the MWA for Java, describing it as a comprehensive guide to modernizing Java applications with independently scalable, cloud-native architecture on the company's Azure cloud computing platform.

MWA Architecture
[Click on image for larger view.] MWA Architecture (source: Microsoft).

While it works specifically with Spring Framework and Azure, it can also be adapted to other frameworks and cloud providers, giving Java devs flexible and actionable strategies for app modernization with specific features including:

  • Modernization Through Refactoring: Building on the Reliable Web App (RWA) pattern, the MWA focuses on decoupling critical components into microservices to enhance scalability, agility, and resource optimization.
    Enterprise Web App Patterns
    [Click on image for larger view.] Enterprise Web App Patterns (source: Microsoft).
  • Incremental Refactoring with the Strangler Fig Pattern: The strangler fig pattern enables a gradual migration from monolithic structures to modular services. For Java, this is implemented through Spring Boot and Azure Service Bus, allowing seamless integration and progressive replacement of legacy services with modern, non-blocking solutions.
  • Cloud-Native Architecture: Leverages Azure services, including Azure App Service, Azure Container Apps, and Azure Monitor, to support resilient, high-performance applications with independent scaling for key components.

Strangler Fig was introduced by Marin Fowler in 2024 as a general software architecture concept to facilitate the incremental modernization of legacy systems. It was then used by the MWA, along with other patterns including Queue-Based Load Leveling, Competing Consumers and Health Endpoint Monitoring.

Yesterday, the Microsoft on Java team detailed the Strangler Fig pattern, explaining how it can be used to incrementally refactor monolithic applications into microservices. The pattern is particularly useful for Java developers looking to modernize legacy applications by breaking them down into smaller, more manageable components that can be independently scaled and maintained.

Named after the strangler fig plant, which grows around a host tree and eventually replaces it, this pattern involves wrapping the old code with new code, gradually replacing the old code with new code following a different architecture.

"This pattern incrementally modernizes a legacy Java application by 'strangling' targeted areas and replacing them with new microservices or minimal web apps," said the team before exploring an example showing how to integrate this approach and smoothly transition from a monolith to modern microservices.

Along with Java MWA guidance, the company also provides Modern Web App pattern for .NET documentation.

For the Java crowd, the company pointed to links for more guidance:

  • Architecture guidance: Learn how to modularize web app components and select appropriate platform as a service (PaaS) solutions.
  • Code guidance: Implement four design patterns to optimize the decoupled components: Strangler Fig, Queue-Based Load Leveling, Competing Consumers, and Health Endpoint Monitoring patterns.
  • Configuration guidance: Configure authentication, authorization, autoscaling, and containerization for the decoupled components.

"Modernizing Java applications using the Strangler Fig pattern and the Modern Web App (MWA) pattern provides a strategic approach to incrementally evolve legacy systems," the team said in concluding yesterday's tutorial. "By leveraging these patterns, organizations can achieve scalability, maintainability, and performance while minimizing risks and ensuring continuous availability. Start your modernization journey today by adopting these proven architectural patterns with the help of the Modern Java Web App Patterns Repository."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

  • Introduction to .NET Aspire

    Two Microsoft experts will present on the cloud-native application stack designed to simplify the development of distributed systems in .NET at the Visual Studio Live! developer conference coming to Las Vegas next month.

  • Microsoft Previews Copilot AI for Open-Source Eclipse IDE

    Catering to Java jockeys, Microsoft is yet again expanding the sprawling reach of its Copilot-branded AI assistants, previewing a coding tool for the open-source Eclipse IDE.

Subscribe on YouTube

Upcoming Training Events