DaliCore, user-generated content on top of Java EE.

Most of the projects we have been doing at LodgON over the past few years
have “something” to do with users and content. From a technical point,
these projects typically require persistent storage, scalability,
transaction support and other technologies that are offered by Java
Enterprise Application Servers. Apart from these standard technologies, there
are a number of common functions that we encountered in many projects,
and that also require the basic technologies offered by the Java EE
specification. At LodgON, we created the DaliCore code that is built
on top of the Java Enterprise specification and that adds functionality
commonly encountered in projects related to end-users and (their) data.

About DaliCore

From a functional point, DaliCore is a logical extension of the Java Enterprise
specification. The Java EE specification defines the common infrastructure
needed for a wide range of enterprise applications. It does not
contain domain-specific specifications. This is what DaliCore aims to do
in the domain of social networking and user-generated content.

In a number of projects, one should be able to create user profiles, to
add content, to assign roles and permissions, to query, tag, search and manage
all the users and data. The DaliCore contains a set of REST handlers,
Session Beans and Persistence Entities to achieve this.

Stabilize a moving target

The story of DaliCore is probably not very different from software development
in a number of companies. While doing projects, developers try to reuse and
improve existing code. The fact that the code is continuously improved by
adding new features and removing old features, or by reorganizing some of the
concepts makes it difficult to package it as a “product”.

This also happened inside LodgON. Most of the projects we were doing required
more or less the same conceptual behavior, and lots of code was reused.
However, major changes in underlying technology and minor changes in concepts
caused the “reusable codebase” to be a moving target.

This has changed now. For most of the projects we worked on during the last
months, we used code from an internal repository called DaliCore. There are
a number of reasons why we were able to make the functionality more stable:

  • We use Java EE 6. The Java EE 6 specification makes it much easier to
    create, implement and use domain-specific tools. DaliCore is built on
    top of Java EE. The easier Java EE, the easier to use DaliCore.
    With the release of Java EE 6, a major step towards simplification has
    been set.

  • We use Glassfish. The Jersey implementation in Glassfish allows an
    easy REST-based client-server model that is fully interoperable with the
    model of using Session Beans. Development for Glassfish using NetBeans is
    easier than before.

  • DaliCore provides both a REST interface and an EJB approach. This allows
    our own developers and third parties to either extend DaliCore by extending
    the code or by importing the Jar in a project, as well as to use it as a
    standalone WAR, and call the REST interface to use the functionality from
    a project in any language that supports REST.

  • Maturity of the concepts. LodgON has been working on community projects
    for more than 5 years. We see that the concepts are now more wide-spread
    and accepted.

Open Source

We are in the process of making DaliCore open-source. We didn’t do this before, since the
concepts and functionality were changing rapidly. For third-party
developers, it is not very motivating if they have to change their
approach too often. But since we now feel confident about the concepts, we
don’t expect frequent major changes. That said, we are very open to
ideas and contributions from others.

Sometimes, code is made open-source in a final attempt to get it working.
This is absolutely not the case with DaliCore. We are using it in a number
of commercial projects that are very demanding, and really, it works great. We also
do not plan to reduce our own development resources on it, at the
contrary. Also, we are very aware that our end-customers do not want a
technical product, but an end-to-end functional project. Hence, the
added value is mainly in using DaliCore in projects, and build
some customer-specific functionality around it or on top of it.

Finally, I strongly believe in Open-Source Java projects. These are
exciting and turbulent times for Java developers. We all have our own,
personal likes and dislikes, but we all use Java. Being open about what
we use, why and how we use it, can only help other developers. Some
Open-Source projects are welcomed by lots of developers, others stay
small projects. And that is how it should be. Let the community decide.

I don’t claim DaliCore is the best code for every project. We use it
internally and are happy with it, but it is up to you to decide if and
how you want to use it.
We are working on making the code and documentation easily available.
For now, check out
http://lodgon.com/lodgon/DaliCore.html or mail me at johan (at) lodgon.com.

My opinion about JavaFX 2.0

It’s been a few weeks since Oracle announced the plans with JavaFX.The JavaFX 2010-2011 roadmap is described at the JavaFX website. AsI expected, there were many discussions and opinions in the blogosphereafter the announcement. I took some time to read opinions, and to makemy own impact estimations.

Java

In general, I always applaud the move towards more Java.I am a Java developer, so the more Java the better for me.There are many reasons why I like JavaFX to be an integral part of theJava runtime. Every developer probably has his own list, here is mine:

  • Access the latest and greatest JDK features
  • Generics and Annotations can be used in JavaFX
  • Less confusion in concepts (should I make this a Java or JavaFX class?)
  • Less confusion in grammar (Foo foo = new Foo() or Foo {})
  • Existing tools for Java work for JavaFX (i.e. format, auto-complete,…)
  • No separate download for end-users

Apart from the move to Java, one of the major things is Prism. We heard a lotabout Prism already, and my personal summary is that Prism is “THE graphicalengine for applications in 2010+”, where AWT was the graphical engine inJava in the late nineties.

Timeline

For the projects I am working on, the new roadmap is a positive thing.The major drawback of the roadmap is the timeline. Developing in JavaFX 1.3.1is still encouraged, and Oracle will probably provide some script orguidelines to migrate JavaFX 1.3.1 code to JavaFX 2.0.
But if Oracle wants to be a winner in the RIA market, things should happenfaster. I understand quality matters, and I fully agree. One of thecritics I heard about “good old Sun” is that Sun often over-promised andcouldn’t deliver. I partly agree with that. A number of in-house, closed doorprojects were not as good as promised. But, and here I go again with mycomparison, look at the Glassfish project.

Lessons learned from the Glassfish project

From the very beginning, the Glassfish team created and communicated a roadmap.The goals were clear from day 1, but also the architectural documents,discussions and code was made available.
Having the goals clear creates high expectations fromusers and customers. Having the code and discussions open, allows developersto help, and it generates early feedback. When Glassfish x.y is released,there won’t be negative surprises, since it is something that was alreadyavailable in the community during development. Developers clearly knowwhat is going on. If they need things faster, they are free to help andcontribute. Of course, the quality assurance is still in internal hands.Not everyone is allowed to commit patches to the core functionality. Butthat is not needed. The developer community is allowed to help, and it isup to Oracle to decide what do with the code.

I strongly encourage the same concept for JavaFX development. The JavaFXteam at Oracle is great, lots of clever people. I was glad I could talkwith some of the core JavaFX developers (e.g. Richard Bair, JasperPotts, Jonathan Giles and Amy Fowler) during JavaOne. Those are excellentpeople doing a great job. Add the power of the development community tothis team, and JavaFX 2.0 will be a success.

JavaFX script and Visage

The JavaFX community has mixed feelings on the fact that Oracle won’tcontinue the investment in JavaFX script. That means that Oracle won’tcontinue to develop the JavaFX Script Compiler. Some people like thisdecision, others are extremely disappointed.
That sounds very reasonable. JavaFX script is a DSL with somespecific characteristics. I don’t believe there is a single languagethat is “best” for all developers. The way developers think, the waythey see (or don’t see) concepts and structures makes one oranother language the most suitable to them. Some people see feature Xof Scala as an advantage, others see it as a disadvantage. There is no”best” answer.

At JavaOne, Stephen Chin announced Visage, a “new” DSL that is actually the continuation ofJavaFX script with modifications. The great thing about this is thatit is a DSL that is developed in the Open Source, with input from thecommunity.
I am convinced that Visage is a great language for at least a number ofdevelopers. One of the good things about JavaFX 2.0 (and Java in general)is the increasing support for DSL’s that can leverage the Java platform.Developers use the language of their own choose (Java, Visage, Scala,…)and their code runs on the Java platform. That is an incredible strongpoint of the Java Platform.

Overall, I am happy with the JavaFX 2.0 plans. But I am convinced thedeveloper community should be involved, in order to increase thechances on success.