Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Web GUI For C Code - Which Language ?

Options
  • 06-01-2004 8:14pm
    #1
    Registered Users Posts: 1,278 ✭✭✭


    dia dhuit,

    i have been given 7000 lines of functioning C code which i must adapt to a web interface for a postgraduate 3 month project.

    the compiled code runs as a command line program for use by astronomers/observers, giving rise/set times for solar system objects, distances of various stars from zenith (point in sky directly above your head), phase of moon (eg 100%=full moon) and some other bits and bobs.

    what i must do is rewrite or reuse the existing code in a new more user firendly web interface where the parameters can be passed in visually in text-boxes (as opposed to by command line), and the results are returned graphically as text and graphs (for distances which vary over time).

    can someone suggest a suitable language to use for a web interface, or indeed whether it is possible to use existing c code and somehow encapsulate it so it can be run in web gui ?

    i have experience with c, html, dhtml, asp, vbscript and javascript

    many thanks,
    jAH


Comments

  • Closed Accounts Posts: 20,759 ✭✭✭✭dlofnep


    Use a common gateway interface (CGI).


  • Closed Accounts Posts: 36 DaemÈn


    if you can get in contact with someone able to create c++ cgi scripts (which would be your web interface) you should be able to reuse most of your code as c++ code can be written procedurly d same as c.

    u would have to change some datatypes and librarys - but the bulk of the code should be reuseable.

    im not well up on the c++ cgi scripts atall so hopefully u can find someone who is and see how u would go about it...


  • Registered Users Posts: 1,278 ✭✭✭jArgHA


    thanx for the suggestions, i hadn't even considered cgi scripts. don't have any experience in cgi myself but if c++ cgi scripts can reuse c code as you suggest it might be the right option.

    cheers again,
    jAH


  • Closed Accounts Posts: 423 ✭✭Dizz


    Wrap it in perl - yer only man!

    Dizz


  • Closed Accounts Posts: 304 ✭✭Zaltais


    Bung all the C code you have into a .dll and access it's functions through IIS with ASP using VB. (Don't know if it's totally possible but I think I remember reading something similar to this being done relatively easily.)

    Or convert the C code to C# and do it in ASP.NET
    Originally posted by Dizz
    Wrap it in perl - yer only man!

    Dizz

    Or do what he said.


  • Advertisement
  • Registered Users Posts: 1,278 ✭✭✭jArgHA


    Originally posted by Zaltais
    Bung all the C code you have into a .dll and access it's functions through IIS with ASP using VB. (Don't know if it's totally possible but I think I remember reading something similar to this being done relatively easily.)

    thanx Zaltais, i think i'll prolly do something along these lines as I have no experience with cgi and perl scripts and have exp. with asp and vbscript.

    i can't seem to find nything on web about this, does anyone know of some decent documentation/links on accessing c functions from a dll through asp as suggested by zaltais ?

    jAH


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    You might get away with snarfing most of the code into php.


  • Closed Accounts Posts: 304 ✭✭Zaltais


    Very sketchy informaton I'm afraid, but after a quick google I found these, which while being far from complete information, should help to point you in the right direction....


    http://forums.aspfree.com/t9425/seee44be259416669a49ba93d640e0c7e.html

    http://www.dbforums.com/t972905.html

    http://forums.aspfree.com/t17904/s1165986597c0145ec3faf508dc007828.html

    http://www.ondotnet.com/pub/a/dotnet/2002/01/14/first_com.html


    These took me the best part of five minutes to find, no offence intended, but you don't seem to have looked very hard.....


  • Registered Users Posts: 1,278 ✭✭✭jArgHA


    thanx again zaltais, some helpful info from those links.
    Originally posted by Zaltais
    These took me the best part of five minutes to find, no offence intended, but you don't seem to have looked very hard.....

    did spend good hour looking but must've using the wrong search terms, i'm crap when it comes to google


  • Registered Users Posts: 4,676 ✭✭✭Gavin


    Create a soap interface and then plug a web interface into that. For extra effort marks..

    gSoap, Apache axis in c++ and then php has good support for soap. I think.

    Gav


  • Advertisement
Advertisement