Thread: c++ for web

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    19
    Rep Power
    0

    c++ for web


    hey, this isn't really a c++ question, but i was wondering if there is a way to put an executable inside a web page, as in it'll run in a window in the browser. is this possible, or would i have to go to java to do that?
  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,255
    Rep Power
    2222
    Putting it in a Java applet would certainly be a tried-and-true way.

    Another way would be to write an Active-X object, which you can do with Visual C++. However, as I understand it, there are a couple problems using Active-X:

    1. I think that only a Windows machine could use it. I could be wrong about this, so anyone who knows better please correct me.

    2. As I understand it, an Active-X object can do anything, so I view them as gaping security holes. I refuse to allow an Active-X object to run on my browser and I am sure that many other people feel the same way.


    The new .NET framework may offer some other options. I've steered clear of that hype so far.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    19
    Rep Power
    0
    thanks, im not really sure what active-x is, so i guess i'll just have to learn java. i was planning on doing that anyway, so this just gives me another reason! thanks again for the feedback, i was just hoping there was some simple way, cuz i wrote a tic tac toe prog and wanted to put it up on my site if possible...oh well!
  6. #4
  7. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,255
    Rep Power
    2222
    Active-X is based on COM and OLE, which are two Microsoft ideas. Basically, Component Object Model involves creating a software object that another program can load in at run-time, almost like a DLL, and use. If you have done Visual Basic, those VBX objects that you could get from third-party vendors and insert into your program as a new control were fore-runners of Active-X.

    Transitioning from VC++ to COM can be a fairly steep learning curve, though I've read that Active-X can be picked up part-way along that slope.

    If you are already proficient with Visual C++ and MFC programming, then research further into Active-X before you give up on it completely.

    If you still decide to go with Java, it does have some advantages:

    1. Its syntax is very much like C/C++, so the learning curve won't be as steep.

    2. It should be able to run on practically any browser in the world, no matter what OS. Similarly, if you distribute a Java class (a compiled program), then it should be able to run on any machine regardless of OS, just so long as it has a Java interpreter. That's about as close to universally-executable code as you can get.

    3. It's free.

    The only part that's really different is in creating graphical interfaces. However, it seems to be related to Tk.

IMN logo majestic logo threadwatch logo seochat tools logo