<?xml version="1.0" encoding="UTF-8"?><rss version="0.92">
<channel>
	<title>Query7</title>
	<link>http://query7.com</link>
	<description>PHP, Javascript, Python and Web Development</description>
	<lastBuildDate>Sat, 25 Jun 2011 21:29:51 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	<!-- generator="WordPress/3.0.4" -->

	<item>
		<title>This Week in Web &#8211; PHP Needs X, Python IDEs, Firefox5, jQuery Mobile, Python Games</title>
		<description><![CDATA[<h3>Firefox 5 Released</h3>
<p>Mozilla have released Firefox 5.0 final. Some of the biggest changes are support for CSS animations, the addition of the <a href="http://dnt.mozilla.org/">do not track</a> header and better HTML5 support. A list of features and changes that developers may find relevant can be found <a href="https://developer.mozilla.org/en/Firefox_5_for_developers">here</a>. If you were a user of the Firefox 4 beta versions, Firefox should update to version 5 in the background. Otherwise you can download Firefox 5 from the <a href="http://www.mozilla.com/en-US/products/download.html">downloads page</a>.</p>
<h3>jQuery Mobile Beta 1</h3>
<blockquote><p>The jQuery Mobile team is happy to announce the release of Beta 1. We’re proud of the refinements we’ve made to make jQuery Mobile faster, extensible and more compatible over the last 12 weeks and look forward to having more frequent releases as we work up to 1.0 in late summer. We’re planning on releasing a second Beta in about a month that will begin decoupling our code so you can include only the components you need, add greater extensibility to support dynamic JS-driven sites, and bring even broader device support.</p>
<p>Note that jQuery Mobile 1.0 will require jQuery core 1.6 as a baseline. Going forward, we’ll be supporting the two latest major versions of core but</p></blockquote><p>&#8230;</p>]]></description>
		<link>http://query7.com/this-week-in-web-php-needs-x-python-ides-firefox5-jquery-mobile-python-games</link>
			</item>
	<item>
		<title>This Week in Web &#8211; SMF2, ZF2, Python Lamdas, Future of JS, Titanium 1.7</title>
		<description><![CDATA[<h3>Simple Machines Forum 2.0 Final</h3>
<p>After being at Release Candidate stage for over two years, SMF 2.0 has now <a href="http://www.simplemachines.org/community/index.php?topic=437328.0">gone gold</a>. Along with some minor bug fixes and security enhancements the biggest change is that SMF 2 is now licensed under the BSD License. SMF 1 and all previous SMF 2 RCs were licensed under a propriety &#8216;SMF License&#8217; that prevented people from modifying the original SMF source and redistributing it themselves. With the change to the BSD license, SMF is on it&#8217;s way to becoming a mainstream open source project. Unfortunately development is still done in a private version control system.</p>
<h3>Video: Future of Javascript</h3>
<p>Jeremy Ashkenas and Brendan Eich talk about the future of Javascript at JSConf 2011.<br />
</p>
<h3>Titanium Studio, Mobile SDK 1.7 Release</h3>
<p><a href="http://developer.appcelerator.com/blog/2011/06/introducing-titanium-studio.html">Appcelerator</a> has released the final version of their Titanium Studio product and Mobile SDK version 1.7. A full list of changes to the Mobile SDK since the previous release can be found <a href="http://developer.appcelerator.com/apidoc/mobile/1.7.0/changelog.html">here</a>.</p>
<blockquote><p>
Fastdev for Android speeds prototyping and testing by enabling local changes to become instantly available to your application while the simulator is running. This eliminates the time-consuming steps of packaging, building and deploying apps for each</p></blockquote><p>&#8230;</p>]]></description>
		<link>http://query7.com/this-week-in-web-smf2-zf2-python-lamdas-future-of-js-titanium-1-7</link>
			</item>
	<item>
		<title>This Week in Web -Django Hosting, Podcasts, Git Tutorials, Python Apps with Titanium</title>
		<description><![CDATA[<h3>Django Hosting Roundup</h3>
<p>Over the last month and a half Ken Cochrane has been evaluating the different cloud webhosts for Django apps. In this <a href="http://kencochrane.net/blog/2011/06/django-hosting-roundup-who-wins/">summary post</a>, Cochrane provides a useful table that compares features and prices of all cloud hosts as well as App Engine and Web Faction. Below are links to the individual host reviews.</p>
<ul>
<li><a href="http://kencochrane.net/blog/2011/04/my-experiences-with-epio/">ep.io</a></li>
<li><a href="http://kencochrane.net/blog/2011/04/my-day-gondorio/">gondor</a></li>
<li>]]></description>
		<link>http://query7.com/this-week-in-web-django-hosting-podcasts-git-tutorials-python-apps-with-titanium</link>
			</item>
	<item>
		<title>This Week in Web &#8211; jQuery API, Python Video Archive, Symfony2 Beta, Heatmap.js</title>
		<description><![CDATA[<h3>I Don&#8217;t Like [Django] Class Based Generic View</h3>
<p>John DeRosa has written a <a href="http://seeknuance.com/2011/05/28/i-dont-like-django-class-based-generic-views/">blog post</a> detailing why he does not like class based generic views (which were introduced in Django 1.3). He is of the opinion that generic views should be very simple and require a minimal amount of code to use. Class based generic views require you to subclass the generic view and override particular methods and properties  (such the name of the template). This is in contrast to the old &#8220;function style&#8221; generic views where all you needed to do was call method and pass in the appropriate parameters.</p>
<h3>jQAPI.com</h3>
<blockquote><p>The jQuery documentation is great, very complete, nicely written and with a lot of examples and demos. The only thing that bugs me is the way we have to find the right documentation for what we search for. Try to search for the <em>.is()</em> function for example. Over 100 matches before the actual function I am looking for?! And it is a fixed layout which means even on my big screen I have to scroll all the way down and have to scan for it. There have to be a better way, obviously. </p>
<p>Just to make</p></blockquote><p>&#8230;</p>]]></description>
		<link>http://query7.com/this-week-in-web-jquery-api-python-video-archive-symfony2-beta-heatmap-js</link>
			</item>
	<item>
		<title>This Week In Web &#8211; Python, NodeJS CMS, Google APIs, XDebug</title>
		<description><![CDATA[<h3>Writing Clean, Testable, High Quality Code in Python</h3>
<p>Noah Gift, Python book author and Associate Director of Engineering at AT&#038;T has written an article titled <a href="http://www.ibm.com/developerworks/aix/library/au-cleancode/index.html">Writing Clean, Testable, High Quality Code in Python</a> on IBM Developer Works. Gift primarily talks about good coding practices such as multiple small functions, test coverage and static analysis (with PyLint). Although all code in the article is Python, the lessons he teaches and topics he discusses can be applied to any dynamic language such as Javascript, PHP and Ruby. If you are relatively new to programming I recommend your read this article.</p>
<h3>NodeJS Cheatsheet</h3>
<p>The folks over at GoSquared have published a great NodeJS cheatsheet <a href="http://downloads.gosquared.com/help_sheets/11/Node%20Help%20Sheet.pdf">[pdf]</a> <a href="http://downloads.gosquared.com/help_sheets/11/Node-Help-Sheet-large.jpg">[jpg]</a>.<a href="http://www.gosquared.com/liquidicity/archives/1930"><img src="http://downloads.gosquared.com/help_sheets/11/Node-Help-Sheet-large.jpg" width="540" height="768"/></a></p>
<h3>Removal and Deprecation of some Google APIs</h3>
<blockquote><p>Following the standard deprecation period – often, as long as three years – some of the deprecated APIs will be shut down. The rest have no scheduled date for shutdown, but won’t get any new features. The policy for each deprecated API is specified in its documentation.</p>
<p>    These APIs are now deprecated but have no scheduled shutdown date: Code Search API, Diacritize API, Feedburner APIs, Finance API, Power Meter API, Sidewiki API, Wave API<br />
    These</p></blockquote><p>&#8230;</p>]]></description>
		<link>http://query7.com/this-week-in-web-python-nodejs-cms-google-apis-xdebug</link>
			</item>
	<item>
		<title>Resources for Learning Vim</title>
		<description><![CDATA[<p>Over the last few months I&#8217;ve found myself using the <a href="http://vim.org">Vim</a> text editor an increasing amount. Below are some resources that I found particularly useful.</p>
<h3>Venturing Into Vim</h3>
<p>Jeffery Way, editor and author of Nettuts, has released a 4 part video tutorial series called <a href="http://marketplace.tutsplus.com/item/venturing-into-vim-4part-video-series/131400">Learning Vim From The Ground Up</a>. The 4 videos total over 2 hours playtime and cost just $5. They are recorded on Mac OS X at a screen resolution of 1280×720. Way&#8217;s experience in screencasting really shows in these videos. He clearly communicates all of his points, step by step, at a good speed. These videos start with the assumption you know absolutely nothing about Vim so they are a great resource for a Vim user of any level.</p>
<h3>Vim Cheatsheet</h3>
<p>The folks at ViEmu.com (who produce Vim keybindings for MS Office and Visual Studio) have produced a printable <a href="http://www.viemu.com/vi-vim-cheat-sheet.gif">Vim cheatsheet</a>. The cheatsheet clearly lays out the lower and upper case functionality for each key as well as some general Vim commands. The text size and colour contrast makes it easy to read from a distance, I recommend you print it out.</p>
<p><a href="http://www.viemu.com/vi-vim-cheat-sheet.gif"><img height="382" width="540" src="http://www.viemu.com/vi-vim-cheat-sheet.gif" alt="vim cheatsheet" /></a></p>
<h3>VimCasts.org</h3>
<p>Drew Neil produces short, focused Vim screencasts and posts&#8230;</p>]]></description>
		<link>http://query7.com/resources-for-learning-vim</link>
			</item>
	<item>
		<title>This Week in Web &#8211; jQuery Chrono, jMongoBrowser, PHP DI, Titanium</title>
		<description><![CDATA[<h3>jQuery Chrono</h3>
<p>The <a href="https://github.com/avk/jQuery-Chrono">jQuery Chrono</a> plugin provides an easy, human-readable wrapper around the Javascript functions <em>setTimeout()</em> and <em>setInterval()</em>.</p>
<p>Rather than writing:</p>
<pre>setTimeout(function() { ... }, 5 * 60 * 1000);</pre>
<p>You can write:</p>
<pre>$.after(5, "minutes", function() { ... });</pre>
<p>Likewise</p>
<pre>setInterval(function(){ ... }, 60 * 60 * 1000);</pre>
<p>becomes</p>
<pre>$.every(1, "hour", function() { ... });</pre>
<h3>PyGame Examples</h3>
<p>The Simpson College Computer Science Department has posted a <a href="http://cs.simpson.edu/?q=python_pygame_examples">collection of 15 GUI PyGame scripts</a>. They range from drawing simple graphics onto the screen to full blown games with keyboard control. This is a great resource for those wanting to learn PyGame but don&#8217;t know where to start.</p>
<h3>jMongoBrowser</h3>
<p><a href="http://girbal.net/jmongobrowser/">jMongoBrowser</a> is a cross platform GUI administration tool for MongoDB written in Java. It provides GUI tools that allow you to easily manage your databases, collections and documents. jMongoBrowser also allows you to execute queries and explore the returned data through the rich user interface.<br />
<img src="http://query7.com/wp-content/uploads/Untitled.png" alt="" title="Untitled" width="540" height="375" class="aligncenter size-full wp-image-1704" /></p>
<h3>Titanium Mobile SDK 1.7 RC1</h3>
<blockquote><p>Titanium Mobile SDK 1.7 Release Candidate 1 is now available, providing new functionality, enhancements and bug fixes across iOS and Android. Download and install the release candidate SDK to test drive</p></blockquote><p>&#8230;</p>]]></description>
		<link>http://query7.com/this-week-in-web-jquery-chrono-jmongobrowser-php-di-titanium</link>
			</item>
	<item>
		<title>Kohana 3.1 Wiki Tutorial Routes</title>
		<description><![CDATA[<p>In the original <a href="http://query7.com/kohana-3-1-wiki-tutorial">Kohana wiki application</a> the URLs in the views were hardcoded. If we wanted to change the domain name or restructure a route we would need to go through the application and change every single URL.</p>
<p>Thankfully the Kohana <em>Route</em> class comes with a method <em>url()</em> which allows us to generate URLs to routes we have specified in the application. In the first <a href="http://query7.com/kohana-3-1-wiki-tutorial">tutorial</a> we defined the following routes in <strong>application/bootstrap.php</strong>:</p>
<pre>Route::set('wiki-edit', 'wiki/&#60;page&#62;/edit')
	-&#62;defaults(array(
		'controller'=> 'wiki',
		'action'	=> 'edit_page',
	));

Route::set('wiki-save', 'wiki/&#60;page&#62;/save')
	-&#62;defaults(array(
		'controller'=> 'wiki',
		'action'	=> 'save_page',
	));

Route::set('wiki-page', 'wiki/&#60;page&#62;')
	-&#62;defaults(array(
		'controller'=> 'wiki',
		'action'	=> 'view_page',
	));

Route::set('default', 'wiki')
	-&#62;defaults(array(
		'controller' => 'wiki',
		'action'     => 'view_page',
		'id'		 => 'index',
	));
</pre>
<p>Before we can generate routes we need to set some configuration options in <strong>application/bootstrap.php</strong> (line ~82). We need to specify the <em>base_url</em> and <em>index_file</em> attributes in the array passed to <em>Kohana::init()</em>. The application on my local install is located at 127.0.0.1/query7kwiki/index.php, so my <em>Kohana::init()</em> statement would read:</p>
<pre>Kohana::init(array(
	'base_url'   =&#62; '/query7kwiki/',
	'index_file' =&#62; 'index.php'
));</pre>
<p>In <strong>application/views/edit.php</strong> the form <em>action</em> attribute was hardcoded to the value <em>/query7kwiki/index.php/wiki/</em>. That can be replaced by:</p>
<pre>&#60;?php echo Route::url('wiki-save', array('page' =&#62; $page)); ?&#62;</pre>
<p>In <strong>application/views/single.php</strong> there is a&#8230;</p>]]></description>
		<link>http://query7.com/kohana-3-1-wiki-tutorial-routes</link>
			</item>
	<item>
		<title>This week in web &#8211; Vim Python IDE, Silex, Dojo JS Classes, New Appengine Datastore API</title>
		<description><![CDATA[<h3>Python Appengine Datastore alternate API</h3>
<p>Guido van Rossum has published a <a href="https://docs.google.com/document/d/1dsx1hihmMXMJm8wIRu49tJR-KEng80o3wkg4Nlbqn-w/edit?hl=en&#038;ndplr=1&#038;pli=1#">document</a> 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.</p>
<p>Also check out the new Appengine <a href="http://googleappengine.blogspot.com/2011/05/app-engine-150-release.html">1.5.0 API</a></p>
<h3>Turning Vim into a modern Python IDE</h3>
<p>John Anderson has written a detailed <a href="http://sontek.net/turning-vim-into-a-modern-python-ide">tutorial</a> 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 <em>vimrc</em> file can be installed through the following:</p>
<pre>git clone https://github.com/sontek/dotfiles.git
cd dotfiles
./install.sh vim</pre>
<p><a href="http://query7.com/wp-content/uploads/git.png"><img src="http://query7.com/wp-content/uploads/git.png" alt="" title="git" width="584" height="348" class="aligncenter size-full wp-image-1665" /></a></p>
<h3>Titanium Mobile Fastdev for Android</h3>
<blockquote><p>The idea behind <a href="http://developer.appcelerator.com/blog/2011/05/titanium-mobile-intro-series-fastdev-for-android.html">Fastdev</a> 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</p></blockquote><p>&#8230;</p>]]></description>
		<link>http://query7.com/this-week-in-web-vim-python-ide-silex-dojo-js-classes-new-appengine-datastore-api</link>
			</item>
	<item>
		<title>Kohana 3.1 Wiki Tutorial</title>
		<description><![CDATA[<p>In this tutorial you will learn how to create a simple wiki using the PHP framework Kohana version 3.1. Several years ago Siddharta Govindaraj created a <a href="http://showmedo.com/videotutorials/video?name=1100000&#038;fromSeriesID=110">screencast</a> demonstrating how to create a wiki using Django, this is essentially the Kohana version of that. It covers using Kohana&#8217;s Routing, ORM and MVC systems. Full source code of the application is available on <a href="https://github.com/lastkarrde/query7kwiki">github</a>.</p>
<p>The wiki application has 3 different pages: </p>
<ul>
<li>/wiki/somepage/save &#8211; handles the saving of the page</li>
<li>/wiki/somepage/edit &#8211; displays a form that allows the user to edit the page</li>
<li>/wiki/somepage &#8211; displays the page</li>
</ul>
<h3>Configuration</h3>
<p>We will be using the ORM module to query the database for our wiki pages so we must load it in the <strong>application/bootstrap.php</strong> file (Line ~99).</p>
<pre>Kohana::modules(array(

	'database'   => MODPATH.'database',   // Database access
	'orm'        => MODPATH.'orm',        // Object Relationship Mapping

	));</pre>
<p>We also need to specify our database configuration settings. This is done in <strong>application/config/database.php</strong>.</p>
<pre>&#60;?php

return array
  (
  	'default' => array
  	(
  		'type'       => 'mysql',
  		'connection' => array(
  			'hostname'   => '127.0.0.1',
  			'username'   => 'root',
  			'password'   => 'root',
  			'persistent' => FALSE,
  			'database'   => 'query7kwiki',
  		),
  		'table_prefix' => '',
  		'charset'      => 'utf8',
  		'caching'      => FALSE,
  		'profiling'    => TRUE,
  	),
  );</pre><p>&#8230;</p>]]></description>
		<link>http://query7.com/kohana-3-1-wiki-tutorial</link>
			</item>
</channel>
</rss>

