Specialization : Scenario provided in LSA course : Design question
Below is one of the use cases mentioned in the courses ...
Use case: Create a component implementation layer
GameMatch is a social media company that specializes in introducing members to each other as they play different types of games.
The process for setting up and playing the game is the same for any game. The rules for each game are different. The entire process runs in the context of the game members decide they want to play. For the purpose of reporting, you store each interaction from game launch to match completion to different tables according to the selected game.
Design a specialization solution that supports this requirement.
Based on the above question , here are the design considerations I have made. Need suggestions / recommendations based on my selection & also I am Interested in knowing what all are the other options & recommendations
1) As the application is all about setting up and playing the games , no need of separate framework layer & one implementation layer is enough which contains entire game management
2) For each game , the entire life cycle might be the same . Hence , we can have one generic case type containing the life cycle
3) Rules could be different for each game ,hence the underlying processes need to be specialized for each game which can be achieved through circumstance (or) class specialization... If we can consider Class level specialization here , reporting might be easier ( we can map each class to separate table ) . can we make use of DCR in this scenario ?
4) Any other design aspects to consider here that significantly impact the design ?
I would do it differently .. I think we should define one framework layer and define your case type there and we should define implementation process in each implementation class for each game.and each implementation class be mapped to different database table.