Topic: C++ Bean
Author: "=?iso-8859-1?B?TG/vYyBUculnYW4=?=" <loic.tregan@hol.fr>
Date: 1998/08/01 Raw View
There is a big confusion :
- in JAVA and Delphi, there is a standard interface to the properties of
the objects.
- in Delphi & C++ Builder, there is a built-in support for these
properties wich save he programmer to implements this interface.
For instance, we may define :
class IDocumention {
abstract int GetPropertiesCount();
abstract string GetPropName( int index );
abstract void SetProp( string name, int value );
abstract void SetProp( string name, float value );
...
}
and each 'component builder' must implement this interface, whereas in
Delphi & C++ Builder it done automaticlly by the compiler.
My feeling is that JAVA has not been changed to include JavaBean, it is a
norm wich specify the name of the getter and setter given the name of the
property.
It is true that the language has to be modified in order to generate
automactclly GetPropName for instance. It is not my aim.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Edward Diener <eddielee@abraxis.com>
Date: 1998/07/25 Raw View
C++ Builder and Delphi both use the same concepts. In Delphi this is part of
the language since Inprise ( Borland ) has more or less assumed rights over
their version of Pascal. In C++ Builder their are extensions to C++ that
Inprise has created to promote their concept of RAD development with C++. By
far the 2 most noticeable are properties and closures.
Properties are implemented using an extension keyword called __property in a
class to defines a variable that can actually "call" a member function when
the variable is set, ie. mypropertyvariable = x, or when the variable is read
( get ), ie. x = mypropertyvariable. The compiler is obviously generating
this code for __property variables.
Closures are a means by which a pointer to a member function can be assigned
to a member function of any class that has the same signature as the
"closure" pointer. It is implemented with the extended keyword __closure as
part of the pointer-to-a-function declaration. Once again the compiler is
generating different code for this pointer so that it can be assigned to a
member function of any object which has the appropriate signature.
Properties and the __property keyword are used to implement the idea of
setting properties visually for a component. Closures and the __closure
keyword are used for setting event handlers visually for a component.
I am not lobbying for this functionality in C++ but I do think these ideas do
merit consideration in the C++ community and the possibility for their
inclusion, or something like them, in a future release of C++. I do know that
programming visual components with these extensions to C++ is much easier to
do in C++ Builder than any other "visual" environment that I have ever used.
I only wish that the rest of Inprise's implementation of C++ Builder were as
well thought out as their extensions to the C++ language. Nonetheless I am
fairly well pleased to use Inprise's product.
Phlip wrote:
> Edward Diener wrote in message <35B23C2D.5AEFA0AE@abraxis.com>...
>
> >COM and DCOM have nothing to do with the "component oriented
> programing" of
> >Java, Delphi, or C++ Builder. Perhaps you feel it should be a model or
> offer
> >some ideas regarding doing visual development in C++ through additions
> to the
> >C++ language but, if do, you don't explain that in your response.
>
> Oops. While my tirade against elements of ActiveX is understandable, and
> I know that all these systems _also_ support ActiveX, maybe we need to
> return to the original question. What do these systems also use to
> achieve Component Oriented Programming?
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Phlip" <deltanet@tegan.com>
Date: 1998/07/21 Raw View
Edward Diener wrote in message <35B23C2D.5AEFA0AE@abraxis.com>...
>COM and DCOM have nothing to do with the "component oriented
programing" of
>Java, Delphi, or C++ Builder. Perhaps you feel it should be a model or
offer
>some ideas regarding doing visual development in C++ through additions
to the
>C++ language but, if do, you don't explain that in your response.
Oops. While my tirade against elements of ActiveX is understandable, and
I know that all these systems _also_ support ActiveX, maybe we need to
return to the original question. What do these systems also use to
achieve Component Oriented Programming?
-- Phlip (no replies - address munged)
======= http://users.deltanet.com/~tegan/home.html =======
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Edward Diener <eddielee@abraxis.com>
Date: 1998/07/20 Raw View
COM and DCOM have nothing to do with the "component oriented programing" of
Java, Delphi, or C++ Builder. Perhaps you feel it should be a model or offer
some ideas regarding doing visual development in C++ through additions to the
C++ language but, if do, you don't explain that in your response.
Phlip wrote:
> Lo=EFc Tr=E9gan wrote:
>
> > Several langages, including JAVA Delphi & Inprise (ex-Borland) C++
> >Builder, supports component oriented programming : a component is an object
> >with extended RTII, documenting its properties, read and write functions to
> >access these propertis, and user-defined editors to edit these properies in
> >design time (with a graphical environnement).
> >
> > These properties can be included with no language changes : just a
> >standard mapping between the name of a property and its reas/write function
> >is necessary ( see java beans ).
> >
> > In order to bring C++ to visual development, could we define this
> >mapping officially ? Maybe CORBA has already done it ?
>
> You'r not gonna like the answer, but...
>
> The Distributed Object Standard that the companies you listed follow is
> set by Microsoft and their ActiveX system. The DCOM library in the OS
> permits one object to manipulate another via interface pointers, whether
> the objects are in the same process, in the same computer, or on the
> same 'net.
>
> ActiveX is the Standard for objects written with DCOM. The resulting
> objects are language- and platform-agnostic. In the Internet Explorer
> Web Browser, every HTML tag exists in memory as an ActiveX object. And
> that's why you can plug IE into your own program, and you can script
> IE's behavior using C++, Visual Basic for Applications, VBScript or
> JScript (really JavaScript). All MS needed to do was enable these
> languages to read the RTTI systems of ActiveX thru a socket called
> ActiveX Script.
>
> Furthermore, MS has pretended to hand the ActiveX Standard over to an
> inter-industry committee to manage its upgrades.
>
> Now when this rosy picture is just about to give you the warm fuzzies,
> remember this: MS did not need to, but they insisted on supporting
> ActiveX with a group of absurd implementation-specific extensions to
> VC++, like '__declspec', and #import. You can write all the ActiveX you
> want without these - you can even write it in C - but (as usual with MS)
> you'd be swimming against the tide trying to write ActiveX without a
> very complete class library to re-use. You have a choice of either
> working 3 very experienced programmers on startup-hours for five months,
> or downloading the ActiveX Template Library from MS's Web site for free.
>
> -- Phlip (no replies - address munged)
> ======== http://users.deltanet.com/~tegan/home.html =======
> -- Follow-Up set to /dev/nul --
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Phlip" <deltanet@tegan.com>
Date: 1998/07/20 Raw View
Edward Diener wrote:
>...It is true that C++ Builder supports the C++ language as is,
>but it does include extension keywords, implemented using the double underscore
>( __ ) in front of the extension keyword(s), and that these keyword extensions
>give it the ability to support component oriented programming according to the
>definition you have supplied below...
>...Finally, I support your inquiry that perhaps some of the ideas behind these
>extensions will find themselves into some future iteration of C++...
The only thing ActiveX needs from C++ is its common "virtual function
table" method of virtual dispatch. The Distributed Component technology
these IDE use is called ActiveX, and it can be written in raw C, or in
C++ with no extensions at all.
The extensions support the library code that drives ActiveX.
-- Phlip (no replies - address munged)
======= http://users.deltanet.com/~tegan/home.html =======
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "=?iso-8859-1?B?TG/vYyBUculnYW4=?=" <loic.tregan@hol.fr>
Date: 1998/07/18 Raw View
Several langages, including JAVA Delphi & Inprise (ex-Borland) C++
Builder, supports component oriented programming : a component is an object
with extended RTII, documenting its properties, read and write functions to
access these propertis, and user-defined editors to edit these properies in
design time (with a graphical environnement).
These properties can be included with no language changes : just a
standard mapping between the name of a property and its reas/write function
is necessary ( see java beans ).
In order to bring C++ to visual development, could we define this
mapping officially ? Maybe CORBA has already done it ?
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Phlip" <deltanet@tegan.com>
Date: 1998/07/18 Raw View
Lo c Tr gan wrote:
> Several langages, including JAVA Delphi & Inprise (ex-Borland) C++
>Builder, supports component oriented programming : a component is an
object
>with extended RTII, documenting its properties, read and write
functions to
>access these propertis, and user-defined editors to edit these
properies in
>design time (with a graphical environnement).
>
> These properties can be included with no language changes : just a
>standard mapping between the name of a property and its reas/write
function
>is necessary ( see java beans ).
>
> In order to bring C++ to visual development, could we define this
>mapping officially ? Maybe CORBA has already done it ?
You'r not gonna like the answer, but...
The Distributed Object Standard that the companies you listed follow is
set by Microsoft and their ActiveX system. The DCOM library in the OS
permits one object to manipulate another via interface pointers, whether
the objects are in the same process, in the same computer, or on the
same 'net.
ActiveX is the Standard for objects written with DCOM. The resulting
objects are language- and platform-agnostic. In the Internet Explorer
Web Browser, every HTML tag exists in memory as an ActiveX object. And
that's why you can plug IE into your own program, and you can script
IE's behavior using C++, Visual Basic for Applications, VBScript or
JScript (really JavaScript). All MS needed to do was enable these
languages to read the RTTI systems of ActiveX thru a socket called
ActiveX Script.
Furthermore, MS has pretended to hand the ActiveX Standard over to an
inter-industry committee to manage its upgrades.
Now when this rosy picture is just about to give you the warm fuzzies,
remember this: MS did not need to, but they insisted on supporting
ActiveX with a group of absurd implementation-specific extensions to
VC++, like '__declspec', and #import. You can write all the ActiveX you
want without these - you can even write it in C - but (as usual with MS)
you'd be swimming against the tide trying to write ActiveX without a
very complete class library to re-use. You have a choice of either
working 3 very experienced programmers on startup-hours for five months,
or downloading the ActiveX Template Library from MS's Web site for free.
-- Phlip (no replies - address munged)
======= http://users.deltanet.com/~tegan/home.html =======
-- Follow-Up set to /dev/nul --
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Edward Diener <eddielee@abraxis.com>
Date: 1998/07/19 Raw View
First let me say that I program using C++ Builder and am happy to use its RAD
environment to write Windows programs. With that said, it is not true that the
component oriented programming in C++ Builder can be included with no language
changes, unless you mean that "no language changes" does not include extensions
to the language. It is true that C++ Builder supports the C++ language as is,
but it does include extension keywords, implemented using the double underscore
( __ ) in front of the extension keyword(s), and that these keyword extensions
give it the ability to support component oriented programming according to the
definition you have supplied below.
I have no problem using C++ Builder because I am still using C++, and it is
pretty easy to separate these language extensions from the C++ standard.
However a standard conforming C++ compiler will hiccup on these extensions
because they are not part of the C++ language.
Finally, I support your inquiry that perhaps some of the ideas behind these
extensions will find themselves into some future iteration of C++.
Lo=EFc Tr=E9gan wrote:
> Several langages, including JAVA Delphi & Inprise (ex-Borland) C++
> Builder, supports component oriented programming : a component is an object
> with extended RTII, documenting its properties, read and write functions to
> access these propertis, and user-defined editors to edit these properies in
> design time (with a graphical environnement).
>
> These properties can be included with no language changes : just a
> standard mapping between the name of a property and its reas/write function
> is necessary ( see java beans ).
>
> In order to bring C++ to visual development, could we define this
> mapping officially ? Maybe CORBA has already done it ?
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]