Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can modernize an existing application while reusing existing logic when you add a custom API wrapper—a technically compelling way to update traditional application architectures. This approach reflects API-first principles, meaning you design your APIs before implementing the backend logic. API wrapping enables existing business-critical applications to interact with modern services through consistent, well-defined APIs.
A common example is a classic, three-tier e-commerce solution. Following the Façade design pattern, the modernization plan can directly target the client and middle tiers while retaining the back-end database as-is. An API wrapper enables the existing database to communicate with the modernized infrastructure.
Benefits of using API wrapping
API wrapping rapidly delivers business value through:
- Improved interoperability. APIs standardize the means for different systems to communicate, making it easier to integrate them.
- Enhanced scalability. Through abstraction, APIs remove underlying application details and complexities, enabling you to develop scalable solutions.
- Accelerated development. Your development efforts can focus on features and applications, rather than underlying details and complexities.
- Enhanced reusability. You may be able to reuse APIs across multiple applications, significantly reducing development efforts.
The following steps and considerations help you effectively resurface your existing applications using an API-first design pattern on Azure.
Apply API-first design to an existing application
In general, to use an API-first design pattern with an existing application, do the following:
Assess your application and its core components.
- Determine which parts of the legacy application need to be exposed via APIs.
- Map out dependencies and interactions within the legacy system.
Define your API specifications.
- Use OpenAPI and Swagger to create a clear contract for the API.
- Get input from stakeholders, including developers, product owners, and end users, to ensure your API design meets their requirements.
- Learn from our experience in A technical journey into API design-first: Best practices and lessons learned.
Import your OpenAPI specifications into Azure API Management.
- Use Azure API Management to publish, secure, transform, maintain, and monitor your APIs.
- Set policies for authentication, rate limiting, CORS, and request/response transformations.
Develop your backend services.
- Consider breaking down your application into microservices.
- Use serverless Azure Functions to handle specific API endpoints.
- Use Azure Logic Apps for complex workflows and integrations.
Test and validate.
- Implement automated tests to ensure the API behaves as expected.
- Use mock services to simulate API responses during development.
Deploy and monitor.
- Use Azure DevOps to automate the deployment process.
- Use Azure Monitor and Azure Log Analytics to monitor API performance and log issues.
Considerations for API-first design patterns
By adopting an API-first approach, you can enhance your digital capabilities, streamline the development processes, and improve collaboration across teams. To get the most benefit, API management is essential for ensuring smooth integration and interaction among applications and services. Effective API management ensures that APIs are secure, scalable, and easy to use.
As you introduce API-first design patterns, the following Azure features, services, and best practices can help you on your modernization journey.
For more information, see Design APIs for microservices.
Security
- Authentication and authorization. Use Microsoft Entra ID and Microsoft Entra ID External to help secure your APIs.
- Data protection. Ensure sensitive data is encrypted both in transit and at rest.
Performance
- Caching. Implement caching strategies using Azure Cache for Redis to improve performance.
- Rate limiting. Use rate limiting policies in Azure API Management to prevent abuse and ensure fair usage.
Scalability
- Autoscaling. Use autoscaling features to handle varying loads.
- Load balancing. Implement load balancing to distribute traffic evenly across services.
Interoperability
- Data transformation: To ensure compatibility, use Azure API Management to transform older data formats such as XML to newer formats like JSON used by modern systems.
- Backward compatibility. Use versioning to make sure your new APIs don’t break existing clients.
Development
- Discovery. Use Azure API Center to track your APIs in a centralized location and support discovery, reuse, and governance.
- Documentation. Use Swagger UI or Redoc to generate comprehensive documentation of your APIs.
- Developer portal. Use the Azure API Management developer portal to give developers self-service access for exploration and testing.
Next steps
Get started with the next cycle of activities and start to drive innovation during application modernization.