Category Archives: Python

Desktop Web Application

Are you frowning reading the title of this post? I recently finalized on developing my next commercial application. These days everyone is jumping to SAAS but my application has to be a desktop app running on the users machine. It is going to have a lot of reporting and charting. So, the best option is to make it as a web application and get all the power of HTML and JavaScript for presentation.

In the past, when I wanted to develop such an app, I used Java, Tomcat and Derby for Programming Language, Web Server and Database respectively. Both the web server and database were used in embedded mode.

Fast forward a few years, now I am moving to a different tech stack. I wanted to use sqlite3 which is more flexible and that rules out Java (I didn’t wanted to rely on any non-native jdbc drivers). So, I had to decide between Perl which I am quite familiar with and Python which is all new to me. Given the raising (and may be lowering) popularity of Python and decline of Perl, I decided to go with Python.

So, my current tech stack looks like this:

Programming Language : Python
Database: Sqlite3
Web Server : CherryPy
Templating Engine: Mako (I evaluated a few, this is one of the 3 recommended by CherryPy and found the syntax to be less verbose)
Javascript Libraries: JQuery

While researching on some of the Python Libraries realized that Python 3 is not backward compatible with prior 2.x releases but I decided to go with Python 3 (how can you not have nonlocal when you need to exchange info between a callback function and the code that invokes a function that triggers the callback?)

Still need to research on JavaScript libraries for Graphs (using Canvas of HTML5 that do client side rendering). I also need to decide on the type of data presentation for large tables. I want to be able to load the data on-demand as the user scrolls down and not all at the beginning. As I learn from all this, I will update any additional components I might decide to use.

My end goal is to make the app usage as well as app installation as smooth as possible. At this time I don’t know how to make the installation smooth since there are some python libraries that are not part of the standard libraries that I am using. While these 3rd party libraries have licenses that permit including them into my software, I need to figure out if it’s best to get the end users install them from the respective websites or I should provide a way to do it via my software.

I am excited about this new project and more so doing it by learning a new programming language and tech components.

Update 1: For client side charting, I looked at multiple alternatives and finally decided to go with Google Chart Tools.


Filed under Desktop Application, Python