将JSF与Spring集成的目的是什么[关闭](What is the purpose of integrating JSF with Spring [closed])

编程入门 行业动态 更新时间:2024-10-28 05:13:08
将JSF与Spring集成的目的是什么[关闭](What is the purpose of integrating JSF with Spring [closed])

JSF和Spring是两个不同的Web框架。 我想问两个问题,以清除我头脑中的事情:

将这两个框架一起使用的目的是什么? 我听说JSF是视图层。 那么我们是否可以使用JSF创建一个包含业务逻辑的复杂Web应用程序?

有人能解释一下吗 谢谢

JSF and Spring are two different web frameworks. I would like to ask two questions to clear things in my head:

what is the purpose to use this 2 frameworks together ? i have heard that JSF is for view tier. So can we make a complex web application containing a business logic only with JSF?

Could someone explain? Thanks

最满意答案

Ans 1.我们集成了两个框架来利用它们的最佳功能。

在你的情况下,JSF是视图(UI)部分的最佳框架之一,而spring因其功能DI(依赖注入)而擅长维护bean。

Ans 2.创建jsf的主要目标是

创建一个标准的UI组件框架,开发工具可以利用它,使工具用户更容易创建高质量的UI并管理UI与应用程序行为的连接。 为UI组件,组件状态和输入事件定义一组简单,轻量级的Java基类。 这些类将解决UI生命周期问题,特别是在页面生命周期内管理组件的持久状态。 提供一组常用的UI组件,包括标准的HTML表单输入元素。 这些组件将派生自可用于定义新组件的简单基类集(在#1中概述)。 提供JavaBeans模型,用于将事件从客户端UI控件调度到服务器端应用程序行为。 定义用于输入验证的API,包括对客户端验证的支持。 指定用于UI的国际化和本地化的模型。 为目标客户端提供自动生成适当的输出,同时考虑所有可用的客户端配置数据,例如浏览器版本。 根据Web可访问性计划(WAI)的定义,提供自动生成包含所需钩子的输出以支持可访问性。

是的,你只能使用JSF创建一个复杂的应用程序,但它更容易使用它与其他一些框架,如Seam,Spring等

源JSF完整参考

Ans 1. We integrate two frameworks to exploit best features of both of them.

In your case JSF is one of the best framework for view(UI) part and spring is good at maintaining beans because of its feature DI(Dependency Injection).

Ans 2. the main goals of creating jsf were

Create a standard UI component framework that can be leveraged by development tools to make it easier for tool users to both create high-quality UIs and manage the UI’s connections to application behavior. Define a set of simple, lightweight Java base classes for UI components, component state, and input events. These classes will address UI lifecycle issues, notably managing a component’s persistent state for the lifetime of its page. Provide a set of common UI components, including the standard HTML form input elements. These components will be derived from the simple set of base classes (outlined in #1) that can be used to define new components. Provide a JavaBeans model for dispatching events from client-side UI controls to server-side application behavior. Define APIs for input validation, including support for client-side validation. Specify a model for internationalization and localization of the UI. Provide for automatic generation of appropriate output for the target client, taking into account all available client configuration data, such as the browser version. Provide for automatic generation of output containing required hooks for supporting accessibility, as defined by the Web Accessibility Initiative (WAI).

yes you can create a complex application only with JSF but its lot easier to use it with some other framework like Seam , Spring etc

Source JSF Complete reference

更多推荐

JSF,框架,web,frameworks,Web,电脑培训,计算机培训,IT培训"/> <meta name="des

本文发布于:2023-07-25 23:09:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1267580.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:目的   Spring   JSF   closed   integrating

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!