Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 21st, 2006, 02:49 PM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Domain Object inherit from Business Entity

Hi,
Wouldn't it be easier to inherit your domain objects from your business entities so that you don't have to maintain the members/properties in 2 places? So, Product would inherit from ProductDetails, for example. Is there a reason you don't do this?

Thanks!

 
Old September 23rd, 2006, 08:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't know if you'd want to inherit between tiers, that would seem to break the objective in keeping the tiers separate. But I understand what you're saying - you want to avoid repeating the same fields. Maybe an interface would serve us better in that role.

However, typically the BLL will not have a 1:1 relationship with the DAL. It's common to flatten out the model at the BLL level, so it's often going to be very much denormalized. You might have data from 3 different tables in one BLL object.

The BLL should be a close representation of how the data is going to be used, and the DAL should be a close representation of how the data is going to be stored. In the middle of these you have to do some mapping and translation, and that's where the discussion of ORM fits in. Whether you map yourself, or use a tool to map, either way you have to mitigate the difference in data representation whenever you cross the DAL-to-BLL boundary.

It's hard to show all of this in a simple site like this, but you can imagine how a large site could be modelled ...

Eric

 
Old September 25th, 2006, 09:48 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks - that makes sense. I typically use the approach of a "BusinessEntities" namespace that I consider part of the business layer, so I think of the entities and the BLL as the same tier. You mentioned: "Maybe an interface would serve us better in that role." - could you explain what you meant there?






Similar Threads
Thread Thread Starter Forum Replies Last Post
about picturebox inherit youtubeline C# 3 December 12th, 2008 03:41 PM
xmlnodelist within a business object ssr92 ASP.NET 2.0 Professional 1 December 23rd, 2007 05:33 AM
business object relationships thenoseknows ASP.NET 1.x and 2.0 Application Design 2 July 16th, 2007 03:02 PM
Same pages for sub domain from main domain vivek_inos ASP.NET 1.0 and 1.1 Professional 1 February 13th, 2007 10:15 AM
Difference between Entity and Entity type arshad mahmood C++ Programming 0 May 8th, 2004 12:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.