website development framework

2022.03.26

This article was originally released Northell Blog,After authorization of the original author InfoQ Chinese station translates and shared。

(Website Development Framework)

With the explosive growth of social media and users to generate content,The Internet is developing in a better direction。In order to keep the pace of development in the times,Provide better interactivity,Developers start building libraries and frameworks to simplify interactive sites。2006 year,John Resig published jQuery,Make HTML Writing client scripts easier。over time,Other similar projects have appeared。Just started,They are a huge monomer,And impose the idea of the project to the developer。Now,These libraries have begun to transform to compact lightweight libraries,Can be added to any application very easily。Let's take a look at the most popular three。

(Website Development Framework)

website development framework

JavaScript Framework overview


Starting a new project always doing many decisions。One of the key decisions is to choose the right frame or library.。Fortunately,Vue.js Is a very diverse library,Can handle a variety of tasks。

Vue.js


Vue.js This library allows you to add interactive and additional features to any use. JavaScript Coding environment。Vue Can be used to solve simple tasks on separate pages,It can also be used as a basis for mature industrial applications.。Vue.js Is a high-end framework for building a graphical user interface。It can also be with some modern tools and attached libraries,Used to construct complex one-way applications。


Vue One of the biggest advantages of the library is that it does not need any special knowledge.。any Vue Applications are used HTML、CSS and JavaScript Written——Familiar with these tools can be put into work immediately。Even if you have never done a client development,Can also be based on the previous MVC Design mode experience is built,This mode is MVVM very similar。

React


Use React Library,We can easily create interactive user interfaces。integrated React Time,No need to change the code of the current project,It is only responsible for rendering interface,Do not bring extra pain。


React System support user interface update,Make more modular components to create a robust module for the application easier。React The library achieves most user interface maintenance work through data updates,This is very pleasant to developers(No wonder it is so popular)。

Angular


Angular Almost is a complete development environment。It contains a set of programs,include TypeScript translater、AOT Compiler and Web server。Angular of Web Server is used to debug sites developed using this framework。It uses the same Angular CLI Utility started,Have to start Angular CLI,You need Windows Enter the project folder in the command line,Execute ng serve Order。

Vue、React and Angular Main feature

(Website Development Framework)

React One of the biggest advantages is:Delicious balance between stability and innovation,Make the user more easy to adapt。This reason and other reasons React Maintaining it,And get more and more popularity。


website development framework(Website Development Framework)


Image Source:https://insights.stackoverflow.com/trends?tags=reactjs%2Cvue.js%2Cangular%2Cangularjs

size


The size of the development framework is critical to the performance of future applications。Framers and applications must load before the application starts working properly。


in this regard,Angular Most complicated,have 143KB。React Second,have 43KB,and Vue.js only 23KB。Unless your application is particularly large,And contain a large number of components,Otherwise it is best to use a smaller structure。

performance


exist Web In the project,Performance and DOM closely related:DOM In the browser / Code in the code Web page。When an update occurs,You can pass DOM control Web page。

(Website Development Framework)

Vue、React and Angular Performance will vary depending on the task,But in most cases,They are very efficient and fast。React and Vue All achieve DOM。Thanks to its well-designed structure,Vue Excellent performance and memory allocation。This is React and Vue.js Superior Angular The place:They use virtual DOM——original DOM Replica。


Notice:DOM A kind of HTML The content of the document is expressed as the object of the object。also,There is also an interface for managing the specified object.。DOM Divided DOM(Really known DOM)andvirtual DOM。What is the difference??Let's take an example。If you want to modify HTML Some information found in the label,Algorithm will do this:truly DOM Update all tags,Until it finds the fragment it needs。In some cases,This will have a negative impact on performance and other parameters。虚拟 DOM Then only update the necessary HTML Piece。

Community


React Is the most popular framework in the world,What is the secret?。It is more and more popular,Because it provides true Promise。React of Mental Model It looks very reliable,Its components make it easier to create user interfaces,API Flexible and feature,The feeling of the entire project should be like that。right API Description of the library is also friendly,It is easier to leave a good impression。


Since then,React The library is in the basic concept and API Aspects are basically unchanged,But has formed and developed a complete set of knowledge and best practices,More and more people are using it。Angular Completed due to its advantages,And have a large number of community support。Regrettably,although Vue.js has many benefits,But it didn't accept the developer as it is like its competitors.。

(Website Development Framework)

Let us compare these three frames from two aspects of popularity and correlation.:

(Website Development Framework)

  • GitHub:Currently,Vue.js Is the most popular framework,Although it is the youngest,This means that more and more projects will use it.。
  • Google search:In Google Search,React The query request is up to,Follows Vue.js。The most unopened thing is Angular.js。Angular.js Popularity,and Vue.js The popularity is rising。
  • Labor market demand:Most job vacancies React.js related,Afterwards Angular,Then then it is Vue.js。

Vue、React and Angular:Which one is?


In order to select the most suitable library,You should first analyze these frameworks carefully and understand your needs.。Whether there are many existing projects of dependencies,Or you want to develop new applications developed using familiar libraries,Vue Will not bring you any trouble?。You can continue to use Bootstrap or Bulma Such CSS Framework,PreserveјQuery or Backbone Written components,Integrated your favorite library HTTP ask,Use Promise Object。

(Website Development Framework)

To start using Vue Program,What you have to do is Vue.js Library Web page。No complex assembly tool!Developing a prototype from head to tail 1 arrive 2 Week time,This allows you to collect user feedback as soon as possible and often。Vue 2 The server-side rendering is introduced(SSR)support。This allows you to minimize the initial data loading,And request new views and resources as needed。Combined with efficient component cache,Can further reduce traffic consumption。


React Library can do some amazing things。Because the entire user interface is used JavaScript Defined,So you can use JavaScript Rich features perform various operations in the template。You will only be subject to JavaScript Characteristics limit,Not limited by the template framework characteristics。When you think full JavaScript During the visual effect of definition,You may think of a lot of quotes、Essential characters and createElement transfer。do not worry,React Library allows you(Selectively)Use JavaScript Code coexistence HTML-like JSX Syntax definition visual elements。

(Website Development Framework)

React Different from other two frameworks in the following ideas:


  • With it, it is a framework,It is better to say that it is a library.(Originally for processing UI Created);
  • Because it is not limited by the framework,So it's more functions——More suitable for professionals,Not an initiator;
  • exist Angular Many of them can be“Use the box”Main characteristics,Alone here must be connected(This method has advantages,Disadvantages,For beginners, it is a disadvantage,Because you need unnecessary action);
  • More face JavaScript Instead of TypeScript(Although each version is TS Support is increasing);
  • Easy to create native Android and iOS Mobile app;
  • Have a large number of third-party libraries suitable for various occasions(more than Angular)。


Angular Already used in many largest、Most complicated Web Application。

(Website Development Framework)

website development framework


Image Source:https://www.madewithangular.com/


Angular Draw some of the best features in server-side development,And use them to expand the browser HTML mark。so,Creating an application with enhanced features is easier and relaxing。Angular Application is based on MVC Design mode build,This model is committed to creating an application with the following characteristics:

(Website Development Framework)

  • Easy to expand:If you understand the basics,Even the most complex Angular application,You are also easy to understand,This means you can easily expand your application to provide a new function.。
  • Easy to maintain:Angular Application is easy to debug,Bug Easy to repair,This means long-term operation Angular Application is also easy to maintain。
  • test tools:Angular Good go mod And end-to-end test support。therefore,You can find and fix them before you encounter them.。
  • standardization:Angular Browser-based internal function,Will not bring any hindrances to your work。This allows you to create a standard Web application,Contains the latest features(E.g,Various HTML5 API)、Popular tools and frames。
  • This is a framework——This means it sets the creation Web Application rules,Set a specific framework in the initial stage,Let beginners can be less expensive。
  • Angular Too much function,If you need additional things,Can connect to a third party module。

Vue.js VS React:Bidirectional data binding


exist Vue middle,You can easily bind component variables to form fields。When you change the variable,Form field update,When the user changes the form field,Component variables will be updated。This is written React Event handler is much easier。


also,Many people like to show the popularity of the framework,in React Yes Angular of 2 arrive 3 Multiplication。It creates a mobile app(React Native)Gain a lot,Because of Angular Ionic compared to,It is more convenient。Until Web application(ReactJS)Development aspect,Everything is not so simple.。

(Website Development Framework)

E.g,for Web application,I have found,use Angular Use ReactJS more convenient。

(Website Development Framework)

You can try themselves and compare different directions or technologies。to this end,You can enter some keywords in Google Trends.,It will draw a beautiful chart for you。

Vue.js vs React vs Angular


Different from the previous frame,Vue.js Is created by one person,he thinks 2013 The framework already has a framework too complicated.。Vue The first and second versions are created by one person,therefore,In certain aspects,It may be worse than competitors,Especially in security。Vue 3 It is created by a development team.,This means a lot now Bug And the disadvantages have been fixed,The efficiency of the frame itself has also been improved。

I should learn React still Angular?


It is best to learn at the same time Angular and React。These two frameworks have advantages and disadvantages。Experts suggest that beginners first study Angular,Because everything you need is“Use the box”of,This is not easy to make mistakes(Framework will help you control)。In learning Angular Later,You can learn ReactJS 和 React Native。in addition,If you only need mobile app,You can also jump directly to React Native。In fact,You only need to learn the characteristics of the framework,Just this。The rest of the knowledge is common(OOP、TypeScript、RP)。Learning frame itself 1 arrive 2 Zhou is enough,You can already create simple Web Application。

Conclude

(Website Development Framework)

Obvious,These three frameworks are very powerful,But at the same time is very different。They have their own advantages and disadvantages,No universal formula can be used to decide an absolute winner。选哪个框架好,Which frame is selected。在做决定之前有必要进行全面的研究。To see the apps you are creating and your specific needs,这一点尤其重要。


It is necessary to conduct a comprehensive study before making decisions.:


https://northell.medium.com/react-vs-vue-vs-angular-what-to-choose-for-web-development-abc5565d3f11

返回列表
更多新闻资讯