Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.


  #2 (permalink)  
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

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:13 AM.


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