I learned the Smarty template engine a few days ago, which solved the division of labor problem that I had been troubled by before. However, when getting the data returned by ajax, I have to use js to generate tags first, then add elements to the tags, and finally Put tags in HTML. . . Today I found that these frameworks (should) can solve this problem, but I don’t know which one to start with? Not sure which framework to choose based on the complexity of the project? I hope the seniors can give me some advice, thank you very much!
As a Vue fan, of course I recommend Vue.
The reason is:
It’s easier to get started than the others. You don’t need to get a bunch of build tools to use it directly (of course it’s best to have them)
Lightweight, smaller size, faster loading, of course the front-end likes small and beautiful things
The function is powerful enough and there are solutions for most scenarios
vue advocates the principle of simplicity and practicality, it is small enough and powerful enough, which is good
I have used all three, react is similar to vue, and angular contains more functions (angular is divided into version 1 and 2, 2 is typescript used by default, 1 is too bloated), it is recommended to learn vue, I am also using it recently vue.
Seeing so many recommendations
vue
above, I think the key is to understand what problem each framework solves and what benefits it brings to development and performance. Maybe after a while another framework will come out and be praised again. , it’s better if you can go deeper when studyingAccording to your description, your needs should be relatively simple, just use simple Vue; Vue is simple enough and powerful enough.
Vuejs templates (not in .vue files) are strings and do not need to be converted; React’s JSX also needs to be converted (or introduce a lib), etc. It's too troublesome for you to get started with React.
But my personal suggestion is that if you have the opportunity and energy, it’s best to get in touch with or learn React.
Angular has dependency injection and dirty value checking, but Vue does not have these. It is easy to get started and the documentation is very well written. It is recommended to learn Vue. It is a very good framework.
vue
Reasons: Simple, reliable and deep
Recommend React + Mobx + Ant Design, which is as easy to learn as vue. Personally, I think the difficulty of the React technology stack is mainly Redux. Beginners or those who find it troublesome can actually bypass it. This is the todomvc project address of Mobx + React.
Which ecosystem is perfect and which one should be used first
Of course it’s vue