`
ihuashao
  • 浏览: 4514941 次
  • 性别: 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是oracle ADF DataControl的规范

    jackson-datatype-jsr310-2.13.1-API文档-中英对照版.zip

    赠送jar包:jackson-datatype-jsr310-2.13.1.jar; 赠送原API文档:jackson-datatype-jsr310-2.13.1-javadoc.jar; 赠送源代码:jackson-datatype-jsr310-2.13.1-sources.jar; 赠送Maven依赖信息文件:jackson-...

    j2ee 1.4所有jar包

    activation.jar javax.servlet.jar javax.servlet.jsp.jar jboss-j2ee.jar jboss-jaxrpc.jar jboss-jsr77.jar jboss-saaj.jar mail.jar namespace.jar xml-apis.jar

    服务器验证JSR-303

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

    jsr303相应jar包

    jsr303相应jar包,用于spring框架的数据验证,直接加到lib目录下即可

    jackson-datatype-jsr310-2.9.8.jar

    jackson-datatype-jsr310-2.9.8.jar

    FindBugs JSR305_3.0.2

    FindBugs, Find Bugs in Java Programs. FindBugs requires JRE (or JDK) 1.7.0 or later to run. However, it can analyze programs compiled for any version of Java, from 1.0 to 1.8.

    JSR303要用的jar包

    JSR303要用的jar包 validation-api-1.0.0.GA hibernate-validator-4.3.0.Final

    jsr305-3.0.2-API文档-中英对照版.zip

    赠送jar包:jsr305-3.0.2.jar; 赠送原API文档:jsr305-3.0.2-javadoc.jar; 赠送源代码:jsr305-3.0.2-sources.jar; 赠送Maven依赖信息文件:jsr305-3.0.2.pom; 包含翻译后的API文档:jsr305-3.0.2-javadoc-API...

    jsr305-3.0.2-API文档-中文版.zip

    赠送jar包:jsr305-3.0.2.jar; 赠送原API文档:jsr305-3.0.2-javadoc.jar; 赠送源代码:jsr305-3.0.2-sources.jar; 赠送Maven依赖信息文件:jsr305-3.0.2.pom; 包含翻译后的API文档:jsr305-3.0.2-javadoc-API...

    jackson-datatype-jsr310-2.11.4-API文档-中英对照版.zip

    赠送jar包:jackson-datatype-jsr310-2.11.4.jar; 赠送原API文档:jackson-datatype-jsr310-2.11.4-javadoc.jar; 赠送源代码:jackson-datatype-jsr310-2.11.4-sources.jar; 赠送Maven依赖信息文件:jackson-...

    jsr352:实施JSR 352

    要构建并运行所有测试: # start MongoDB databasemongod# build JBeret, activate allTests maven profile to run all testsmvn install -DallTests一些测试涉及非常大的数据集(例如,超过一百万行的CSV或Excel...

    spring4采用JSR349标准校验数据

    NULL 博文链接:https://lovelzy.iteye.com/blog/2265003

    JSR268门户标准

    java门户标准,jsr168规范,jsr268规范,java门户标准,jsr168规范,jsr268规范

    JSR-000343 Java Message Service 2.0 javadocs for Evaluation

    JSR-000343 Java Message Service 2.0 javadocs for Evaluation.官网下载的,放在这里共享

    SpringMVC JSR303数据校验DEMO(附:JSR303的JAR包)

    SpringMVC JSR303数据校验DEMO(附:JSR303的JAR包) SpringMVC JSR303数据校验DEMO(附:JSR303的JAR包)

    jackson-datatype-jsr310-2.9.5-API文档-中英对照版.zip

    赠送jar包:jackson-datatype-jsr310-2.9.5.jar; 赠送原API文档:jackson-datatype-jsr310-2.9.5-javadoc.jar; 赠送源代码:jackson-datatype-jsr310-2.9.5-sources.jar; 赠送Maven依赖信息文件:jackson-...

    JSR-94的API,最终版的

    学习规则引擎必备之api,里面什么都全了。 需要的不用找了,我在官网上下的。

    jackson-datatype-jsr310-2.9.7-API文档-中英对照版.zip

    赠送jar包:jackson-datatype-jsr310-2.9.7.jar; 赠送原API文档:jackson-datatype-jsr310-2.9.7-javadoc.jar; 赠送源代码:jackson-datatype-jsr310-2.9.7-sources.jar; 赠送Maven依赖信息文件:jackson-...

    jsr80 java 访问 usb

    这两个项目也都开始试图向其他操作系统上的 Java 应用程序提供对 USB 设备的访问,尽管它们都还没有开发出可以使用的包(参阅 参考资料 中有关本文中讨论的这两个项目及其他项目的资料)。 在本文中,将对 jUSB 和 JSR...

Global site tag (gtag.js) - Google Analytics