views:

43

answers:

0

hi


I don’t understand why is using method overloads( at BLL layer ) preferred over using separate methods with individual names.

For example, if our web app has at DAL layer methods GetAllArticles, GetArticlesByCategory, GetPublishedArticles and GetPublishedArticlesByCategory for retrieving articles from the DB, then it is recommended that at BLL layer we use GetArticles() overloads to call all of the above DAL methods.

a) But why is using GetArticles overloads preferred over using (at BLL layer) GetAllArticles, GetArticlesByCategory, GetPublishedArticles and GetPublishedArticlesByCategory methods ( these methods would call DAL's GetAllArticles, GetArticlesByCategory, GetPublishedArticles and GetPublishedArticlesByCategory, respectively )?


Namely, I realize that business objects are meant to abstract data base schema and make them more human understandable. But as far as I’m concerned, if I was UI developer, it would be far easier for me if BLL layer had methods GetAllArticles, GetArticlesByCategory, GetPublishedArticles and GetPublishedArticlesByCategory, instead of BLL having GetArticles overloads, since by just looking at the name of the method, I would know exactly what it does! Thus, aren't methods with individual names more closely to human way of thinking than overloads - which is exactly what DLL should provide


b) So are GetArticles overloads supposed to more intuitive than GetAllArticles, GetArticlesByCategory, GetPublishedArticles and GetPublishedArticlesByCategory?!


thanx