-2

I have an application written in C. I have to develop a GUI for it. This application will be connected to the internet and will send and receive requests and responses through the network.

One way is to write the code in PHP to send and receive requests and responses by POST or something, and compile the C code into an executable, and then use PHP's shell_exec() function to run that exe. Is this good approach?

I am a beginner and I want to know what would be the best way to go about this kind of thing. Performance is definitely important, but modern look and feel of GUI is also very important.

Solace
  • 97

1 Answers1

2

You have added label, probably, this is the answer: just use GTK and you will get pure C app. As bonus you will be able to run your app on several platforms (of course: crossplatform is not painless).

The other option — QT library.

Embed C module

There is the other approach — use C module as core, and NodeJS or Python (Java/C#/...) for writing UI and other application-logic:

  • UI code in python/javascript/java/C#...
  • application logic (parse arguments, load DB, event-handling, signals..) implemented in python/js/java/C#
  • time-consuming things could be implemented in C and compiled as module for corresponding language (don't forget: a lot of things already implemented, and exist like packages on NPM and PyPI)

Probably, this approach should reduce development time, bcz native C application (entirely in C: UI+core+whistles) will take A LOT OF YOUR TIME. But if you are not familiar with other languages or you want to learn C ­— this is not for you.


One important thing for junior-coders: avoid to create your own scooter, when there are a lot of guru, who have created awesome bicycles already. At least look, which pitfalls they have avoided already;)

mksm
  • 182