0



14Sep2012

ScalaWCS 0.1 released

Hi all.

My first code drop of the ScalaWCS is on GitHub.

It is informally 0.1 (not even tagged as such actually), but it is not really yet usable because of the lack of a Scala API, and the documentation is still very rough.

So please don't expect to go there and use it, please give a look and let me know what you think if you like.

However some planned key features are already there. Here there are a few:

Dispatcher to Scala is in place

The basic idea is that every template will be replaced by a simple Dispatcher with this body:

<%=wcs.boot.WCS.dispatch(ics)%>

This body will invoke a corresponding Scala class.

For a CSElement, the class will be in app.CSElement, for a template in app.Template. Then the name of the class is Type.Name, where Type is the name of the type (or Typeless if no type)

Examples:

CSElement swWrapper will invoke class app.CSElement.swWrapper.

Template Typeless swLayout will invoke class app.Template.Typeless.swLayout.

Template swBody for Page will invoke class app.Template.Page.swBody.

Hot code loading is working.

You have to deploy a stub in WebCenter Sites, then all the code is deployed in a jar that is dynamically reloaded when you rebuild it. Combined with the continous packaging of SBT, you get the effect "code" then "reload the page" to see the results.

Tag API is wrapped in Scala

All the tags can be called in Scala: I generated  a wrapper for each of them from the TLD so you can call a tag as simply as you would invoke a method.

What is left to do?

A lot. Here is the plan for 0.2

  • integrate csdt  so you can invoke it from sbt
  • implement the planned Scala API
  • create a reference site
  • create a Mock for ICS so you can unit test templates
and this is a list for 0.3
  • integrate catalogmover in sbt
  • wrap url assemblers in Scala
  • wrap filters in scala

 

Posted by msciab
14Sep2012