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...
Show off your group to the world. Share a photo of your group with us.

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 #22423 of 23245 |
Re: [altdotnet] Noob Q: DDD Project Layers Question

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 perspective is whatever makes sense in your domain.

I personally would create an IAuthenticateUsers interface and allow my controller to depend on that. Create a simple Authentication mechanism that meets the current need. As the authentication & authorization story unfolds though out your iterations add complexity as needed.

On Mon, Jul 13, 2009 at 8:18 AM, chevronboyde <samuel@...> wrote:
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




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
   http://groups.yahoo.com/group/altdotnet/

<*> Your email settings:
   Individual Email | Traditional

<*> To change settings online go to:
   http://groups.yahoo.com/group/altdotnet/join
   (Yahoo! ID required)

<*> To change settings via email:
   mailto:altdotnet-digest@yahoogroups.com
   mailto:altdotnet-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
   altdotnet-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
   http://docs.yahoo.com/info/terms/




--
"The explanation requiring the fewest assumptions is most likely to be correct."

- Occam’s Razor
http://en.wikipedia.org/wiki/Occam's_Razor


Mon Jul 13, 2009 3:29 pm

notmyself74
Offline Offline
Send Email Send Email

Forward
Message #22423 of 23245 |
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