原创 2003年06月26日 10:08:00




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.


数据绑定语法Vue.js 的模板是基于 DOM 实现的。这意味着所有的 Vue.js 模板都是可解析的有效的 HTML,且通过一些特殊的特性做了增强。Vue 模板因而从根本上不同于基于字符串的模板,请...
  • itpinpai
  • itpinpai
  • 2016年07月27日 17:09
  • 9444


String sql ="select * from users where name=? and password=?"; PreparedStatement pstmt = null; ...
  • coding_man_xie
  • coding_man_xie
  • 2016年03月15日 21:50
  • 2230


数据访问层的设计我研究了很长时间,关于接口的定义,好几次都推翻重来。 园子看到过很多easyui+MVC+EF的文章,在早期,我的设计也类似。 但是后来为了增强它,想加点功能通用的功能进去,就耗费...
  • dyllove98
  • dyllove98
  • 2013年07月19日 19:19
  • 7907

Spring - Java/J2EE Application Framework 应用框架 第 4 章 属性编辑器,数据绑定,校验与BeanWeapper(Bean封装)

第 4 章 属性编辑器,数据绑定,校验与BeanWeapper(Bean封装) 4.1. 简介 是否需要对业务逻辑进行验证是一个常见的问题。 有关这一点存在两种...
  • GarfieldEr007
  • GarfieldEr007
  • 2017年02月15日 23:07
  • 350

Spring - Java/J2EE Application Framework 应用框架 第 10 章 使用JDBC进行数据访问

第 10 章 使用JDBC进行数据访问 10.1. 简介 Spring提供的JDBC抽象框架由core, datasource,object和 support四...
  • GarfieldEr007
  • GarfieldEr007
  • 2017年02月15日 23:14
  • 228


原文链接: http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html 核心J2EE模式...
  • pku_lihf
  • pku_lihf
  • 2012年05月29日 17:12
  • 624

form2 数据绑定到 form1 中的控件 (c#)

  • 2011年05月28日 05:52
  • 44KB
  • 下载


  • 2011年02月15日 09:03
  • 368KB
  • 下载

ASP.NET 2.0 快速入门(2):ASP.NET 2.0 数据绑定 PDF.zip

  • 2008年01月09日 12:51
  • 1.51MB
  • 下载


  • 2008年03月14日 15:00
  • 3.9MB
  • 下载