The Model Development Tools Object Constraint Language (MDT OCL) project provides the building blocks for Model-Driven tools to weave OCL declarative specifications into software artifacts. We showcase some of these possibilities, taking as starting point a plug-in to visualize OCL abstract syntax trees (ASTs) in the form of annotated trees. This example motivates some practical tips about patterns for OCL visitors, including using Java 5 generics and achieving conciseness by letting MDT OCL take care of the “walking” order. To really reap the benefits of OCL-enriched specifications, tools in our modeling chain have to be able to transform such expressions into the target software platform (e.g. compile into Java, translate into SQL). Work in this area is summarized, to ease jump-starting your own OCL processing project.
This article has me brainstorming how I can use the OCL in an example.
I also added an excellent new book titled “Eclipse Web Tools Platform: Developing Java Web Applications” to the resources page. This book, authored by Naci Dai, Lawrence Mandel, and Arthur Ryman is great source of information about the Eclipse Web Tools project. I spoke with Naci Dai about web tools at EclipseCon; the podcast from that conversation is here.