Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Riena/New And Noteworthy"

m (removed 1.1.0.M6)
(1.1.0.M5)
Line 1: Line 1:
 
=== 1.1.0.M5 ===
 
=== 1.1.0.M5 ===
 +
* Riena is now based on Eclipse 3.5.
 
* Icons of sub-modules (only leaves) are showing in the navigation tree (#255528)
 
* Icons of sub-modules (only leaves) are showing in the navigation tree (#255528)
 
[[Image:iconSubModule.png]]
 
[[Image:iconSubModule.png]]

Revision as of 04:43, 25 February 2009

1.1.0.M5

  • Riena is now based on Eclipse 3.5.
  • Icons of sub-modules (only leaves) are showing in the navigation tree (#255528)

IconSubModule.png

  • The SubModuleView adds every widget with the property "binding_property" to the list of UI controls that will be binded.
    • It is not necessary to call for every widget the method addUIControl. You must only set the binding_property.
    • Every widget is added only once.
  • Now Remote Service Proxies can also (alternativly to RemoteServiceFactory) be created using a Fluent API (similar to Publish.service(....).....) here an Example:
  • ImageUtils is replace with ImageStore. The ImageStore loads and caches images. It also can load images from other bundles. The bundles must export there image folder (e.g. icons) with the extension point "org.eclipse.riena.ui.swt.imagepath".
  • If you want to use your own implementation of the interface org.eclipse.riena.navigation.INavigationNodeProvider you can configure it now by adding an extension for the extension point "org.eclipse.riena.navigation.navigationNodeProvider" with a priority higher than the default (-100). The old way of overriding it by registering a service with a higher ranking in an Activator is no longer supported. The timing and sequence when bundles are started and Activators invoked could not be sufficiently defined.

Package renaming

  • In bundle org.eclipse.riena.core the injector packages have been renamed:
    • org.eclipse.riena.core.extension -> org.eclipse.riena.core.injector.extension
    • org.eclipse.riena.core.service -> org.eclipse.riena.core.injector.service
  • In bundle org.eclipse.riena.core the internal cache package has been renamed:
    • org.eclipse.riena.core.cache.internal -> org.eclipse.riena.internal.core.cache
  • In bundle org.eclipse.riena.ui.filter a package has been renamed:
    • org.eclipse.riena.internal.ui -> org.eclipse.riena.internal.ui.filter

1.0.0

  • fixed some missing plugins launch files of sample projects
  • fixed 262026. This required some refactoring of the class org.eclipse.riena.navigation.ui.swt.views.SubModuleView during which two methods were removed: activate(ISubModuleNode) was called when any submodule node was activated - if you need this use your own ISubModuleNodeListener - and setController(SubModuleController) which was obsolete because the controller was already set on the navigation node.

RC2

  • Improved validation of the navigation tree configuration. E.g. if 'assembly' extensions contain two 'submodule' elements with the same 'typeId' but different views or controllers and exception is now thrown when the application starts.
  • Disabled asynchronous programmatic navigation which was not fully implemented yet by removing the method org.eclipse.riena.navigation.NavigationArgument#setNavigateAsync(boolean). See https://bugs.eclipse.org/bugs/show_bug.cgi?id=261832
  • fixed problem with DateTextRidget 261291 with the border looking strange on OS X
  • fixed problem with the unregister method for Remote Service Proxies which did not work properly 261507 and which also did not unregister properly when the bundle for the proxy was stopped
  • fixed problem for publisher where services that were registered before the protocol specific publisher (i.e.) hessian was active were simply not published later on. in some cases it did not know that it had the publish later and others a ConcurrentModificationException stopped the Remote Service publisher from doing it. All those problems were solved.
  • changed the Riena Demo Server/Client which is in a demoable but unfinished state that all views are now in english (previously german)

RC1

  • HessianRienaDispatcherServlet renamed to RienaHessianDispatcherServlet
  • All methods in RemoteServiceFactory() that actually registers a remote service proxy now also require a BundleContext. The old syntax without anything or with a hostId is gone. i.e. new RemoteServiceFactory().createAndRegisterProxy(IPingPongService.class, "http://localhost/hessian/IPongPongWS", "hessian", context);
  • New exception ProxyAlreadyRegisteredFailure if a Remote Service Proxy for that URL already exists.
  • The protocols (like hessian) that have to implement IRemoteServiceFactory are no longer found using OSGi Service but using Extensions. The reason is that OSGi Service sometimes didnt start fast enough and especially in Unittests the invoke to a remote service would be issued before the protocol factory was registered. With extension that cannot happen.
  • Two new system properties to set the initial width and the initial height of a Riena application: riena.application.width, riena.application.height
  • Look and Feel settings for the border and title bar of dialogs

DialogLnf.PNG

  • UI-Filters: With the help of the UI filters some restrictions can be added to UI elements of a Riena application. E.g. add a validator to a text field or hide a sub module in the navigation.

→ Details

  • Some methods marked as @deprecated have been removed:
    • org.eclipse.riena.core.extension.ExtensionInjector.bind(String) - use update(String) instead
    • org.eclipse.riena.core.extension.ExtensionInjector.doNotTrack() - just remove when used in fluent code
    • org.eclipse.riena.ui.ridgets.IComboRidget.getSelectionObservable() - use BeansObservables.observeValue(this,IComboRidget.PROPERTY_SELECTION) instead
    • org.eclipse.riena.ui.ridgets.IComboRidget.isEditable() - use isReadonly() instead (inverse value!)
    • org.eclipse.riena.ui.ridgets.IComboRidget.setEditable(boolean) - use setReadonly(boolean) instead (inverse value!)
    • org.eclipse.riena.ui.ridgets.ISingleChoiceRidget.getSelectionObservable() - use BeansObservables.observeValue(this,IChoiceRidget.PROPERTY_SELECTION) instead
    • org.eclipse.riena.ui.ridgets.IValueRidget.getRidgetObservable() - use BeansObservables.observeValue(bean, propertyName) instead
  • The @deprecated class org.eclipse.riena.ui.ridgets.IValueProvider has been removed. It was a legacy class from a past project. The data binding of Ridgets is based on IObservableValue (see org.eclipse.riena.ui.ridgets.IValueRidget).
  • All bundles export now all packages and all internal packages are marked with x-internal:=true
  • The Client Monitoring feature has now a Getting Started
  • Login support ( → Details): There is the possibility in Riena to provide an application with an login dialog/view. In this dialog authenication information (i.e. user, password) may be requested from the user. By configuration this dialog appears before the application starts and additionally in case there is no user activity for some specified time while the application is running.

This feature is supported in two different ways:

  1. Login via some dialog view and
  2. Login via the eclipse splash view.

The feature is demonstrated in the Riena example (SWT ExampleApplication) using the second alternative.

Example for a login dialog view:

Riena Login Dialog.PNG

Example for a splash login view:

Riena Login Splash.PNG

M6

Navigation

  • The extension points "org.eclipse.riena.navigation.navigationNode" and "org.eclipse.riena.navigation.subModule" have been replaced by the new extension point "org.eclipse.riena.navigation.assemblies" that combines their functionality
  • It is now possible to use a hierarchical structure for modulegroup↔module↔submodule definitions within an assembly extension element reflecting the structure of the resulting navigation tree
  • There is a GenericNavigationAssembler that is able to create a sub tree from this description eliminating the need for custom INavigationAssembler (formerly INavigationNodeBuilder) implementations in most cases

→ Details

The module "UIProcess" from the Riena example client eg is completely defined declarative (except for the view and controller implementation, of course):

Riena Cient UIProcess.PNG

<assembly
    id="org.eclipse.riena.example.uiProcesses"
    name="uiProcesses_definition"
    parentTypeId="playground">
  <modulegroup
      name="uiProcesses_group"
      typeId="org.eclipse.riena.example.uiProcesses">
    <module
        name="uiProcesses"
        label="UIProcess"
        icon="org.eclipse.riena.example.client:/icons/ledred.png"
        closeable="false">
      <submodule
          typeId="org.eclipse.riena.example.uiProcess_1"
          name="uiProcess_1"
          label="Demo1"
          icon="org.eclipse.riena.example.client:/icons/ledlightgreen.png"
          view="org.eclipse.riena.example.client.views.UIProcessDemoSubModuleView"
          controller="org.eclipse.riena.example.client.controllers.UIProcessDemoSubModuleController"/>
      <submodule
          typeId="org.eclipse.riena.example.uiProcess_2"
          name="uiProcess_2"
          label="Demo2"
          view="org.eclipse.riena.example.client.views.UIProcessDemoSubModuleView"
          controller="org.eclipse.riena.example.client.controllers.UIProcessDemoSubModuleController"/>
    </module>
  </modulegroup>
</assembly>

Labels and other string value attributes may contain variables that are automatically replaced by their values upon node creation. → Details

<module
   label="Customer ${riena.navigation.nodeid:instanceId}"
   typeId="com.acme.customer.edit.module">

Multiple instances of the same submodule may be created depending on the number of objects in a collection or array. → Details

<foreach element="account" in="${riena.navigation.parameter:accounts}">
   <submodule
         label="Account ${riena.navigation.nodecontext:account.accountNo}"
         typeId="com.acme.customer.edit.account"
         instanceId="${riena.navigation.nodecontext:account.accountNo}"
         controller="..."
         view="..."/>
</foreach>

MessageBox

Riena messagebox example.png

  • First create control in the view:
// Create MessageBox control in view:
MessageBox messageBox = UIControlsFactory.createMessageBox(parent);
addUIControl(messageBox, "messageBox");

and obtain ridget in controller:

// Obtain MessageBoxRidget in controller:
IMessageBoxRidget messageBoxRidget = (IMessageBoxRidget) getRidget("messageBox");
  • Then configure ridget MessageBoxRidget:
// Configure MessageBoxRidget:
messageBox.setType(IMessageBoxRidget.Type.QUESTION);
messageBox.setTitle("Bridgekeeper");
messageBox.setText("What is your favourite colour?");
// Set options
IMessageBoxRidget.MessageBoxOption[] customOptions = new IMessageBoxRidget.MessageBoxOption[] {
new IMessageBoxRidget.MessageBoxOption("Blue"),
new IMessageBoxRidget.MessageBoxOption("Yellow")};
messageBox.setOptions(customOptions);
  • And show message box:
// Show MessageBoxRidget and get result:
IMessageBoxRidget.MessageBoxOption selectedOption = messageBox.show();

Disable Items in Tree

  • Items in a tree ridget can be disabled, by binding to a boolean property of the model element.
MyModel[] roots = { root1 };
MyModel element = ...;
// bind MyModel.isEnabled() or MyModel.getEnabled() to the enablement of a tree item
treeRidget.bindToModel(roots, MyModel.class, "children", "parent", "value", "enabled", null);
element.setEnabled(false); // will disable the 'element' item in the tree

Riena tree ridget with disabled items.png

  • Items in a tree ridget can be hidden, by binding to a boolean property of the model element.
MyModel[] roots = { root1 };
MyModel element = ...;
// bind MyModel.isAvailable() or MyModel.getAvailable() to the visibility of a tree item
treeRidget.bindToModel(roots, MyModel.class, "children", "parent", "value", null, "available");
element.setAvailable(false); // will hide 'element' item in the tree

Communication

Riena communication now attaches the called method name and a request id to the URL of each remote service call. So if you check your access log you see something like

yourhost 111.111.111.111 - 2008-11-22 13:15:12 POST /demo/hessian/CustomerWS?loadCustomer&RID-e5n70jkb HTTP/1.1 200

So you not only see the service "CustomerWS" but also the called method "loadCustomer" and a unique requestId "RID-e5n70jkb". The requestId can be used to track calls through your infrastructure (say you have logs in your loadbalancer, apache, tomcat whatever you can be sure to always find the correlated entries in the individual access.log files.

DialogView

Used to build dialogs that use the Riena concept of views and controllers (see also riena snippets).

Riena dialogView.png

  • Provide the view for the example dialog:
/**
 * The view for the example dialog.
 */
public class MyDialogView extends DialogView {
 
	public MyDialogView() {
                // specify null as parent composite here (default is the workbench shell)
		super(null);
	}
 
	protected AbstractWindowController createController() {
		return new MyDialogController();
	}
 
	protected Control buildView(Composite parent) {
 
		super.buildView(parent);
 
		Composite composite = new Composite(parent, SWT.NONE);
		composite.setLayout(new GridLayout(2, false));
 
		UIControlsFactory.createLabel(composite, "Input"); //$NON-NLS-1$
		Text input = UIControlsFactory.createText(composite);
		addUIControl(input, MyDialogController.RIDGET_ID_INPUT);
 
		Button okButton = UIControlsFactory.createButton(composite);
		okButton.setText("Ok"); //$NON-NLS-1$
		addUIControl(okButton, MyDialogController.RIDGET_ID_OK);
                ...
       }
}
  • Provide the controller for the example dialog:
/**
 * The controller for example dialog.
 */
public class MyDialogController extends AbstractWindowController {
 
	public static final String RIDGET_ID_INPUT = "input"; //$NON-NLS-1$
	public static final String RIDGET_ID_OK = "okButton"; //$NON-NLS-1$
 
	public void configureRidgets() {
 
		super.configureRidgets();
 
		getWindowRidget().setTitle("My Dialog"); //$NON-NLS-1$
 
		ITextRidget input = (ITextRidget) getRidget(RIDGET_ID_INPUT);
		input.setText("Input please"); //$NON-NLS-1$
 
		IActionRidget okAction = (IActionRidget) getRidget(RIDGET_ID_OK);
		okAction.addListener(new IActionListener() {
			public void callback() {
                                ...
				getWindowRidget().dispose();
			}
		});
                ...
       }
}
  • Build and open the example dialog:
	new HelloDialogView().build();

Global Exception Handling

Riena now includes a global exception handler manager which is called if an exception occurs and is caught by the framework. You can register one or multiple Exception Handler through an extension like this:

<extension
         point="org.eclipse.riena.core.exception.handlers">
      <exceptionHandler
            class="org.eclipse.riena.internal.core.exceptionhandler.SimpleExceptionHandler"
            name="Simple riena core handler">
      </exceptionHandler>
   </extension>

An Exception has a name (for documentation and reference), a class (that has to implement IExceptionHandler) and a before attribute. "before" references the name of any other exceptionhandler before this exception handler must be called. a blank or null value puts the exceptionhandler at the end. The framework currently makes these calls in server tier when calling the remote service and in the ui thread. The global exception handler has a chance to handle the exception and acknowledge that it did by returning OK:

return Action.Ok;

If it didnt handle this exception than it should return

return Action.NotHandled

After the exceptionhandler is called the exception still thrown. Exception Handlers are intended to allow logging or display of a message dialog or any kind of notification as appropriate. They don't make exception handling in general unnecessary.

Client Monitoring

Client monitoring is similar to the Eclipse Usage Data Collector [1], i.e. both collect data on the client and transfer this data to a server for further processing. Riena's client monitoring is capable of collecting data from various sources (e.g. logs, custom logs, usage data of course too, ..) and is of course extensible.

Riena clients are typically used for business applications. For this type of application it is viable for operators (better word here!) to be informed of problems or failures before users stumble upon them. This can be achieved with the client monitoring. This automatically generated information is often more precise than bug reports.

You can have a brief look at this feature within our example client application (Bundle: org.eclipse.riena.example.client, Launch configuration: SWT ExampleApplication.launch). To activate the monitoring you have to add the bundle org.eclipse.riena.monitor.client to the launch configuration and modify the plugin.xml. Within the plugin.xml search for "org.eclipse.riena.monitor.collector". There are two extensions in comments. Remove the comments. Now the example is ready to run. Before you do this, start the Riena Sample App Server (Bundle: org.eclipse.riena.sample.app.server, Launch configuration: Riena Sample App Server.launch). When the example client is up navigate to "Playground" >> "LogCollector". Here it is possible to create log and custom log events. If you create a log event with level warn or error all collected events up to this time will be transferred to the server. The server will print the received log events to the console.

A more in depth "Getting started" will follow soon.

M5

  • Made Riena View Parts (i.e. subclasses of SubModuleView) usable in RCP. The necessary steps are described in bug 247102.
  • [Marker] Disabled fields should show no content (feature request) (bug 245630)
// Disabling a ridget
ISingleChoiceRidget ridget;
ridget.setEnabled(false);

Riena disabled ridget.png

  • [Marker] Lock the selection in Tree and Table ridgets that are output only (bug 245632)
  • Added a NumericTextRidget. It supports an arbitrary number of digits. Grouping can be turned on or off. Negative numbers can be allowed or blocked. It can automatically mark negative numbers red (can be disabled). See INumericValueTextFieldRidget for more info.
// Create special SWT Text widget in view:
Text text = UIControlsFactory.createTextNumeric(parent), "txtInteger");
addUIControl(text, "txtInteger");
// Obtain NumericTextRidget in controller:
INumericValueTextFieldRidget numericTextRidget = (INumericValueTextFieldRidget) getRidget("txtInteger");

Riena numeric text ridget.png

  • Added a DecimalTextRidget. It has a fixed number of decimal and fraction digits. Grouping can be turned on or off. See IDecimalValueTextFieldRidget for more info.
// Create special SWT Text widget in view:
Text text = UIControlsFactory.createTextDecimal(parent), "txtDecimal");
addUIControl(text, "txtDecimal");
// Obtain DecimalTextRidget in controller:
IDecimalValueTextFieldRidget decimalTextRidget = (IDecimalValueTextFieldRidget) getRidget("txtDecimal");

Riena decimal text ridget.png

  • Added a DateTextRidget. It supports structured editing of a formatted date/time/date-time String, according to a predefined formatter pattern. See IDateTextFieldRidget for more info.
// Create special SWT Text widget in view:
Text text = UIControlsFactory.createTextDecimal(parent), "txtDate");
addUIControl(text, "txtDate");
// Obtain DecimalTextRidget in controller:
IDateTextFieldRidget  dateTextRidget = (IDateTextFieldRidget  ) getRidget("txtDate");
dateTextRidget.setFormat(IDateTextFieldRidget.FORMAT_DDMMYYYY);

Riena date text ridget.png

  • IServicePublisher modified unpublish method: It used to get a path as parameter which was enough for Hessian and some SOAP implementation but not flexible enough. Now it receives the full RemoteServiceDescription Object which contains among other things the path
  • GenericObjectCache has a few tests now and supports generics for key and value
  • Riena's security is changing to no longer be based on JAAS directly but on Equinox Security
    • first step is to base the authentication process on Equinox Security's model with extension points for login module, callbackhandler etc.
    • some refactoring for authorization were done
  • Until there is a need expressed we will stop doing extensive testing using the java SecurityManager because its pretty uncommon that Equinox Container run within a SecurityManager environment
  • removed all dependencies to ConfigurationAdmin. Now all configuration for URLs (i.e. hostname) is done using core.variables
  • Nodes of the navigation (e.g. module or sub-application) can be disabled or hidden. (At the moment disabled or hidden sub-module are not displayed correct)
    Navi.png
    Image 1: All modules are enabled and visible
    NaviModuleDisabled.png
    Image 2: Module "Module 1.1.2" is disabled
    NaviModuleHidden.png
    Image 3: Module "Module 1.1.2" is hidden
public interface INavigationNode extends IMarkable {
  ...
	void setVisible(boolean visible);
 
	boolean isVisible();
 
	void setEnabled(boolean enabled);
 
	boolean isEnabled();
  ...
}

M4

Collection Information about New and Noteworthy for M4

  • support Attachments (binary blobs) in Remote Service calls
    • ability to create an "Attachment" object (a java object from Riena) from a URL, InputStream or File and pass it as parameter or return it from a method call
    • the Attachment can read on the target as if it where a local container
  • improved Exception handling for remote services
    • calls to remote services no longer return RemoteFailure with the real exception nested inside but they return the actually exception. we check that this exception is actually allowed by the method signature so the client isnt "surprised", we also let RuntimeExceptions go through. For checked exceptions like IOExceptions Riena nicely wraps them in a RemoteFailure
  • Ridgets for Trees and Trees with columns.

Riena treetable.png

  • Menu Bar and Tool Bar (Cool Bar) below sub-application switcher
  • Status Line (with message, number, date and time)
  • Resizing of shell (without OS-Shell-Border)
  • After adding / removing validation rules from an IEditableRidget you can now invoke revalidate() to update the ridget's validation state:
IEditableRidget ridget;
ridget.removeValidationRule(numbersOnly);
ridget.revalidate();
  • The TableRidget and TreeTableRidget will automatically show checkbox images on columns that contain a boolean value. Riena table with checkbox.png
  • The TreeTableRidget now supports "grouping" for tree nodes. Enabling grouping, will hide the column values for rows that contain a tree node that has children. See IGroupedTreeTableRidget for details.
TreeTableRidget ridget;
ridget.setGroupingEnabled(true);

Riena grouped tree table.png

  • SingleChoiceRidget and MultipleChoiceRidget have been implemented.

Riena choice ridgets.png

  • ITreeRidget.setRootsVisible(boolean) can be used to hide / show the root node in a ITreeRidget
  • two new extension points added to configure navigation targets in the tree-like Riena UI application model
    • INavigationNodeId added to identify nodes
      • the interface INavigationNode was extended with a new method getNodeId() that returns an INavigationNodeId
      • an INavigationNodeId has a 'type' part and an 'instance' part both being arbitrary Strings. It is suggested to use a package-like naming for the typeId to ensure uniqueness across an application
      • the typeId defines the type of a node like 'com.acme.banking.bankingSubApplication' or 'com.acme.banking.accountModule'
      • the instanceId is used to distinguish between nodes of the same type like multiple account nodes with different account numbers. The instanceId is optional and may be null for nodes of which only one instance can exist.
    • INavigationNode.navigate(INavigationNodeId) method added to navigate to another node
      • if a node with the specified ID exists it is activated
      • if no node is found a new instance is created first
      • INavigationNode.create(INavigationNodeId) only creates nodes without activating them and may be used for initialization
    • extension point "org.eclipse.riena.navigation.navigationNodeType"
      • defines how to create nodes of a given typeId
      • an implementation of the interface INavigationNodeBuilder returns a single navigation node or the root of a new subtree in the application model
      • parentTypeId sets where to place the new node in the application model. If the parent node does not exist it will be created too
      • the class of the parent node must be the one required for the created node e.g. an ISubApplicationNode for an IModuleGroupNode
    • extension point "org.eclipse.riena.navigation.subModuleType"
      • defines how to represent a sub module in the work area. A sub module is the only navigation node in the Riena UI that does not come with a default presentation
      • view refers to an "org.eclipse.ui.view" extension
      • controller must be a subclass of IController. An instance is created for every submodule node and equiped with a set of Ridgets that is bound to the UI-widgets in the view
<extension point="org.eclipse.riena.navigation.navigationNodeType">
   <navigationNodeType
         typeId="com.acme.example.barModule"
         nodeBuilder="com.acme.example.FooModuleBuilder"
         parentTypeId="com.acme.example.fooModuleGroup" />
</extension>
<extension point="org.eclipse.riena.navigation.subModuleType">
   <subModuleType
         typeId="com.acme.example.bazSubModule"
         view="com.acme.example.BazSubModuleView"
         controller="com.acme.example.BazSubModuleController" />
</extension>
  • Riena now provides UIProcesses for easy synchronization and visualization of parallel jobs
    • Based on eclipse jobs API
    • Integration of exisiting eclipse jobs
    • Dialog visualizing activity and progress
    • Support for visual contexts (describing under which circumstances an UIProcess is visualized)
    • Thread-Serialized callback methods (initialUpdateUi, updateUi, finalUpdateUi)

Uiprocess2.JPG

  • Markers in navigation tree

Error and mandatory marker are displayed in the navigation tree for these sub modules that have marked widgets.

TreeItemMarker.png

  • Riena now supports sending Attachments (binary large chunks) as parameter or returnvalues in remote service calls, data is transferred in the remote service call.
  • Modular Riena - New RCP example: The project org.eclipse.riena.sample.client.rcpmail shows how to use Ridgets in a regular RCP application/ViewPart, without using the rest of Riena. This may be interesting for developers that want to utilize Riena's Ridget concept without fully migrating their RCP application to Riena.
  • Code Snippets: Created a wiki page with code samples that teach you how to use Ridgets. We'll keep adding more examples as the project progresses.
  • Output markers: Ridgets with an output marker are "read only". Their content cannot be changed by the user.
ITextFieldRidget ridget;
ridget.setOutputOnly(true);
  • Mandatory markers: Ridgets with a mandatory marker must be filled out by the user.

Riena mandatory.png

ITextFieldRidget ridget;
ridget.setMandatory(true);

Back to the top