” If you don’t modernize and migrate today , you may suffer tomorrow “
Having and old application, database or servers means = the risk of losing everything .
When you decide to modernize your web applications or services and move them to the cloud, you don’t necessarily have to fully rearchitect your apps. Rearchitecting an application by using an advanced approach like microservices isn’t always an option because of cost and time restraints. Depending on the type of application, rearchitecting an app also might not be necessary. To optimize the cost-effectiveness of your organization’s cloud migration strategy, it’s important to consider the needs of your business and the requirements of your apps. You’ll need to determine:
-
Which apps require a transformation or rearchitecting.
-
Which apps need to be only partially modernized.
-
Which apps you can “lift and shift” directly to the cloud.
Today you can choose to migrate, modernize, or build cloud native solutions depending on your business goals and how you assess your application portfolio .
In this new Serie of videos that I will be sharing starting from today , we are going to see step by step how to migrate and modernize a .Net application .
What will we do ?
1- Create the application and migrate to azure .
In this new Serie we are going to build a simple application that contain a backend (API) and frontend (MVC) ( .NET (5.0) connected to sql server as first step , than we are going to migrate the api ,
the mvc application to azure app service ,we are going later to migrate the database to azure sql as a service and we are going to make sure that the application is working fine .
In the below picture , we are going to have a simple .NET application running on our local IIS with also sql server installed in the same machine .
As you can see in the picture below, we are planning the first step to how we are going to migrate our application to azure.
At this point ,and if you have finished watching the related videos ,you will see how simply in a few steps we have moved our application to the cloud using azure ,next step will be about modernizing this application .
2- Let’s modernize .
In this second part we are going to see how to modernize our application using azure functions .
With its migration to Azure, it’s time to use the power of azure function so we can follow a serverless approach that can handle the increase number of creating tasks .
For that we need to create Two azure functions and let me explain why !
We are going to build our first azure function using visual studio that will take care of the “create action” .
So what we need now is ,instead of calling the API , we need our application to call the azure function , so the solution is to replace the api url the azure function ? NO , we need to modernize this ,for that we need to make
sure that we don’t have different URL’s inside our client application , for that we are going to build an azure function that will play the role of a proxy ,each time a call received ,based on the type of call ‘GET,Post,Put’ it will redirect the call to the right api endpoint that we need to call .
With this feature, you can specify endpoints on your function app that are implemented by another resource. You can use these proxies to break a large API into multiple function apps (as in a microservice architecture), while still presenting a single API surface for clients.
With Azure Functions Proxies, you can modify requests to and responses from the back-end.
Sample of proxy azure function :
{ "$schema": "http://json.schemastore.org/proxies", "proxies": { "proxy1": { "matchCondition": { "methods": [ "GET" ], "route": "/api/{test}" }, "backendUri": "https://<AnotherApp>.azurewebsites.net/api/<FunctionName>" } } }
3-How is the performance of my application and how to identify issues ? (Application Insights ) .
After doing all the above work we can say that we have a nice application on cloud ! YES/NO ?
Well ,it’s nice to have such application on cloud but it’s awesome if we understand what’s happening with our application , do we need to enhance something , is our application performing fine and responding to users requests ? is there any failed requests ?
Well to do this usually you have to write a lot lines of code ,but now with Application Insights activated we can monitor your live applications. It will automatically detect performance anomalies, and includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app. It’s designed to help you continuously improve performance and usability. It works for apps on a wide variety of platforms including .NET, Node.js, Java, and Python hosted on-premises, hybrid, or any public cloud.
5- DevOps .
DevOps is a set of practices that combines software development and IT operations. It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. DevOps is complementary with Agile software development; several DevOps aspects came from the Agile methodology.
Now we have a nice application running on cloud , it’s time to modernize the work for developers by adding devops .
A developer can run the application on his local computer and it works fine but when he push to the repo , the application may crash and we have an argument about “it worked on my machine !”
for this , we need to make sure that the application is built first on cloud ,and then if the build was fine it will be published else it will report to you back and you don’t have a corrupted application live for users .
For this ,we are going to see Azure CI/CD pipeline simplifies continuous integration and continuous delivery (CI/CD) in the application development process .
for now , this is what I have prepared for our application ,in case I’m going to see that I can apply other modernization steps , I will update this document .
Link to the YouTube playlist : LINK