You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by janandith jayawardena <ja...@gmail.com> on 2008/06/01 19:52:20 UTC

Sling/Scala weekly progress report.(26-05-2008 to 01-06-2008)

 Sling/Scala weekly progress report.

 Duration : 26th Monday 2008 to 1st June 2008.

 Progress:

    1. Setting up development environment in eclipse.

    2. Discovering the presence of an Interpreter in Scala compiler library.

    3. Created a standalone project to test the Interpreter.
        The interpreter takes input in a string and returns the result. Ex:
"4 + 2" gives "6".

    4. Writing code to use the Interpreter in Sling/Scala and building.
        I wrote code to use the interpreter for Sling/Scala based on  Ruby
ERBScriptEngine & ERBScriptEngineFactory.
        I hope to feed the string input using the reader like the eval
method of ERBScriptEngine and write output             using
scriptContext.getWriter().write(String).
        The bundle is loaded automatically but there are problems related to
this activity stated under problems.

Problems:

    Solved:

    1. Using maven in Eclipse.
    2. Creating the pom.xml for Sling/Scala using the correct Scala library
plug-ins.


    Unsolved:

    1. Getting the scala script to run in sling using Sling/Scala bundle
described under point (4) in Progress heading.
        I want the Interpreter in "eval(Reader script , ScriptContext
scriptContext)" to pick up a scala script and display results or dump it to
a log file. But I don't know the correct place to put the script and do this
correctly. I have also tried to run it using the examples provided in
reference [1] and [2]. I think I need more help on this.


Perspective:

    1. Fixing the unsolved problem and running the Scala Interpreter in
Sling.
    2. If successful in step 1 try to access content using scripts.


References :

  [1]
http://dev.day.com/microsling/content/blogs/main/slingrequestprocessrevisited.html
  [2]
http://incubator.apache.org/sling/site/discover-sling-in-15-minutes.html

Re: Sling/Scala weekly progress report.(26-05-2008 to 01-06-2008)

Posted by janandith jayawardena <ja...@gmail.com>.
Hi Bertrand,

I have created a jira issue to submit my code untill I'm able commit to the
google project. Hope it's fine for the moment.

janandith.

Re: Sling/Scala weekly progress report.(26-05-2008 to 01-06-2008)

Posted by janandith jayawardena <ja...@gmail.com>.
Hi Bertrand,

I clicked on the "join project" link at
http://code.google.com/p/sling-scala/. I think you have to add my e-mail
address to the group for me to view the project.
It's janandith@gmail.com.

I didn't post the ICLA yet. I will do it this Saturday sorry for the delay
:-).


janandith.

Re: Sling/Scala weekly progress report.(26-05-2008 to 01-06-2008)

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Janandith,

Thanks very much for your report!

On Sun, Jun 1, 2008 at 7:52 PM, janandith jayawardena
<ja...@gmail.com> wrote:
>  ...  3. Created a standalone project to test the Interpreter...

It would be good to commit this to the sling-scala project (see my
other mail) - we will probably not use it for Sling, but seeing what
you're doing will help us help you ;-)

> ...       I want the Interpreter in "eval(Reader script , ScriptContext
> scriptContext)" to pick up a scala script and display results or dump it to
> a log file. But I don't know the correct place to put the script and do this
> correctly. I have also tried to run it using the examples provided in
> reference [1] and [2]. I think I need more help on this....

Can you show us the problematic code? Maybe commit it to sling-scala?

-Bertrand