summaryrefslogtreecommitdiffstats
path: root/site/trunk/site-publish/sca-developer-guide.html
diff options
context:
space:
mode:
Diffstat (limited to 'site/trunk/site-publish/sca-developer-guide.html')
-rw-r--r--site/trunk/site-publish/sca-developer-guide.html161
1 files changed, 161 insertions, 0 deletions
diff --git a/site/trunk/site-publish/sca-developer-guide.html b/site/trunk/site-publish/sca-developer-guide.html
new file mode 100644
index 0000000000..d8dab31142
--- /dev/null
+++ b/site/trunk/site-publish/sca-developer-guide.html
@@ -0,0 +1,161 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+ <HEAD>
+ <LINK type="text/css" rel="stylesheet" href="http://people.apache.org/~svkrish/tuscanySite/style/default.css">
+ <LINK rel="SHORTCUT ICON" href="http://cwiki.apache.org/confluence/display/TUSCANY/$images/favicon.ico">
+ <TITLE>SCA Developer Guide : Apache Tuscany</TITLE>
+ <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+
+ <BODY onload="init()">
+
+ <TABLE valign="top" border="0" cellspacing="0" cellpadding="0" width="100%" background="http://people.apache.org/~svkrish/tuscanySite/images/TuscanyLogoNEW_Text_120px_bg.jpg">
+ <TR>
+ <TD valing="top" align="left">
+ <A href="http://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=TUSCANY&title=$siteroot"><IMG src="http://people.apache.org/~svkrish/tuscanySite/images/TuscanyLogo.jpg" border="0"></A>
+ </TD>
+
+ <TD width="100%">
+ &nbsp;
+ </TD>
+ <!-- Adds the edit page link to the top banner-->
+ <TD valign="bottom">
+ <DIV style="padding: 2px 10px; margin: 0px;">
+ <A href="http://cwiki.apache.org/confluence/pages/editpage.action?pageId=46583">
+ <IMG src="http://people.apache.org/~svkrish/tuscanySite/images/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A>
+ </DIV>
+ </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="home.html" title="Apache Tuscany">Apache Tuscany</A>&nbsp;&gt;&nbsp;<A href="home.html" title="Home">Home</A>&nbsp;&gt;&nbsp;<A href="java-sca-subproject.html" title="Java SCA Subproject">Java SCA Subproject</A>&nbsp;&gt;&nbsp;<A href="sca-java-documentation.html" title="SCA Java Documentation">SCA Java Documentation</A>&nbsp;&gt;&nbsp;<A href="" title="SCA Developer Guide">SCA Developer Guide</A>
+ </TD>
+
+ <TD align="left" valign="middle" class="topBarDiv" nowrap="true">
+ <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/ws-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 align="left" valign="top">
+ <DIV id="PageContent">
+
+ <DIV class="pagecontent">
+ <DIV class="wiki-content">
+ <TABLE class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><TBODY><TR><TD class="confluenceTd" valign="top" width="15%">
+<DIV class="panel" style="border-style: solid; border-color: #C3CDA1; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #C3CDA1; background-color: #C3CDA1; "><B>General</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1; ">
+<P><A href="home.html" title="Home">Home</A><BR>
+<A href="events.html" title="Events">Events </A><BR>
+<SPAN class="nobr"><A href="http://www.apache.org/licenses/LICENSE-2.0.html" title="Visit page outside Confluence" rel="nofollow">License <SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN><BR>
+<SPAN class="nobr"><A href="http://www.apache.org/" title="Visit page outside Confluence" rel="nofollow">ASF <SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P>
+</DIV></DIV>
+<DIV class="panel" style="border-style: solid; border-color: #b4b4b5; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #b4b4b5; background-color: #C3CDA1; "><B>Community</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1; ">
+<P><A href="getting-involved.html" title="Getting Involved">Get Involved</A><BR>
+<A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A><BR>
+<A href="issue-tracking.html" title="Issue Tracking">Found a Bug?</A><BR>
+<SPAN class="nobr"><A href="http://apache-tuscany.blogspot.com/" title="Visit page outside Confluence" rel="nofollow">Blog <SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P>
+</DIV></DIV>
+<DIV class="panel" style="border-style: solid; border-color: #b4b4b5; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #b4b4b5; background-color: #C3CDA1; "><B>Tuscany SCA</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1; ">
+<P><A href="sca-overview.html" title="SCA Overview">SCA Overview</A><BR>
+<A href="java-sca-subproject.html" title="Java SCA Subproject">SCA Java</A><BR>
+<A href="sca-cpp.html" title="SCA CPP">SCA Native</A><BR>
+<A href="php-sca.html" title="PHP SCA">PHP SCA</A><BR>
+<A href="sca-downloads.html" title="SCA Downloads">Downloads</A></P>
+</DIV></DIV>
+
+
+<DIV class="panel" style="border-style: solid; border-color: #b4b4b5; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #b4b4b5; background-color: #C3CDA1; "><B>Tuscany SDO</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1; ">
+<P><A href="sdo-overview.html" title="SDO Overview">SDO Overview</A><BR>
+<A href="sdo-java.html" title="SDO Java">SDO Java</A><BR>
+<A href="sdo-cpp.html" title="SDO CPP">SDO C+&#43;</A><BR>
+<A href="sdo-downloads.html" title="SDO Downloads">Downloads</A></P>
+</DIV></DIV>
+<DIV class="panel" style="border-style: solid; border-color: #b4b4b5; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #b4b4b5; background-color: #C3CDA1; "><B>Tuscany DAS</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1; ">
+<P><A href="das-overview.html" title="DAS Overview">DAS Overview</A><BR>
+<A href="das-overview.html" title="DAS Overview">DAS types</A><BR>
+<A href="das-downloads.html" title="DAS Downloads">Downloads</A></P>
+</DIV></DIV></TD><TD class="confluenceTd" valign="top" width="85%">
+
+<P><B>There's nothing to it.</B> Really. Seriously, one of the main goals of Tuscany and SCA is to avoid imposing rules and requirements on how people write applications. We want to let people write application code the way they want without being concerned about the environment in which it will be used. After all, writing code to handle plumbing just gets in the way of writing the interesting stuff. So basically, you write the code for interesting bits, and Tuscany provides the environment that lets it run.</P>
+
+<P>As a result of that, this guide does not actually contain a lot of gory details on how to write an application for SCA. What it does contain is a description of the information that Tuscany uses to figure out how to run your code, the things that it can handle, and the things that it can't. As part of that it provides guidelines and best practices that you can use to make your code easier for others to use or that allow it to run in more places. This guide also describes the different environments that Tuscany supports (such as command line clients or web applications) and how to package up applications to run in them.</P>
+
+<H2><A name="SCADeveloperGuide-Components"></A>Components</H2>
+
+<P>The basic building block for SCA is a component. When you're writing code for SCA, you are typically writing code that will either be the implementation of a component or will be used by such an implementation.</P>
+
+<P>An SCA component follows the <SPAN class="nobr"><A href="http://www.google.com/search?q=Inversion%20of%20Control" title="Visit page outside Confluence" rel="nofollow">Inversion of Control<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN> design pattern with Tuscany providing the controlling framework. A typical component can be illustrated as:<BR>
+<DIV align="center"><IMG src="sca-developer-guide.data/component.png" border="0"></DIV><BR>
+where</P>
+<UL>
+ <LI>Services describe the function this type of component provides</LI>
+ <LI>References are dependencies this type of component has in order to function</LI>
+ <LI>Properties define configuration parameters for this type of component</LI>
+ <LI>Intents describe assumptions this type of component has on how it will be used</LI>
+ <LI>and Implementation is some code that actually does the work (i.e. what a developer writes)</LI>
+</UL>
+
+
+<P>Although the Tuscany runtime is written in Java, the implementation of a component can be in other languages some of which may be more suitable to the form of implementation than Java code (for example, BPEL for business processes or XSL-T for transformations). How the services, references, properties and intents are defined for an implementation is specific to that particular implementation type; Tuscany provides several including:</P>
+
+<UL>
+ <LI><A href="java-implementation.html" title="Java Implementation">Java</A> for POJO style components</LI>
+ <LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANY&title=JUnit%20Implementation&linkCreation=true&fromPageId=46583" title="Create Page: JUnit Implementation" class="createlink">JUnit<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN> for integration testing of SCA components</LI>
+ <LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANY&title=Spring%20Implementation&linkCreation=true&fromPageId=46583" title="Create Page: Spring Implementation" class="createlink">Spring<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN> for integrating Spring components</LI>
+ <LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANY&title=JavaScript%20Implementation&linkCreation=true&fromPageId=46583" title="Create Page: JavaScript Implementation" class="createlink">JavaScript<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN> for components written in JavaScript</LI>
+</UL>
+
+
+<P>Please see each sub-section for detailed information on implementing components in any of these languages.</P>
+
+<H2><A name="SCADeveloperGuide-Composites"></A>Composites</H2>
+<P>Individual components like those above can be used on their own, or they can be grouped together to form composite components. A composite is a type of component whose implementation is not code but an aggregation of other components co-operating to provide Services as a whole. A composite provides Services, has References to other dependencies, and can be configured using Properties in just the same way as individual components can.</P>
+
+<P>The typical implementation of a composite is described using XML defined by the SCA Assembly Specification (known as SCA Component Definition Language or SCDL). For information on how this is used in Tuscany, please see:</P>
+<UL>
+ <LI><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANY&title=Composite%20Implementation&linkCreation=true&fromPageId=46583" title="Create Page: Composite Implementation" class="createlink">Composite<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<P>&gt;&gt; Comment: Is this a good place to talk about wires? We talk about wires in the next section for the first time and it is out of context</P>
+
+<H2><A name="SCADeveloperGuide-DomainAssemblies"></A>Domain Assemblies</H2>
+
+<P>The implementations of components above, either individual or composite, all form reusable units that can be run multiple times in different environments (in much the same way as you have multiple instances of a Java class). A component becomes instantiated when it is actually used in an SCA environment. This is done by using it as part of the assembly of an SCA Domain.</P>
+
+<P>SCA Domains can vary in size from the very small to the very large:</P>
+<UL>
+ <LI>a very small domain could be one within a test environment inside an IDE</LI>
+ <LI>a medium sized domain could be a single server or small cluster supporting a single application</LI>
+ <LI>a large domain could describe all the services within a department or company</LI>
+</UL>
+
+
+<P>A domain is self-defining - it is what it is. It is really just a coherent grouping of components that are working together, connected to each other using SCA wiring. In a large domain there may be all sorts of policies about where components can run and how they connect to each other or to external services but during development the goal is to make that <B>Someone Else's Problem</B> as all that baggage really just gets in the way of writing code.</P>
+
+<P>Making it <B>Someone Else's Problem</B> though does mean that at some point you need to hand them the implementations that you have been developing. This generally goes better if the code being handed over has been well tested and packaged up nicely (sometimes with a bow on it). Tuscany provides some build-time tools to help with this:</P>
+<UL>
+ <LI>A <SPAN class="nobr"><A href="http://incubator.apache.org/tuscany/plugins/tuscany-itest-plugin" title="Visit page outside Confluence" rel="nofollow">itest Maven plugin<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN> to support integration testing</LI>
+ <LI>A <SPAN class="nobr"><A href="http://incubator.apache.org/tuscany/plugins/tuscany-war-plugin" title="Visit page outside Confluence" rel="nofollow">war Maven plugin<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN> to package a self contained web application</LI>
+</UL>
+
+</TD></TR></TBODY></TABLE>
+ </DIV>
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+
+ <DIV class="footer">
+ Copyright &copy; 2003-2007, The Apache Software Foundation&nbsp;&nbsp;
+ </DIV>
+
+ </BODY>
+</HTML> \ No newline at end of file