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.

http://paul-hammant-fork.github.com/StoryNavigator/

Mustache/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 complex 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.

Summary

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.

Apr 23, 2012: This article was syndicated by DZone



Published

March 12th, 2012
Reads:

Tags

Categories