This Week in Web – App Engine, Titanium Studio, Useful PHP Snippets

April 8, 2011 No comments yet

App Engine 1.4.3 Released

Python API Changes
Prospective Search API: The experimental Prospective Search API allows Python runtime users to detect and take action on datastore entities that match certain criteria when they are written. For the experimental release, users will be allowed 10,000 subscriptions with the Prospective Search API. Pricing will be announced once the feature is fully launched.

Testbed Unit Test Framework: The Testbed suite for Python provides an easy interface for using App Engine API stubs in integration tests similar to the previously existing Java Testing Framework. You can create tests for your application that do not rely on calling App Engine production services, which speeds up the time your tests take to complete, and eliminates dependencies for your test on external services.

Files API: The new Files API in Python and Java allow you to programatically read and write data using Blobstore. This API can be used to generate reports, export data, or do anything that your heart desires that requires large, binary objects.

full announcement

Titanium Studio Preview

Appcelerator have announced a preview release of Titanium Studio, an IDE built on top of Aptana (Eclipse) for Titanium Mobile development. It includes…

This Week in Web – MongoDB, jQuery, Unladen Swallow

April 1, 2011 No comments yet

The Little MongoDB Book

Karl Seguin, creator of mongly, has released a free and open MongoDB ebook. The Little MongoDB Book is aimed at those new to MongoDB and covers the MongoDB API for reads, writes and updates as well as tips on getting the best performance and durability out of a MongoDB server. The book can be viewed on github or downloaded as a pdf.

Beginning jQuery With A Solid Foundation

Mike Gleason has written a brilliant article titled Beginning jQuery with a solid foundation. The article starts out what the Document Object Model is and how the HTTP protocol works. It then goes into detail explaining how jQuery itself is structured, and how the seemingly magical $() function is created (and how you can do it yourself in Javascript). If you learned jQuery without learning Javascript then I recommend you read this.

PHPThumb

PHP Thumb is a light-weight image manipulation library aimed at thumbnail generation. It features the ability to resize by width, height, and percentage, create custom crops, or square crops from the center, and rotate the image. You can also easily add custom functionality to the library through plugins. It also

This Week in Web: PyCon, Django 1.3, Symfony2

March 25, 2011 No comments yet

Symfony2 API Browser, Cheatsheet

The official API browser for Symfony2 can now be accessed at api.symfony.com/2.0. There you can browse look through all namespaces, classes and methods in Symfony2 (documented by PHPdoc comments). The folks at elao.org have released a cheatsheet for using Doctrine2 with Symfony2. The cheatsheet contains field information, configuration parameters and examples of relations (ManyToMany, ManyToOne etc.). Download the cheatsheet here (available in many formats).

MEPP – Mac Nginx Percona PHP

MEPP ​​is a set of applications to provide a local web development environment independent of OS X, installs in minutes. MEPP ​​is a similar alternative to LAMP, WAMP or MAMP for OSX

MEPP use nginx as web server and Percona as database server. MEPP ​​is free software and has no relation with any company in charge of the applications you use, in which case each has its own license.

PyCon 2011 Videos Released

Most of the talks given at the recent PyCon were recorded and have now been uploaded onto BlipTV. Below are some of the most popular talks:

This Week in Web – NowJS, Mongly, Symfony, gae-flask-html5

March 18, 2011 Comments Off

NowJS

NowJS is a new library for NodeJS that makes the creation of realtime web applications easy. NowJS library creates a namespace, now, which can be accessed by both client and server side code. This allows the developer to call server side functions from client side code, and client side functions from server side code. It currently supports all modern web browsers and is aiming to support older versions of Internet Explorer. The video below shows how to create a chatroom in 12 lines of code using NowJS.

Mongly

Mongly is an interactive learning tool for MongoDB. It gently walks you through the different queries, functions and operations available in MongoDB. If your a complete beginner to MongoDB then I suggest you use this tool as well as try.mongodb.org to learn it.

GAE Flask HTML5 Template

Zach Will has created a project on Github named gae-flask-html5. It is a skeleton Flask application that uses the html5-boilerplate as the default templates. You can get it up and running in a matter of seconds:

git clone https://github.com/zachwill/gae-flask-html5.git *app name here*
dev_appserver.py .

Dictionary Autocomplete

This Week in Web – Email Validation, jCanvasScript, Android Development, JS Keyboard Events

March 11, 2011 No comments yet

PHP isEmail Function

Over the last couple of weeks the issues regarding email validation have been popping up in various online programming communities. It has been pointed out that using PHP’s filter_var function with FILTER_VALIDATE_EMAIL doesn’t actually approve all email addresses that would otherwise be valid (specified in internet RFCs). Dominic Sayers has written an email validation function called isEmail which, according to the tests is 100% accurate. It is available in PHP and Java implementations.

jCanvasScript

jCanvasScript is a javascript library that enables easy manipulation of the canvas HTML element. It runs on all desktop and mobile platforms that support the canvas element. The following snippet shows how easy it is to create and manipulate a circle and rectangle.

<head>
        <script type="text/javascript" src="jCanvaScript.js"> </script>

        <script type="text/javascript">
        function simpleExample()
        {
            jc.start('canvas_1');
            jc.circle(100,100,50,'rgba(255,0,0,0.5)',1);
            jc.rect(150,40,50,60,1).rotate(30,'center');
            jc.start('canvas_1');
        }
        </script>
    <head>
    <body onload="simpleExample()">
        <canvas height="200" width="300" id="canvas_1"></canvas>
    </body>

Beginning Android Development for iOS Programmers

Clay Allsopp has written an extremely detailed series of tutorial-style blog posts detailing how he ported an iOS app to the Android platform. The application, Brocabularly, is a relatively simple CRUD (create, read, update, delete) dictionary-like application. The posts are aimed at people who…

This Week in Web – WordPress, Convore, jFormer, WebGL

March 4, 2011 No comments yet

WordPress 3.1 Released

WordPress 3.1, codenamed Reinhardt, has been released. This release focuses on making WordPress a more suitable platform for a content management system. It supports the creation of different post content types as well as the ability for the administrator to (more) easily import and export posts. The administator user interface has also been revamped. As usual you can update to the latest version through your WordPress administrator dashboard.

Convore

Convore is a website that allows groups of people to communicate in real time. It is best described as a cross between a traditional forum bulletin board system and IRC. Users can create public or private groups which act as a forums. Members of that group can then create and reply to threads in that group. Convore automatically tracks which threads and replies you have already seen and notifies you when a new post is made.

Programming groups on Convore:

jFormer

jFormer is an open source form management framework. The backend is written in PHP and frontend is handled by jQuery. After installing the framework you define your form in PHP, jFormer then takes care of client & server side validations,…

This Week in Web – PHP COM, Pango, Python32, Titanium Mobile

February 25, 2011 No comments yet

PHP Pango Extension

Michael Maclean has recently published a PHP wrapper for the Pango library. It depends on his Cairo PECL package as well as Pango. Once installed you can draw graphics with Cairo and text with Pango directly from PHP. The following code is taken from his announcement:

header("Content-Type: image/png");
/* Make a 300x300px image surface */
$s = new CairoImageSurface(CairoFormat::ARGB32, 300, 300);
$c = new CairoContext($s);

/* Set the background to white */
$c->setSourceRGB(1, 1, 1);
$c->paint();

/* Let's draw using black 'ink' */
$c->setSourceRGB(0, 0, 0);

/* Make a Pango layout, set the font, then set the layout size */
$l = new PangoLayout($c);
$desc = new PangoFontDescription("Bitstream Charter 28");
$l->setFontDescription($desc);
$l->setWidth(250 * PANGO_SCALE);

/* Here, we use Pango markup to make part of the text bold */
$l->setMarkup("Hello world! Here is a rather long paragraph which should get wrapped");

/* Draw the layout on the surface */
$l->showLayout($c);

/* Output the PNG to the browser */
$s->writeToPng("php://output");

Titanium Mobile 1.6 Released

Appcelerator have just announced the release of version 1.6.0 of their Titanium Mobile SDK. 1.6.0 includes many new features for the Android platform including additional Intents, Samsung Galaxy support and the…

This Week In Web – PHP Internals, jQuery Plugins, Kohana Performance

February 18, 2011 No comments yet

Podcast: Under PHP’s Hood

The folks over at iBuildings recently put up an mp3 version of Johannes Schlüter’s talk “Under PHP’s Hood”. It was recorded at the Dutch PHP Conference 2010. Schlüter describes how common PHP operations are actually executed in the Zend Engine and the performance impact each has. He covers:

  • How your PHP script is run: compilation, opcodes, zend engine
  • How objects and arrays are stored: hashtables, refcount
  • include vs include_once vs require vs require_once
  • Autoloading
  • References (and why you shouldn’t use them in PHP5)
  • Garbage collection in PHP 5.3+

Reuse your Javascript as jQuery Plugins

Christopher Haupt recently wrote a tutorial for the EngineYard blog titled Reuse your Javascript as jQuery Plugins. Haupt walks you through the process of converting an existing piece of Javascript code into a jQuery plugin. He explains how to structure your plugin so it works with jQuery’s method chaining as well as how to create a standalone plugin that would be called like:

$.pluginName('some', 'param');

Optimizing a Kohana Based Website

A question about increasing the speed and scalability of a Kohana powered website was recently asked on Stackoverflow. User Pascal Martin replied with an incredibly

This Week in Web – PHP Namespaces, NodeTuts, Kohana

February 11, 2011 No comments yet

Interview with Matthew Weier O’Phinney

Kevin Schroeder, tech evangelist at Zend, recently interviewed Zend Framework lead Matthew Weier O’Phinney. The two talk about Weier O’Phinney’s history with Zend and experiences with maintaining and developing the Zend Framework. They then go on to talk about Zend Framework 2 and cover the design decisions made in ZF2 and the things learned from ZF1 that will be altered. I found the sections on namespaces and autoloading in ZF2 particularly interesting.

Javascript Libraries Deconstructed

JS Libs Deconstructed is a website which clearly sets out and explains and explains the differences between jQuery, Prototype and Mootools. The index page gives a summary of the advantages and disadvantages of each of the 3 frameworks. Clicking on the name of a framework sends you to a page where you can easily browser through the source code (organised by class and method) of the framework.

Why PHP Namespaces Matter

Zend Framework lead Matthew Weier O’Phinney has written an article discussing the use and implementation of namespaces in PHP. One of the key points that he emphasises is that namespaces are alot more readable than the old Zend_Style_Classes. An example of this would be the hypothetical…

This Week in Web – Django, Cloud9, Orion, AOP

January 12, 2011 Comments Off

CSS Overlay in Webkit

Guillermo Rauch has written a tutorial on how to implement a lightbox using pure CSS3. He gives reasons as to why using the CSS3 method is less buggier than the old javascript or “pure css” implementations and then demonstrates how to code a lightbox with animations.

Deploying Django Applications with nginx and uwsgi

Martin Rusev has written a tutorial describing how to deploy a Django web application using nginx and uwsgi. It covers compiling nginx, setting up upstart, creating the wsgi.py file for Django, installing uwsgi and configuring nginx to use uwsgi with Django. This is definitely worth reading and bookmarking if your new to Django deployments.

Hosted Cloud9

The Cloud9 team have started the private beta for the hosted version of the Cloud9 IDE. If you want to participate in the beta, create an account, and wait until your account is activated (it could be days/weeks). You can still download and host your own version of the software, but the hosted version allows you to:

  • Run and debug NodeJS applications on their cloud infrastructure
  • One click forking of GitHub projects
  • Push and pull from and to GitHub
  • Access your code