Home > net grid > Trading application development

Trading application development

Developing a real time trading application development is really tough but with a simple design and time tested methodology this can be achieved very fast. A simple Trading application development must be able to handle different kinds of currencies such as the dollar, euro, pounds etc. The scope for future Enhancement must also be provided in the Trading application development. During the real time trading application development it must be able cope with difficult circumstances such as not able display real time data, programmatic error which can have a huge impact on the application and usage of CPU and memory. Dapfor make sure that during the trading application development all this problems are addressed so that user doesn’t face any kind of problem. It is really a tough job but not achievable. In trading application development currency converter is an important and vital part. Each currency has different rates which changes during the market period and this change must be displayed to the user. To ensure this facility CurrencyRate Class is created in the trading application development process. As discussed earlier the rate of the currency changes in real time and to handle it the following API is used.
public class CurrencyRate : INotifyPropertyChanged
{

public IList<string> AvailableCurrencies
{
get { return _availableCurrencies; }
}
public string MainCurrency
{
get { return _mainCurrency; }
}
}
CurrencyRate currencyRate = CurrencyRate(“USD”, Provider.Instance.AvailableCurrencies);
//Get current USD/EUR rate
double rate = currencyRate[“EUR”];
//Set a new USD/EUR rate
currencyRate[“EUR”] = 1.42;
INotifyPropertyChanged interface is used to notify the users about the change in the currency rate. After the creation of data model in trading application development process it needs to be displayed to user on the grid. To connect the data source to the .net grid Grid.Source is used.
Header header = Header.FromDataType(typeof (CurrencyRate));
grid.Headers.Add(header);
//Bind grid to the collection of CurrencyRate
grid.DataSource = new List<CurrencyRate>(Provider.Instance.CurrencyRates.Values);
In trading application development phase, Dapfor provides with the facility to display the particular column on the .net grid by implementing the IDataAccessor interface. This trading application development process uses the System.ComponentModel.TypeDescriptor class which supplies meta information of any class to the entire application.
// TypeDesctiptor provider.
internal class CurrencyRateTypeDescriptorProvider : System.ComponentModel.TypeDescriptionProvider
{
private ICustomTypeDescriptor _typeDescriptor;
public CurrencyRateTypeDescriptorProvider() : base(TypeDescriptor.GetProvider(typeof (CurrencyRate)))
{
}
public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance)
{
return _typeDescriptor ?? (_typeDescriptor = new CurrencyRateTypeDescriptor(base.GetTypeDescriptor(objectType, instance)));
}
}
To achieve this feature CurrencyRateTypeDescriptorProvider class is created during the trading application development phase. The above code will give the TypeDescriptor for object that belongs to the CurrencyRate kind in the trading application development process.

  1. No comments yet.
  1. No trackbacks yet.

Leave a comment