The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 RAD That Ain't Bad: Domain-Driven Development with Trails
Subject:  Where do you put your business logic?
Date:  2005-06-27 11:23:01
From:  ccnelson
Response to: Where do you put your business logic?


Well, ideally, you put your business logic in your domain model. That's one of the fundamental tenets of DDD. But I don't think that really answers your question. If the question is, "what is the analogue to Rails controllers?", then I would say Tapestry pages are the answer. Tapestry page objects allow you to have methods invoked from your buttons and links (and this will get even easier with Tapestry 4.0) like controllers (as I dimly understand them). I would say in most cases you would want pages to delegate to domain objects to do the real work, but that is a design decision.

 Feed java.net RSS Feeds