Baking a Cake – Domain model

Published on and tagged with baking a cake  cakephp  domain model  use case

The use cases we have written in the previous article are the basis to identify the conceptual classes and to draw the domain model of our application. To identify the conceptual classes we will use “Noun Phrase Identification”, i.e. each noun is considered to be a candidate for a conceptual class (with some experience you can skip this step).

If we look at the first use case “Creating a project”:

The user choses to create a new project, enters the project information, and the system creates the project.

we get the following nouns:

  • user
  • project
  • project information
  • system

The first two nouns are conceptual classes. The third noun sounds like it is an attribute of the “project” class, even though the term “information” is a bit too general. The last noun, “system” refers to the application we want to build and is therefore no conceptual class.

If we apply this approach to the other use cases we find two additional conceptual classes: message and feed.

The next step is to define the associations between those classes. We can do that textually or visually by drawing a UML diagram. I prefer the latter, as it is more clear. But first the textual version:

  • A User has many Feeds
  • A User has many Projects
  • A User subscribes to many Projects
  • A Feed belongs to a User
  • A project belongs to a User
  • A project is subscribed by many Users
  • A Project has many Messages
  • A Message belongs to a Project

And here the same as UML diagram (created with JUDE, but personally I prefer to use pen and paper as it is the fastest way to create an UML diagram):
Domain model

Up to now it doesn’t matter which technology we will use to realize the application, as all steps were technology-neutral. But this will change next week when we will setup the database and start programming.

Entire series

5 comments baked

  • Max

    Good going Man, But one joint bigger posts will be better than these small steps :)

  • shuron

    No i think stepps are well sized encapsulating separate topics of the project

  • cakebaker

    Thanks for your feedback.

    @Max: The reason for the small steps is, as shuron already said, that they cover different topics. But I agree with you that the first two posts could have been combined in one post.

  • Aeshan

    Hi Max,
    I’ve been scouring the web looking for UML I could use in Web Projects.yours looks like a good candidate.tho I was wondering if what the full routine would be like from user requirements to release?
    Thanks!

  • cakebaker

    @Aeshan: Hm, I don’t understand your question, what do you mean with “full routine”?

Bake a comment




(for code please use <code>...</code> [no escaping necessary])

© daniel hofstetter. Licensed under a Creative Commons License