惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
D
Docker
J
Java Code Geeks
L
LangChain Blog
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
腾讯CDC
罗磊的独立博客
U
Unit 42
爱范儿
爱范儿
Vercel News
Vercel News
MyScale Blog
MyScale Blog

博客园 - Ellipse

Design by Contract what's interface Provider, Manager, Helper - Ellipse Layer supertype for MVP - Ellipse Build your own CAB#12 - Rein in runaway events with the "Latch " Build your own CAB#11 - Event Aggregator Build your own CAB Part #9 - Domain Centric Validation with the Notification Pattern Build your own CAB Part#8 - Assigning Responsibilities in a MVP pattern Build your own CAB Par#7 - what's the Model? Having a break Build your own CAB Part #6 - View to Presenter Communication Build your own CAB Part #4 - The Passive View Build your own CAB Part #3 - The Supervising Controller Pattern Build your own CAB Part #1 - The Preamble(Jeremy D. Miller) Build your own CAB Part #2 - The Humble Dialog Box -- Jeremy D. Miller Gridview 的RowCommand Reading Build your own CAB (1) -- Jeremy D. Miller ActionList Webpage redirection
Build your own CAB #13 - Embedded Controllers with a Dash...
Ellipse · 2007-10-15 · via 博客园 - Ellipse

to make the view itself simpler
to help a view control some distinct part of its behavior

context: we have a Trade screen that has seven different states depending upon whether you're creating or reviewing a Trade.  The various user actions available on the screen differ from the state to state. As the screen changes state either upon opening the screen or a result of user actions while it's open we need to enable/disable and show/hide different screen elements.

fluent interface:
stateManager.OnState(TradeDetailState.Review)
      .Show(updateTradeButtonPanel)
      .IsReadOnly()
      .Enable(
          editTradeButton,
          statusCheckBox,
          Status2CheckBox,
          cancelTradeButton);