From 200a40b332420f94992eb39a6d0ea1cf1490ffc4 Mon Sep 17 00:00:00 2001 From: coreyg Date: Fri, 21 Nov 2014 09:30:19 +0000 Subject: Adding tuscany's website to their svn repo for svnpubsub git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1640879 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca-java-implementationwidget.html | 217 +++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 site/trunk/site-publish/documentation-2x/sca-java-implementationwidget.html (limited to 'site/trunk/site-publish/documentation-2x/sca-java-implementationwidget.html') diff --git a/site/trunk/site-publish/documentation-2x/sca-java-implementationwidget.html b/site/trunk/site-publish/documentation-2x/sca-java-implementationwidget.html new file mode 100644 index 0000000000..58e98f3d3b --- /dev/null +++ b/site/trunk/site-publish/documentation-2x/sca-java-implementationwidget.html @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + SCA Java implementation.widget : Apache Tuscany + + + + + + + + + + + +
+ HomeApache Tuscany Docs 2.x > Index > SCA Java Extensions Guide > SCA Java implementation.widget + +
+ + + + + + +
+
+ + + + + + + + +
+  Apache Tuscany Docs 2.x > Index > SCA Java Extensions Guide > SCA Java implementation.widget + + Tuscany Home | User List | Dev List | Issue Tracker   +
+ + + + + + +
+
Table of Contents
+
+ + +
+
+ +
+ + +
+
+

Introduction

+ +

The Tuscany Widget Implementation extends the SCA programing model to HTML and/or Web 2.0 client applications.

+ + +

Using Implementation.Widget to model your Web 2.0 component

+ +

This component type allows you to model your HTML and/or Web 2.0 as an SCA component, the implementation artifact would be html resource that represents the application, and you can define SCA References, that would be wired to server side services.

+ +
+
+<composite	xmlns="http://www.osoa.org/xmlns/sca/1.0"
+		xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+		targetNamespace="http://store"			
+		name="store">
+		
+       <component name="store">
+           <t:implementation.widget location="contents/store.html"/>
+           <service name="Widget">
+               <t:binding.http/> 
+           </service>
+	   <reference name="catalog" target="Catalog">
+               <t:binding.jsonrpc/>
+	   </reference>
+	   <reference name="shoppingCart" target="ShoppingCart">
+	       <t:binding.atom/>
+	   </reference>
+        </component>
+    
+        .....
+</composite>
+
+
+ + +

Defining references in HTML resources

+ +

The widget implementation introduces SCA annotations to JavaScript code using the syntax below. These references will get properly introspected by the implementation.widget and wired to the proper server side services.

+ +
+
+//@Reference
+var catalog = new Reference("catalog");
+
+//@Reference
+var shoppingCart = new Reference("shoppingCart");
+
+
+ + +

Including generated JavaScript client proxy

+ +

The client application will need to include a generated JavaScript that will contain the necessary client proxy used to access the server side services. The name of the generated JavaScript is the same as the HTML resource being specified as the implementation artifact.

+ + +
+
+<!-- one js include per sca component -->
+<script type="text/javascript" src="store.js"></script>
+
+
+ +

Supported binding types

+ +

Currently, you can define references to remote services using the following bindings :

+ + + +

References

+

http://incubator.apache.org/tuscany/getting-started-with-tuscany.html

+ + + +
+ +
+
+
+ + + + + + + +
+ + + \ No newline at end of file -- cgit v1.2.3