Business models on the web with HTML 5

31 July 2012

STEM models can now be accessed from PC, Mac, iPad, iPhone, Android and Windows Phone platforms.

Since we last covered the developing eSTEM web capability in October 2011, our clients have been developing their respective web presences very energetically. Their input has driven our own development forward and we are now generating native HTML 5 interfaces in preference to Flash to achieve wider device compatibility.

Our generated HTML is not (yet) pretty, but it is immediate and fantastically more reliable than anything else compiled by hand. The automation and ease of use is such that one recent newcomer to the web environment for STEM had a first model up and running on the web within 24 hours.

A separate User Guide for Enterprise STEM is being updated on a frequent basis while this functionality remains in significant flux. The June 2012 edition includes explicit set-up instructions for the website and associated software stack as well as all of the latest functionality. Here we describe the process of generating HTML 5 interfaces from the Editor and Results programs through to publishing these on the server. We also provide an update on new features such as usage tracking and options for users to save their own input sets and download template reports.

1. The process for publishing a model with eSTEM

After creating a model in the STEM Editor and results views in the STEM Results Program, a user can choose to export selected input values in the model and particular graphs/tables or results views to a web interface as described in the following pages. A set of data and configuration files for the eSTEM server will be generated, as well as the web interface that will access the web service to run this particular exported model and display the results chosen by the modeller.

The recommended approach is to use a sensitivity element to gather together (and group and order) the desired inputs from multiple elements, exactly as if you were going to run a sensitivity analysis for those inputs. The Label field for a regular sensitivity parameter can be used to customise the labelling of the corresponding web controls, and a new Web Presentation dialog for the sensitivity element offers the following fields per parameter in order to govern more prescriptively the placement and style of the various web controls within a single tab (i.e., all visible on one page with scroll bars if required).

Figure 1: The new Web Presentation dialog for a sensitivity element

If there is too much information to fit onto ‘a single screen’ and you are not keen on the use of scrollbars, then it is also possible to create a ‘tabbed’ interface. If you select a number of separate and distinctly named sensitivity elements as described above, then each sensitivity element will define an individual tab in the web interface, and the tabs will be presented in the same order as they appear in the Editor, working from left to right and then down the selection.

Alternatively you can control the order more robustly by including each of the sensitivity elements within a collection, and then just selecting the collection prior to the export.

Figure 2: Controlling the tab order with a collection of sensitivity elements

Figure 3: The corresponding multiple tabs in the generated web interface

You can even create a hierarchy of nested tabs by creating a collection of such collections of sensitivity elements!

An equivalent function in the Results Program enables you to add charts and tables to a web presentation in a very similar manner to exporting results to Excel.

Figure 4: Sample results output in the generated web interface

This chart is part of a 100%-generated web presentation created in minutes based on our recent newsletter article about cake consumption.

2. Controlling activity logging and debug output

The web service is designed to log all activity, you simply have to enable the functionality as follows and decide how much detail you want to see.

For each individual model, you can define a logging attribute within its associated WebServiceModelConfig.txt file with possible values as shown in Figure 5 below.

Attribute and value     Effect
logging = none No log files are created (the default).
logging = transaction One line is appended to the log file for each external request handled by the web service, listing the time and date, the user and the type of transaction.
logging = input In addition to the transaction detail, one further line is appended to the log file for each input value sent for each run, save or export command, listing the time and date, the user, the relevant input reference and the value set for that input.
logging = debug In addition to the transaction and input details, further detail is appended to the per-transaction output including the length of time taken to process the request, the value of each result returned to the user (where appropriate), and any additional information which may be required to profile or diagnose any problems with the service from time to time.

Figure 5: Individual model logging options for the eSTEM web service

3. Enabling per-model defaults and per-user saved model inputs

The HTML interface code generated by the STEM Model Editor incorporates commands (which utilise corresponding web-service methods) for the end-user:

  • to save (and name) their current input values from the web presentation, and
  • to subsequently select and reload those values at a later date.

Figure 6: The Save Inputs dialog in the generated HTML interface code

In addition, the user may choose:

  • to restore the original default values for the model, or
  • to select and load any alternative default values which may be provided by the site administrator (for example to cater for differing user profiles).

Figure 7: The Load Inputs dialog in the generated HTML interface code

4.Creating Excel-based reports to download in XLSX or PDF format

An Excel-based report drawing on live model inputs and results can be generated from a pre-defined template file by the web service and then made available for download by the end-user in either XLSX or PDF format.

4.1 Using token replacement to populate an end-user download

Reports are generated by creating a copy of a template XLSX (or XLSM) file, modifying cells within this file that are marked for some form of modification and then saving this copy into a location from which it can be downloaded by the user. Note that the template file must be a spreadsheet saved only in XLSX (packaged XML) format.

The template file may contain any content supported by the file format. Cells with content matching any of the following rules will have their content replaced by the export process. All other content in the spreadsheet will remain unaltered; thus a report can contain whatever text, images, formatting or other media the user chooses to place in it. Although STEM will not generate charts in the report, the user can add charts that reference cells to be replaced as their source data, so that charts of result data can be produced. The formatting of replaced cells will not be altered – only the content.

4.2 Token-replacement keywords and intended usage

The following table describes each of the available token-replacement keywords and its intended usage. If any cell has content that starts with the tag value but doesn’t match any of the expected formats, or if a value fails to be retrieved for any reason to fill the cell, the cell will be made empty and an explanatory message will be logged to the configured logs folder for the web service.

$STEM$ input <element> <field> <period>
       The value of the specified input when the report was generated.
$STEM$ result <scenario> <element> <result> <consolidation mode> <period>
       The value of the specified result in the specified scenario. To refer to the working model, pass an empty string for the scenario name.
$STEM$ period <scenario> <consolidation mode> <period>
       A period label for the specified scenario. To refer to the working model, pass an empty string for the scenario name.
$STEM$ next
       If the cell immediately to the left of this cell contains an ‘input’, ‘result’, ‘period’ or ‘next’ instruction, this cell will be given the value or label from the subsequent period for the same input or result if values or labels remain to be displayed. In all other cases, this format is invalid.
$STEM$ <input or result> [ <string 1> <string 2> … ]
       Retrieves a value using the initial instruction, but uses that value to select a string from a list and places the selected string in the cell rather than the retrieved value.

Figure 8: Token-replacement keywords for exported reports in Excel

The syntax is evidently rather intricate as it essentially embeds the same kind of information as you might be familiar with providing to the StemGetResult() and StemGetPeriod() worksheet functions in Excel after exporting results to Excel in the desktop environment.

Free subscription when we review your business model

How well do you understand your business? It may be profitable now, but how prepared are you for this to change? We have a track record of analysing individual services or entire businesses in an interactive workshop style that engages and informs. Our visual software enables multi-disciplinary dialogue about the business you thought you knew and the more uncertain future ahead.

Read the article

STEM User Group Meeting 2017 proceedings

Our most recent customer event was held on 27–28 September 2017 at King’s College, Cambridge. The modelling track explored three growth models for a start-up business, from unconstrained to measured to driven. The remainder of the event covered the forthcoming STEM version 8.0, the revised business model for Implied Logic, and two guest presentations.

Read the article

A freshly baked model of a start-up

We examine Michaela’s Best Bread Direct service, from her first unconstrained vision, through a more realistic measured phase and finally to a more ambitious, customer-driven approach. We demonstrate how STEM can be applied to almost any business topic and always delivers a systematic and reliable treatment of time and money.

Read the article

Business-case design and training at your service

Ever wondered what we do at Implied Logic? We have recently posted a comprehensive update to our services portfolio online which is effectively a self-service proposal for everything from online training on-demand through to on-site business-modelling consulting and hosting services for business models on the web.

Read the article

Connecting elements to graphs and publishing online

In what is likely to be the final preview article for the forthcoming STEM version 8.0, we explore visual connections between individual icons and a related graph, as well as intuitive, interactive options for adding an element to an existing graph. We also explore new layout options for pushing a presentation of results in STEM to the web.

Read the article

Our latest help and training materials

Documentation is never regarded as a very exciting activity, but our comprehensive help and training materials are a vital element of the self-serve experience with STEM. In the last quarter we have posted two significant updates to our online help site which enhance both of these aspects.

Read the article

A radical re-think on STEM pricing

We announce a new freemium strategy for accessing the STEM software, including a free and fully-functional demo system for small projects and study as a taster for an innovative minimal-support subscription to the Conventional STEM (C-STEM) desktop solution at just GBP 330 p.a..

Read the article

Vision for the forthcoming STEM 8.0

As part of our vision for a more intuitive way of working that bridges previous mental leaps wherever possible, we preview another two features of the forthcoming STEM version 8.0 – direct-draw connect mode and more flexible user data – that form part of a joined-up approach to fulfilling this dream.

Read the article

© Implied Logic Limited