A non-developer wants the ability to modify scripts that users read on several screens.
For example, the first script may read, “Thanks for calling, how may I help you?” and contain some input elements. After clicking a “Next” button on this screen, they are presented with another form with another script with more input elements.
How can they “insert” a screen in between (or after or before) the two screens mentioned above with a lightweight XML-style language read from an external file? This file would contain simple, non-developer readable tags like <text>blah blah blah</text>, <button>Next</button> surrounded by <screen></screen> that I could translate into hide-able and show-able <div> tags. It should also be cache-able so all screens can load hidden when the user logs in or some earlier time in the application process.
All I’ve come up with so far is jQuery in the button.onclick’s to hide the current div and show the next. I’m unsure how to use MVC to shove all this data down at the client at some prior time. Cookies are too small for caching big chunks of text, I think. Should I be looking into frames ::shudder::?
Basically, this .NET MVC app needs to dynamically cache views based on an external source to create a “dynamic” workflow of screens able to be modified by non-developers. It is ok to force the users to log out and back in to re-cache these screens.
Please let me know if this is unclear, I’m happy to elaborate.
Here’s what you could try:
Start by designing each page you would like to have with its input fields. Then you could define the ViewModels, the Controllers and the corresponding Views. It might look something like this (oversimplified):
ViewModels:
Then create a repository which will parse the XML (the implementation is left for brevity):
Then here’s how a page controller might look like:
And the last part is the corresponding view:
And the
Button.ascxEditor Template which will render the navigation links: