Application Upgrading Notes

PureWeb STK

3.x

Calgary Scientific Inc. © 2012

Contents 3.1

Introduction
Deprecated API
PureWeb C++ Service STK Changes
PureWeb Silverlight Client STK Changes
Common PureWeb STK Changes
Optional Changes

Contents 3.0

Introduction
Deprecated API
Namespace Changes
Signature Changes
Microsoft Silverlight Changes


Introduction 3.1

Applications made from the 3.0 version of PureWeb will require minor modifications to upgrade them to the current 3.1 PureWeb. To help you identify the specific changes in this release, the application upgrading notes includes information on Namespace Changes, Deprecated API information, and Signature Changes.

Top of Page


Deprecated API

No APIs have been deprecated in the 3.1 version of PureWeb.

Top of Page


PureWeb C++ Service STK Changes

This section provides the latest list of PureWeb C++ Service STK changes.


ValueChangedEventArgs::NewValue() now returns a CSI::Nullable. Previoulsy, it returned a String.


The following methods now require a CSI::Locale parameter. Use Locale::Invariant().

Top of Page


PureWeb Silverlight Client STK Changes

This section provides the latest list of PureWeb Silverlight Client STK changes.


Upgrade your Scribble sample from 3.0 to 3.1 by re-adding PureWeb.Client.Silverlight to your list of references.


Upgrade your Scribble sample from 3.0 to 3.1 you must change the Target Silverlight Version to Silverlight 5.

Top of Page


Common PureWeb STK Changes

This section provides the latest list of common PureWeb STK changes.


The AppShare constructor now requires a sessionUrl. Use Framework.Client.SessionUrl.


To exit the application, add an explicit call to WebClient.Disconnect() in the exit handler of the application.

Example:


	private void Application_Exit(object sender, EventArgs e)
	{
		Framework.Client.Disconnect();
	}
	

Top of Page


Optional Changes

This section provides the a list of optional changes.


Change port 4502 to 8080.

Example:

http://localhost:4502/pureweb/app?name=ScribbleApp&client=silverlight&_diagnostics=true

Replaced by:

http://localhost:8080/pureweb/app?name=ScribbleApp&client=silverlight&_diagnostics=true


Change port app URL to view URL.

Example:

http://localhost:4502/pureweb/app?name=ScribbleApp&client=silverlight&_diagnostics=true

Replaced by:

http://localhost:4502/pureweb/view?name=ScribbleApp&client=silverlight&_diagnostics=true


It is no longer necessary to queue the ConnectSession command.

Example:


	private void Application_Startup(object sender, StartupEventArgs e)
	{
		this.RootVisual = new MainPage();
		// get the current location from the browser
		string href = (string)HtmlPage.Window.Eval("document.location.href");
		var uri = new Uri(href);
		Trace.WriteLine("Connecting to server {0}, href");
		if (uri.AbsolutePath.StartsWith("/pureweb/view"))
		{
			// Start a new session with default credentials
			Framework.Instance.Client.AuthorizationInfo = new BasicAuthorizationInfo() 
			{ Name = "admin", Password = "admin" };
		}
		Framework.Client.Connect(href);
		//Framework.Client.QueueCommand("ConnectSession");
	}
	

Top of Page


Introduction 3.0

Applications made from the 2.2 version of PureWeb will require minor modifications to upgrade them to the current 3.0 PureWeb. To help you identify the specific changes in this release, the application upgrading notes includes information on Namespace Changes, Deprecated API information, and Signature Changes.

Top of Page


Deprecated API

This section provides the latest list of deprecated API information.


IncrementPendingApplicationResponses()

DecrementPendingApplicationResponses()

StartApplicationPendingResponseInterval()

Top of Page


Namespace Changes

This section provides the latest list of namespace changes.


CSI::PureWeb::IRenderedView

Replaced by:

CSI::PureWeb::Server::IRenderedView


CSI::PureWeb::StateManager

Replaced by:

CSI::PureWeb::Server::StateManager


CSI::PureWeb::ViewImageFormat

Replaced by:

CSI::PureWeb::Server::ViewImageFormat

Top of Page


Signature Changes

This section provides the latest list of signature changes.


virtual void PostKeyEvent(CSI::PureWeb::Input::KeyboardEventType::Enum keyEventType, const CSI::PureWeb::Input::KeyboardEvent& keyEvent);

Replaced by:

virtual void PostKeyEvent(const CSI::PureWeb::Ui::PureWebKeyboardEventArgs& keyEvent);


virtual void PostMouseEvent(CSI::PureWeb::Input::MouseEventType::Enum mouseEventType, const CSI::PureWeb::Input::MouseEvent& mouseEvent);

Replaced by:

virtual void PostMouseEvent(const CSI::PureWeb::Ui::PureWebMouseEventArgs& mouseEvent);


stateManager->RegisterView()

Moved to:

stateManager->ViewManager().RegisterView()


stateManager->UnregisterView()

Moved to:

stateManager->ViewManager().UnregisterView()


TypelessStateLock::SetProperty>

Replaced by:

SetValueStateManagerServer


StateManagerServer::Start()

Replaced by:

Start(IStateManagerController* pStateManager)(drops 3 of 4 parameters).

Previously, this method used an input/output (IO) stream, now it uses a default port (8082). The default port can overridden by setting the environment variable PUREWEB_PORT.


Command handlers have added CSI::Guid sessionId as the first parameter.

Top of Page


Microsoft Silverlight Changes

This section provides the latest list of Mircosoft Silverlight changes.


Framework

Replaced by:

Framework.Instance


StateLock.Element

Replaced by:

GetTree


StateLock.GetProperty

Replaced by:

GetValue


StateLock.GetPropertyAs<>

Replaced by:

GetValueAs<>


StateLock.Root

Replaced by:

GetTree("/")

Top of Page