The architecture which is described in this document succeeds core part of one from the pervious version , still it introduces new concepts and there are a lot of places where implementation is significantly changed.
Concepts:
The library is destined to facilitate development of applications which main purpose is data handling (data-centric, business applications). There is a lot of tasks which main purpose is just show, modify and update data in user’s friendly way. Even if a task is very simple, the developers still need to spend a lot of time on implementation and maintains of the data structure also they have to implement UI which allows show and handle underlying data. All these tasks are often repetitive and not changing from task to task. Of cause there are a lot of libraries and applications which already help to solve these problems: DevExpress XAF framework, Access and the latest product of the strain Light Switch tool are the great examples of them. While all these applications have a great performance in their areas, still they have one common flow - they don't give a full access to their internal implementation. Internal implementation in this context doesn't mean to have access to their source code but thorough access to all their components and properties. They all play their role at a quite abstract level, this mean you couldn't just override the behavior of their components in the way that you generally do when implement standard windows applications. Consequently this leads to necessity of learn new technologies and spend time on scrutinizing new architecture model.
Hence the goals of this framework are:
- Rapid development process - Ability to build UI and execute full-functional business applications just on the base of the predefined meta-data without code writing and compilation.
- Flexibility - Ability to intervene in the process of UI creation at any level either by mean of events or by the components overriding, in order to change their default properties or substitute them with custom ones.
- Extensibility - Possibility to build extended and customized components on the base of the default ones and then use them instead.
- Strong Object Model - ability to get any UI, data entity or meta-data object at any time and modify their properties.
- Abstract UI layer - When UI layer is build on the base of meta-data, the core building routine should be independent from implementation of the specific UI components.
- Data provider independency - interaction with data either from database or any other external data storages should be abstracted.
- Data source layer independency - possibility to use as a data source (cashed data) objects of any type - DataSet, DataContext or custom objects list.
All these items generally complain with XAF DeveExpess architecture, still some differences are relevant:
- XAF is intended to be used only in pair with XPO framework (no independency from the data source)
- XPO framework is intended to work in relation with the specific XPO data provider (hence there is no data provider independency)
- New features are introduced to abstract developer interaction with user interface components. (hence you couldn't get the real win form components behind this abstract ones)
Nevertheless it's a good idea to learn and understand how XAF framework is implemented, because it gives clear and elucidating idea how a sustainable architecture should be implemented. Once again the largest part of the library is intended to be similar to the XAF framework, although not always implemented exactly in the similar way just because a lack of resources.
The abstract structure:
The library’s objects structure:
The library’s workflow:
The core component of the library is XtraBinding object. It contains System.Windows.Forms.BindingSource object which links to the UI controls while UI is building (step 3 on the library’s workflow image). Once BindingSource object is linked to the controls all changes made through the controls are reflected automatically on the BindingSource’s linked data source. The XtraBindinding component contains IXtraBindingItemAdapter interface which allows get access to control data source’s items in the respective BindingSource. The GetAdaptedDataSourceItem(object) method of the IXtraBindingItemAdapter returns an object which provides such kind of the control for the respective data source item. The returned object has to be derived from the interfaces that allow to control and manage respective data source item (See the Data source layer on the library’s object structure). Through these interfaces it is possible to edit, modify, reject changes and get the state of a data source item. When the item is modified the respective changes should be reflected on the data base, it could be achieved by using IDataAdapter interface which is also contained in the XtraBinding component. The IDataAdapter interface contains a number of methods which allow interact in-cache objects with the data base layer. The Update(IEnumerbale



No comments:
Post a Comment