Defining VCL-like framework for Python
Alexander Staubo
nospam-alex at mop.no
Fri May 21 12:52:13 EDT 1999
In article <199905191942.VAA26784 at axil.hvision.nl>, ivnowa at hvision.nl
says...
[snip]
> >> >Delphi is particularly good -- especially compared to such toolkits as
> >> >Microsoft's MFC -- because it offers clean OOP concepts,
> >>
> >> Hmm, it's not that clean, but that's not the point here... :)
> >
> >It's arguably cleaner and more robust than Python's OO implementation, but
> >possibly that's just me.
>
> It's a matter of taste and choice. One area where Delphi bites me is that
> when you design X forms, only slightly different, you have to design all X of
> them from scratch. Sure, you can copy & paste and such, but when you need to
> change code, you'll have to do it in all the forms. Not very maintainable. --
> Of course experienced Delphi "programmers" have ways to avoid or minimize
> this, but my point is, putting the layout of the form in code does have its
> benefits. In Python/Tk, you can design a more or less abstract class, then
> derive from it.
Delphi 4 supports form inheritance, which essentially means you can do
what you say can't be done: Design a generic base form, and derive
specialized from that form.
> >For example, and I might have this wrong (ie., there could be
> >workarounds), Python has problems with cyclic references. If two objects
> >have references to each other, you need to delete both objects to resolve
> >the link: There's no support for weak connections to objects, other than
> >inane workarounds such as factory functions or referring to objects by
> >string names.
>
> It seems that cyclic references are one of Python's problems, yes. So you
> need to avoid those. :^)
It means you can't have owner relationship between objects -- incredibly
limiting for a number of design patterns.
> >[snip]
> >> I think designing all-new components (not constructed from existing
> >> ones) won't be that easy, though. Is it possible? *looks expectantly
> >> at Tkinter demigods*
> >
> >But worth it.
>
> So I suggest you design them, and we decide if it's worth it. ;^)
That's a great response. Thanks. My battered self-confidence is still
trying to make up its mind about whether to ditch to project or not. It
feels a bit like swimming upstream.
--
Alexander Staubo http://www.mop.no/~alex/
"Give me an underground laboratory, half a dozen atom smashers and a beautiful
girl in a diaphanous veil waiting to be turned into a chimpanzee, and I care
not who writes the nation's laws." --S. J. Perelman
More information about the Python-list
mailing list