Introduction
Anchor | ||||
---|---|---|---|---|
|
...
This section contains a topic on creating Sidebar widgets by beginning with an archetype which is provided as a starting point for development. The code generated by the archetype is explained in detailThe detail. The generated code is explained, including the Dojo toolkit basics, which will help you getting get started with your own development.
Section | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
On this page
...
In This Topic
Table of Contents | ||||
---|---|---|---|---|
|
...
XperienCentral
...
Client-side
...
Architecture
The client-side architecture introduced in XperienCentral makes it possible to add functionality to the Workspace using Dojo widgets. The advantave of this architecture is that you can add functionality which reacts to changes in the the Workspace and Editor, such as when starting editing or viewing content. The figure below shows a depiction of the XperienCentral client-side architecture.
Section | |||||||
---|---|---|---|---|---|---|---|
|
...
External references: Dojo / Data Stores in DOJO
...
Anchor | ||||
---|---|---|---|---|
|
The Dojo toolkit is an open source modular JavaScript library, or, more specifically a JavaScript toolkit which is designed for the rapid development of cross-platform, JavaScript/AJAX-based applications and websites. The following are examples of Dojo widgets you can develop:
Section | |||||||
---|---|---|---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
There is a lot of documentation available on Dojo. Here are a few starting points. If you’re not familiar with the Dojo toolkit, have a look at the tutorials. Another approach is to dive right into it by creating a sidebar widget based on the archetype and analyze the code using using the information available in the Developing Sidebar Widgets page topic.
References:
- Website of the Dojo foundation: http://dojotoolkit.org
- On this website you can find dojo Dojo documentation: http://dojotoolkit.org/documentation
- The Dojo API is documented here: http://dojotoolkit.org/api/
The XperienCentral client-side API
Next to the standard Dojo toolkit XperienCentral has it’s own set of Dojo classes that can be used in custom widgets. They consist of widgets, business login objects and data stores:
This XperienCentral client side API is documented in JSDoc. JSDoc basically works like Javadoc, but for JavaScript in place of Java code.
A practical example of how to use this documentation can be found on the Sidebar Widgets page.
XperienCentral JSDoc: https://api.gxsoftware.com/jsdoc/
...
...
...
Widget Plugins in XperienCentral
There are two types of widget plugins in XperienCentral: Sidebar Widgets and Panel Widgets.Sidebar widgets are widgets that are placed Sidebar widgets and panel widgets. Sidebar widgets are widgets that can be docked in either the left or right sidebarSidebar in the XperienCentral Workspace:
Sidebar widgets are described in detail on the in the Developing Sidebar Widgets page topic, including how to create one using an archetype. Panel widgets are widgets are widgets that can be opened via a menu item in the configuration Configuration menu, such as the standard Layout panel:
There is at the moment of writing
At this time there is no archetype or specific documentation for creating custom panel widgets. Therefore it requires more knowledge to write one than to write a sidebar widget.
...
Contact your GX Software consultant for help in creating a new panel widget.
...
Dojo Widget Composition
Keep the following thins in mind when determining planning the composition of Dojo widgets:
- Make sure that each widget is self-contained.
- The widget should expose public properties, methods and events. This ensures that your widget can be used reused in other widgets.
- Divide responsibility ("granularity"). In general it is better to create a few smaller widgets with a specific function than one large widget with lots of user interface elements.
- Implement the "deepest" widgets (the parts) first and work upwards towards the final functionality.
Avoid using experimental widgets as much as possible. The DojoX package was originally intended for this purpose, although some components.
- Check for existing widgets. Don’t reinvent the wheel, re-use as much as possible.
- Keep reusability in mind. Make sure your widgets can be reused in other widgets later on. Also write clear API documentation for your own widget using JSDoc.