Sunday, September 19, 2010

Project Description

The application allows view, create modify and handle workflow of different kinds of trades either committed in the markets or out-of-market in the unique way. System traces and loads trades from different sources such as MICEX stock market, FOREX and other places (actually there are about 25 different kinds of market places which system handles) to a single data storage (Oracle data base). Since the all trades stored there is in the unique way the client interface give ability to user to view, change and handle them in the standardized format. Also it provides interface to create new trades on the base of predefined templates (such as simple non-market trade (buy/sell stock), REPO trades, loans, nettings and buy-sell-back trades) with corresponding parameters calculators for each one. Also there are a handful of company-specific trade types with the same features. System also includes the specific business logics for the trades such as ability to hand on trades to back office or modify specific parameters of trades which have been committed on a particular market. Also there has been implemented clients permission system which allows restrict the particular user of viewing specific information or doing not allowed operations.

Project was implemented using C# and Frame Work 3.5. Also were used 3-rd party libraries such as DevExpress and DevArt.
Our team has had 5 members, 4 Oracle developers and I was entirely responsible for the client part of application including UI, interaction with Data Base structure, calculation of the specific parameters of the trades.
JIRA and SVN were used for the project management.

DB interaction

Were used ADO.NET, DevArt - dotNet for Oracle, DataSet memory-cache model.
DevArt was used because it has some advantages upon standard Oracle framework library such as: faster data selection, support asynchronous data selection, has more logical implementation and finally – friendly support team.

UI

User interface largely relies on DevExpress win form controls. The controls which library provides much more comprehensive and have a great deal of extensive functionality in comparison with standard windows controls. For example XtraGrid and XtraLayout controls allow customize presentation of the data on the form by the end-users and then save / restore their preferences. And once again great support.

Project video

Application architecture

The module is data-centric, desktop application implemented by C#. It's use DataSet as internal data-cash storage model. It's largely used ADO.NET and his booster DevArt library. UI interface is implemented by using DevExpress WinForm control library. The architecture in general is built on the base of strong object oriented model in intention to comply with following goals:

  1. The independency from the data provider
  2. Independency of visual layer from the data layer
  3. Capacity to change/add on the move visual representation of the specific data entities
  4. Capacity to adjust visual representation of data at run-time by end-users

To meet these requires application's implementation are divided by the following groups of libraries:

  1. Libraries which work with data on abstract level
  2. Libraries which build data representation layer (UI) on the base of metadata
  3. Libraries which link data with their UI representation layer
  4. Libraries which implement abstract data level



How it's wok.


Meta-data definition

In DataSet are defined all meta-data that necessary to their visual representation, such as:

  • Caption of tables, columns
  • Default values for columns
  • Mask for columns
  • Filters for specified relations

Also for each data table are defined associated stored procedures which update and delete respective records and mapping of columns to their parameters.

Building a representation layer







Each data table by default is associated with list form where data could be selected and displayed, also here you could add or remove particular record. Each data record could be shown in own form, where it is possible to modify and update the record.

The list form is composed by two main components: search panel and grid. Search panel contains controls to define search conditions by which records are selected into the grid. Grid is used to display set of selected records.

The controls on the search panel and columns in the grid are built in run-time by the meta-data from a data table.
The form which displays particular record is built by the same way.

Binding representation and data layers.

Data is bound to UI controls by mean of the DataView (custom, not System) class which is a wrapper of BindingSource class. Besides of standard BindingSourcefunctionality it provides following features:

  • Links memory-cached data with data base (Allow fill data from DB, update data in data base).
  • Handles parent-child relations between binding sources.
  • Supports transaction model when data is updated.

Note
Following improvements for the current model could take a place in future:

  1. Detach metadata from the data.
  2. Data representation layer should be built on abstract level