See a Good Article today:
Understanding the front-end framework from a Java perspective, nodejs,reactjs,angularjs,requirejs,seajs
http://blog.csdn.net/uikoo9/article/details/45999745
(PS: There is another article can also see: Http://uikoo9.com/blog/detail/fe Web front-end ramble About-uikoo9.com)
The article reads as Follows:
"front-end Mysterious veil" for Back-end development, The front-end is mysterious, dazzling technology, a wide range of frameworks, if you still stay in the front end is equal to only use jquery to do the development, then you out, this article from the Java perspective of the current front-end popular some of the Framework. The level is limited, please correct Me. "nodejs" official website: https://nodejs.org/Introduction: A "frame" that is extremely important to the front end, can be said to be an epoch-making analogy Java: JVM details: on the front end Nodejs has epoch-making significance, do not use the front end Nodejs are embarrassed to say that they are the front end, do not listen to the end of the nodejs, Or not the pros and cons of Nodejs and java, nor is it a qualified back end. Nodejs is not a JS framework, do not think it is similar to the framework of jquery, Nodejs is the JS runtime, running environment, analogy Java Jvm,java The beginning is what, is undoubtedly the jvm, since the Jvm,java can boast that he is "a write everywhere run ", whether you're windows or linux, you can run A. class file whenever a corresponding version of the JVM is Installed. The same Nodejs function and the same as the jvm, but also JS operating environment, regardless of what you are operating system, as long as the corresponding version of the Nodejs installed, then you can use JS to develop background programs. This has epoch-making significance, meaning has been only in the browser to play to play on the js, can do the Back-end development, from the Nodejs after the emergence of a large number of JS do background development front-end personnel, this part of the staff is the front-end "full stack programmer." remember, Nodejs is the same as the JVM of the JS operating environment, open the front-end personnel toward the back end of the Road. 1. png "js MVC framework" related framework: Too many frameworks, see the following two articles private customization, 10 best Node. JS MVC framework based on the Nodejs 14 web framework analogy in Java: ssh1 (struts1+spring+hibernate), SSH2 (struts2+spring+hibernate), SSM (springmvc+spring+Mybatis) Details: above said Nodejs opened the front-end developers to develop the back end of the door, and Nodejs analogy to the jvm, then learn Java people know, after learning the JVM (basic) what to learn? yes, framework, What are the frameworks in java, as mentioned above, SSH1,SSH2,SSM and so on, these frameworks are MVC frameworks. Since Nodej have, the JVM appears, then the next is the JS big God to encapsulate the MVC framework, just as the Java great God began to encapsulate the MVC framework, relative Java popular several frameworks, Nodejs corresponding MVC framework is much more, see the above two articles, Enough to make you see the Dazzling. One of the more famous is Expressjs. remember, when you see these JS frames, a little smile, the original is to write the MVC framework, based on Nodejs:sails. Js,total.js,partial.js,koa. Js,locomotive. Js,express. Js,flatiron. JS2. png "js modular" related concepts: COMMONJS,AMD,CMD,UMD related frameworks: commonjs,seajs,requirejs,coolie analogy in Java:Import, right is Import. Detailed: as said above, when the Nodejs (jvm), with Mvcjs (ssh), It is conceivable that each MVCJS will have a number of JS files, this time JS Modular will be useful, when someone and you say JS modular how how, feel oneself very hanging when, dump him a sentence, Is it the import in java? yes, Although the front-end seems JS modular how cow x, how to hang, but in Java is Import. Take a look at the following two images to see the comparison between Requirejs (amd) and Java guide pack:1. PNG2. png but JS in the modularization, there are many specifications, such as commonjs,amd,cmd,umd, feel the head of the big bar, in fact, simply speaking, is Commonjs is running on the Nodejs side, AMD,CMD,UMD is running in the browser, Its role is to import a variety of JS files, JS Modular management, can be understood as Java package management, see this article: http://coolie.ydr.me/introduction/commonjs-amd-cmd-umd.htmlagain, a mvc,js can do it.+kind of frame, can imagine modularity, JS also corresponds to a lot of frameworks, such as Commonjs,requirejs,seajs and so On. remember, Commonjs,requirejs,seajs and other JS modular frameworks, followed by various specifications (amd,cmd,umd,commonjs), analogous to the import in Java3. png "reactjs" official website: http://facebook.github.io/react/introduction: A framework that was soon before facebook, the front-end Cult. Analogy with Java: Freemarker macros. Details: Facebook shortly before a JS framework, reactjs, for a time, generally used reactjs, or heard the Reactjs front-end development superior, then, What is the framework is what, we look at an example of the official Website:5. png ok, do not understand, I say, the left is a piece of code, the right is the code in the Web page effect, the left of the code above a large paragraph is defined, the last word is used, the left code JSX is the Reactjs format, next to a compiled JS is jsx compiled js, native js. In other words, you write Jsx file, compiled into a section of JS file, this JS file after running is the right effect, then what is the benefit? is a package, a large section of the JS definition, and finally only need a sentence output, that is, a line of JS code corresponding to the right of a UI Component. The biggest function of Reactjs is to develop UI components, such as This: http://Material-ui.com/#/components/dropdown-menuCool effect, Material UI style WebUI component, developed based on Reactjs. Do not know to do Java Freemarker did not, used freemarker do not know to use the macro did not, see paragraph code:10. PNG---------------------------------------------------------------------------------------------8. PNG------------------------------------------------------------------------7. png the first picture is freemarker with a macro encapsulated bootstrap button component, The second picture is in the code with the use of encapsulated bsbutton, the third picture is the effect there is no discovery and Reactjs very similar ah, Just Reactjs is implemented at the front end, and Freemarker is implemented at the backend, where the common denominator is encapsulation and can be passed. remember, Facebook's Reactjs is a JS framework for developing UI libraries, characterized by the ability to encapsulate a lot of code. 11. png more great content: http://uikoo9.com/
From the Java point of view of the front-end JS various frameworks