domain-model

UML Domain Modeling

给你一囗甜甜゛ 提交于 2019-12-20 19:41:21
问题 What is the difference between a domain model and a data model? 回答1: A datamodel is a design model that only describes data and it's relations. The model contains entities, but they are described in terms of what data they own not how they act on this data or what their responsibilities are. An domain model on the other hand, is a conceptual model used in analysis of a problem domain. It describes the domain in terms of entities that have relations, data and behaviour. It describes the

Rich vs Anemic Domain Model

亡梦爱人 提交于 2019-12-17 15:03:22
问题 I am deciding if I should use a Rich Domain Model over an Anemic Domain Model, and looking for good examples of the two. I have been building web applications using an Anemic Domain Model, backed by a Service --> Repository --> Storage layer system, using FluentValidation for BL validation, and putting all of my BL in the Service layer. I have read Eric Evan's DDD book, and he (along with Fowler and others) seems to think Anemic Domain Models are an anti-pattern. So I was just really wanting

Using app-level settings in rich domain models

限于喜欢 提交于 2019-12-11 21:28:02
问题 I want to have a global/app level setting that I want to use in my rich domain models. I have a method that does some calculations based on the argument passed. This might not be the best example and might not look like a method belonging to the domain model but I try to keep it simple so you could understand the problem. public decimal Calculate(CalculationMethod calculationMethod) { switch (calculationMethod) { case CalculationMethod.Multiply: return _x * _y; // _x and _y are fields case

What is the difference between conceptual domain models, application class models, and consolidated class models?

痴心易碎 提交于 2019-12-11 13:15:47
问题 I need to make these three UML diagrams for a class project, but they all seem like the exact same thing, a class diagram. 回答1: The difference is the level of abstraction those models deal with the reality they try to reflect. The conceptual model is just a rough draft of the domain. You try to gather business objects (contents and relations). The application class model is one that is designed towards coding the system under consideration (SUC). The term "consolidated class model" is not a

E-commerce Domain Model Feedback

故事扮演 提交于 2019-12-11 04:08:47
问题 I've been working on putting together a rough conceptual model of an E-commerce website that basically allows users to resell concert tickets. It's purely conceptual and not something i'm actually making! Anyway I've put together a domain model and I was hoping for some feedback. I've made class model before and modelled databases but found it quite difficult differentiating between them. I've seen the words rich and anaemic thrown around a lot and I believe my model is anaemic. Would simply

How to Inject Helper Dependencies in Domain Model Entity Classes

◇◆丶佛笑我妖孽 提交于 2019-12-11 01:37:49
问题 So I'm well underway in my effort to convert my desktop/WPF solution from using Service Locator pattern to using Dependency Injection. So far it has been relatively painless (since the same UnityContainer is used in both cases): I just remove each call to my global/static ServiceLocator and put the dependency in the constructor. But I'm stumped when it comes to a helper service that exists in one of my entity classes. Currently I have something like this: A singleton helper service which

Java EE - What is the correct layer for formatting domain model objects before passing them to views?

一曲冷凌霜 提交于 2019-12-10 22:25:49
问题 I am developing a web application which has a typical layered architecture: a DAO layer that retrieves domain model objects from a database; this layer communicates with the service layer which does some business operations using those objects; the web layer (Spring Controllers) use the service layer to retrieve the domain model objects (or collections for them) and pass them to the view layer; the view layer is either simple JSPs which show the data using JSTL, or JSPs which retrieve some of

Update Domain Model except for one property in TYPO3 6.2

巧了我就是萌 提交于 2019-12-08 08:12:19
问题 I maintain a TYPO3 extension that manages frontend users in the backend. Therefore I extend the FrontendUserRepository with my own model. My extension provides CRUD operations and I have a problem with updating the password of existing persons. The idea is to only update the password, if the password field in the edit form is filled, otherwise (if it's left empty) the old password value remains in the database. Now everything was working fine with TYPO3 4.5, but now after I upgraded to 6.2,

Decoupling the model and input checking

爷,独闯天下 提交于 2019-12-08 06:41:30
Is it a good practise to decouple input checking from a model and have it handled elsewhere, say by a controller? If so, how could this be done from an MVC or DDD standpoint? It is a good practice to perform UI validation. E.g. if Your domain object expects date time, it is correct if UI part of application ensures it will receive from user correct string, will parse it to date time and pass it to domain object. Bad example: UI part validates if bank account has enough money for transfer. However - can't give any tips how to implement properly this kind of validation in framework You are using

Is lots of add/change methods and constructor overloads a consequence of DDD?

a 夏天 提交于 2019-12-08 05:13:39
问题 I have a class: public class Person { public string FirstName { get; private set; } public string LastName { get; private set; } public string Email { get; private set; } public string Telephone { get; private set; } public Address Address { get; private set; } public Person(string firstName, string lastName) { //do null-checks FirstName = firstName; LastName = lastName; Address = new Address(); } public void AddOrChangeEmail(string email) { //Check if e-mail is a valid e-mail here Email =