Pageflow / wizard behaviour

Dec 16, 2010 at 8:57 AM
Edited Dec 16, 2010 at 8:58 AM

I need to make a head start for a project, using Orchard for that is just an idea of my.
That project requires views configured by our customers by an external tooling that will create config.
First we were thinking to dynamicly use that config within a module, but we went another way for several reasons i won't explain here.
The bottom line is that config will be parsed by t4 templates and product modules will be generared. The problem here is that the code must not be too hard to generate and so it must be consistent. All generated code must fit as pages in a pageflow that is also configured. Some pages or part of the pages can be shared between each of the generated modules.

Every flow entrance is for a differend product, and will be a differend module with a own controller and views etc.

Step 1 - fill in product fields
Step 2 - fill in more product fields
Step 3 - might be more steps pre-generated
Step 4 - calculate premium
Step 5 - fill in the shared customer page/view

I noticed the pagebuilder concept, not for the pagebuilder itself but the navigation used there seems to be nice.
Using a out of the box statemachine from WF is something we consider but that is something else.

Shall i make a core module where all the generated modules depend on?
That core module provides pageflow/navigation and the ability to host a compositeview for view composition or something.

Do u guys have any tips?
Or is there perhaps a Fork like this one (where i can't find anything about workflow) containing a sample on Orchard.

PS: There must also be a view on step that is showing a summary.

Dec 17, 2010 at 3:30 PM

Oh man.. i'm overwhelmed by the al the possible solutions.
I feel like i'm too new to this all, comming from WPF and Silverlight with only some ASP.NET work in the past.

Perhaps it's because i don't know how exactly ASP.MVC works, routing, actions, postback, etc..

Orchard bring the steps of the stair even higher.

Normally i'm good with patterns etc, but... this isn't windows nor silverlight.
I really need some help in which direction i should go.

I'm trying to learn about creating a own module with a custom ContentItem.
Maybe i need to figure out Shapes, maybe i need to figure out Theme's?

Until now i managed to created a own ContentPart with a Driver, a Handler, a Record, a Model and a ViewModel.
A view with @Display(Model.Content) shows the EditorTemplate without the Save submit button.

Anyway, i could create a pageflow controller where contentitems or contentparts are being injected into a step.
Or i could create a controller foreach pageflow process where each step is an action. But in that case i might need to show a view from another module.

Help... any tip is welcome

Coordinator
Dec 17, 2010 at 5:49 PM

Well, you could maintain the state for your workflow in session for example. I think the whole wizard should be one controller, with one action per step, and from each of the post actions, depending on the validity of the submitted information, you can redirect to the next action or stay on the same. Seems to me like this is more about MVC than about Orchard. Orchard is only going to really kick in after that when comes time to compose the view from different parts.

Dec 17, 2010 at 10:10 PM

yup, except that the customer must create several pageflows with a user-friendly tool, in that pageflow (not really a workflow or a statemachine) multiple parts should be visible on a page.

Step 1 shows =>
 - some fields 

Step 2 shows =>
 - more fields from the same module;
 - a part in right zone showing a summary what is filled in step 1

Step 3 shows =>
 - fields from another (shared) module;
 - a part in right zone showing a summary what is filled in step 1 and 2

etc..

Last step =>
 - all together...

There might be 30+ differend modules (differend products) behaving all the same, but with differend fields in step1 and step2 etc.. or differend steps
I was thinking about a base class for the controller or a base class for the viewmodel or something, really an MVC kind of thing perhaps.
Orchard kicks in when it comes to compose the view of different parts, letting those parts work together without putting dependency's between them.

 

Coordinator
Dec 17, 2010 at 10:16 PM

Sure, base controller sounds fine.