`
javasee
  • 浏览: 949663 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

JSR227:J2EE数据绑定及数据访问标准

阅读更多

Oracle提交了一份关于“J2EE数据绑定及数据访问标准”的标准提案,JSR227,计划将MVC模式中view到controller的数据绑定及访问形式标准化,涉及的MVC实现可能包括Struts、JSF和Swing等。这是个有趣的尝试,如果成功,Java开发者将获得一个统一的MVC数据绑定及访问方法。不过我怀疑它成功的可能性。

下列JSR227的一个简单介绍

——————————————————

Increasingly, enterprise applications model persistent datasources as Java classes and develop Business Services[1] that query, manipulate, and persist these objects. However, developing interactive user interfaces that use Business Services to correctly manipulate the data objects requires understanding and coding against complex sets of design patterns and standards that underly the various Service technologies. This proposed specification will define a framework of classes, called Declarative Bindings, that formalize the characteristic interactions between typical UI components and values and methods available on Business Services. By using the Declarative Bindings set forth in this specificiation, any Java UI rendering technology can declaratively bind to any Business Service. Example UI components and controller technologies include: JSP JSTL tags, JSF, Struts, and Swing. Example business services include SOAP Web Services, EJB Session Beans or any Java class being used as an interface to some functionality.

When accessed by the UI components and UI controller, the metadata-driven Declarative Bindings interact with the classes that they are bound to, providing J2EE standards-compliant support for things like:

  1. Binding (locating and accessing)
    1. single attribute (appropriate for input fields and other single value UI components)
    2. objects with related collection attributes (appropriate for tree controls)
    3. collections of objects (appropriate for displaying in tables)
  2. Navigating
    1. current row tracking (first, next, prev, last)
    2. current range (appropriate for scrollbar pagination)
    3. coordinating related collections (appropriate for master/detail display)
    4. multiple iterators sharing same collection (appropriate for split pane)
  3. Performing actions
    1. normalizing the interaction of generic insert, update and delete operations on transactional objects and collections of objects
    2. surfacing status of bound objects (to know whether the UI component needs to be re-rendered)
    3. dispatching to methods to perform custom services.
    4. validating and reporting validation exceptions.

Declarative Bindings completely decouple the user interface from the data portions of the application. In the nomenclature of MVC application architectures, this specification standardizes metadata and behavior for binding to elements of the Model from both the View and the Controller.

The Declarative Binding classes provide attributes that are easily accessible to all user interface technologies that support EL or Java. Declarative Bindings manage the interaction with Business Services. They drive their behavior off metadata, which is convenient for tools vendors. One of the goals of this proposal is allow interoperability between tools products that interactively bind sophisticated interfaces to the services that provide the data.

To facilitate a common mechanism for accessing diverse Business Service technologies this specification proposes that the Declarative Bindings access the Business Services via a lightweight abstraction layer called Data Controls.

Data Controls provide supplemental metadata about the Business Service's capabilities and constraints as well as support a simple interface for normalizing typical interactions with the Service. Data Controls comprehensively describe the attributes and methods so that UI components can make intelligent assumptions about how to render the data. In addtion, the Data Control standardizes access to functionality that is typically required by data-intensive, interactive user interfaces. Examples of functionality could include how the Business Service is instantiated, navigated, invoked, sychronized, transacted or released. This JSR will not impose any requirements for the types of attributes or methods on the Data Control or any implementation requirements. Those decisions will be left to the implementor of the Data Control and revealed to the Declarative Bindings and UI via the Data Control interface.

[1] By Business Service we mean any class that publishes objects and provides methods that manipulate the objects. I.e. The actual term may vary according to the Business Service technology, SessionFacade, WebService, ApplicationModule, etc.

分享到:
评论

相关推荐

    jsr227 参考文档

    ### JSR227:为J2EE提供标准的数据绑定与数据访问机制 #### 一、概述 JSR227(Java Specification Request 227)是一项由Oracle提出的标准,旨在为Java 2 Platform, Enterprise Edition (J2EE)平台提供一种通用的...

    下一代数据编程:服务数据对象

    - **Web UI数据绑定与JSR-227**:SDO可以帮助实现UI组件与后端数据源之间的绑定。 - **JCA与JMS**:SDO可以与JCA和JMS一起使用,处理来自企业信息系统的数据。 #### 七、结论与展望 通过引入SDO,开发者可以以更...

    下一代数据编程:服务数据编程

    SDO与其他技术的关系密切,它可以作为JDBC、JSR-114、实体EJB、JDO、Hibernate等持久性框架、Java-XML绑定、XQuery、JSR-225、Web UI数据绑定、JCA与JMS等技术的补充。例如,SDO可以与JDBC结合使用,提供更高级别的...

    服务器验证JSR-303

    JSR-303的发布使得在数据自动绑定和验证变得简单,使开发人员在定义数据模型时不必考虑实现框架的限制。

    J2EE开发使用手册源码

    6. **JAF(JavaBeans Activation Framework)**和**JSR 175(Annotations)**:JAF用于处理不同类型的MIME数据,而JSR 175引入了注解,简化了代码的元数据声明。源码可能展示了如何使用注解进行类型安全的属性访问,...

    J2EE 基础教程ppt

    J2EE架构由多个层次组成,包括客户端层、Web层、业务逻辑层和数据访问层。这些层之间的通信通过标准接口和服务进行,确保了组件间的松耦合。 - **客户端层**:通常包含桌面应用或轻量级浏览器应用,与服务器通过...

    j2ee 企业级开发

    1. **多层架构**:J2EE支持四层架构(客户端、Web层、业务逻辑层、数据访问层),使得系统职责明确,易于维护。 2. **组件化**:通过EJB(Enterprise JavaBeans)等组件模型,实现代码的模块化和复用。 3. **安全性*...

    J2EE 5.0帮助文档(英文帮助文档)

    它简化了数据访问,让开发者可以使用面向对象的方式操作数据库。 5. **JMS (Java Message Service)**: JMS提供了一种标准的方式来创建、发送、接收和读取消息,用于实现异步通信和解耦应用程序组件。 6. **JTA ...

    j2ee构架师手册

    6. **JNDI(Java Naming and Directory Interface)**:JNDI提供了一个统一的接口,用于查找和绑定各种资源,如EJB、数据源和邮件服务器等。 7. **JAF(JavaBeans Activation Framework)**与JSR 181(Web Services...

    J2EE 1.4基础教程

    此外,还引入了JSR 170的内容管理系统API(Java Content Repository API),允许开发人员访问和管理内容存储库。 ### 学习J2EE 1.4的重要性 尽管后来的J2EE版本演变为Java EE,并进一步发展为 Jakarta EE,但J2EE ...

    JSR 181 Web Services Metadata for the JavaTM Platform

    - **JSR-181到JSR-109部署描述符的映射**:解释了如何将JSR-181元数据映射到JSR-109部署描述符中,以便在J2EE容器中部署。 #### 8. 使用JSR-181注解来影响WSDL的形状 - **RPC/Literal风格**:描述了如何使用JSR-...

    用WebLogic Portal 8.1 开发 JSR 168 Portlets

    此外,portlet还提供了额外的功能,如持久性数据存储、用户概要访问、URL重写和不同作用域的瞬变数据存储。 Portlet容器扩展了Servlet容器的功能,符合J2EE 1.3规范。它负责提供portlet运行所需环境,确保portlet...

    J2EE API帮助文档

    JPA 1.0在J2EE 5.0中首次引入,提供了一种声明式的方式处理数据库操作,简化了数据访问层的编写。 4. **EJB (Enterprise JavaBeans)**: EJB是J2EE中的核心组件模型,用于构建可部署的业务逻辑。在J2EE 5.0中,EJB ...

    J2EE Application Development using Java

    1. **Java EE架构**:J2EE架构基于层的概念,包括表示层、业务逻辑层和数据访问层。这些层之间通过接口进行通信,确保了良好的模块化和职责分离。 2. **Servlet和JSP**:Servlet是Java编写的小型服务器端程序,处理...

    j2ee 5 API J2EE

    JAXB 2.0是J2EE 5中用于XML绑定的工具,它允许开发人员将XML数据自动映射到Java对象,反之亦然。这一版本引入了注解支持,使得XML到Java的映射更加直观和简洁。 **4. JPA 1.0(Java Persistence API)** Java ...

    XML在J2EE中的应用.doc

    XML,全称可扩展标记语言(Extensible Markup Language),在J2EE(Java 2 Platform, Enterprise Edition)环境中扮演着重要角色,它提供了一种独立于应用程序和平台的数据表示方式,便于数据交换和集成。...

    JDK1.6&J2EE;_APIzh_CN.zip

    JDK(Java Development Kit)是Java编程语言和Java平台的标准版开发工具包,而J2EE则是用于构建企业级分布式应用的平台。 描述中提到"JDK的文中文的",意味着这些API文档是中文本地化的,对于中国或其他使用中文的...

    j2EE概述老师精心总结

    J2EE应用通常采用三层架构:表现层(Presentation Layer)、业务逻辑层(Business Logic Layer)和数据访问层(Data Access Layer)。表现层由Web组件组成,负责用户交互;业务逻辑层由EJB或Java类实现,处理业务...

    J2EE武功秘籍.zip

    7. **JAF(JavaBeans Activation Framework)** 和 **JSR(Java Specification Requests)**:前者支持MIME类型和数据对象的激活,后者是Java社区进程定义新API和规范的机制。 8. **Web服务(Web Services)**:...

Global site tag (gtag.js) - Google Analytics