Jean-Paul Boodhoo from ThoughtWorks has published an excellent article regarding how to implement MVP (Model-View-Presenter) pattern in ASP.NET. It acutally has very similar implementation I am using currently. The only difference is I declear event in the view, so that ASP.NET page use event to notify the presenters, which makes more loosely coupled between ASP.NE page and presenter. I also use DTO (Data Transfer Object) to pass the data through. Although DTO seems as a Core J2EE Pattern, I still have a concern to use it extensively, becasue DTO is totally against the Object-Oriented principals. It promotes a FLAT object, a really value object. Since I have developed my domain objects with NHibernate/Castle ActiveRecord, it duplicates the efforts as well. The main purpose of using DTO is to utilize the ASP.NET databinding features. Paul Wilson seems to work on a solution to map domain objects to UI. It seesm very intertesting. But I have not seen any sample code yet. Anybody has a better solution?
-
Recent Posts
Categories
Archives