Extension Types

Extensions in Wisej follow a simple naming convention:

  • Wisej.Ext.{Name} for non-widget extensions, i.e. file system, icons, etc. These are extensions that are not related to control or widget. Examples are: Wisej.Ext.Translation and Wisej.Ext.Geolocation.

  • Wisej.Web.Ext.{Name} for extensions that are specific to Wisej.Web widgets and controls.

Wisej supports 5 kinds of extensions:

  1. Control

  2. Widget

  3. Component

  4. Extender Provider

  5. Icon Pack

Control

The native Wisej Control is a control that implements both sides of the technology: client and server. The client side is a specific JavaScript class (i.e. “wisej.web.TextBox” derived from one of the qooxdoo widgets) while the server side is the corresponding server component (i.e. Wisej.Web.TextBox derived from Wisej.Web.Control or a subclass).

A new Wisej Control must extend any of the Wisej.Web classes but it’s not required to provide a new JavaScript class.

Wisej.Web.Ext.ProgressCircle is an example of a Wisej Control that doesn’t provide its own JavaScript class. It extends Wisej.Web.Canvas and draws the component using HTML5 canvas instructions.

Wisej.Web.Ext.JustGage instead is an example of a Wisej (Extension) Control that provides its own JavaScript class, “wisej.web.ext.JustGage”.

The main difference is that the first control is limited on the client side by the implementation of the base class. While the second (JustGage) can provide any kind of client side functionality in its JavaScript class fully controlled by the server side of the control.

Look at the two projects on GitHub to get a better sense of these two controls.

Widget

Wisej Widgets are always derived from the Wisej.Web.Widget class and never provide a specific JavaScript class. In fact the Wisej.Web.Widget can also be using by itself on any container.

A Wisej Widget is basically a general purpose client side container that can server as the containing element for any third party JavaScript widget. The control provides a simple way to load JavaScript packages from any sources, in sequence, and still asynchronously.

The two most important properties are Packages and InitScript. Packages is a collection of libraries while InitScript is the initialization JavaScript. The packages are cached and organized by name, so if multiple widgets use the same package (i.e. jQuery), it will be loaded only once.

Wisej.Web.Ext.CoolClock and Wisej.Web.Ext.jQueryKnob are examples of Wisej Widget extensions. The first loads the external resources from its own embedded repository, the second loads jQuery from “https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js” and the jQueryKnob widget from its own embedded resources.

Component

Wisej Components are components that may live only the server or also on the client. They may specify a server side JavaScript object (not a widget) or be limited to the server.

The two relevant examples are Wisej.Ext.Translation and Wisej.Ext.Geolocation.

Wisej.Ext.Translation is a server side only component, derived from System.ComponentModel.Component and usable on any container. It lives only on the server side and never interacts with the client.

Wisej.Ext.Geolocation is a server and client component, derived from Wisej.Base.Component, and it provides its own JavaScript class “wisej.ext.Geolocation” which is not a widget but simply a qooxdoo object. One of the most interesting features of this component is the capability to callback the server asynchronously to provide the return value of the GetCurrentPosition function.

Extender Provider

Extender providers are a completely different type of extension to Wisej. They all implement the System.ComponentModel.IExtenderProvider interface and extend Wisej.Web.Component.

Extender providers extend other components: when an extender provider is dropped on a container it will add properties and functionality to the other controls. Optionally, a Wisej Extender Provider, may implement instead the Wisej.core.IWisejExtenderProvider interface to extend Wisej controls in design mode on the designer.

Wisej.Web.Ext.Bubbles, Wisej.Web.Ext.SpeechRecognition, and Wisej.Web.SpeechSynthesis are examples of extender providers that add bubble notifications, speech recognition, and speech synthesis functionalities to all the controls in the same container. The source code for these extenders is provided in the extensions download page.

Wisej.Web.JavaScript, Wisej.Web.Animation, Wisej.Web.ToolTip, Wisej.Web.HelpTip, and Wisej.Web.ErrorProvider are also extenders but are part of the core Wisej.Web product and the source code is not available in the download page.

Wisej.Web.Rotation, and Wisej.Web.StyleSheet, are all examples of extenders that are capable of extending components also at design time: if you add the Rotation extender to a container it will add rotation capabilities to all the other controls and if you change one of the Rotation properties it will be reflected immediately in the designer.

Icon Pack

Icon packs are assemblies that include SVG, PNG, or GIF icons as embedded resources and an optional static class that exposes all the icons as string properties.

Wisej recognizes the icon packs referenced in the project and is able to show them in the image picker dialog:

Last updated