Over a million developers have joined DZone.
Platinum Partner

The Importance of Design-Mode for Client-Side MVC

· Web Dev Zone

The Web Dev Zone is brought to you in partnership with Mendix. Download this Forrester Report to gain a better understanding of the low-code platform market and how to make a strategic platform selection you won’t regret.

Synopsis: Design mode (the same view but without Angular or Knockout loaded) is a great way to see the multiplicity of the view as you develop.

Remember that JBehave ‘Story Navigator’ blog entry I did a year ago? Well, give it a quick click to remind yourself. It has been tidied up some since – as I get better with Angular. I forked it on github, to a version that’s published in the same way (github pages) but without JavaScript running; No AngularJS specifically.

Here’s a screenshot:

And here’s the link, which is a better way of quickly seeing the shrunken picture above.


Moustache or handlebar style template fields everywhere.

You can see them everywhere – things that would be output text in the final version, but are now just model references in design mode. Some are simple field references, some are more compex expressions, or have formatters attached.

Only one row versus many in the running version.

There are three rows in the running version, and only one row in the design mode.

Multiple alternates concurrently shown in design-mode

The passed OR failed icon in in the running version, is now passed AND failed (side by side) in design mode:

For each column in the table, according the the design of the JBehave StoryNavigator, there are three possibilities in respect of sort order:

  • this column is the sorted one in descending order
  • this column is the sorted one in ascending order
  • this column is not the one being sorted

All three of those realities are shown for each column, and it is that which forces the columns far out to the right of the view. There’s an obvious improvement that someone could make to that – as there is no need for me to repeat the text of the column name as it does not change.


Hopefully you get to see the beauty of of Angular and Knockout: You get to see a design preview of the finished page, with all of the components visible, and with CSS hooked up as it would be in the finished product.

The Web Dev Zone is brought to you in partnership with Mendix. Better understand the aPaaS landscape and how the right platform can accelerate your software delivery cadence and capacity with the Gartner 2015 Magic Quadrant for Enterprise Application Platform as a Service.


Published at DZone with permission of Paul Hammant , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}