Answer the question
In order to leave comments, you need to log in
What is the best way to switch to Angular, React, Vue?
Hello dear community users. I faced a problem that I now have a hard time living with. I work in a medium-sized company, the team is engaged in an enterprise project, where development is carried out by three people: two javaists and one front-end developer (aka me).
From my knowledge, I only know Angular. A year ago, we started the project on the first angular, with the release of the second, we successfully ported it to the second (fourth). But here the task arose on the project, to dynamically draw components on the page on demand (that is, depending on which page layout comes from the server). The problem is that when I began to implement the task, I realized that it was either not feasible for me, or I was not solving it correctly. That is, at the time of loading the application, I have to load all the components that can be in the layout (and there are about 200 of them), but a layout comes from the server, in which there can be 5 components on this page, and it turns out that I am loading a meaningless bundle from N-megabytes of volume obese from all components. At first I tried to dynamically render components into modules, but different modules could have the same components, hence the idea with the lazy load of the module failed, the implementation of the removal of the component in the form of a js file, but did not find solutions in angular, I wanted to put one component into one module for lazy loading on demand, but it breaks from here the idea, because routing is tied in angular only to loading one module, the implementation with dynamic loading using systemjs has also disappeared, since this thing is already outdated and you can’t launch it on the new angular, and the implementation with dynamic compilation of typescript in runtime is also not approached, because this case was assembled for a very long time as a result in the browser, while the requirements for the UI were loading in a second in the browser (although AOT does not work for dynamic components, and again there are problems). That is, I felt pain and hatred on myself, and the desire to write in Angular why is less and less. But although I am one of his fans, the problem cannot be solved. Maybe server rendering needs to be raised for this, as an additional network application that collected the desired layout on the server, but again, why so much torment?
Are React, Vue (I didn’t write for them) the same number of problems? I am 23 years old, I want to develop and maybe I chose the wrong path. I look at Sbertech, Yandex, Rambler and other large ones use React, maybe that’s why only articles on Habré and other resources are only about React, supposedly because it’s really better developed there or what? If Vue is so cool, why are there so few vacancies on it.
I want to know, should I now rewrite the entire project to another technology or what should I do with my problem? There are people from large teams, what would you advise?
I don't need to dynamically generate molds, it's easy to do
<div *ngFor="let field of entityFields">
<input [ngModel]="field" />
</div>
Answer the question
In order to leave comments, you need to log in
Well, I didn’t even touch React, I once wrote Angular on the first one and have been working on Vue for several months now.
I would take Vue. Its entry threshold is low, the Russian-language documentation is just a gun, and for your task, it seems to me the very thing.
See how lazy loading is done in Angular itself (router) and in Ionic.
It is not very clear why the standard solutions out of the box do not suit you.
You can also post in the direction of Stencil JS - this is a team from Ionic making a framework for creating web components - there is lazy loading of components out of the box.
Lazy loading works for me on https://debtstracker.io/ (Ionic), although there are subtleties in code duplication.
It's weird how you fit in. And server technologies do not count anymore?
We have a similar problem in our project - to upload only those files that this project needs (we have three of them now). Bundle: grunt, node + ejs, Angular (1.5)
In grunt, we prescribe what project goes.
And there is also a main domain and non-main ones, they have different sets of files - the logic works on the server side and it is not difficult to implement it.
Your problem can also be solved on the server using any server technology/language.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question