Migration path to Angular 4

We have a large enterprise application with native Windows client and asp mvc web server client interface. We are discussing this long-term transition plan for angular 4:

  • Planning is to create new forms in angular 4.
  • We want to embed these angular forms in an existing web client. iFrame - idea, are there any others?
  • Same thing in win's own client. The new form is opened using the built-in web browser in an outdated application that displays the new form.
  • Change the old forms step by step in angular 4 and replace the old ones.
  • Build a complete angular 4 SPA application that replaces windows and the web client.

What do you think of this idea?

Is angular 4 suitable for such a migration strategy? Or should we use other structures?

Angular 4 is designed, as I am now, with SPA in mind. Is creating a “mini spa” realistic by simply creating one form? Can these forms load quickly? Of course, a mini spa should only load the components and modules needed for this form.

+5
source share
1 answer

Let's begin to say that this is a really big question, mainly based on personal opinions, and there is no general and correct answer to it.

Firstly, I highly recommend that you add tags related to the Microsoft technologies that you are currently using in your post, because perhaps this way you can find someone who has already walked along the same road.

Then let's start answering some of your practical questions:

We want to embed these angular2 forms in an existing web client. iFrame is an idea, are there any others?

Yes there is. Instead of using iFrame and inserting your entire SPA application pointing to your application there, I would suggest you use Web Views , which actually allows you to embed "web code" in them. Usually this is really better than using iFrames pointing to the application.

Is angular 2 suitable for such a migration strategy? Or should we consider using other frameworks?

Yes, angular is one of the best framework for building SPA at the moment. Right now, the world is actually basically divided between angular and ReactJS, which is actually basically a “simple” viewer, and it usually combines with other technologies such as Redux for model management if you are building a large application.

Keep in mind that at the moment the latest version of angular is angular 4, so starting with a new application right now it might be nice to start with the latest available.

And there are other frameworks for SPA. But if you are google, you will find many articles talking about them and “comparing them,” so it’s pretty useless to turn this post into a comparison of all the frameworks. All of them are valid, you just need to choose the one that you like best, or the one that best suits your needs.

How realistic is it to create a mini spa just by creating one shape?

Actually you can, so this is realistic.

Is this appropriate? I have no idea, it depends on the complexity of the forms and all the operations that you have in them. For example, in my personal opinion, if you are going to create a mini SPA just to create two text fields and a button, and when you click you need to call your internal service, this may not be the best approach to create a complete SPA just for that.

Do these forms load quickly?

This question depends on many aspects related to the features of the development of the interface. Therefore, given that you implement everything well and use many performance optimization strategies, yes, they load quickly.

What do you think of this idea?

In fact, in your post you did not explain the reasons why you are going to migrate. What are your current concerns? What sections would you like to improve? What are the limitations of the technologies you are currently using and what do you think will be corrected by the transition to this new architecture?

And there are other aspects to consider: do you have time from your business for making such a big refactor? What is the actual knowledge of the team regarding these new technologies that you would like to use?

So, unfortunately, answering this question is not so simple.

I hope this helps somehow and good luck for your possible migration :)

+1
source

Source: https://habr.com/ru/post/1271200/


All Articles