Web Interfaces for C++ Introspection?
Milo_Mindbender asks: "For a C++ application I'm working on I want to be able to pop up an interface to a class that will display all the 'tunable' parameters of the class and let me inspect/modify them, while the program is running. The catch is that I'm running on a minimal embedded OS with Open GL but no GUI library. Rather than porting a widget set or writing my own, I was thinking about having the application talk to a web browser, and then use the browser to display the GUI, take user input, and finally push the data back to the app. The classes have metadata that describes the public data locations/types so they can be accessed, but not being a web-wizard I'm not sure of the best way of generating the information I need to create the UI. My first thought is to generate HTML and push that to the browser, but it seems like there must be a better way than this, maybe someone has written a library specifically for doing this sort of thing? Any help/suggestions would be appreciated!"
You may be interested in XUL then. Especially, in remote XUL.
Also, see Remote XUL Application Development with_Mozilla I and Remote XUL Application Development with Mozilla II.
You may even be able to create the UI XML files automatically from your interfaces, using a script, or introspection.
You can then send the data back to your host, using RPCs or a REST-like interface.
Windows is like decaf - it tastes like the real thing, but it won't get you through the day.
Unix has threads, too. Recent Linux kernels have particularly fast threading.
Be relentless!
Oh and BTW, fork() and the unix process model sucks as a parallellism primitive.
You're right...you should use pthreads or nptl instead.
Some advice from someone who makes the same mistake every now and then...When you learn something in class, don't talk about it on Slashdot for at least a month. That'll give you a chance to think before you type.
In the mean time, dissing UNIX around here is likely to get you modded "Troll."
tasks(723) drafts(105) languages(484) examples(29106)
Why would you want to use a CSP-style concurrency model instead of threads? To quote from the occam compiler homepage:
In layman's terms, you get concurrency that can be built up from easily understood pieces (instead of a monolithically concurrent system with locks scattered throughout the code), and an underlying theory of concurrency that lets you understand and analyze your design and ensure that it is, for example, free of deadlocks (I've personally created complex networks of 1000+ interacting processes in a dynamically evolving topology, with nary a hitch). And did I mentioned that the context-switching performance of most of these systems is amazingly good?
How about minimal server-side XML + Client side XSLT?
Requirements:
Now all you have to do is serve the XML and stylesheet, attach the stylesheet to the XML file and watch any XSLT-aware browser do the heavy work of transforming that simple XML into beautiful XHTML (or HTML) for you.
Benefits:
Problems:
Why re-invent the wheel writing C++ UIs and stuff when there is plenty of simpler ways out there.