Web Framework Shootouts, or A Day at the Rat Races
Tuesday, January 31st, 2006It seems that even the venerable Guido van Rossum (creator of Python) is weighing in on the ongoing Python web frameworks debate in two very good blog entries here and here.
Personally, I find this to be a fascinating time to be in this business. There have never been so many good technology stacks for building web applications. As I’ve mentioned in previous posts, Ruby on Rails is largely to thank for the current web application architecture renaissance. Python also has its share of very good frameworks to choose from.
However, I believe that in the coming years we will be moving away from a pure web/HTTP-based view of the world, and the value of a single server-side application being able to speak multiple protocols will become more and more apparent, as network-based applications stretch out beyond the traditional web browser.
The Python-based Twisted Networking Framework was developed to solve this specific problem of unifying multiple services in a single networked application. My favorite treatment of this topic is the chapter that Glyph contributed to Massively Multiplayer Game Development, titled Using the Twisted Framework for MMP Service Integration. Some of the code examples are a bit dated (it was published in 2003), but the conceptual material is worth the price of admission alone, IMO. Also, Abe Fettig’s new book Twisted Network Programming Essentials is quite good, with a couple of multi-protocol examples to boot.
Where will this leave the majority of the lightweight web frameworks? Unfortunately (and with absolutely no disrespect intended), it’s somewhat akin to the adage “Even if you win the rat race, you’re still a rat”. By this I’m referring to the fact that the web application framework that gains the most critical acclaim and popularity is still, by definition, a web application framework. Once you need your web app to talk to both web browsers and IM clients (or email, SMS, FTP, etc.), the game is fundamentally changed, and all bets are off.
Don’t get me wrong, web-based applications as we know them today are the dominant segment of the modern application development world, and will continue to be for the foreseeable future, but this doesn’t mean that there isn’t room for innovation beyond the typical capabilities of a mainstream web application. Specifically, presence and real-time messaging/collaboration will likely play increasingly important roles in the application development world, and Jabber/XMPP will likely become the de facto compliment to HTTP for stateful user interaction.
I’ll take this opportunity to cite a concrete example of the power of complimenting HTTP with XMPP-based messaging in a single server-centric application. We’re doing this exact type of thing with ProjectPipe today. ProjectPipe is our hosted project management solution. The web-based elements of the application talk traditional HTTP all day long between the browser and the server. However, we also provide rich integration between the web app and Microsoft Project and Excel residing on the user’s desktop. This is accomplished by using Jabber/XMPP as a compliment to HTTP (via a tiny client-side application that is installed on the user’s PC).
By building our application atop Twisted and Nevow, we are allowing our customers to do things that they otherwise couldn’t (without a bunch of additional strings attached). Having the user click on a web link and automagically generating an updated cut of their MS Project plan from server-based data is genuinely useful. Using the same technical underpinnings, users can also upload issue lists from Excel to the database server via a single click on a web page. From their perspective, transferring data back and forth between a remote database and their local desktop apps is easy to do.
Multi-protocol (HTTP/XMPP) server support has helped us take a reasonably complex integration scenario (bi-directional MS Project/Database integration) and make it appear unremarkable to our users, largely because we were able to envision and implement a solution that didn’t have to live within the architectural constraints imposed by a typical web application.
