Andrew Ho writes: > On Sun, 9 Nov 2003, David Forslund wrote: > > > The "magical" things are much stronger type checking > > Dave, > Zope can also does Type checking - as strong as you like. The difference > is the existence of a mandatory "interface description and gateway" layer. > There are certainly pros and cons to having this layer. My point (with the > "help" method example) was that we can have this layer in Zope too - it is > just not mandatory. > > ... > > My server will never even see a call to be processed for an error, if the > > argument types don't match up. > > Even if the argument types match up, you can still experience an error. > Thus, an "interface description and gateway" layer does not preclude the > need to handle error and perform input checks inside the application code. > Certainly, but I don't see any requests that have incorrect data types.
> Hence, this "magic" that we pay so dearly for (through writing and > maintaining mandatory interface descriptions) still leaves us pretty > much in the same spot. > > > When I get an Integer in CORBA, it will be an Integer not a string that > > I have to figure out how to parse into an Integer. > > Good example. > > Everything I get from http is a String. If I want to use something as an > integer, I typecast it as an Integer in Zope. If this causes a typecast > error, then I write an appropriate piece of code to handle the error. > Furthermore, I might write some code to do range checking etc before > continuing to use this input. > Of course. In Java or CORBA, if it isn't an Integer, I don't have to do anything. There error is generated automatically, and I don't have to have code dealing with this error. > With CORBA/Java, you may save a step since you don't have to do > typecasting. However, could you easily define the input error handling > method? Furthermore, wouldn't you still have to validate the input > (beyond type checking)? > Certainly. > > Things like interface repositories exist along with implementation > > repositories, so I can discover everything about a service before I try > > to invoke it, if I need to. > > Can you really learn everything about a service from the interface > repository? > > Ideally, interface description and implementation code should be one and > the same. As implementation code become much more readable (as the case > with Python and Zope), interface repositories become obsolete. > No. Interface descriptions can be viewed without having any implementations. They in fact hep in the implementation process. Dve > Best regards, > > Andrew > --- > Andrew P. Ho, M.D. > OIO: Open Infrastructure for Outcomes > www.TxOutcome.Org >
