summaryrefslogtreecommitdiffstats
path: root/site/trunk/site-publish/documentation-2x/sca-java-implementationwidget.html
diff options
context:
space:
mode:
Diffstat (limited to 'site/trunk/site-publish/documentation-2x/sca-java-implementationwidget.html')
-rw-r--r--site/trunk/site-publish/documentation-2x/sca-java-implementationwidget.html217
1 files changed, 217 insertions, 0 deletions
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 @@
+
+
+
+
+
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+ <HEAD>
+ <META name="description" content="Apache Tuscany">
+ <META name="keywords" content="apache, apache tuscany, tuscany, service, services, fabric, soa, service oriented architecture, sca, service component architecture, das, sdo, csa, ruby, opensource">
+
+ <LINK type="text/css" rel="stylesheet" href="http://tuscany.apache.org/stylesheets/default.css">
+ <LINK rel="SHORTCUT ICON" href="https://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/$images/favicon.ico">
+ <TITLE>SCA Java implementation.widget : Apache Tuscany</TITLE>
+ <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+
+ <STYLE>
+ .spacetree * ul {
+ padding-left:0px;
+ margin-left: 0px;
+ }
+ .spacetree * li {
+ margin-left: 5px;
+ padding-left:5px;
+ }
+ </STYLE>
+
+ <BODY onload="init()">
+ <!-- topNav -->
+ <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
+ <TR class="topBar">
+ <TD align="left" valign="middle" class="topBarDiv" align="left" nowrap="">
+ <A href="https://cwiki.apache.org/geronimo"> Home</A> &gt;&nbsp;<A href="index.html" title="Apache Tuscany Docs 2.x">Apache Tuscany Docs 2.x</A>&nbsp;&gt;&nbsp;<A href="index.html" title="Index">Index</A>&nbsp;&gt;&nbsp;<A href="sca-java-extensions-guide.html" title="SCA Java Extensions Guide">SCA Java Extensions Guide</A>&nbsp;&gt;&nbsp;<A href="" title="SCA Java implementation.widget">SCA Java implementation.widget</A>
+ </TD>
+ <TD align="right" valign="middle" nowrap="">
+ <FORM name="search" action="http://www.google.com/search" method="get">
+ <INPUT type="hidden" name="ie" value="UTF-8">
+ <INPUT type="hidden" name="oe" value="UTF-8">
+ <INPUT type="hidden" name="domains" value="">
+ <INPUT type="hidden" name="sitesearch" value="">
+ <INPUT type="text" name="q" maxlength="255" value="">
+ <INPUT type="submit" name="btnG" value="Google Search">
+ </FORM>
+ </TD>
+ </TR>
+ </TABLE>
+
+
+ <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
+ <TR class="topBar">
+ <TD align="left" valign="middle" class="topBarDiv" nowrap="true" width="100%">
+ &nbsp;<A href="index.html" title="Apache Tuscany Docs 2.x">Apache Tuscany Docs 2.x</A>&nbsp;&gt;&nbsp;<A href="index.html" title="Index">Index</A>&nbsp;&gt;&nbsp;<A href="sca-java-extensions-guide.html" title="SCA Java Extensions Guide">SCA Java Extensions Guide</A>&nbsp;&gt;&nbsp;<A href="" title="SCA Java implementation.widget">SCA Java implementation.widget</A>
+ </TD>
+
+ <TD align="right" valign="middle" class="topBarDiv" align="left" nowrap="true">
+ <A href="http://tuscany.apache.org/">Tuscany Home</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-dev">Dev List</A> | <A href="http://issues.apache.org/jira/browse/Tuscany">Issue Tracker</A>&nbsp;&nbsp;
+ </TD>
+ </TR>
+ </TABLE>
+
+ <TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF">
+ <TR>
+ <TD valign="top" align="left" width="22%" bgcolor="#F9F9F9" class="noprint">
+ <DIV class="tabletitle">Table of Contents</DIV>
+ <DIV class="spacetree">
+
+
+ </DIV>
+ </TD>
+ <TD align="left" valign="top" width="78%">
+ <!-- pageContent -->
+ <DIV id="PageContent">
+ <DIV class="pageheader" style="padding: 6px 0px 0px 0px;">
+ <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+ <!--img src="http://geronimo.apache.org/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+ <DIV style="margin: 0px 10px 0px 10px" class="smalltext">Apache Tuscany Docs 2.x</DIV>
+ <DIV style="margin: 0px 10px 8px 10px" class="pagetitle">SCA Java implementation.widget</DIV>
+
+ <DIV class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+<!-- -->
+ <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=5964942">
+ <IMG src="http://geronimo.apache.org/images/icons/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A>
+ <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=5964942">Edit Page</A>
+ &nbsp;
+ <A href="https://cwiki.apache.org/confluence/pages/listpages.action?key=TUSCANYxDOCx2x">
+ <IMG src="http://geronimo.apache.org/images/icons/browse_space.gif" height="16" width="16" border="0" align="absmiddle" title="Browse Space"></A>
+ <A href="https://cwiki.apache.org/confluence/pages/listpages.action?key=TUSCANYxDOCx2x">Browse Space</A>
+ &nbsp;
+ <A href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964942">
+ <IMG src="http://geronimo.apache.org/images/icons/add_page_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add Page"></A>
+ <A href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964942">Add Page</A>
+ &nbsp;
+ <A href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964942">
+ <IMG src="http://geronimo.apache.org/images/icons/add_blogentry_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add News"></A>
+ <A href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964942">Add News</A>
+<!-- -->
+ </DIV>
+ </DIV>
+
+ <DIV class="pagecontent">
+ <DIV class="wiki-content">
+ <H3><A name="SCAJavaimplementation.widget-Introduction"></A>Introduction</H3>
+
+<P>The Tuscany Widget Implementation extends the SCA programing model to HTML and/or Web 2.0 client applications.</P>
+
+
+<H3><A name="SCAJavaimplementation.widget-UsingImplementation.WidgettomodelyourWeb2.0component"></A>Using Implementation.Widget to model your Web 2.0 component</H3>
+
+<P>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.</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+&lt;composite xmlns=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//www.osoa.org/xmlns/sca/1.0&quot;</SPAN>
+</SPAN> xmlns:t=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//tuscany.apache.org/xmlns/sca/1.0&quot;</SPAN>
+</SPAN> targetNamespace=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//store&quot;</SPAN>
+</SPAN> name=<SPAN class="code-quote">&quot;store&quot;</SPAN>&gt;
+
+ &lt;component name=<SPAN class="code-quote">&quot;store&quot;</SPAN>&gt;
+ &lt;t:implementation.widget location=<SPAN class="code-quote">&quot;contents/store.html&quot;</SPAN>/&gt;
+ &lt;service name=<SPAN class="code-quote">&quot;Widget&quot;</SPAN>&gt;
+ &lt;t:binding.http/&gt;
+ &lt;/service&gt;
+ &lt;reference name=<SPAN class="code-quote">&quot;catalog&quot;</SPAN> target=<SPAN class="code-quote">&quot;Catalog&quot;</SPAN>&gt;
+ &lt;t:binding.jsonrpc/&gt;
+ &lt;/reference&gt;
+ &lt;reference name=<SPAN class="code-quote">&quot;shoppingCart&quot;</SPAN> target=<SPAN class="code-quote">&quot;ShoppingCart&quot;</SPAN>&gt;
+ &lt;t:binding.atom/&gt;
+ &lt;/reference&gt;
+ &lt;/component&gt;
+
+ .....
+&lt;/composite&gt;
+</PRE>
+</DIV></DIV>
+
+
+<H3><A name="SCAJavaimplementation.widget-DefiningreferencesinHTMLresources"></A>Defining references in HTML resources</H3>
+
+<P>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.</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-comment">//@Reference
+</SPAN><SPAN class="code-keyword">var</SPAN> catalog = <SPAN class="code-keyword">new</SPAN> Reference(<SPAN class="code-quote">&quot;catalog&quot;</SPAN>);
+
+<SPAN class="code-comment">//@Reference
+</SPAN><SPAN class="code-keyword">var</SPAN> shoppingCart = <SPAN class="code-keyword">new</SPAN> Reference(<SPAN class="code-quote">&quot;shoppingCart&quot;</SPAN>);
+</PRE>
+</DIV></DIV>
+
+
+<H3><A name="SCAJavaimplementation.widget-IncludinggeneratedJavaScriptclientproxy"></A>Including generated JavaScript client proxy</H3>
+
+<P>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.</P>
+
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+&lt;!-- one js include per sca component --&gt;
+&lt;script type=<SPAN class="code-quote">&quot;text/javascript&quot;</SPAN> src=<SPAN class="code-quote">&quot;store.js&quot;</SPAN>&gt;&lt;/script&gt;
+</PRE>
+</DIV></DIV>
+
+<H3><A name="SCAJavaimplementation.widget-Supportedbindingtypes"></A>Supported binding types</H3>
+
+<P>Currently, you can define references to remote services using the following bindings :</P>
+<UL>
+ <LI><A href="sca-java-bindingatom.html" title="SCA Java binding.atom">ATOM</A></LI>
+ <LI><A href="sca-java-bindingjsonrpc.html" title="SCA Java binding.jsonrpc">JSON-RPC</A></LI>
+ <LI><A href="sca-java-bindinghttp.html" title="SCA Java binding.http">HTTP</A></LI>
+</UL>
+
+
+<H3><A name="SCAJavaimplementation.widget-References"></A>References</H3>
+<P><A href="http://incubator.apache.org/tuscany/getting-started-with-tuscany.html" class="external-link" rel="nofollow">http://incubator.apache.org/tuscany/getting-started-with-tuscany.html</A></P>
+
+
+
+ </DIV>
+
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+
+ <!-- footer -->
+ <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
+ <TR>
+ <TD align="left" valign="middle" class="footer">
+ &nbsp;&nbsp;
+ <IMG src="http://static.delicious.com/img/delicious.small.gif" height="10" width="10" alt="Delicious">
+ <A href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=550,height=550'); return false;">Bookmark this on Delicious</A>
+ &nbsp;&nbsp;
+ <IMG src="http://digg.com/img/badges/16x16-digg-guy.gif" width="16" height="16" alt="Digg!">
+ <A href="" onclick="window.open('http://digg.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&topic=programming');">Digg this</A>
+ <!-- Slicker, but no text
+ <script type="text/javascript">
+ digg_skin = 'icon';
+ digg_window = 'new';
+ digg_title = 'Apache Geronimo v2.2 Documentation : SCA Java implementation.widget';
+ digg_topic = 'programming';
+ </script>
+ <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
+ -->
+ &nbsp;&nbsp;
+ </TD>
+ <TD align="right" valign="middle" class="footer">
+ <A href="http://cwiki.apache.org/GMOxPMGT/geronimo-privacy-policy.html">Privacy Policy</A>&nbsp;&nbsp;-&nbsp;&nbsp;
+ Copyright &copy; 2003-2010, The Apache Software Foundation, Licensed under <A href="http://www.apache.org/licenses/LICENSE-2.0">ASL 2.0.</A>&nbsp;&nbsp;
+ </TD>
+ </TR>
+ </TABLE>
+
+ </BODY>
+</HTML> \ No newline at end of file