views:

214

answers:

2

Duplicate: this is a duplicate of .NET WebBrowser Control as User Interface. Let's please close this question, and direct any new answers to the original.

Hello folks i need you experience in such things im thinking on easy way to be as much as cross platform as i can lately i had the idea of using embedded web server for my application written in c++ as a easy way to supply cross platform GUI what do you think about this technique ? does someone use it ? to keep it light ,cross platform , easy to develop . ability to keep the application as 1 binary file self contained

+1  A: 

The idea of using Rich Web App as the UI for the sake of portability is quite reasonable - though cross-browser support does add quite a lot of work.

Embedding the server wouldn't have occurred to me (I tend to work in multi-tier apps where we natuallry separate presentation layer to its own tier) but I can't see a fundamental reason not to do this - as you say single self contained executable does have some attraction. Even if you chose to deploy the HTML, images etc as files in a file system instead of parcelled into the app (and for ease of update you might do that) you overall approach makes sense to me.

djna
A: 

One downside to this approach is that it requires the end user to start two processes -- the web server and the web browser. You can limit the impact by making your application do both, but then the use may end up with two browser windows instead of one unless your app is smart enough to open a new tab in an existing browser rather than launching a new one.

That is just the tip of the iceberg though. Before going down this path you should consider the impact your decision has on the end user. It sounds like your main goal is cross-platform support rather than a high quality end user experience. Which is more important to you?

Maybe a web-based front end will be best for your users, or they may better be served by a more traditional GUI toolkit. There are many cross-platform GUI toolkits that will allow you to give a rich experience to your users with little effort (for example, Tk with python, ruby or Tcl).

Some may say that toolkits like Tk, wx, etc have to make compromises to be cross-platform, but I think they provide far fewer compromises than you have to accept when making a web based front end.

Of course you also have to consider time-to-market, your own skills, etc when making this decision. Just remember that at the end of the day the software should make some task easier for the end user, so ask yourself if your choice supports or hinders that.

Bryan Oakley
my second choice is qt . but iwill break the self container binary rule
some scripting languages allow you to create single-file executables with no dependencies. Tcl/Tk and the tclkit/starkit/starpack model comes to mind. I'm sure there are others.
Bryan Oakley