Java EE vs JSP vs JSF [英] Java EE vs JSP vs JSF

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

问题描述

我希望学习用于开发Web应用程序的Java技术。当我更多地看到这一点时,我对 jsf , jsp javaee 。我知道SO上有几个帖子(帖子1 帖子2 )试图解决这些混淆,我还有更多的混淆:

I am looking to learning a Java technology for developing web applications. As I looked more into this, I became confused between jsf, jsp, and javaee. I know there are several posts on SO (post 1, post 2) which attempt to resolve these confusions, I have a few more on top of them:


  1. JSP死了支持JSF吗?

  2. Java EE是JSF运行的平台还是完全不同的东西?

  3. 是JSF只是用于开发Web应用程序的MVC框架?

  4. JSF是由Oracle开发的框架和Java的一部分,还是一个单独的框架(就像Zend Framwork来自PHP) ?

  5. [红利]你会建议学习 jsp jsf

  1. Is JSP "dead" in favor of JSF?
  2. Is Java EE the platform JSF runs on top of or something different altogether?
  3. Is JSF merely an MVC framework for developing web applications?
  4. Is JSF a framework developed by Oracle and part of Java, or is it a separate framework altogether (Much like the Zend Framwork is from PHP)?
  5. [Bonus] Would you recommend learning jsp or jsf?

在你的回答中,随意将这些技术与A之类的东西进行比较SP.NET,ASP.NET MVC,Ruby on Rails,Zend Framework或常规Java Applet,因为这些是我已经熟悉的事情。

In your answer, feel free to compare any of these technologies to things like ASP.NET, ASP.NET MVC, Ruby on Rails, Zend Framework, or regular-old Java Applets, as these are things I am already familiar with.

谢谢为你的时间。

推荐答案


JSP是否死支持JSF?

Is JSP "dead" in favor of JSF?

JSF与JSP相比有许多好处。例如:

JSF has countless benefits over JSP. For instance:


  • 它定义了MVC方法

  • 它设置了组件化标准

  • 它具有应用值功能

  • 内置AJAX

  • 定义的视图上下文控件

  • 允许使用Primefaces等丰富的接口扩展

  • It defines a MVC approach
  • It set up componentization standards
  • It has apply values feature
  • Built-in AJAX
  • A defined view context control
  • Allows for rich interfaces extensions like Primefaces

我们可以继续使用。

您仍然可以将JSP用于需要某些特定灵活性或性能的其他场景,对于servlet也是如此,但JSF几乎取代了JSP用于健壮应用程序。

You can still use JSP for other scenarios where you need some specific flexibility or performance, and the same thing for servlets, but JSF pretty much replaced JSP for "robust" applications.

现在,我是JSF的忠实粉丝,但还有很长的路要走。 JSF 2.2有点看起来像一个成熟的框架,因为它有一个定义的导航标准 FacesFlow ),我们在2.1中只有一个内置的文件上传器,它甚至不是AJAX,而且还有HTML5等等。所以是的,有很多还有更多工作要做,我不会在这里详细说明。

Now, I am a huge fan of JSF, but it has a long way to go. JSF 2.2 kinda looks like a mature framework now that it has a defined navigation standard (FacesFlow), and we just had a built-in file uploader in 2.1 and it is not even AJAX, and there's "HTML5", etc. So yeah, there is a lot more work to be done that I won't detail in here.

根据我的经验,如果与JSF和Spring MVC等其他框架相比,JSP实际上是死的和别的。 Java EE 7教程几乎没有提到JSP的任何内容。但它并没有死,因为Web容器已经支持它,你仍然可以使用它。

In my experience, JSP is in fact "dead" if compared to JSF and other frameworks like Spring MVC and others. Java EE 7 tutorial barely says anything about JSP. But it is not dead dead, since it is already supported in Web Containers and you can still use it.


Java EE是平台JSF在
之上运行或者不同的

Is Java EE the platform JSF runs on top of or something different altogether?

JSF是Java EE的一部分,但是你不需要完整的Java EE配置文件以便使用JSF。示例:

JSF is part of Java EE but you do not need full Java EE profile in order to use JSF. Examples:


  • Tomcat只是一个Java EE Web Profile实现,您可以在Tomcat中使用
    JSF。

  • 您可以在JBoss中使用JSF,但是您不需要启用JMS以使JSF正常工作。

Java EE组件是模块化的,你只需要一个Web Profile服务器/容器就可以使用JSF。

Java EE components are modular, and you only need a Web Profile server/container in order to use JSF.


JSF只是一个MVC框架用于开发Web应用程序?

Is JSF merely an MVC framework for developing web applications?

是(但我不会说仅仅)。每个人都有自己的利弊。但原理是一样的。

Yes (but I wouldn't say merely). Each one has it own pros and cons. But the principle is the same.

有人可能会争论与EJB集成,但Spring MVC也有自己的容器。

One could argue about integration with EJB, but so is Spring MVC with its own container.


JSF是由Oracle开发的框架和Java的一部分,还是一个
单独的框架(就像Zend Framwork来自
PHP)?

Is JSF a framework developed by Oracle and part of Java, or is it a separate framework altogether (Much like the Zend Framwork is from PHP)?

Oracle现在委托团队定义规范。理论上,如果需要,您可以实现自己的JSF。我不知道PHP的Zend Framework。

Oracle now delegates to teams to define specification. In theory, you can implement your own JSF if you want. I do not know about PHP's Zend Framework.

最常见的JSF实现是Mojarra和MyFaces。 (Luiggi现在打败了我,你可以查看他的链接)。

Most common JSF implementations are Mojarra and MyFaces. (Luiggi beat me on this right now, you can check his links).


[奖金]你会推荐学习jsp或jsf吗? / p>

[Bonus] Would you recommend learning jsp or jsf?

我会推荐两者。 JSP首先和JSF之后。

I would recommend both. JSP first and JSF after it.

但我会100%建议你为你的项目使用JSF。但请确保您了解组件化以及使JSF成为强大工具的所有内容。

But I would 100% recommend you to use JSF for you projects. But make sure you understand componentization and all the stuff that makes JSF a powerful tool.

同时查看 JSF 2.2新功能,这个页面非常适合介绍添加到框架中的最新功能。

Also check out JSF 2.2 new features, this page is awesome for an intro on the latest features added to the framework.

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

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