

Ask HN:To build a GUI should I take the HTML5/js path or stick to older techs? - zoobert

I have built an application using Python and would like to add a graphical interface for that application.
The application is multi-platform and I am looking for a solution that should run on Win/Mac/Linux.<p>I have checked the different widget toolkits in Python (PyQt/PySide and wxPython) but I am not satisfied by them because in general the learning curve is high and because by default, they produce "clunky" anonymous results.<p>So if I want to go further with them and produce a nice personalized result (create your own widgets, ...) , I need to be really invested and spend lots of time mastering them.<p>I am wondering if building a web based interface (HTML5/javascript) wouldn't be better ?<p>I could create the web interface and run it in chromium with an extension to manage all filesystems operation. I could also start a nodejs server and kill it when I stop the application.<p>Do you think it is a viable solution ?<p>Which road would you take (stick to widget toolkit, nodejs, chromium) ?<p>Any advices are welcome.
======
airfoil
PySide with QtWebkit would work for a desktop html gui:

[http://srinikom.github.com/pyside-
docs/PySide/QtWebKit/index...](http://srinikom.github.com/pyside-
docs/PySide/QtWebKit/index.html)

~~~
zoobert
Thanks I will check that possibility. It might be easier to manage than
chromium or nodejs as a local desktop app.

------
dman
Check out enaml - <https://github.com/enthought/enaml> . It makes writing UI's
in python really fun.

~~~
zoobert
Still it relies on wxPython or PyQT which is my problem because you are
limited to the existing widgets somehow (or you need to create your own
widgets and then it is slow and painful).

~~~
dman
Writing custom widgets in Qt isnt half bad.

------
mouseroot
well for cross platform Qt or gtk,although everyone always says stay away from
experimental I say use canvas If the user cant use the canvas fall back to
jquery. I belive with the technologies we have now old idioms like "dont
render gui on the canvas" this will soon fade away, running your own server
for just that application may not work so well as you have to manage that
server aswell, like what if the user isnt allowed to give the firewall access?
or what if the server crashes and the client has import data that needs to
saved? I personally have played with alot of gui stuff and I always come back
to html5 and js so thats just my $0.02

~~~
zoobert
@mouseroot. Ok thanks for the advice. When I was talking about http server, I
meant locally on the user's machine(start a nodejs for example and kill it
when the user stop the application somehow).

Other solution is to use chromium with a filesystem extension.

Do you have tricks or advices for that ?

~~~
mouseroot
<http://www.html5rocks.com/en/tutorials/file/filesystem/> and heres something
i tossed together yesterday :D <http://cssdeck.com/labs/nt3httvf>

that site html5rocks shows alot of cool stuff some of it only works in chrome
but most of it is cross browser, hope this helps

~~~
zoobert
Ok I will check the html5rocks web site. Thanks

------
farseer
build the gui in html5, just use only the popular libraries such as jquery and
stay away from the experimental stuff i.e. canvas or webgl.

~~~
zoobert
ok but after practically what do I do ?

I run it in a chromium, I launch a HTTP server ?

In the end I want to make a desktop GUI and I would like a solution which is
not too clunky

------
camus
Depends on what you want to do. For gui development you should use a solution
that has a GUI editor so you dont have to manually code your interface , i
find it pretty important , that's why in my opinion Java with Swing is still
the easiest way to go for multiplateform GUI development. Java is not that
hard and tools like eclipse or netbeans provide gui editors. You want to use
HTML5/Javascript ? then go with adobe air , you will be able to develop your
app in full javascript/html and take advantage of the air API, and deploy in
any plateform that can run air.

