Lars Trieloff wrote
> Hi Michael, Felix,
> 
> I think what Michael needs when he refers to Microsling is a scriptable
> Sling. This means that all the core aspects of Sling:
> 
> - request handling
> - error handling
> - request filtering
> - response filtering
> - repository events
> - timed events (cron jobs)
> 
> are scriptable. I think this is a reasonable request and would allow
> users to build powerful web applications in the script language (or even
> servlets) they prefer.
> 
I'm not sure if we really need to do something special for scripts in
these areas. If it's possible to extend Sling with a Java
component/service then someone should be able to implement a bridge for
hooking in the favorite scripting language at this place.

The list above mentions "timed events (cron jobs)" - now, we have
support for this in Sling (the event and scheduler modules) based on the
OSGi event handling. In other words, it's possible to fire events at a
specific time. There can be a listener for this event - this is an OSGi
service. Now I think this is all we need to provide for users, if people
really want to script such a listener with a different language, then
it's possible to provide a bridge here.

But what is the benefit of using scripts in these places? Handling
events for instance is something which usually affects the business
logic and not the display logic. I see a point of using scripting
language for display logic :)

And especially in the case of filters this might all be very difficult
to setup, like getting access to the repository, using the right user
context etc.

I think, one is able to get and call (evaluate) a script using the
ScriptResolver, so writing a component that gets a script from a
specific path and executes it, its easy and imho sufficient for mosto f
these use cases.

Carsten


-- 
Carsten Ziegeler
[EMAIL PROTECTED]

Reply via email to