Wobpy
Home Home Contact us Contact
home News Projects Tests Files Follow manatlan on Twitter Sign in
Last edition : 2009/02/14 10:51

Wobpy

Home of the future wobpy. A sort of ajax framework letting you code your webform like you code an gtk application in python, without using html/css/javascripts ... only python !

It will only depend on jquery on the client side, and a wsgi stack on the serverside.

To have got a good idea : it's a little bit be like pyjamas (the GWT in python). Except it is directly usable under webpy (or others python web frameworks), no needs to code your logic on a xml/json rpc server. It's "easier", but less powerful too.

Til now, it implements : TextBox, TextArea, SelectBox, RadioList, CheckBox, Label, Link, Button, Image, Panel, Table, VBox, HBox ... and modal dialogs. I plan to add : a Pager (a wigdet able to page).

CAUTION

The integration in common web frameworks is easy, since wobpy is a wsgi utility. You must keep in mind that you need to instanciate your wobpy object in each transaction (post, get, ...), to rebuild the wobpy context. So, you definitively can't store some datas in the instance of the object. You could store the instance in a session object, to make this kind of things. But it's definitively speeder to recreate it at each transaction than storing it in a session. It's a major difference with pygtk app ! Sure wobpy could handle a session for you, and let you code as you code a pygtk app. But I really think it's a bad idea. Wobpy must stay as simple as possible.

BTW, I use it (and improve it) in each my web dev now. And it's a real breeze.

A "hello world" example could be :

class MyForm(Wobpy):
    def 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 )

In your browser, there will be a input box, a label, and a button. If you click on the button, the content on the input box is shown in the label.

All the backend (the ajax communication between the page and the server) is done via a wsgi middleware, nammed WobpyMiddleware ;-).

No public release yet 2009-02-14 ... (but will be in pypi too)

RSS Python Powered Get Ubuntu
©opyleft 2008-2019 - manatlan