p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET Website Programming Problem-Design-Solution (http://p2p.wrox.com/forumdisplay.php?f=23)
-   -   Question about Business Layer (http://p2p.wrox.com/showthread.php?t=27144)

hasanali00 March 21st, 2005 11:17 AM

Question about Business Layer
 
I was going throught he code: NewsManager.Business.News.

Why are using properties to display information, such as NewsId, Body...

Why can't we just return a DataSet from the Business layer to the presentation??

Am I missing on something??




bmains March 21st, 2005 11:51 AM

That was the approach that was taken, to use business objects instead of a dataset, which yes you could do also.

Brian

RM82 March 21st, 2005 11:55 AM

DataSets are very heavy, and to be honest this book doesnt always give the best representation of what to send back, as there are inconsistencies. If for instance your return one record, why do you want to return a dataSet with all its overhead for that?? you would return a custom object which is light weight and easy to consume via your presentation layer. The same can be said with collections of objects. If you dont need to use the features of the dataSet why use that, why not use just a dataTable or a custom collection of objects.

Rob


hasanali00 March 21st, 2005 06:49 PM

thanks. very much appreciated.



All times are GMT -4. The time now is 02:06 AM.

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