使用Servlets / JSP或其他前端框架的JSF或MVC? [英] JSF or MVC with Servlets/JSPs or other frontend frameworks?

查看:176
本文介绍了使用Servlets / JSP或其他前端框架的JSF或MVC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java开发社交Web应用程序。我需要开发我的Web浏览器应用程序的前端/ GUI。

I'm working on development of a social web application using Java. I need to develop the frontend/GUI of my application for web browsers.

我想知道什么是更好的策略来进行前端开发,无论是使用JSF 2.0和Linux等框架。喜欢简单地遵循使用servlet和JSP的MVC方法吗?

I'm wondering what is the better strategy to do frontend development, whether using frameworks like JSF 2.0 & like OR simply following MVC approach with servlets and JSPs ?

我听说JSF真的让开发更简单,但学习曲线也不算太低,所以值得学习JSF还是我更喜欢直接使用servlets / JSP?

As I have heard JSF really makes the development simpler but also the learning curve is not too low, so is it worth learning JSF or I should prefer to directly proceed with servlets/JSPs ?

我是使用Java进行Web应用程序开发的新手&我差不多已经完成了为应用程序编写业务逻辑。

I'm new to web applications development using Java & I've almost completed writing the business logic for the application.

请根据以下参数证明您的答案:

Please justify your answer on the basis of following parameters:



  1. Performance&成本

  2. 易于开发&时间(考虑学习时间)

  3. 未来代码维护

  4. 您认为重要的任何其他参数

  1. Performance & costs
  2. Ease of Development & Time (considering the learning time as well)
  3. Future Maintenance of code
  4. Any other parameters you consider important




更新(07-09-2012):



我终于去了JSF-2.0&直到约会都没有遗憾。学习曲线陡峭。这是更容易&使用像Primefaces这样的组件库,开发速度很快。国家储蓄有一些成本,但这些事情可以聪明地处理。社区是大而重要的事情已有详细记录。希望在不久的将来无状态JSF 即将推出,这将提升JSF的卓越性能。

Update (07-09-2012):

I finally went with JSF-2.0 & have no regrets till date. Learning curve is not steep. It's easier & development is fast with component libraries like Primefaces. There are some costs as to state saving but those things can be handled intelligently. Community is big & things are well documented now. Hopefully, in near future Stateless JSF is also coming which will boost JSF with extra high performance.

推荐答案

对于一个业余爱好的webapp,自制一些MVC框架也不错。这是一次很棒的学习练习之旅。但是,它会长期咬你,肯定如果你在网上发布它变得流行。大多数现有的MVC框架都经过深思熟虑。大多数不可预见的警告都被考虑在内。唯一的框架API由第三方维护和记录。

For a hobby webapp, homebrewing some MVC framework is not bad. It's a nice learning exercise tour. However, it will bite you on the long term, for sure if you publish on the web and it becomes popular. Most of existing MVC frameworks are very well thought out. Most of the unforeseen caveats are taken into account. The sole framework API is well maintained and documented by a third party.

此外,每当您的网络应用程序变得流行并且您需要更多开发人员来完成它以满足最终用户要求/愿望时,更容易找到已经熟悉现有用户的人框架。有了一个自制的,可能有错误的MVC框架,你可能会发现很少有开发人员渴望在接手维护之前潜入另一个学习曲线,他们可能永远不会重新申请他们未来的工作/项目。

Also, whenever your webapp becomes popular and you need more developers to work on it to fulfill the enduser requirements/wishes, it's easier to find someone who's already familiar with an existing framework. With a homebrewed and possibly buggy MVC framework, you'll likely find less developers who are eager enough to dive into another learning curve before taking over the maintenance which they'll probably never reapply on their future jobs/projects.

这不是特别适用于JSF,而是适用于所有其他现有和流行的MVC框架,例如Spring MVC。至于JSF,一般来说,我在此之前已经写了很多关于它的内容。以下是阅读其中一个的好起点:

This does not specifically apply on JSF, but on every other existing and popular MVC framework as well, such as Spring MVC. As to JSF in general, well, I've written a lot about it before here. Here are some good starting points to read the one and other about it:

  • JSF versus plain HTML/CSS/JS
  • JSF adoption and popularity
  • What are the disadvantages of JSF 2.0?

这篇关于使用Servlets / JSP或其他前端框架的JSF或MVC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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