Module 3: Designing

20. Exercise 3: Domain Modeling

Resources

Transcript

[00:03] Hey friends. Welcome to the third exercise of the course and I hope you are taking some time to complete this because I really think that they will help you make the concept stick a bit better. But if you’re just skipping ahead to the solution, that’s fine too. There is no judgment here.

[00:18] So the exercise that we’re going to be taking a look at now is completely in the domain model of the full snack application. So here we have the list that we saw in the previous video. You can use this as a starting point. We have simply a list of the entities that we discover. And then for the entities, we have some of its main attributes and operations.

[00:38] So the exercise is to go through the functional requirements that we saw in the project’s spec and the Figma file where we have the UI specs and try to identify the remaining entities and attributes. So for the attributes don’t. This is not about completeness, so don’t try to, you know, create a more complete model possible. And also the same applies for operations.

[01:02] Focus more on the attributes that represent relationships with other entities. So for example, we we may find what I have here that I have an entity that is a restaurant category. And so we are going to have an attribute here that represents a relationship between between my restaurant and the category. So I may have a categories attribute that is an array or a collection of restaurant category entities.

[01:27] And if you like some bonus point and you like to see your model represented visually in a diagram, what you can do is you can grab your entire list, you can copy your entire list and paste it on any LLM. Really, you can use chatGPT or Claude and ask it to give you a class diagram in mermaid syntax, and then you can grab that the results of what they give you and you can paste it here in Mermaid.live and that will give you your visual class diagram representing your domain model.

[01:57] So I hope you give this a try. How you spend a few minutes on this and I’ll see you in the next video. I’ll show you my version of the solution.