... Let's not forget that in most J2EE settings, we don't want the physical database connection to be closed when we call "close()" on the Connection object...
... 1. Excess complexity 2. No precondition, postcondition, or class invariant validation 3. Cannot add new methods to an existing interface in a later version...
Elliotte Harold
elharo@...
Sep 1, 2006 10:06 am
17734
Hi, Please provide some info on Junit testing of web services. I am sure someone has done it. Cheers. vk....
... Nope. Never done that. And I've already mentioned that any problems with third party database drivers _will_ show up in integration, funtional, performance...
... Generally, a few minutes using one of the major search engines will return plenty of suitable candidate packages. I just spent ten seconds typing "junit...
Hi Elliotte, ... Fair points. Interfaces do add some complexity, but they also buy you flexibility and extensibility, so I'd be sure to always weigh these...
... No, they don't. The checking isn't as clean as it is in a language like Eiffel that makes these parts of the language, but it's absolutely possible. For...
Elliotte Harold
elharo@...
Sep 1, 2006 5:22 pm
17741
... They make receiving a message more complex, it's true. They make sending a message much simpler. Or rather, they add more lines of code on the receiving...
... This path leads to madness. Every class that you'd like to extend, without modifying, will result in a hierarchy. If these classes are already in a...
... At best, unit tests verify that *my* code is not violating my preconditions. They do nothing about verifying that *your* code is not violating my...
Elliotte Harold
elharo@...
Sep 1, 2006 11:00 pm
17744
... I'm not sure I believe the second part. In practice, replacing a concrete-class based solution with an interface-based solution expands the complexity for...
Elliotte Harold
elharo@...
Sep 1, 2006 11:01 pm
17745
... Indeed it does, but the real world is madness itself. Hence the popularity of this approach, because despite the added complexity on the API developer...
I am also working on WebServices and need guidance on JunitTesting of WebServices. i have tried using WSDL to Java in Eclipse platform using -t arguments. Then...
... Why do you worry about me? I'll write my own unit tests, you concentrate on yours. It is not your job to debug my code. Now, maybe you are building a...
... That's not what I was saying. If you use the Interface Segregation Principle, you can't pass an IAccount2 to someone expecting an IAccount. Which makes...
... But you can't do that with an interface. At a minimum you need Document doc = Factory.newDocument(); ... In Java, if the public interface of the class...
Elliotte Harold
elharo@...
Sep 3, 2006 10:40 am
17752
... It is my job to make sure my code works. I can't do that if the code that calls it violates my preconditions and class invariants. For detailed elaboration...
Elliotte Harold
elharo@...
Sep 3, 2006 10:42 am
17753
... The essence of design by contact is that you advertise what you need so that you don't have to check. Bertrand Meyer was trying to come up with a set of...
... I'm confused. I always thought a precondition is something that says "if you violate me, there is no guarantee what the code will do". Curious, Ilja...
... In well written code, *anything* a client does gives specified results. In the event of a precondition violation that result will usually be an ...
Elliotte Harold
elharo@...
Sep 3, 2006 6:52 pm
17757
... I think you've misunderstood Meyer. He wanted to make the checks easier to write. He didn't think they shouldn't happen. Providing correct input data is...
Elliotte Harold
elharo@...
Sep 3, 2006 6:55 pm
17758
... Those sound like very personal definitions of both "well written" and "precondition" to me. Take care, Ilja...
... No, the point of preconditions is really to make responsibility clear. People often place too much emphasis on their runtime aspect. Regardless, you can...
... Nope. That's pretty much counter to Design by Contact. Do you have a copy of Meyer's Object Oriented Software Construction? If you do, I can point you...