Questions tagged [domain-model]

A domain model is composed of the objects, behavior, relationships, and attributes that make up the industry that is the focus of development.

E.g. if you are in retail, you would model the "things" (classes) that are relevant, such as Sale, Product, and SalesTransaction. Read more here

359 questions
3
votes
4 answers

LINQ Entities as business objects - pro/cons

the dbml file generated by Visual Studio (sqlmetal) comes with entities mapped to database tables. In your opinion, these clases are suitable to be used as domain model classes? Or should we avoid them and isolate them into the data access layer…
lmsasu
  • 7,459
  • 18
  • 79
  • 113
3
votes
2 answers

Domain Model architecture project in ASP.NET MVC

Are there any open source projects in ASP.NET MVC that use the Domain Model architecture instead of the Transaction Script (Service Layer) architecture? I'm looking for more of a project then just small examples.
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
3
votes
1 answer

Creating Domain Model mapper with complex DTO

I am using JSON to Kotlin plugin for generating DTO classes with Moshi to save a lot of time dealing with complex JSON response from APIs. Just to give a glimpse how huge the response can be Sample DTO using Moshi @JsonClass(generateAdapter =…
3
votes
2 answers

asp.net mvc post request + service layer- the best way to do this

Lets say I wanted to make a post request to update the status of a house, ideally this data should be in some sort of service layer, typically this involves validate user - are they still active or been kicked out by admin? check the houseid - is…
Haroon
  • 3,402
  • 6
  • 43
  • 74
3
votes
2 answers

Complex domain model based on companies and not users

I have a few different types of companies that can access my web application e.g Different types of Companies: Client Supplier Agent Each have their own table in the database, linked to the main table Company which stores all common data e.g.…
Haroon
  • 3,402
  • 6
  • 43
  • 74
3
votes
2 answers

Domain Model or Domain Object ? - Definitions

Please correct me if I'm wrong. We may say Domain Model to represent: a) The M part of a MVC structure, having on the M part, a Domain Driven Design pattern applied. b) A scheme of entities, their attributes and relationships in a certain way. Could…
MEM
  • 30,529
  • 42
  • 121
  • 191
3
votes
2 answers

ORM and many-to-many relationships

This is more or less a general question and not about any specific ORM or language in particular: this question comes up regardless of your ORM preference. When mapping a many-to-many relationship it is possible to obscure the intermediary table…
3
votes
2 answers

Domains specific language vs domain specific modelling language

Referencing paper "Domain-specific languages: a systematic mapping study", a fundamental question that's bugging me, and a simple Google search seems to be of little help, I want to figure out what's the difference between Domain Specific…
Thinker
  • 5,326
  • 13
  • 61
  • 137
3
votes
1 answer

UML Domain Model : How to distinguish attributes and classes?

I am currently making a domain model of a combat game, and I have difficulties determining whether certain elements should be a class of their own or attributes of some class. For example, I have used a category list to determine the following…
hisoka
  • 344
  • 3
  • 13
3
votes
1 answer

Dealing with one-to-many in Cassandra

Given the below simplified domain model: Train Journey id uuid train name string (unique within one day) date of journey date ... Journey Stations station uuid arrival timestamp departure timestamp ... With this relation: 1 Train Journey has n…
saimonsez
  • 344
  • 3
  • 16
3
votes
1 answer

Java domain model: categories with specific subcategories

I have a class Product. Each product can have any amount of Categories: public class Product { private List categories ... } Each Category has its own unique set of subcategories. For example: Category 'Red' has subcategories…
user1884155
  • 3,616
  • 4
  • 55
  • 108
3
votes
3 answers

Is it bad to have meaningless keys in my domain model classes?

When creating domain model, we almost always have Id field or property for our entities which represents the primary key column of corresponding table in the database. My question is - if I have this key property that has nothing to do with the…
chester89
  • 8,328
  • 17
  • 68
  • 113
3
votes
2 answers

Using collections/containers/catalogs in Domain Models

Let's say I want to model a cinema. The cinema will have a couple of rooms(for example, 7), where the movies are being played. I wonder how should I design the domain model for this scenario. Should the Cinema class concept concept have a direct…
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
3
votes
3 answers

Who should create business objects?

Since business/domain objects should be unaware of their persistence they obviously must not contain code that loads data from a database to initialize themselves. On the other hand not all of the properties of business object have public setters to…
Karsten
  • 1,814
  • 2
  • 17
  • 32
3
votes
3 answers

Domain Model and "Business Logic" confusion

Whenever I read an article about modern design pattern like MVVM or DDD I have trouble translating the example into the domains I am typically working on. All these pattern come to the conclusion that domain models should exist in their own little…