Hi,

Am Montag, den 22.11.2010, 10:54 +0800 schrieb Vicary Archangel: 
> On Sat, Nov 20, 2010 at 3:46 AM, Justin Edelson 
> <[email protected]>wrote:
> 
> > On 11/19/10 1:43 PM, Vicary Archangel wrote:
> > > Hi Justin,
> > >
> > > On Sat, Nov 20, 2010 at 12:39 AM, Justin Edelson <
> > [email protected]>wrote:
> > >>
> > >> Have you looked at just running BlazeDS or LCDS inside Felix/Sling? That
> > >> seems much simpler than writing your own RTMP server.
> > >>
> > >> Justin
> > >
> > >
> > > Thanks for the advise.
> > >
> > > It seems just a bit outta my expectation and interest if I run those
> > > Java thing
> > > inside Sling. My original thought is making the whole thing from back to
> > > front
> > > with JavaScript. (Says MongoDB at the back, along with Flash / AJAX)
> >
> > Out of the box, Sling's scripting harness only get invoked as part of
> > HTTP request processing. You'll have to write some bridge code in Java
> > to do something else.
> >
> > As I said, I don't know why you would do this instead of just using
> > BlazeDS.
> >
> > Justin
> >
> > >
> > > When there is already open source products there in Java, I believe
> > porting
> > > the
> > > whole thing into OSGi bundles will be only a handful of tasks.
> > >
> > > All I need is to confirm the ability of Sling in handling most of the
> > common
> > > used
> > > LCDS functionalities, before I start anything.
> > >
> > > Vic
> > >
> >
> >
> Yeah, you're right. If this is only to achieve the functionality, I can use
> anything. I can even have some workarounds in my apps and stick to my
> existing PHP classes.
> 
> When there is so much frameworks and Java web servers out there, I feel the
> fun comes from the unity of scripting languages in both client and server
> sides.
> 
> My first thought when I saw Sling is that an OSGi launchpad that supports
> scripting in processing requests in all three languages (JSP, SSJS and
> Scala), and doing everything Java supports (through calling OSGi bundles
> from the scripts). But what I learned is just a small portion of process is
> "scriptable".

What do you mean by "a small portion" ? Point is, that almost complete
request processing is in fact scriptable. The only things not scriptable
is the work being done by Sling on behalf of the developer:

  * Find the data to work on by resolving the URL. We present this
     as an instance of the  Resource interface to the request
  * Find a script or Servlet to call to process the request

The Script or Servlet can be written in plain Java (mostly regular
servlets) or any scripting language providing support for JSR 223 (Java
Scripting API). You are most interested in JavaScript it seems, so you
get this out of the box with Sling by our use of the Rhino
implementation.

Of course this is somewhat different to traditional web applications,
where the URL generally is first resolved to a Servlet being called and
the servlet then has to access/find the data itself.

Regards
Felix

> 
> There's nothing wrong with Sling, the concept does wiki and content driven
> websites very well. Just I might have gone a wrong place I guess.
> 
> Thanks for all of you in this thread anyways, you guys are really helpful.
> 
> Vic.


Reply via email to