Design notes

Access to stock data

A preliminary design involved a TPickerStationery class which contacted the Stock Server for all available stocks and handed them to the TPickerModel.
But this approach made it impossible to support any live-updating of the Stock Picker document.

In the current design, although live-updating is unimplemented, TStandardPickerPresenter creates and uses a TStockCaller object to obtain stocks from the Stock Server. This approach, in addition to achieving the goal of insulating TPickerModel from any awareness of a server, supports obtaining data from any number of locations or setting up a live connection to the server simply by modifying the presenter.

Support for drag and drop

The view class in Stock Picker is derived from TDOMDocumentComponentView which is declared in the Taligent Selection Tool documented sample. This reduces code by allowing Stock Browser to take advantage of that program's implementation of drag and drop functionality.

Look-up by name

Rather than maintain a hierarchy of embedded components for each TStockData object, the model holds multiple stock data objects in a TDictionaryOf<TStandardText, TStockData> so they can be looked up by name. This simpler approach yields better performance.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker