As I already mentioned before, we (me and Martin Gogolla) wrote an introductory guide to the OCL language . I’m attaching now the slides of the OCL tutorial talk I gave to present our OCL guide at the SFM’12 summer school.
You can also download a pdf version of the talk
In the summer school programme web page you’ll find many other presentations of great researchers so take a look!
If you liked this post, you should subscribe to the blog feed or facebook page and follow my thoughts on twitter about software development or web design and social media .
One of the most valuable features in .NET framework > 3.5 is LINQ and its lambda expressions. With them I am able to define conceptual restrictions in the domain model itself. If you know how to write OCL expressions as well sure you will be a master in LINQ expressions and would take the advantage from this skill.
Here is an introduction to LINQ Lambda Expressions sintax and methods:
http://msdn.microsoft.com/en-us/library/bb397687.aspx
http://msdn.microsoft.com/en-us/library/system.linq.enumerable.aspx
Cheers.
Is there any comparison between LINQ and OCL?
Since you know the two, which one you prefer?
On slide 10, shouldn’t the OCL invariant include the “age” attribute? As written I believe it states that a person must have at least 18 spouses.
You’re right, I’ll update the slides!