Models can be used for various purposes such as communication, documentation, design means, and for the generation of various artifacts including code. Nevertheless, as some ambiguities still exist in models, additional languages are required. To address this need, in the context of object-oriented modeling, the Object Constraint Language (OCL) was devised. Alternately, other languages including programming languages can be used for constraint specification. In this work we conducted a controlled experiment using USE and a Java framework we developed for that purpose, and compare the effectiveness of developing model-based constraints with respect to quality, time, and confidence. The results indicate that as Java is more familiar to the subjects than OCL, the time to develop the constraints utilizing the developed framework was shorter whilst the confidence was higher. However, despite the greater familiarity with Java, the constraints quality was better when using OCL and USE.