ShedLib: GUI native e web-oriented in Python

While developing modern software applications, today you have to face the fact that we are quickly moving towards a web-oriented world. The need to have features-rich native desktop applications is paired with the need to have web-oriented counterparts allowing to manage most of the functionalities of the corresponding native desktop applications via a standard web browser. Enforcing these needs today requires a lot of efforts given the different and often incompatible nature of the two deployment environments; a common solution is to write two distinct applications rarely sharing any code at all, or to use a solution allowing to generate a desktop application starting from a web oriented one (like with Adobe AIR), with the result of obtaining applications that inherently suffer from all the limits of an internet browser and do not make use of all the capabilities of a native desktop application.

In this context we are going to introduce ShedLib, a library that allows the development and deployment of GUI applications either based on an advanced native and multi-platform interface (Mac OS X, Linux and Windows), either in the form of web 2.0 applications, all using the same Python source code for the application. This is made possible by using wxWidgets (for the native GUI version) and CherryPy together with a powerful Javascript runtime written to exploit modern browser capabilities (for the web version).

We will discuss this new technology via examples; in particular, we will demonstrate the potential of this system by writing some lines of Python code to create a simple application able to connect to a MySQL DB (via MySQLdb), showing data using a "rich interface". The very same application will be executed as a native desktop application as well as inside a web browser.

pycon3 in the track Imparare Python.

Download


Language
IT
Duration
45 minutes