enthought/jigna — pull request #31 by agrawalprash (2014-06-30 09:16:38+00:00)
Title: Clean up of the View API

The `View` API now has the following improvements:

1. Creates and returns a QWidget instead of showing it in-place. This gives the user flexibility to show the widget, or embed it in an existing QApplication etc.
2. The tornado version is now symmetric with the QApplication. We don't start the tornado ioloop inside the serve method anymore. Instead, we create a tornado application and let the user decide on where she wants to listen it.
3. Examples are updated to reflect the latest API. Each example now also has some descriptive comments about what will happen on the UI when they run it.
4. Two new examples are included:
- An example to show embedding of jigna widget inside an existing QWidget framework.
- An example to show model updates finding their way through the web interface.

Discussion: The `View` should probably be called something else (a `Document` maybe? a `Document` will generate the HTML and then the `create_widget`, `create_webapp` methods should be convenience methods out of it).