Home  >  Q&A  >  body text

java-web - 前端与java如何协作开发

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

阿神阿神2712 days ago433

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:20:43

    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 {{ }}.

    reply
    0
  • 阿神

    阿神2017-04-17 17:20:43

    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.

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 17:20:43

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

    reply
    0
  • Cancelreply