What’s New in Sculptor 2.0?
There are great possibilities for extensibility and customization.
Version 2.0 of the Sculptor productivity tool
has just been released with new support for mixin composition and
REST. In this interview, JAXenter speaks to Sculptor founder,
Patrik Nordwall, on what’s new in this release.
JAXenter: Can you give us an introduction to
the Sculptor tool?
Patrik Nordwall: Sculptor is an open source
productivity tool. You express your design intent in a textual
Domain Specific Language (DSL), from which Sculptor generates high
quality Java code and configuration. The concepts from
Domain-Driven Design is used in the DSL.
The DSL and the code generation drives the development and is
not a one time shot. The application can be developed incrementally
with an efficient round trip loop.
The generated code is based on well-known frameworks, such as
Hibernate and Spring. Sculptor is useful when developing typical
enterprise or web applications that benefit from a rich and
persistent domain model. Sculptor also provides a sophisticated
CRUD GUI for administrative sections of the application or to serve
as a scaffolding for your manually created pages.
JAXenter: What technologies are at work, in
Patrik: The DSL is developed with Xtext and
code generation is done with Xpand and Maven. There are great
possibilities for extensibility and customization. You can pick ‘n’
choose target implementation. Hibernate or EclipseLink as JPA
provider with Oracle, MySQL, PostgreSQL, or in-memory HSQLDB as
database. MongoDB and AppEngine datastore are also supported.
Spring or EJB3. Jetty, Tomcat, JBoss, or Google AppEngine. GUI with
JSF and Spring Web Flow, Eclipse RCP, or GWT SmartClient.
Integration with Apache Camel and Spring Integration. REST with
JAXenter: Mixin composition was added to the
recently released Sculptor 2.0. What are the benefits of mixin
composition in Sculptor?
Patrik: I think one of the best features in
Scala is traits. Using traits it is possible to compose small
pieces of behavior and state in an elegant way. I miss traits when
I use Java. To mitigate that problem I have implemented support for
traits in Sculptor.
Similar to interfaces in Java, traits are used to define object
types by specifying the signature of the supported methods. Unlike
interfaces, traits can be partially implemented; i.e. it is
possible to define implementations for some methods. Similar to
abstract classes, but you don’t have to waste
your single inheritance opportunity.
Examples of how this can be used, are available at our blog.
JAXenter: The logging API has been changed from
Commons Logging with Log4j to SLF4J with Logback for this release.
What is the reason behind this change?
Patrik: We think our users want to use the best
logging API and implementation. Some users still need to use Log4j,
and that is no problem since SLF4J allows many backends and also
has special bridges for many (legacy) logging frameworks.
JAXenter: What are the next steps for this
Patrik: We will soon support JPA2. We will add
OpenJPA to the list of supported of JPA providers. The query DSL
that is part of Sculptor is currently only implemented for
Hibernate and MongoDB. With JPA2 it will be available for all JPA