Programming HTML WebUI like PyGTK
I want to create a platform for "cloud services". That all the apps are
like desktop apps (like with gtk gui), but they are running on the server
and the client just renders it with HTML render engine.
The client would be an aplication whitch takes care about comunicating
with the server, and a window that has webkit embeded for rendering the
gui.
The server creates the GUI in a session and changes it according to the
signals from the client. I want the apps, running on the server, it would
be coded like pygtk e.g.:
import gtk
w = gtk.Window()
b = gtk.Button('press me!')
b.connect('clicked', w.destroy)
w.add(b)
w.show_all()
This creates a window with a large button on it. And when you press the
button the window closes. The button click would be just a javascript that
sends to the server that the button is cliked and the server handles the
signal, changes the gui and sends new html to the client. Now the server
would take the window and creates an equivalent HTML code.
html = w.to_html()
send_to_client(html)
Client gets the html code and renders it on the window with webkit.
questions:
Is it a good idea? (It strongly reminds me web aplications)
Is there already a solution for this?
Is it posible to create an equivalent html to the gtk widgets? (not all,
just Window, Button, Entry, ComboBox, HBox, VBox, TreeView)
Is it posible to code gui like pygtk and the result is html? (I dont want
to mess with CSS and javascript)
sorry for my english thanx
No comments:
Post a Comment