Ola Paulo, comments inline On Mon, Jul 5, 2010 at 12:17 PM, Paulo Alvim <[email protected]> wrote: > > Hi Folks, > > > > I`m starting with SCA/Tuscany and I have a few conceptual questions: I need > to build some kind of “Dashboard/Portal” application composed by a “Dashboard > View” (a dynamic layout) and various dynamic Dashboard Gadgets that I’d like > to develop in a component model like SCA. > > > > In fact, I could use “Portlet JSR 268” but I would need a traditional “server > centric” Portal product – and my impression is that the portlet model is old > fashioned (although I’m not completely sure). I’d like to have only one SCA > (Java) component that should be able to: > > > > - FIRST: Serve “Web Static Content” (HTML5, CSS3 and Javascript files) to > be rendered in a dashboard panel/gadget area (this would probably be > persisted locally by using HTML5 Local Persistence) > > - SECOND: To keep RESTful Ajax interations with the client > > My questions are: > > 1. I didn't find examples of SCA components serving client content (HTML) > directly. The HTML/CSS/JS files are normally deployed in the client > application. But it’s a reasonable architecture? Is there any problems to do > that that I can't see (as a begginer)? > Here is an example of a service returning images, should be same scenario as the one you are describing, where you want to basically send resources back to client.
http://svn.apache.org/repos/asf/incubator/photark/trunk/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRImageCollectionImpl.java <!-- Component responsible for providing REST access to images --> <component name="ImageServiceComponent"> <implementation.java class="org.apache.photark.jcr.services.JCRImageCollectionImpl"/> <service name="ImageCollection"> <tuscany:binding.http uri="/gallery"/> </service> <reference name="repositoryManager" target="RepositoryManager"/> </component> You also mentioned you want to have a AJAX iterations between the client and the services, and you could also see an example of a "in-progress" REST API at http://svn.apache.org/repos/asf/incubator/photark/branches/photark-rest/ Some other examples are available in the binding-rest-runtime test scenarios https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/ > > 2. If it's reasonable: Must I deliver this component as a regular JAR or is > there another more appropriate format in SCA/Tuscany? > In SCA, you are "delivering" things as contributions, depending on how you are packing your application you can have jars, zips or even folder structures as contributions. > > 3. Does anyone have links (or arguments) about “portlet JSR268 x SCA”? > I don't think these two technologies compete with themselves. SCA would be used for assembling you services, where you would use JSR268 more towards providing portlets (ui pieces/widgets) that consume your SCA services. Having said that, I'm not sure if you are asking more towards replacing JSR268 with SCA, and if that is your question, let me put this way, you should be able to build your "ui" that integrates with your SCA Services as Portlets, JSPs following Java EE standards, Web 2.0 client applications (you might get some help of SCA Widgets), etc > > Thanks in advance! I intend to study Tuscany in depth but any tip at this > moment will help me a lot... > > Paulo Alvim > Brazil > -- Luciano Resende http://people.apache.org/~lresende http://twitter.com/lresende1975 http://lresende.blogspot.com/
