This repository has been archived by the owner on Sep 29, 2024. It is now read-only.
Report | Week 07 #36
tech-n1c
started this conversation in
Show and tell
Replies: 2 comments
-
Hello, It's fantastic to see how your team has incorporated key design principles like the Liskov Substitution Principle (LSP) and the Single Responsibility Principle (SRP) into your project. The explanation of how LSP is applied to the Account and Player classes, with specific mention of the BlackJackPlayer subclass, demonstrates a solid understanding of the principle. Ensuring that subclasses can seamlessly replace their superclasses without loss of functionality showcases a thoughtful and scalable design. Well done. Your CookPit Team |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
We updated our CRC diagram to fulfill some design principles. Also, we attended the DevFestKA last Saturday to get some inspiration for the project.
CRC diagram:
We adjusted our diagram in order to fulfill the following two design principles:
Liskov Substitution Principle
The LSP states that all Objects of a superclass should be replaceable with objects of their subclasses. In our project, we have the
Account
class, which has the subclassPlayer
. ThePlayer
class will have a subclass for every game we implement. For now, we only have BlackJack as an example, so there only is the subclassBlackJackPlayer
. Each of the superclasses (Account
andPlayer
) can be replaced be their respective subclasses without loosing any functionality. The subclasses only add extended functions for their use case, but don't modify any inherited functionality. The same principle applices analogely for theGame
class and its subclasses.Single Responsibility Principle
Single Responsibility Principle (SRP) suggests that a class should encapsulate a single responsibility or functionality, and if a class has multiple responsibilities, it becomes more difficult to understand, maintain, and modify. By adhering to the SRP, each class becomes more focused and less likely to be affected by changes in other parts of the system.
We used the SRP to build a maintailable, and extensible system, because our plan is to create multiple games in a clean class-structure.
DevFestKA Learnings
At the DevFest, we attended many inspiring and highly interesting talks, many of them also being relevant for our project. For example, we learned about using AI features in web applications, which is something we might implement for a support assistant or intelligent Ai opponents.
There also was a talk on PassKeys, were the concept and basics were introduced. Afterwards, we also heard about (dis-)advantages on the usage. The speaker (Christian Kühn from dmTECH GmbH) also showed us a demo of the process. After his talk, we thought about implementing security in our project with passkeys as well. In a short conversation with him, he suggested KeyCloak as an authentication provider, which makes the whole process a lot easier to use for beginners.
Beta Was this translation helpful? Give feedback.
All reactions