Electric Cloud Interview Question

How would you structure multi-step wizard functionality on top of MVC framework?

Interview Answer

Anonymous

Nov 16, 2017

Well, I would use router in order to persist each step of wizard. For each step route I would initialise an appropriate view and tie it with model to store there all the applied settings in a controller. If settings should be saved per each step then I would go multiple models way otherwise I would initialise only one model to persist all the data while user finish the last wizard's step. Also I should have provided some code on prefered stack to prove the concept.