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.

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.

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)?

> 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.

Best regards,

Andrew
---
Andrew P. Ho, M.D.
OIO: Open Infrastructure for Outcomes
www.TxOutcome.Org

Reply via email to