java-web - 前端与java如何协作开发
阿神
阿神 2017-04-17 17:18:43
0
3
430

最近公司成立了Java团队,因前端小组之前都没有跟Java合作过,不知如何下手,既然有新团队,想借这契机引入前端MV*框架,如Reactjs或者Angular之类的,但现在毫无头绪,希望有热心大神能分享一下自己项目中前后端分离的案例,感激感激!

阿神
阿神

闭关修行中......

reply all(3)
洪涛

In fact, you can introduce nodejs as the middle layer to process the data of java restful api. Angular is a single page framework and is not SEO friendly. React's style is more troublesome to write. In this way, you can handle various processes at the node level, such as template rendering, and the effect of handlebars is the same as angular's {{ }}.

阿神

What the Java team needs is to build RestFul api and use Json seat as a carrier for front-end and back-end communication.
Many Java frameworks can be easily implemented. For example, SpringMVC, PlayFramework, Spark (not the Apache Spark used for big data), Jfinal, etc. Of course, these are what Java programmers need to care about, and they are not what you have to do. You just need to get this data through ajax. You still write html the same way you used to write it. Add at most a few lines of jsp code and change the file suffix from html to jsp.
Be sure not to let Java programmers do Server Side Rendering. Java only provides data, not pages.
As for Reacts or Angular or other frameworks, go to Zhihu or search on this site to see other people’s opinions. Take advantage of VueJs.

刘奇

Use 3 artifactsSSH, and then do what you need to do with the front end

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!