Oracle submits a standard proposal for "J2EE Data Binding Standard", JSR227, which plans standardizes data binding and access form in MVC mode, and the MVC implementations involved may include Struts, JSF and Swing. Wait. This is an interesting attempt. If successful, Java developers will get a unified MVC data binding and access method. But I suspect that it is the possibility of success.
A brief introduction to the following 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 INTE Rface 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:
Binding (Locating and Accessing)
single attribute (appropriate for input fields and other single value UI components) objects with related collection attributes (appropriate for tree controls) collections of objects (appropriate for displaying in tables) Navigating
current row tracking (first, next, prev, last) current range (appropriate for scrollbar pagination) coordinating related collections (appropriate for master / detail display) multiple iterators sharing same collection (appropriate for split pane) Performing actionsnormalizing the interaction of generic insert, update and delete operations on transactional objects and collections of objects surfacing status of bound objects (to know whether the UI component needs to be re-rendered) dispatching to methods to perform custom services. 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 Sophistated 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 what publishes Objects and provides methods That Manipulate the objects. I. The Actual Term May Vary According to The Business Service Technology, SessionFacade, WebService, ApplicationModule, etc.