Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Python web application GUI toolkit (muntiacus.org)
66 points by rwlincoln on Nov 20, 2011 | hide | past | favorite | 28 comments


It should not take 20 seconds to launch a barebones calculator, and another 5 to respond to clicking on a number.


I just switched to a High-CPU EC2 instance. I hope it helps. Otherwise:

$ easy_install muntjac

$ muntjac

to run the demos locally.


I'm getting an import error when i try to run muntjac locally.

from muntjac.terminal.gwt.server.paste_wsgi_servlet import PasteWsgiServlet File "/Library/Python/2.6/site-packages/Muntjac-1.0.0-py2.6.egg/muntjac/terminal/gwt/server/paste_wsgi_servlet.py", line 19, in <module>

ImportError: No module named HTTPServlet


I had a similar experience. Took around 5 seconds to launch, and around 10 seconds to get the result of me clicking 5 * 6. Much too slow.

- Chrome, i7, 4GB RAM


Out of curiosity, what kind of rig are you running on?

On my four year old desktop it started in about 3 seconds and clicks on buttons do have a noticeable lag, but it's probably 1/3 to 1/2 a second.


One issue is that the session gets unpickled/pickled with each request. When each of the samples has been run the pickled session files are ~2Mb.


> Out of curiosity, what kind of rig are you running on?

Quad-core i7 ThinkPad. I'm using Chrome (16), that might be relevant.


It's probably the HN load. I'm getting a "A server error occurred. Please contact the administrator." message for the calc app.


First make it possible, then make it fast, then make it beautiful.

This is awesome -- don't let the haters say otherwise.


Thanks. I'm not sure how it compares to Vaadin in terms of speed, but it does run on PyPy (and IronPython), which might help.


Sounds like a lot like Wicket (component based web ui). And honestly, I don't like this idea for the web. Web UI is not desktop UI. Make make both of them equivalent, one requires adding a special layer that converts API calls to HTML rendering, which can make things unnecessarily slow (as it was slow in Wicket, and it's also slow in Muntjac).


It depends heavily on how its implemented. I use primefaces[0] for java development and find it amazingly easy to build data based sites quickly, its also very fast. It uses jQuery UI for many components so it is very easy to extend / modify.

[0] http://www.primefaces.org


What would help a lot is to provide some detail on if/how this toolkit could be used with web frameworks like Django.

It would be awesome to be able to keep using Django models and expose them through Muntjac-based templates.

Could this be feasible? If yes, would be great to see some examples. If no, why?


I don't know much about Django sadly. I can tell you that the ApplicationServlet is just a WSGI app and can be stacked accordingly.


Currently only the server-side of Vaadin has been translated and Muntjac relies on the GWT compiled Java from Vaadin for the client code. The plan is to translate the rest and use Pyjamas to produce the JS. That way new components could be defined in Python.


You might want to try django-mediagenerator for Pyjamas integration. We already have a pyjs filter. See [1] for an example of how to use pyjs with mediagenerator.

You should be prepared for lots of subtle pyjs bugs, though. The translation isn't perfect. One problem is that the Pyjamas team is replicating GWT, so they only need a small subset of Python's features. They also don't use more advanced features for performance reasons. This means that many code paths are practically untested.

[1] http://www.allbuttonspressed.com/blog/django/2010/11/Offline...


Running the samples gives this currently - "A server error occurred. Please contact the administrator." Wanted to report this since being on the front page is precious and maybe you want to restart your server so that you dont lose the eyeballs.


Thanks. I'm new to HN and didn't realise what this would do to my traffic. It is currently on EC2, but I had it working on GAE. Perhaps that would have helped with the scaling.


Python already has a similar framework with pluggable front-end toolkits (jquery, qooxdoo and zk): http://rctk.googlecode.com/

Performs reasonably well and very pythonic.


Yuck!

The browser and server should work together elegantly in a modern asynchronous application, not force a paradigm that doesn't fit.


Useful, especially if someone needed to do a quick and dirty 'webifying' of an older desktop based python app.

Keep up the good work!


this is incredibly slow.

but on the bright side it got me to check on the original vaadin, which i found very interesting.


This looks a lot like GWT/Pyjamas.


It's a port of Vaadin, which was built on top of GWT; so yes it should be a lot like GWT, though it doesn't seem to mention any use of Pyjamas unfortunately...


Er, the name could be a problem. Swap the first and last letters.


Please tell me it took you some time to work this out..


After clearing up the spat drink yeah. Thought the deer had a k at the end... Oh well.


I really hope you make some tutorials too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: