Is there anything like JavaBeans in C++?

R

Ramon F Herrera

Is there some standard (ish) way to build reusable graphic components
in the C++ environment?

-Ramon
 
I

Ian Collins

Ramon said:
Is there some standard (ish) way to build reusable graphic components
in the C++ environment?
Check the archives of this group (c.l.c++), this question is asked
frequently.
 
D

Daniel Pitts

Ian said:
Check the archives of this group (c.l.c++), this question is asked
frequently.
As far as I know, standard C++ doesn't have the necessary reflective API
to handle the introspection aspect of JavaBeans.

What features of JavaBeans are you interested in? Events, Properties,
automatic discovery? There may be C++ centric ways to handle all of these.
 
R

Ron AF Greve

Hi,


Ramon F Herrera said:
Is there some standard (ish) way to build reusable graphic components
in the C++ environment?

-Ramon
Wel not really a standard way. But in MS-Windows there is of course the
Component Object Model which is similar to java beans. COM is easy to progam
in C++ (and easier to use in Visual Basic :) )


Regards, Ron AF Greve

http://www.InformationSuperHighway.eu
 
R

Ramon F Herrera

As far as I know, standard C++ doesn't have the necessary reflective API
to handle the introspection aspect of JavaBeans.

Thanks for making me look. :) "Looking up", that is. I had been
wondering about this "reflection" and "introspection", and wondered
whether it was probably a feature of a language called "665++" (for
its inability to see its own reflection) :)

Now seriously. There are some instances of reflection.

- GUI builders: Matisse does not use reflection, it's just a clumsy
hack. This one, OTOH provides a nice example of how useful and
powerful reflection techniques can be:

http://www.instantiations.com/windowbuilder/ (*)

- Another example of reflection is some types of viruses

- A plain vanilla linker-loader is not an example of reflective
programming.


-Ramon

(*) Since I have been on a quest for having a single IDE for Java and C
++, I wrote to the company above, asking them if they had something
like WindowBuilder (it sure beats the pants of MSVC++'s GUI builder)
for C++. Their response was: "C++? Are people still using that!?". He
added a smiley, though.
 
R

Ramon F Herrera

As far as I know, standard C++ doesn't have the necessary reflective API
to handle the introspection aspect of JavaBeans.

What features of JavaBeans are you interested in? Events, Properties,
automatic discovery? There may be C++ centric ways to handle all of these.

My requirements are quite modest. My application has a palette (much
like Photoshop, except with fewer items) but the elements you click on
is not just an static icon, they have some GUI behavior. I would like
to be able to hire different programmers to implement such widgets, in
a standard -or at least consistent- way, like in JavaBeans.

-Ramon
 
T

Tim H

My requirements are quite modest. My application has a palette (much
like Photoshop, except with fewer items) but the elements you click on
is not just an static icon, they have some GUI behavior. I would like
to be able to hire different programmers to implement such widgets, in
a standard -or at least consistent- way, like in JavaBeans.

Binary consistent, or just API consistent? Isn't that what APIs are
for?
 
R

Ramon F Herrera

Binary consistent, or just API consistent?

That's part of my question.
Isn't that what APIs are for?

Which APIs are you talking about, my own? Some standard?
See my answer to your previous question above.

I am an experienced C (and recently, Java) programmer. I have read the
"Thinking in C++" book, so I am familiar with the syntax. What I am
really trying to figure out is the resources and facilities out there
(libraries, GUI toolkits, source code available, common usage, best
practices, etc.). In those areas are I am pretty much a clueless
newbie.

Thanks,

-Ramon
 
E

Erik Wikström

Is there some standard (ish) way to build reusable graphic components
in the C++ environment?

Yes, there are several, it all depends one which GUI framework you are
using and what you want to be able to do. If you can live with
recompiling when you add a new component than any framework will do,
just define a couple of interfaces that you require that the graphical
components adhere to. If you want to allow dynamic loading (like
plugins) then it becomes more complicated, and platform specific but I
think you should still be able to do it on most platforms.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top