Live data from Hacker News

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

news.ycombinator.com

1–10 of 13 posts

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

#1
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.

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.

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.

I am wondering if building a web based interface (HTML5/javascript) wouldn't be better ?

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.

Do you think it is a viable solution ?

Which road would you take (stick to widget toolkit, nodejs, chromium) ?

Any advices are welcome.

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

#3
post #2

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.

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

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

#4
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

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

#7

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 a…

@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 ?

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

#8
post #5

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

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).

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

#9
post #6

PySide with QtWebkit would work for a desktop html gui: http://srinikom.github.com/pyside-docs/PySide/QtWebKit/index...

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

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

#10
post #7

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 a…

@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 ?

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

Post reply on HN