Home > net grid > Real Time Blotter

Real Time Blotter

Nowadays, every user wants an application that should be fast, stable and displays data that are updated. A real-time application means that the data which are displayed must be current and updated. The best example for a Real Time Blotter application is the stock market viewer which is always current and updated. Nowadays, every Real Time Blotter application uses this real-time feature. For a simple Real Time Blotter application developers need Market, Instrument and Feeder class. In Market class, properties such as OpenTime, CloseTime, MarketState and Name are included. Collection of tools such as shares, bonds etc are very important in every market. These set of instructions are generally taken before the opening of the market and remain constant till the market is closed. In this case, Instrument class is used in this Real Time Blotter application it is having an identifier which is used in the application for ex. Code, ISIN, MNEMO etc. In the Feeder class, all the important information from the Instrument class as well as the price and its change, market information and availability of the product.
If an instrument is sold or purchased, the subscriber of the Feeder class will be notified about the particular change. This is possible with the help of the interface INotifyPropertyChanged, which the Feeder class implements. A Real Time Blotter application must be able to work on different markets and must be available in the application. Provider Class is created in the Real Time Blotter application to save the instruments, global data and the list of market. Use of composite objects makes the Real Time Blotter application more powerful. For ex. Properties of the Feeder and the Instrument class can be used to display composite data, CompositeField Attribute is used for this purpose. Using this attribute is not a single line of coding and it is done which decreases the development time of the Real Time Blotter application. It doesn’t have a negative impact on the Real Time Blotter application.
public class Feeder : INotifyPropertyChanged
{
private readonly Instrument _instrument;

[CompositeField]
public Instrument Instrument
{
get { return _instrument; }
}
}
public class Instrument
{

[Field(“InstrumentId”)]
public string Isin
{
get { return _isin; }
}}
As stated earlier Feeder class implements the INotifyPropertyChanged interface and the FieldAttribute object is used to set the InstrumentId property. The above will display the ISIN code. For market object which is stored in the Feeder class also uses this technique. This illustrates the simple coding in the Real Time Blotter application.
public class Feeder : INotifyPropertyChanged
{
private readonly Market _market;

[CompositeField]
public Market Market
{
get { return _market; }
}}
Adding animation is also very easy and simple and is done in the non-GUI part of the Real Time Blotter application.  In the provider class just add the BeginUpdates () method. Color of the cells in the Real Time Blotter application is done using the Grid.PaintCell event.

Categories: net grid Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment