Book a Demo

Author Topic: How to create a simple Domain Model. Tutorial  (Read 15913 times)

Wivel

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
How to create a simple Domain Model. Tutorial
« on: March 30, 2013, 06:01:24 am »
Hi

I have written this little tutorial on how to develop a simple domain model using Enterprise Architect. The model is developed so it be used to generate a JPA model using the TigerTeam TRIMM tool.

You can find it here: http://www.tigerteam.dk/tutorial-getting-started-with-trimm-jpa/create-a-simple-domain-model-using-enterprise-architect/

Henrik
« Last Edit: March 30, 2013, 06:02:52 am by wivel »

AndyJ

  • EA User
  • **
  • Posts: 337
  • Karma: +5/-3
  • It's only a model
    • View Profile
Re: How to create a simple Domain Model. Tutorial
« Reply #1 on: April 30, 2013, 09:05:34 am »
Hi Henrik,

I would probably display the "association" between OfferType and ExpirationType <<enumeration>> in a different way. I'm not sure about having an association between attributes and enumerations.

In my case, I'd add an attribute called "Expiration" to the class "OfferType" and then type that attribute as ExpirationType.

Then that attribute would appear as Expiration:ExpirationType in the OfferType class.

Andy
« Last Edit: April 30, 2013, 09:06:24 am by novaphile »
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."

Wivel

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: How to create a simple Domain Model. Tutorial
« Reply #2 on: April 30, 2013, 08:18:44 pm »
Hi Andy

Glad that you have read your blogpost and I hope that you have found it useful.

Yes, you are right and both ways of doing it is correct, both from a modeling standpoint and when modeling for use with our TRIMM generator.

The added benefit from using an Attribute is that you can control the position of the Enumeration within the generated Entity. When you use a link/association to the Enumeration the order is based on the timestamp of the association, which is not always the most usable way of sequencing information :)

I have to ask. Are you planning on doing any code generation from your domain models or are you using it for documentation purposes only?

Henrik

AndyJ

  • EA User
  • **
  • Posts: 337
  • Karma: +5/-3
  • It's only a model
    • View Profile
Re: How to create a simple Domain Model. Tutorial
« Reply #3 on: May 01, 2013, 08:06:33 am »
As a general rule, we do not generate code from the domain models.

Our domain models represent the user experience rather than the software behind the scenes.

Andy
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."