what’s the difference between service layer and domain model layer

The Domain Model contains information and functionality related to what it means to be a User. It should map conceptually onto something that exists physically in the real world or a clearly defined concept in the problem space. The Service contains information and functionality related to performing atomic units of work. It should map conceptually … Read more

ASP.NET MVC Business Logic in Domain Model vs Service Layer

First off, your Model folder in your Asp.Net MVC project should be used for ViewModels. These are the models that your Controllers send to your Views. They should be highly optimized for the View, meaning only the properties needed for the view, and nothing else. What you are taking about, Domain Models, are the same … Read more

What is Java domain model?

A domain model (the term is not at all Java specific) is a class that models something in the problem domain, as opposed to a class that exists for technical implementation reasons. Domain model instances often need to be persisted in a database, and in Java, they typically conform to the Java Beans specification, i.e. … Read more

What’s the difference between Data Modelling and Domain Modelling?

Good question, the problem is that it depends on the definion of the terms, I think they differ slightly based on the sources. I would agree with previous answer – domain models are for describing the problem domain, at least the part you need to develop a solution. You describe all the various entities, their … Read more

What exactly is the difference between a data mapper and a repository?

Suppose your application manages Person objects, with each instance having name, age and jobTitle properties. You would like to persist such objects, retrieve them from the persistence medium and maybe update (say, on their birthday, increment the age) or delete. These tasks are usually referred to as CRUD, from Create, Read, Update and Delete. It … Read more

Iterator versus Stream of Java 8

There’s lots of performance advice here, but sadly much of it is guesswork, and little of it points to the real performance considerations. @Holger gets it right by pointing out that we should resist the seemingly overwhelming tendency to let the performance tail wag the API design dog. While there are a zillion considerations that … Read more

ORM Entities vs. Domain Entities under Entity Framework 6.0

I agree with the general idea of these posts. An ORM class model is part of a data access layer first and foremost (even if it consists of so-called POCOs). If any conflict of interests arises between persistence and business logic (or any other concern), decisions should always be made in favor of persistence. However, … Read more

Having Separate Domain Model and Persistence Model in DDD

Are there any reasons opinion 1) would be preferred to opinion 2) other than speeding up development and reusing code. Option 1 is just because of pure laziness and imagined increased development speed. It’s true that those applications will get version 1.0 built faster. But when those developers reach version 3.0 of the application, they … Read more

Rich vs Anemic Domain Model [closed]

The difference is that an anemic model separates logic from data. The logic is often placed in classes named **Service, **Util, **Manager, **Helper and so on. These classes implement the data interpretation logic and therefore take the data model as an argument. E.g. public BigDecimal calculateTotal(Order order){ … } while the rich domain approach inverses … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)