Introducing wobpy
Home Home Contact us Contact
home News Projects Tests Files Follow manatlan on Twitter Sign in
back 2008-11-11 22:20:44

Introducing wobpy

Forget my last post. Since that day, I'm working on another concept, which is a lot more interesting. It uses webpy and jQuery too. I've found a way to make some kind of server components. So it will be easy to code a web form like we code a gtk window : instantiate a widget, add some objects (textarea, button, checkbox ...), declare theirs events ... and code in python only (no html, no javascript, no ajax call).

It's fully ajax, and coders shouldn't write any line of javascript. All states and events are transfered during the ajax call, silently. On the server side, objects keep in sync with the client.

Yes, it's yet another kind of GUI on the web, but it's amazing for me ;-). It's based on webpy, and should be an external lib. So I named it : wobpy (like webpy), wob for "web object".

here is an example :

class MyForm(Wobpy):
    def __init__(self):
        Wobpy.__init__(self)

        self.t = TextArea()
        self.add(self.t)

        b=Button("go")
        b.connect("onclick",self.onbclick)
        self.add(b)

        self.l = Label()
        self.add(self.l)

    def onbclick(self):
        v=self.t.get_value()
        self.l.set_text( v )

When instantiate in a webpy mapped class, it will display a textarea, where you can enter some text, and when you click on the button 'go', it will put the entered text in a label.

Note that it looks like a gtk.Window, and could be easily mapped to gtk. It's really amazing.

It will be there when it'll ready for prime time.

Tags: wobpy
RSS Python Powered Get Ubuntu
©opyleft 2008-2017 - manatlan