Question

I've searched for a while on this subject, but found no "satisfactory" answer so far.

I'll try to explain myself.

We're developing a web app that requires, for some entities, wizards on create/edit processes, so the user can switch between the steps and have a better control of the complexity and the flow required to build such entities.

Every alternative suggested i found (i've checked wicked wizard gem and ASCII cast about muti-step forms) ends about requiring a change to the entity for the wizard. IMO, the wizard is just a VIEW particularity that has nothing to do with the entities and their interfaces... If i end up changing my models to deal with view's problems, i will be violating SRP (Single responsibility principle), also hurting the separation of concerns itself. Store data in the session is an option, but when editing an already existent (persistent) entity, i'll have to deal with that by persisting on each step, instead of keep the changes on the session...

So, do any of you guys already built an app with wizards? Any suggestions?!?

PS: I'm using Rails, but the question is about how to proper model the scenario described, regardless of the technology.

Was it helpful?

Solution

In my opinion, you can take advantage of browser capabilities like cookies,local storage,indexedDB for keeping your Wizard steps data and with Jquery or Javascript library of your preference can manipulate the persisted data or retrieval of such data.

If there is any operation that is going to be fired from your wizard step which will give server side call, then cache those results in some similar way,instead of repopulating the result from server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top