Alder Green
2006-Nov-04 02:47 UTC
[Rails] How do CRUD and REST work for a wizard-style application?
I''m rewriting an application with the intention to use the elegant CRUD and REST design principles as outlined by DHH in his RailsConf Keynote[1]. The question is: how do you use those principles for an application that is of a sequential nature? The application works much like an MS Windows wizard: user begins at screen foo. After doing (or not) some stuff in screen foo, he is taken to screen bar, and from there to screen baz, etc. (the order of the screens may be altered and/or reversed). The application is essentially about walking the user through a sequential procedure. A common solution would be to define each screen as an action. I.e. the ProcedureController would contain actions #foo, #bar, #baz, etc. This obviously does not remotely resemble anything like the above mentioned CRUD/REST principles, in particular the neat "7 standard actions per controller" design[2]. Can the CRUD/REST model, in whole or part, be applied such an application? -Alder -- [1] http://blog.scribestudio.com/articles/2006/07/09/david-heinemeier-hansson-railsconf-2006-keynote-address [2] index, new, create, show, edit, update, and destroy, see: http://scottraymond.net/articles/2006/07/20/refactoring-to-rest