Hi All
DDD Noob here needing some clarity on DDD. I am looking at an asp.net mvc web
application and have a few questions.
1) Where would actions like AuthenticateUser(username, password) exist?
Does this exist as a method of the User entity i.e. User.Authenticate(username,
password)
Should it exist as a service to the Domain:
UserService.AuthenticateUser(username, password)
2) When persisting entities, should I be using a service/facade or using the
Repository directly:
In my UserController class:
User user = new User("Joe Soap");
IoC.Container.Resolve<IUserRepository>().SaveUser(user);
or something like
UserFacade.SaveUser(user) which in turn uses the repository.
Previously my tiers were as follows:
Web - asp.net
BusinessLogic - facade and business objects with methods like User.SaveUser()
DataAccess - encapsulated data access using ent library
Common - config info, logging, services etc
I am trying to understand how this translates with DDD with a simple example of
authenticating a user and also saving a user to the db. Curently using
nhibernate, castle windsor and rhino
Hope that was clear
Sam