Saturday, October 10, 2009

Java-based Domain Driven Frameworks

Yesterday I'm browsing and exploring about Full-stack Domain Driven Application Frameworks written in the Java platform. The Java platform still has a lot of potential, but somehow the Rails framework tells me that we're still far from it, my exploration yesterday.
Here is a brief of the frameworks I read about:
  1. JMatter - This one I already use a few months back. The UI is pretty decent, but the lack of production quality web-based view technology.. makes it very far behind others. It currently only has production-grade Swing viewer, making it a two tier application platform. Security-wise, two-tier platforms are not good -> each client must have a database connection to the db server, which potentially could be abused. Has no authorization code built in. Actions on the entity written in the domain model, encapsulating business logics.
  2. OpenXava - Web-based GUI with some AJAX parts. Has no authorization code built in. Separates actions from domain model, the concept is that actions must be contained in controllers.
  3. Jspresso - Has multiple view (GUI) technology implemented - ULC, Flex, and WingS. Flex is Adobe's RIA technology, WingS is AJAX Web-based view technology. ULC I have no experience. The Reference manual somewhat not completed. Domain model not written in Java, it was written in spring beans XML. I havent figure out how to write business logic, but entity relationship stuffs seems to be complete. Class-based authorization and dynamic authorization (The docs were very hazy about this one - seems that this is authorization based on object's state but I havent' found out how to implement authorization based on object's owner).
  4. Nakedobjects - Currently only has Swing/AWT viewer (sorry, haven't got time to find out which is which) and HTML (web-based) viewer. Domain model written in Java, contains business logic (similar to JMatter). Class-based authorization.
  5. Trails - only has Tapestry viewer, which generates Web-based GUI. Domain Model in Java. Seems to be the only one that implement class based authorization and association-based authorization.
The feature I was looking for is association based authorization. But the thing is, OpenXava's view descriptor features seems to be most complete compared to others - makes me hard time thinking whether it is best to start with OpenXava or to start with Trails...


vvandens said...

Hi Yudhi,

I thought that you might have been ineterested in getting more insight on Jspresso dynamic authorization based on objects state. You will find below a forum thread as well as a small wiki article that explores it (you are right, the Jspresso doc still lacks a lot of stuff) :

Authorization based on ownership can be achieved by using the concept above. You have to declare an owner property on your entities, assign it automatically whenever the entity is saved for the 1st time using a lifecycle interceptor (based on the user session), and afterwards, build an authorization gate that opens/closes whenever the entity owner matches the session owner.

As for business logic, you can implement it as services offered by your entities (rich domain model, see or as actions.

As for the future, the next major release of Jspresso will include Qooxdoo ( UI as well as a Groovy DSL to describe the domain instead of wiring Spring beans in XML (but the latter will remain active for advanced usage). Such a DSL will be also be extended to view and application description.

Hope this makes things little clearer. Thanks for your interest in Jspresso !


Yudhi Widyatama said...

Seems that what I looking for is in the component writability gates (feature 2850085). Thanks for the info, Vincent..