This week in web – Vim Python IDE, Silex, Dojo JS Classes, New Appengine Datastore API

Posted on May 13, 2011

Python Appengine Datastore alternate API

Guido van Rossum has published a document detailing Datastore plus, a new Python API for the Google AppEngine Datastore. It beings by explaining the conventions and terminology used (Kind, Ancestor, Property) and then covers all classes and methods. The document is packed with examples of the API in use which makes it a really good learning tool. A printable API cheatsheet is provided at the bottom.

Also check out the new Appengine 1.5.0 API

Turning Vim into a modern Python IDE

John Anderson has written a detailed tutorial on setting up Vim for Python development. It covers the basics such as syntax highlighting and indentation through to the more complicated such as integrating pytest, git and virtualenv into Vim workflow. The finished vimrc file can be installed through the following:

git clone https://github.com/sontek/dotfiles.git
cd dotfiles
./install.sh vim

Titanium Mobile Fastdev for Android

The idea behind Fastdev is simple: Instead of packaging, building, and deploying your app’s files every time you want to see a change, the application requests those files directly from a server running on your machine. This means that any changes that are made locally are instantly available to your application, and the need for a “stop the world” re-deploy is only necessary in very specific instances. On top of this, Fastdev is bi-directional — meaning you can control the app itself directly with the new titanium fastdev command. Right now, app control is limited to restarting and killing the app, but in the future this could be expanded to work in conjunction with our new debugger support to provide dynamic expression evaluation, and other awesome rapid development features.

JS Classes with Dojo

David Walsh has written a tutorial titled Classy Javascript with dojo.declare. It is part of the new Dojo 1.6 documentation. He begins by discussing how classes work and how they are loaded in Dojo and then goes into detail and explains how a developer can write and provide their own classes. He covers:

  • Inheritance (multiple)
  • Methods and properties
  • Constructors

Silex

Silex is a PHP microframework written by Igor Wiedler and Fabien Potencier. It makes use of several components from the Symfony2 framework and aims to be easy to both extend and test. Silex requires PHP 5.3+ and is distributed in the .phar format so it is easy to get up and running with quickly. A comprehensive usage guide is available here. Below is a hello world example:

require_once __DIR__.'/silex.phar'; 

$app = new Silex\Application(); 

$app->get('/hello/{name}', function($name) {
    return "Hello $name";
}); 

$app->run(); 

Leave a Reply

You must be logged in to post a comment.