Is there anything like JavaBeans in C++?

Discussion in 'C++' started by Ramon F Herrera, Nov 29, 2007.

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

    -Ramon
    Ramon F Herrera, Nov 29, 2007
    #1
    1. Advertising

  2. Ramon F Herrera

    Ian Collins Guest

    Ramon F Herrera wrote:
    > 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.

    --
    Ian Collins.
    Ian Collins, Nov 29, 2007
    #2
    1. Advertising

  3. Ramon F Herrera

    Daniel Pitts Guest

    Ian Collins wrote:
    > Ramon F Herrera wrote:
    >> 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.
    >

    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.

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
    Daniel Pitts, Nov 29, 2007
    #3
  4. Ramon F Herrera

    Ron AF Greve Guest

    Hi,


    "Ramon F Herrera" <> wrote in message
    news:...
    > 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
    Ron AF Greve, Nov 29, 2007
    #4
  5. On Nov 29, 1:32 pm, Daniel Pitts
    <> wrote:
    > Ian Collins wrote:
    > > Ramon F Herrera wrote:
    > >> 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.

    >
    > 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.
    Ramon F Herrera, Nov 30, 2007
    #5
  6. On Nov 29, 1:32 pm, Daniel Pitts
    <> wrote:
    > Ian Collins wrote:
    > > Ramon F Herrera wrote:
    > >> 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.

    >
    > 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
    Ramon F Herrera, Nov 30, 2007
    #6
  7. Ramon F Herrera

    Tim H Guest

    On Nov 29, 8:24 pm, Ramon F Herrera <> wrote:
    > On Nov 29, 1:32 pm, Daniel Pitts
    >
    > <> wrote:
    > > Ian Collins wrote:
    > > > Ramon F Herrera wrote:
    > > >> 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.

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


    Binary consistent, or just API consistent? Isn't that what APIs are
    for?
    Tim H, Nov 30, 2007
    #7
  8. Look how it's implemented in QT http://trolltech.com/products/qt

    > On Nov 29, 1:32 pm, Daniel Pitts
    >
    > <> wrote:
    > > Ian Collins wrote:
    > > > Ramon F Herrera wrote:
    > > >> 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.

    >
    > > 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
    Andrey Ryabov, Nov 30, 2007
    #8
  9. On Nov 30, 3:37 am, Tim H <> wrote:
    > On Nov 29, 8:24 pm, Ramon F Herrera <> wrote:
    >
    >
    >
    > > On Nov 29, 1:32 pm, Daniel Pitts

    >
    > > <> wrote:
    > > > Ian Collins wrote:
    > > > > Ramon F Herrera wrote:
    > > > >> 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.

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

    >


    > 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
    Ramon F Herrera, Nov 30, 2007
    #9
  10. On 2007-11-29 08:10, Ramon F Herrera wrote:
    > 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.

    --
    Erik Wikström
    Erik Wikström, Dec 1, 2007
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    10
    Views:
    1,319
    Malte
    Jun 30, 2005
  2. Amit
    Replies:
    3
    Views:
    629
    Alf P. Steinbach
    May 6, 2005
  3. Replies:
    1
    Views:
    323
    Ravi Teja
    Feb 17, 2006
  4. Replies:
    16
    Views:
    588
    Friedrich Dominicus
    Oct 11, 2007
  5. Ramon F Herrera

    Is there anything like JavaBeans in C++?

    Ramon F Herrera, Nov 29, 2007, in forum: Java
    Replies:
    8
    Views:
    322
    Ramon F Herrera
    Nov 30, 2007
Loading...

Share This Page