SilverlightIslandLocate this document in the navigation structure

Use

Using user interface element SilverlightIsland , you can develop Web media applications with video and audio file integration, applications containing vector-based graphics, and highly interactive applications with very fast response times.

Silverlight is a cross platform development framework for creating rich internet applications (RIA) that run identical on all major browsers and operating systems. Silverlight is totally client based. The code is located in an EXtensible Application Markup Language (XAML) Package which is located on the server as an .xap file but executed in the browser plug-in. In addition, the user interface is not limited to the rendering capabilities and control set of the browser.

To access the business data or to invoke operations, the Silverlight-based application calls the back-end functionality explicitly, for example via web services. In contrast to the origin Web Dynpro programming model, there is no pre-defined event cycle for back-end communication: The Silverlight-based application can invoke the back-end services at an arbitrary time. Processing user interactions is done locally on the user's machine. Only if the application decides to invoke a back-end service, a roundtrip is done. The server returns only the data, and the user interface is rendered by the Silverlight application itself.

Requirements

  • SAP NetWeaver installation with Web Dynpro runtime and Developer Studio with Silverlight plugins

  • Silverlight Player Version 2 installation

  • Licensed Visual Studio with Silverlight plugins

  • Licenced Media server

  • About 2 MB client size

User Interface Element

SilverlightIsland controls are integrated in Web Dynpro views by replacing the root UI element. The UI element contains the path to the Silverlight application file. This file resides in the MIME repository and can be shipped together with the Web Dynpro application.

The SilverlightIsland integration is one-directional that means that always a SilverlightIsland is integrated into a Web Dynpro view, and not vice versa.

A SilverlightIsland is displayed as a rectangular control in a Web Dynpro view.

Caution

A SilverlightIsland control cannot be integrated into scrollable containers such as transparent containers, trays, or groups, if scrolling mode is set to auto or both . Also integration into popups is not possible. See also SAP Note 1156163 for further information.

Project Enabling

Silverlight Application is a template within Visual Studio that you use for the initial project creation. To enable the application in this project to communicate with the Web Dynpro application, the project needs to know the SilverlightIsland Web Dynpro library. On the References node under the project node in the Solution Explorer , the WDSilverlightIslandLibrary.dll can be chosen from the SAP folder (right mouse-click).

Rendering

For the SilverlightIsland UI element, the Silverlight container control is used. The control renders to an <OBJECT> tag and its parameters make the browser create a Silverlight player instance and load the Silverlight application file assigned to the SilverlightIsland into the player. Additionally, the control uses the placeholder mechanism to keep the SilverlightIsland alive over several roundtrips. The mapping of the UI element to the control happens in the SilverlightIsland view element adapter. On the server side, there is an Extensible Business Client Markup Language (xBCML) protocol rendering instance for this adapter. On client side, the SilverlightIsland component is accessed with the Active Components Framework (ACF) JavaScript.

Data Flow

The data exchange between the SilverlightIsland component and Web Dynpro is realized with the xBCML protocol. One xBCML document for each SilverlightIsland UI element on the screen is transported along with the HTML page to the client where the xBCML document contains the data required for the SilverlightIsland . xBCML merge requests are transported in the opposite direction using the Web Dynpro event queue. They contain context updates and events for the SilverlightIsland UI Element.

Like other user interface elements, a SilverlightIsland control is using the view context for data binding and can trigger actions. Context attributes are made available in the SilverlightIsland by means of the aggregations properties and data sources. Event declaration can be done at design-time.

Uniform Layouts

By default, the look and feel of screens using SilverlightIsland elements and native Web Dynpro user interfaces is different. Therefore it is important for Silverlight control developers to invest on the Silverlight side to achieve an identical look and feel of both HTML and Silverlight. Although cascading style sheets (CSS) are used by Web Dynpro and also Silverlight to skin the user interface, the technologies use different tags in their CSS styles. A SilverlightIsland embedded in a skinned Web Dynpro application looks identical if the Silverlight code is changed in a way that it adheres to the look and feel of the HTML parts generated by Web Dynpro on the screen.

The Web Dynpro layout is ruled by layout managers whereas Silverlight is based on a pixel-oriented layout. Since the vertical and horizontal layouts are very strong in Web Dynpro, the layout is fairly flexible with respect to the window size or variable text sizes and lengths; this is for example important for application globalization (see below).

Text Sizing

Changing the text size in the browser has no influence on an application using a Silverlight control, in contrast to Web Dynpro applications. Similarly, the layout does not adapt to different text lengths, as they occur with different translations. The following steps are therefore recommended in the design and implementation phase:

· Identifying the longest UI text name and keeping its length for all UI texts on the current screen

· Checking the resizing behavior

· Making checks on layout changes using different fonts, text sizes, and languages

Multi-Language Support

In order to ensure proper multi-language support, all text must be provided by the backend. For performance reasons, these texts should be sent once. All language-dependent texts visualized by a SilverlightIsland must be handled in the Web Dynpro context.

Recommendations

We recommend not to replace existing Web Dynpro controls with Silverlight controls, or to change productive Web Dynpro applications currently containing charts like BusinessGraphics. We recommend to use Silverlight technology if high-graphical screen areas are needed, or if audio or video files shall be integrated, for example. There is no need to replace user interface elements in productive Web Dynpro applications.

Furthermore, we recommend not to use Silverlight for regional-dependent input and output, examples are currencies or units of measurements.