Sunday, July 11, 2010

Business Layer

Business Layer has the following projects:
  • Business.Workflow - Entry path to the layer.  This is where all of the workflows are designed.
    • AlgorithmWorkflow
      • RetrieveAllAlgorithms
      • RetrieveAlgorithmByName(String algorithmName)
      • ExecuteAlgorithm(Timestamp startTime, Timestamp endTime, List symbolList, int algorithmId, float availableBalance)
  • Business.Helpers - Static classes that perform certain operations
    • CalculateNumberOfSharesToBuy(StockHistoryArchive stock, float availableBalance)
  • Business.Helpers.Algorithms - All algorithms defined here
    • DimasTraderAlgorithm
      • CheckToBuy(StockHistoryArchive stock, int algorithmId, float availableBalance, Database database)
      • CheckToSell(StockHistoryArchive stock, BoughtStock boughtStock, int algorithmId, float availableBalance, Database database)
  • Business.Objects - Currently not implemented but am thinking this is where the business entities would reside
  • Business.Adapters - May be renamed to entity translators.  This is where the translation between business objects to data access objects.

Couple things that need refactored:
  • Currently, I did not implemented interface implementation between the business layer and the data access layer.  May be required to be redesigned.
  • May need to implement business entities.
  • May need to implement translation logic, which would be the dependency injection layer itself.

No comments:

Labels