博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
JSR227:J2EE数据绑定及数据访问标准 (转)
阅读量:2507 次
发布时间:2019-05-11

本文共 4480 字,大约阅读时间需要 14 分钟。

JSR227:J2EE数据绑定及数据访问标准 (转)[@more@]

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

下列JSR227的一个简单介绍

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

Increasingly, enterprise applications model persistent datas as Java classes and develop Business Services that query, manipulate, and persist these s. However, develo 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 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: tags, JSF, Struts, and Swing. Example business services include P Services, 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. Perfong 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 perfocustom 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 Mapplication 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 prov 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 ligent 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.

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, , ApplicationModule, etc.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10748419/viewspace-957988/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10748419/viewspace-957988/

你可能感兴趣的文章
设计模式08_适配器
查看>>
设计模式09_代理模式
查看>>
设计模式10_桥接
查看>>
设计模式11_装饰器
查看>>
设计模式12_外观模式
查看>>
设计模式14_组合结构
查看>>
资金流入流出计算方法
查看>>
克罗谈投资策略02_赢家和输家
查看>>
克罗谈投资策略03_你所期望的赌博方式
查看>>
克罗谈投资策略04_感觉与现实
查看>>
通向财务自由之路01_导读
查看>>
通向财务自由之路02_成功的决定因素:你
查看>>
中低频量化交易策略研发01_引言
查看>>
中低频量化交易策略研发06_推进的择时策略
查看>>
史丹·温斯坦称傲牛熊市的秘密
查看>>
期货市场技术分析01_理论基础
查看>>
期货市场技术分析02_趋势的基本概念
查看>>
期货市场技术分析03_主要反转形态
查看>>
期货市场技术分析04_持续形态
查看>>
期货市场技术分析05_交易量和持仓兴趣
查看>>