Over a million developers have joined DZone.

The Importance of Design-Mode for Client-Side MVC

DZone's Guide to

The Importance of Design-Mode for Client-Side MVC

· Web Dev Zone ·
Free Resource

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

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.

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}