Our model design will be based on three application layers:
– A graphical layer (presentation)
– A business service layer (logic)
– A data access layer (data)
The data access layer will be both used by the service layer and the presentation layer. Why not separate the layers more strictly ?
Because in the majority of use cases that we have defined, the data access layer is enough. There is no real interest in creating a forwarding service between the presentation layer and the data access layer.
The only use case where a service layer appears relevant is the UC-3 (Download stock quotations from an external source).
That may be explained by two reasons:
– The data access layer is is a rich layer from the point of view of our business domain. Data are often self-sufficient functionally.
For example, to display the stock price on a graph, loading stock quotations over a given period is the only treatment needed from the business perspective. As for displaying a stocks list. The rest is a question of presentation.
– The studied UC cover basic functionalities.
If you go from the application boostrap and you want to implement advanced use cases such as strategy backtesting, the creation of new services based on the data access layer vould be unavoidable