COM support (was Re: Can Python replace Visual Basic? Should it?)
Werner Schiendl
ws-news at gmx.at
Fri Mar 9 08:45:04 EST 2001
There are definitely areas in COM - a lot of such, to be precise - where
Visual Basic is _not_ suited (at all).
Thing is, there are a lot of things that do not need to care on how the
marshaling is done in detail (because the default is good enough for a lot
of applications, IF you have well designed interfaces - if not, writing your
own marshaling code is the wrong answer to the problem) or how the security
is handled in detail (becuase, e. g. it is not intended to use even by a
local client - only inproc like active x controls or utility classes to
provide functions Visual Basic is missing by default).
As I mentioned, I do not have much experience with Python and COM and I
_thought_, based on that very small insight, Visual Basic would be the more
convenient environment. I read a lot of rather headache stuff on generating
interface classes and things like that and this is one point Visual Basic
handles nicely. ActiveX control containment is also one thing I would have
no idea on how to start.
BTW: I intend to get a copy of O'Reillys book "Python Programming on Win32"
to deepen my insight on that topic. If you know
other links or books worth reading (apart from the docs that come with
python, of course) I would appreciate to hear about them.
regards
werner
P.S.: Of course one should (or must, to bring it to the point) understand
the technology in use. This applies heavily to COM, and I know quite a lot
about that stuff. This is one of the reasons I think that well designed
interfaces are more important for remoting than the actual programming
language. And you can use IDL defined Interfaces with VB, otherwise it would
be a headache some time...
Alex Martelli <aleaxit at yahoo.com> wrote in message
news:98ai2j01o8j at news2.newsguy.com...
> "Werner Schiendl" <ws-news at gmx.at> wrote in message
> news:984133550.452523 at newsmaster-04.atnet.at...
> [snip]
> > I did not do much COM stuff in Python right now, but I think you cannot
> > compare it to Visual Basic at this time.
> > Of course, Mark Hammond does a really impressing job on that issue, but
> > Microsoft is still somewhat in advance with VB I think.
>
> Speaking as somebody whose main bill-paying-techolological-expertise
> right now is COM -- I disagree. VB may well be better for those who
> _lack_ significant COM expertise and still need to handle a lot of COM
> stuff -- if nothing else, because it does a good job of handling the
> visual parts of Active/X, and comes with a zillion wizards which (not
> always successfully) strive to hide the complexities from you. But
> if one DOES know COM (or needs to do complex-enough stuff that the
> knowledge of COM itself is not optional anyway), Python is better --
> because it does _NOT_ strive to hide things behind your back, you are
> in far better control -- essentially the same potential for "control
> of what's going on" that you get with VC++ and ATL, but without the
> horrid complexities thereof.
>
> Like with ATL, though, you do have to study the sources you're supplied;
> the docs are not bad, but they never go deep enough into the system's
> bowels -- only study of sources can take you there.
> [[However, this also applies to theoretically "simple" stuff, as soon as
> you need to answer questions that are deep enough in themselves, e.g.,
> "if I malloc a zillion byte then free them, will the memory be given
> back to the system or will my process keep it to itself for possible
> future needs" -- this can be crucial in practice, but only studying
> the sources of your C system's runtime libraries will help you answer.]]
>
>
> Alex
>
>
>
More information about the Python-list
mailing list