Smart UI Architecture

Asp.net Design Pattern study notes -- PART 2

Example:

Asp.net Design Pattern study notes -- PART 2

What’s problem ?

1.store procedure is too heavy

2.Data access ,Business layer , service seems didnothing

3.UI is too heavy !

4.Hard to test !

As these weaknesses , these codes are very hard to maintain andextension .

Any solution ? maybe we can consider to refactor the architecture ! we need to make different layer do proper things !

Let’s see new architecture!

Asp.net Design Pattern study notes -- PART 2

Asp.net Design Pattern study notes -- PART 2

Asp.net Design Pattern study notes -- PART 2

Now Let’s Apply this Architecture into the sample!

Let’s go through a Very sample feature , there is 2 drop down list control in aspx page, then I need to display the products by customer type :

1. Member (can have discountprice)

2. Non member (originalprice)

To implement this feature ,let’s see the new architecture :

Asp.net Design Pattern study notes -- PART 2

Asp.net Design Pattern study notes -- PART 2

Asp.net Design Pattern study notes -- PART 2


Nowwhat’s changed ?

1. With presenter , UI not “fat” any more

2. Each layercan be tested

3. With EntityFramework , store procedure cannot be too “fat”

4. Service layer,Business layer, Data Access layer all have been assigned proper responsibilities,which makes maintainable and easy to be extended.

相关文章:

  • 2022-03-01
  • 2021-11-11
  • 2021-05-11
  • 2021-12-17
  • 2021-10-18
  • 2021-06-25
  • 2021-12-30
猜你喜欢
  • 2021-07-24
  • 2022-01-26
  • 2021-09-16
  • 2021-08-10
  • 2021-09-02
  • 2021-12-11
  • 2022-01-02
相关资源
相似解决方案