- Motivation
- Transform the model data into a logical presentation without any specific formatting, and then convert that logical presentation to add the actual formatting required.
- Summary
- Two Step View deals with this problem by
splitting the transformation into two stages.
- The first transforms the model
data into a logical presentation without any specific formatting;
- Second step converts that logical presentation with the actual formatting needed.
- This way
you can make a global change by altering the second stage, or you can support
multiple output looks and feels with one second stage each.
- It is further augmentation of Transform View Pattern.
- When to Use
- It is preferred when you need to optimize the same data for two different screen like desktop and mobile.
- It can also be used if the same data need to be displayed differently for different user (personalization) .
- Related Patterns
- Model View Controller : This pattern work very well with Model View Controller
- Related Technologies
- ASP.Net, ASP.Net MVC, XSLT.
- References
- http://martinfowler.com/eaaCatalog/twoStepView.html
- MSDN:Presentation Layer Guidelines
|
|