I feel a bit like Edison in search of the elusive filament. I am still in search of the right fundamental design foundation for my web application.
I believe I have found a pattern to base it on and was hoping the community could suggest some strategies for implementing it.
I would like to mimic the iterative control flow of tax software. All of the major tax software houses have released web versions that allow you to click next and previous as you fill out the tax forms to generate the form for Uncle Sam. Part of this work is iterative, so if you have two jobs, you'll go through the section for your W2 twice, since you have开发者_JAVA技巧 two W2's. There are also a couple of different sections, like where you identify dependents, investments, etc. And these sections allow you to break apart a large task into mini tasks.
This iterative nature is one of obstacles I hit when I tried to model this user flow with the state machine plugins. I just couldn't figure out how to cause the state machine to do a loop.
Thanks for reading!
To do a loop, you pass from one state to the same state:
event :w2 do
transition :w2 => same, :unless => :w2ready?
end
精彩评论