Most users of the WEM modeler are not web developers, they just want to build functional applications. So what if you want something more? You are a developer and you want to add functionality that can easily be re-used by your non-technical modelers. That's what widgets are for.

The possibilities for creating your own web applications in WEM have grown exponentially with widgets. On top of the components already available in WEM, with widgets any desirable web control can be developed and be used and re-used anywhere in your applications.

Developing WEM widgets works very similar to PHP or ASP; you write your own HTML and embed server-based code into your widgets. When a web page with a widget is requested, the server executes the server-based code inside the widget before it returns the page to the browser.

The server-side code is called WEM script and is a minor extension to WEM expressions. By using WEM expressions all the functionality offered by expressions is directly available in the widgets.

Integration in WEM

Widgets include parameters to be set when the widget is used in a WEM project, allowing for easy to configure but very powerful features that can be used by all levels of users.

To take full advantage of widgets, all aspects available in WEM are integrated with widgets, including:

  • HTML input fields that can be bound to fields in your data model.
  • JavaScript events can be handled by logic modeled in WEM such as flowcharts or site navigation.
  • Repetition of HTML elements can be achieved based on your data model or static data (ontology).
  • Use images and other files from your project in a widget.