Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A web2.0 style application's ability to present a dynamic and responsive interface relies on and an organizations ability to provide services for the application to interact. As you might expect Tuscany SCA is ideally placed to provides provide those services using popular technologies such as JSON, XML, RSS, Atom. From the Tuscany Java SCA store sample (samples/store) you can see a catalog service providing a service over JSONRPC

Code Block
SCDL showing component exposing JSON and RSS bound service

Here a browser based application can connect direct to the SCA sevices using the usual approach

Code Block

A snippet of java script showing JSON request
	<component name="Catalog">
		<implementation.java class="services.CatalogImpl"/> 
		<property name="currencyCode">USD</property>
		<service name="Catalog">
			<t:binding.jsonrpc/>
   		</service>
		<reference name="currencyConverter" target="CurrencyConverter"/>	
	</component> 

A browser based application can connect direct to such SCA sevices using a Javascript based JSONRPC proxy which Tuscany Java SCA will generate automatically.

Code Block

	catalog = (new JSONRpcClient("../Catalog")).Catalog;
        catalog.get(catalog_getResponse);

Clearly this catalog service would be any service your Web2.0 style application is required to communicate with. In this way you provide services to your Web2.0 style applications in the same consistent way that you provides services for other reasons in you enterprise.

Tuscany SCA supports Tuscany SCA support other modes of operation also, for example, Direct Web Remoting link is supported with bining.dwrthe Tuscant Java SCA Chat sample (samples/chat) uses binding.dwr to provide a Direct Web Remoting (https://dwr.dev.java.net/)connectionImage Added between the browser app and an SCA service. Using this binding service to browser communication is supported slongside alongside browser to service communication.

Script language based components component implementations can also be used. Tuscany SCA provides implementation.script. Those developers comfortable with writing browser based scripts can, for example, write service base java script components

...