Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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 April 16th, 2007, 02:04 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Why not using a common detail class for DAL BLL

Why not create an ArticleDetail, CategoryDetail... and share these classes between the DAL and the BLL.

Right now we have the mostly the same code in ArticleDetail in the DAL and the Article in the BLL.

Why not create an ArticleBO where the DAL and BLL know about it?

Just a question, but, I think OOP is all about not create repetitive code.


 
Old April 17th, 2007, 01:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe you'll want to add new methods in the business tier, and keep it isolated from the DAL. Most real world sites have heavier business layers than TBH. TBH is only a basic example site. Over time the BLL would likely grow more than the DAL.

Since you mention OOP, there's 2 ways to scale: horizontal and vertical. Horizontal scaling uses interfaces and vertical scaling involves inheritance. Inheritance within the BLL adds layers within the overall layer, and ditto for the DAL, but the DAL and BLL do not share inherited behavior. The relation between the DAL and BLL is horizontal, set by a contract.

But maybe a domain object is what you're referring to. These are acceptable as containers to pass data between tiers, but they shouldn't be more than that. Your object graph can get muddy if you pass full-scale business objects around between DAL and BLL. Those need to be restricted only between the BLL and UI layers.

Eric





Similar Threads
Thread Thread Starter Forum Replies Last Post
BLL and DAL kss BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 13 November 24th, 2008 03:59 PM
Help with BLL and DAL kss BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 November 20th, 2008 09:23 PM
DAL to BLL rodmcleay LINQ 3 June 2nd, 2008 12:15 PM
breaking bll and dal into separate projects tony20501 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 November 29th, 2007 12:29 PM
Redundancy in DAL/BLL classes Mourad BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 March 8th, 2007 10:39 PM





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