Hi Tobias,

On Nov 23, 2007, at 8:32 AM, Tobias Crawley wrote:

Chuck:

What tools do you (or anyone else on the list) use for DBC? In your book you discuss Jass, and you provide Jass4Eclipse (http:// www.gvcsitemaker.com/jass4eclipse/ant_builder). Is that what you still use?

Not exactly. That plugin was for Eclipse 2. I never converted it to the Eclipse 3 API (tried, failed, was too busy to learn the rest of the API, never got back to it...). So now we have a custom Ant build that we run that builds Jass. It is somewhat slow but better than no DBC.


It would be nice to have something that did not require preprocessing, and Contract4j5 (http://www.contract4j.org/) seems to provide that (after a cursory look).

I was so excited when I found Contract4J5. I ripped out all the Jass contracts from a project, replaced them all with C4J annotations. Everything was great! Then I started running some tests. Wow. Slow does not even begin to describe it. Glacial. Seconds of unit tests without DBC became HOURS with Contract4J. There has to be a bug in there, it is insanely slow. I have been corresponding with the author but so far he has not found a / the problem and I have not had time to dig into it. It is a very nice implementation, but unusable for me.

There is an annotation based version of Jass out, http:// modernjass.sourceforge.net/ However, sigh, it is only for Java 6. So trying that out will have to wait for Apple to release Java 6 on OS X.


Chuck


On Nov 22, 2007, at 9:45 PM, Chuck Hill wrote:

I also use Design by Contract with greatly reduces the need to write unit tests as much of the code tests itself. I try to keep in mind "only test what can break" as "only test what you might have possibly written incorrectly" and don't write tests for very simple methods. Test what is useful to test, don't test things just because you can.


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to