[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A question about GUI.



Chen Shapira wrote:
> 
> > Hi there,
> > I have a question about creating GUI for programs. I wrote an
> > application in
> > c++, and i'd like to create for it a GUI. in which libraries
> > do i have to
> > use or can i use javascript to create the GUI?

<description of various Linux/Unix GUI set ommited>

> If you want to use javascript there are several solutions:
> 1. through a browser - you'll have to get your program to interface with the
> browser through html, basicly to write a web server. Not recommended.

Actually you don't. If you program is written to support the CGI
interface then it can use a standard web server to serve a bunch of HTML
and javascript pages as an interface. One example of such an application
is Zope ;-) although I'm not sure it is built with C++, the principle is
the same.

> Basically - use of javascript as a C++ front-end is interesting - but untested
> and may be problematic in many ways. Not recommended - unless you have a good
> reason to do that.

Actually in the Windows world many times programers choose to implement
their programs as several COM objects and write some HTML and javascript
(and even vbscript ;-) files as an interface that uses the COM objects.
Such an approach is not supported on Linux, and maybe for good reasons -
your interface is going to change for almost each new browser version
and also this causes many security concerns, because once your
application is installed on a system, foreign HTML and javascript files
can make use of the same COM objects (there are security measures
designed to stop these things from happening - in a nut shell, they
don't work). Many of Windows, IE and Outlook gaping security holes are
actually manifestations of this very problem. 

If you don't shudder of the thought of using Alpha code, the Mozilla
project includes XUL which implements a not very different idea on top
of the Mozilla/Gecko infrastructure, but cross platform and XML based. I
have no knowledge on how secure or insecure their implementation is.

Cheers,
Gilad.


-- 
Gilad Ben-Yossef <gby@kagoor.com> 
http://kagoor.com | +972(9)9565333 x230 | +972(54)756701
"I've been seduced by the chocolate side of the force."

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il