Yes, I´m a declared OCL fanboy (plenty of my research work revolves around OCL) but I truly believe that time has come for you to learn OCL (Object Constraint Language).
Let me give you just two powerful reasons for that:
- OCL is everywhere. You can use it to define constraints on models (and derivation rules, and init expressions, and operation contracts, etc) but also to define the well-formedness rules of new DSLs you design and, most likely, you´ll need to define any kind of model manipulation operation (e.g. OCL is used to define the matching patterns for model-to-model and model-to-text transformations)
- Without OCL, all you have are either inaccurate specifications (if you just a graphical modeling language like UML, you won’t be able to express all the information required to convey the exact information of the domain in the diagram) or ambiguos ones (if, to complement the graphical model, you decide to use annotations in natural language).
For the later, let me reuse a cartoon (from Far Side ) that John Mylopoulos , in his keynote talk at the ER’09 conference , used to illustrate the misunderstandings thay may occur when using informal modeling languages: there may be a huge difference between what we say and what others understand!!
A complete modeler needs OCL, UML (or any other graphical language) is only the tip of the iceberg when it comes to provide complete and precise specifications!!
And if you are now convinced and want to start learning OCL, check our brand new OCL tutorial
If you enjoyed this post you can subscribe to this Software Modeling blog , to the portal’s mailing list , follow me on twitter and/or participate in the forums . And if you really liked it help me pass it on to others by sharing the post using the links below. Don’t forget to check our consulting , advertising and code-generation services either!