向我解释一下不同的 JSF 组件库的关系

发布于 2024-08-12 11:56:17 字数 293 浏览 7 评论 0原文

尽管我花了一整天的时间开发 JSF 应用程序,但我从未接受过任何关于此事的培训,而且我必须管理我仍然困惑整个 JSF 难题如何组合在一起。 JSF 在我看来有点混乱。

  • jsf-api
  • jslt
  • facelets
  • myfaces
  • 特立尼达
  • 多巴哥
  • jsp api

如果有人能给我这些组件的快速描述,我将非常感激,哪些组件是标准的,哪些可以省略,哪些可以/需要一起使用

Even though i spend whole days developing a JSF application, i've never had any training on the matter and I have to admin I am a still confused how the whole JSF puzzle fits together. JSF just looks a bit thrown together to me.

  • jsf-api
  • jslt
  • facelets
  • myfaces
  • trinidad
  • tobago
  • jsp api

I'd be very grateful if anyone could give me a quick description of these components, which ones are standard, which ones can be left out, which ones can/need to be used together

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

子栖 2024-08-19 11:56:17

JSP和JSTL

JSP经历了多次迭代,但这却是Java EE动态页面的核心技术。这是一个可服务的 API,但使用 JSP 通常意味着需要对代码/资源进行更多的手动管理。

JSTL 是 JSP 标准模板库。这是一组标准 JSP 标记。不要将这些标签与 JSF 标签混合;它们属于不同的编程模型。

JSF API

JSF 规范。这是 JSF Model-View-Presenter 框架的核心。这指定了一组简单的核心组件和核心生命周期工件。有两种广为人知的实现:Mojarra(开源 Sun API)和 Apache MyFaces。 Java EE 5 及更高版本的一部分。

Facelets

为 JSF 设计的视图技术。使用它代替 JSP。您不能在 Facelets 视图中使用 JSP 标记。这不是 Java EE 5 中的标准,但在 JSF2(以及即将推出的 Java EE 6)中实现了标准化。 Facelets 提供的更好的模板通常意味着您可以减少对第 3 方库的依赖。

Facelets 提供了一些看起来像 JSP JSTL 标记的标记,但不共享任何代码。通常也应该避免使用这些标记(请参阅 Facelets 文档以获取建议)。

Apache Trinidad and Tobago

这些是提供组件和其他设施的 JSF 库。由于核心控件集相当基本,因此通常使用此类库,特别是在不使用 Facelets 的情况下。这些不是 Java EE 标准的一部分。库兼容性各不相同。另请参阅 jsfmatrix.net

JSP and JSTL

JSP has undergone many iterations, but this is the core Java EE dynamic page technology. This is a servicable API, but working with JSPs often means more manual management of code/resources.

JSTL is the JSP Standard Template Library. This is a set of standard JSP tags. Do not mix these tags with JSF tags; they belong to a different programming model.

JSF API

The JSF specification. This is the core of the JSF Model-View-Presenter framework. This specifies a simple set of core components and the core lifecycle artefacts. There are two widely known implementations: Mojarra (the open sourced Sun API) and Apache MyFaces. Part of Java EE 5 and above.

Facelets

A view technology designed for JSF. Use this instead of JSPs. You cannot use JSP tags in Facelets views. This is not standard in Java EE 5, but is standardized in JSF2 (and therefore the upcoming Java EE 6). The better templating provided by Facelets often means you can rely less on 3rd party libraries.

Facelets provides some tags that look like JSP JSTL tags, but don't share any code. These tags should generally be avoided too (see Facelets doc for advice).

Apache Trinidad and Tobago

These are JSF libraries that provide components and other facilities. Because the core set of controls is rather basic, it is common to use such libraries, especially if Facelets is not used. These are not part of the Java EE standard. Library compatibility varies. See also jsfmatrix.net.

掐死时间 2024-08-19 11:56:17
  • jsf-api 是 javax.faces 中的接口和类
  • jstl 是一组标准标签(主要在 JSP 中使用) - 大部分都被 JSF 标签替换,顺便说一句,
  • facelets 是一个演示和模板框架(如 jsp)
  • myfaces 是JSF 标准的实现。另一种可能性是,如果 JSF RI(参考实现)
  • 特立尼达和多巴哥是组件库 - 一些未包含在默认 jsf 组件集中的好东西
  • jsp 是 Facelets 的替代品(反之亦然),它也是一个表示框架。
  • UEL - (你没有问,但这很重要) - 统一表达式语言 - #{..} 表达式的规则集
  • jsf-api are the interfaces and classes in javax.faces
  • jstl is a standard set of tags (used primarily in JSP) - most of them are replaced with JSF-tags, btw
  • facelets is a presentation and templating framework (like jsp)
  • myfaces is an implementation of the JSF standard. The other possibility if JSF RI (reference implementation)
  • trinidad and tobago are component libraries - some goodies that aren't included in the default set of jsf components
  • jsp is the alternative to facelets (or vice versa), which is as well a presentation framework.
  • UEL - (you didn't ask, but it's important) - Unified Expression Language - the set of rules for your #{..} expressions
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文