0

I started to create a project for practice purpose and I thought I should have 3 tier programming structure.

I wanted to create a memberinfo system in which I have a presentationClass , MemberBusinessLayer class and 3rd dataLayer.

I said to myself My PresentationLayer should only contact with MemberBusinessLayer class to get the data and MemberBusinessLayer class should get the data from me from dayalayer class. However i saw problem..

In BusinessLayer class I have public member properties for example FirstName, LastName, Address.

In DataLayer class I created a method Public List GetMember(string) . and in my design there is a method SendDataToPresntationLayer() in BusinessLayer class that is calling a GetMembe() method of dataLayer class. I see that is wrong. I am trying to get GetMember returns BusinessLayer object and I am calling getmember in BusinessLayer class.

Well I don't think I can't work with only 3 classes. My design is wrong. There is something more that I need to do. Can somoene help me. Please I am trying to learn I might be very much wrong but I am trying.

thanks

4

1 回答 1

1

这个问题提出了一个非常复杂的答案。虽然这个问题是出于练习目的,但请尝试阅读设计建议。您可以从本指南开始http://www.microsoft.com/en-us/download/details.aspx?id=16236

于 2013-10-04T05:33:53.773 回答