I have a website which hosts web documents & web applications and also acts as an origin server for documents and applications that are served to a client via a proxy web site.
I'm finding it quite difficult to find the correct names to model the players in the http request in my server-side application.
For example, Hypertext Transfe...
What do you think of the following table mapping style for domain entities?
class Customer {
public string Name;
}
class Order
{
public TotallyContainedIn<Customer> Parent { get { return null; } }
public HasReferenceTo<Person> SalesPerson { get { return new HasReferenceTo<Person>(0,1); } }
}
//...
[TableOf(typeof(Customer))]
clas...
Pros:
Repositories hide complex queries.
Repository methods can be used as transaction boundaries.
ORM can easily be mocked
Cons:
ORM frameworks offer already a collection like interface to persistent objects, what is the intention of repositories. So repositories add extra complexity to the system.
combinatorial explosion when usi...
I'm using NHibernate to persist my domain objects.
To keep things simple I'm using an ASP.NET MVC project as both my presentation layer, and my service layer.
I want to return my domain objects in XML from my controller classes. After reading some posts here on StackOverflow I gather DTOs are the way to go. However, I've also come acros...
Is there a ORM that would
leave my entities classes clean, withouth any attributes for properties and classes
would not be ActiveRecord pattern so it should not have entity.Save/Delete etc.
optional: able to execute stored procedures and parse the result into entityies
...
Hello everyone,
I'm looking for a full stack framework (from persistency to view generation (CRUD)) for Java. I don't have experience with Rails style frameworks, like Grails, but I worked a lot with Hibernate, Struts, Spring ...
I prefer a framework that let you naturally modify the business domain design with the less effort ( i.e. w...
In the book .NET Domain-Driven Design with C# from Tim McCarthy there's an example of a link table (two foreign keys + one boolean column) that gets it's own class in the domain. Is this common?
The example is a Contact table and a Project table. The link table is a ProjectContact. What are the pros and cons of using a class ProjectCon...
The shorter version of the Question: "Is it ok to have a superclass, with 2 subclasses, one is an entity the other is a Value Object?"
To longer version:
T have a Team superclass. The Team has the Master, Helpers and a Code.
Then i have the DefaultTeam, subclass of Team, which is an entity with an unique *Code* has its domain identity. ...
Hi all,
I am currently working on a project where I have a BankAccount entity for some other entity.
Each bank account as a reference to a bank entity, an account number and optionally an IBAN.
Now since an IBAN can be validated, how can I ensure that when the IBAN is set for an account is valid. What would be a clean architectural ap...
Scenario: The "Invoice" has a reference to the class "User". A user object is delete through the user himself or an administrator, but the invoice object still needs a recepient (the user).
The user object could be marked as deleted instead of delete it physically. But I think it is a bad design to use an object, that is marked as delet...
Hi all,
currently the system I am working on is layered like this
Web UI
Application
Domain
Infrastructure
In which layer would I put the specification implementations? Infrastrucutre?
...
We have a requirement to add an event reminder when a user enters their email address on an event page. Event is another domain object. Our initial thought was to create a Customer domain object and related CustomerService:
public class CustomerService {
public void AddEventReminder(string emailAddress, int eventId) {
var cus...
We are trying out CQRS. We have a validation situation where a CustomerService (domain service) needs to know whether or not a Customer exists. Customers are unique by their email address. Our Customer repository (a generic repository) only has Get(id) and Add(customer). How should the CustomerService find out if the Customer exists?
...
My question is when to use a specification pattern, and when to use specific SQL query.
I understood that specific pattern need to collect whole collection and post filter using concrete specification. But i dont't understand the advantage in front of specific SQL query.
CarColorSpecification cc = new CarColorSpecification(RED);
CarAge...
I have a client -> service -> server, architecture and I want to introduce validation.
I have dtos being passed over the service and get transformed into domain objects on the server.
Say if a user enters in a value and I need to check this value against the database to see if it exists and if so return an error and highlight the fie...
I am new to DDD but I am trying to implement it in my Project - I have a service which is setup following the DDD principles - Application / Model / Repository - The Clients of the Service want to get back a DTO class (which also contains a Error Collection as one of its members) . Questions is how do I populate the Error Collection of t...
When analyzing life cycle of domain objects, aggregate is basic element for objects grouping.
I am having trouble implementing aggregetes in C#.
One short example, with couple of classes, would be very helpful.
Or any link on this theme.
...
How can I inject an EJB into a domain object (an JPA entity) with Java EE 6?
...
Hi,
I find that whenever I create a layer/tier, I have to translate between one layer to the other, does that mean it is a tightly coupled system? If I was to change a business logic, remove a field in the database, etc, I would have to change ALL layers from the database layer to the client front end?
E.g. A web service that exposes...
In an application that has followed a Domain Driven Design where you have the following sorts of concepts
A repository that deals with the DataBase access
A application service that co-ordinates interactions between enties and value objects etc.
where in general would you put caching code to elimenate an expensive call to the databas...