Skip to main content

Building web apps with Python

Well, as much as coding sucks, I love it -so much in fact, that I spend an inordinate amount of time doing crazy things using the incorrect tools for the job at hand - just for the kick of getting it to work!

Well, recently, I have been prone to the urge to use different languages to augment my website - for those of you who don't know, I am a software developer, who does web development in his spare time... Actually, my new job involves copious amounts of web development - but that is another story.

Well, my current occupation allows me to do web development, and throw in "hardcore" programming languages into the mix - just for fun.

So, one day I decided that our company intranet needed a way of sharing files - not a Samba share (Shared folder on Windows), not an FTP server - because FTP causes too much back and forth network traffic.... and certainly not using anything "standard" like PHP or JavaScript!

No, I opted to use Python... So, I set up Apache, and got cracking ... mind you, it was not as simple as I thought it would be, but as it turns out, Python is quite capable of this task- with relatively little code ... It's quite simple, you edit your httpd.conf file to include python files to run as cgi scripts, which can then run in any folder... then you get cracking writing your python script...

Of course, you would need a fixed IP for the server to be of any use, but it is rewarding enough to crank up your browser and see a web page that your Python code spat out...

 I have included a screenshot of the web app running - along with the tools which were created with it:

*note that the image was doctored slightly to remove company information ... but the layout and look and feel are 100% correct. The left side shows the home page which lists all the services this app provides, and the right page is the "download" service running in my chrome browser window.

Well, let me tell you that Python is quite a dream for writing web apps - especially to a C/C++ programmer who is used to banging out 1-3000 lines of code before morning coffee... This entire web app, with all associated services comes in at under 3000 lines of code - without refactoring to remove common code!

Anyone interested in building web apps with Python should be aware that there are numerous security risks which Python is addressing as I type this. In the near future we might see python becoming the dominant web 2.0 language of choice for building awesome web apps.

Have fun ... my next project is to write a Windows Gadget Game using JavaScript and some clever DOM tricks I picked up along the way...

Popular posts from this blog

Finding a Game Engine is Hard

Well, if you're new here - congratulations on finding the most useless blog on the planet.If you're not new here, thanks for coming back to another installment of "And he just keeps moaning!", this weeks episode deals with how hard it is to select a Game Engine for your development needs. As I've mentioned in the past, there are many things to consider when developing a game: StoryboardingSpecification documentGame EngineResources (art / sound / levels)Time constraintsReturn on Investment Since I've preached about the Specification Document all throughout my last post, I'll save you a little bit of reading by saying it's nearly the most important part of the entire process - nevermind having a compelling game - without the specification document, nothing gets built. Storyboarding is kind of like the specification document, but it allows you to draw little screens of the game as you imagine it to be, without too much detail. And it allows you to have…

Typescript is Hard

So, for a work-project, the language choice handed down by the Overlords-Of-Jobbing has been TypeScript.

You see - where I work, we build websites, and we build the infrastructure to support those websites. We also build platforms to support the website-supporting-infrastructure . . . so we like to iterate quickly and be as agile as possible in our workflow.

For the current clientele we're servicing it has been decided that TypeScript on the Babel toolchain would be the most productivity-boosting language we could use, and as a result I've had to learn this new-fangled language with all its idiosyncrasies.

Now, TypeScript is awesome, it supports both static and dynamic typing, lambdas, the entirety of JavaScript and all the associated libraries and frameworks which come with JS.
TypeScript is awesome.

- will mend fences
- paint your garage
- spay your cat
- neuter your dog
- rent Clerks II on DVD
- run you a nice hot bath after a long day

But, the more I tried to &…

A few thoughts on Game Development

For those of you who follow my blog, you'll notice that I talk about building games, but I never really release anything useful or fully playable. I'm more interested in studying the individual parts of game development, without really caring about building a game as a whole. Well, for the most part this is perfectly acceptable, as I'm not a game developer by trade, and my bread and butter comes from being a utility developer. I've defined utility developer as someone who codes a variety of things without specializing in any specific discipline. As a self-taught developer, it's been hard for me to pivot into a role where I'm classed as a game developer by trade. This is all good and well, but I still want to talk about game development as a whole - specifically how to get a game off the ground. If you've been following any blog about game development, or any programming course which walks you through the process, you've most likely heard of all the ja…