JSP与FreeMarker [英] JSP vs FreeMarker

查看:98
本文介绍了JSP与FreeMarker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JSP是否提供了比FreeMarker更多的灵活性,还是以其他方式?
我的后端涉及Servlets。
在什么情况下使用哪一个?

Does JSP provide more flexibility then FreeMarker or is it other way around? My back-end involves Servlets. Which one is used under what circumstances?

推荐答案

JSP将允许你在视图层中做更多的事情,所以你可能会说它使它更灵活。你可能不应该做的事情,哪一个可以说是FreeMarker的好处。它可以让你更好地控制视图层可以做什么,并强制更好地分离关注点。

JSP is going to let you do more things in the view layer, so you might say that makes it more flexible. Things you probably shouldn't be doing though, which one could argue as a benefit for FreeMarker. It would afford you more control over what the view layer can do and force a better separation of concerns.

这里没有任何正确答案。从技术上讲,您可以使用UI完成任何事情。没有关于您的项目的更多细节,很难提出建议。关于我唯一可以说的是你应该使用 MVC 模式。它可以用任何一个来完成。

There's not really any right answer here. You can technically accomplish just about anything with either for your UI. Without more details about your project it's hard to make a recommendation. About the only thing I can say is that you should probably use the MVC pattern. It can be accomplished with either.

这篇关于JSP与FreeMarker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆