Search the web
Sign In
New User? Sign Up
altdotnet · Alt Dot.Net Discussions
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Noob Q: DDD Project Layers Question   Message List  
Reply | Forward Message #22421 of 23254 |
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:
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 SaveUser
DataAccess - encapsulated data access using ent library
Common - config info, services etc


I am trying to understand how this translates with DDD with a simple example of
authenticating a user and saving a user to the db. Curently using nhibernate,
castle windsor and rhino

Hope that was clear

Sam





Mon Jul 13, 2009 3:18 pm

chevronboyde
Offline Offline
Send Email Send Email

Forward
Message #22421 of 23254 |
Expand Messages Author Sort by Date

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...
chevronboyde
Offline Send Email
Jul 13, 2009
3:19 pm

Check out the source for CodeBetter.Canvas for an example. http://code.google.com/p/codebettercanvas/source/browse/#svn/trunk I think the answer from the DDD...
Bobby Johnson
notmyself74
Offline Send Email
Jul 13, 2009
3:30 pm

These are great questions, doubt you're a noob. My $.02 Your security model(Authentication and Authorization) are cross cutting concerns and should be visible...
blackbird939
Offline Send Email
Jul 13, 2009
4:10 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help