
Now that we have the basic class representation, we have to think what kind of information each of those models But this information is not relevant for the application. We could also have an association with the Board and the User model, so we could identify who created a Know who started the discussion and in the Post so we can identify who is posting the reply. Finally, we will need fields in both the Topic to Similarly, the Post will need a field to represent which Topic it belongs so that we can list in theĭiscussions only Posts created within a specific Topic.

What the solid linesĪre telling us is that, in a Topic, we will need to have a field to identify which Board it belongs to. It’s also important to take the time to think about how do models will relate to each other. The following models: Board, Topic, Post, and User.įigure 2: Draft of the class diagram of the Web Board Models we will create, and it’s very closely related to the data our Django app will process.įor us to be able to implement the use cases described in the previous section, we will need to implement at least Below, an overview of our main use cases and the role of each type of user:įigure 1: Use case diagram of the core functionalities offered by the Web Board Class Diagramįrom the Use Case Diagram, we can start thinking concerning the entities of our project. We will need to find a way to differentiate a regular user from an admin user because only the admins are supposed toĬreate new boards. In this topic, other users can engage in the discussion posting replies. Then, inside a specific board, a user can start a new discussion by creating a new topic. The whole idea is to maintain several boards, which willīehave like categories. Our project is a discussion board (a forum).
#Staruml generate mysql software
Web development, and software development in general, is not just about coding. Pictures to have an idea what we are going to build and then jump to the Models section of this tutorial.īut if you are new to Web development, I highly suggest that you keep reading. If you already have experience with Web development and feel it’s too much detail, you can just skim through the Very briefly about this project we are going to develop. So, before we get into the fun part, playing with models, views, and everything. For me, it’sĭifficult to process a concept where in the examples you read Class A and Class B, or when I see the classicalįoo(bar) examples.
#Staruml generate mysql code
I don’t know about you, but personally, I learn much more by seeing practical examples and code snippets.


Then after that, you are going to learn all the Django fundamentals: models, admin, views, templates, and In the next section, we are going to talk a little bit about the project we are going to develop, so to give you someĬontext. In this lesson, we are going to keep writing code in the same project. We alreadyĬreated the project we are going to play around. Hopefully, you are all setup with Python 3.6 installed and Django 1.11 running inside a Virtual Environment. Welcome to the second part of our Django Tutorial! In the previous lesson, we installed everything that we needed.
