views:

41

answers:

1

Hi
One question but I'm looking for two solutions:

  • static
  • dynamic

Static means I know all states. Dynamic means I don't know states because end user can define it.

Static
How to create and organize views, viewmodels and actions? I know that state pattern is well suited for that scenario but how to pass data from view models and put them to entity? Each action is responsible for one state? What if I have view with more than one possible choices of next state?

How I should choose proper action for state sent as a string by posting some value?

How to match properly posted data to specific actions on entity (look at state pattern)?

Dynamic
What if end user can create own states? Example: app has something like workflow. Suppose I have the same situation like above. I haven't views for each state because I don't know them.

Questions... are the same but I think solution may be different... but what is the solution?

A: 

This post has an approach that might help you get started:

http://statichippo.com/archive/2010/01/08/asp.net-mvc-amp-state-pattern-choose-your-view.aspx

Nissan Fan
This is something what I know but not enough... :(
dario-g