<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Query7 &#187; Web Development</title>
	<atom:link href="http://query7.com/category/web-development/feed" rel="self" type="application/rss+xml" />
	<link>http://query7.com</link>
	<description>PHP, Javascript, Python and Web Development</description>
	<lastBuildDate>Sat, 25 Jun 2011 21:29:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>This Week in Web &#8211; PHP Needs X, Python IDEs, Firefox5, jQuery Mobile, Python Games</title>
		<link>http://query7.com/this-week-in-web-php-needs-x-python-ides-firefox5-jquery-mobile-python-games</link>
		<comments>http://query7.com/this-week-in-web-php-needs-x-python-ides-firefox5-jquery-mobile-python-games#comments</comments>
		<pubDate>Sat, 25 Jun 2011 21:29:51 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[This Week in Web]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1818</guid>
		<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>
			<content:encoded><![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 we’re starting with a cleaner baseline for launch.</p></blockquote>
<p>Read a full list of features and changes <a href="http://jquerymobile.com/blog/2011/06/20/jquery-mobile-beta-1-released/">here</a></p>
<h3>Bejeweled Blitz Clone in Python</h3>
<p>Al Sweigart, author of <a href="http://inventwithpython.com/">Invent Your Own Computer Games With Python</a> has written a Bewjewled clone named Gemgem. It is powered by PyGame and is around 540 lines of commented code. It is available to download <a href="http://inventwithpython.com/gemgem.zip">here</a> [zip]. The Invent With Python <a href="http://inventwithpython.com/blog/">blog</a> is a great resource for those wanting to learn Python and PyGame. Sweigart has posted many games on it and continues to keep it updated.</p>
<p><img src="http://query7.com/wp-content/uploads/gemgem_screenshot.jpg" alt="" title="gemgem_screenshot" width="540" height="416" class="aligncenter size-full wp-image-1825" /></p>
<h3>PHP Needs X</h3>
<p>The recent <a href="http://www.xarg.org/2011/06/php-hacking/">PHP Fork</a> has lead to alot of discussion regarding the direction the PHP language is taking toward the future. Other dynamic languages such as Python, Lua and Ruby have been quick to add new features after consulting and discussing them with the community. PHP on the other hand has almost been the exact opposite, with PHP core developers making the majority of decisions themselves with little to no communication with the PHP user base. The folks over at Orchestra.io have created a <a href="http://phpneeds.orchestra.io/">web application</a> that allows people to submit and vote on suggestions for the PHP language. Hopefully this will make clear to the PHP core developers exactly what the community would like to see in future versions of PHP.</p>
<h3>PyCon 2011 IDE Panel</h3>
<p><iframe src="http://blip.tv/play/g4VigquUYgI.html" width="540" height="439" frameborder="0" allowfullscreen></iframe><embed type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#g4VigquUYgI" style="display:none"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/this-week-in-web-php-needs-x-python-ides-firefox5-jquery-mobile-python-games/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Week in Web &#8211; SMF2, ZF2, Python Lamdas, Future of JS, Titanium 1.7</title>
		<link>http://query7.com/this-week-in-web-smf2-zf2-python-lamdas-future-of-js-titanium-1-7</link>
		<comments>http://query7.com/this-week-in-web-smf2-zf2-python-lamdas-future-of-js-titanium-1-7#comments</comments>
		<pubDate>Sat, 18 Jun 2011 20:01:16 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[This Week in Web]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1794</guid>
		<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>
			<content:encoded><![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 />
<iframe src="http://blip.tv/play/g_MngsD3RgI.html" width="540" height="389" frameborder="0" allowfullscreen></iframe><embed type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#g_MngsD3RgI" style="display:none"></embed></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 change.</p>
<p>New cross platform APIs for TCP/IP networking: Sockets and Streams, and supporting APIs for managing Buffers and Codecs.</p>
<p>Universal Binaries: develop a single app for deployment on iPhone and iPad</p>
<p>Major improvements related to memory management and memory leaks for iOS (both iPhone and iPad) which substantially improves stability and performance.</p>
</blockquote>
<h3>How Not To Use Lambdas in Python</h3>
<p><em>e000</em> has posted a humorous <a href="https://gist.github.com/1023982">guide</a> on how you shouldn&#8217;t be using lambda functions in Python. It starts off with the fairly harmless:</p>
<pre>pow = lambda x, power: x**power</pre>
<p>And gets to:</p>
<pre>(lambda flask:
    (lambda app:
        (app,
         app.route('/')(
            lambda: 'Hello World!'
         )
        )[0]
    )(flask.Flask('__name__')).run()
)(__import__('flask'))</pre>
<h3>Zend Framework 2.0.0dev3 Released</h3>
<blockquote><p>The Zend Framework team is pleased to announce the third development release of Zend Framework 2.0, 2.0.0dev3. It is immediately downloadable from the Zend Framework servers:</p>
<ul>
<li><a href="http://framework.zend.com/releases/ZendFramework-2.0.0dev3/ZendFramework-2.0.0dev3.zip">zip package</a></li>
<li><a href="http://framework.zend.com/releases/ZendFramework-2.0.0dev3/ZendFramework-2.0.0dev3.tar.gz">tar.gz package</a></li>
</ul>
<p>NOTE! This release is not considered of production quality, and is released solely to provide a development snapshot for purposes of testing and research. Use at your own risk.</p>
<p>This release includes several features:</p>
<ul>
<li>Refactoring of the Markup component</li>
<li>Refactoring of Zend\Tool and CodeGenerator to better accommodate namespaces</li>
<li>Merging of ZF 1.11.0 features into ZF2 (JSON and YAML Zend\Config adapters, etc.)</li>
<li>Migration and refactoring of the LiveDocx service</li>
<li>The new EventManager component</li>
<li>The proposed Dependency Injection component</li>
</ul>
<p>Documentation is still in progress for several features, including the EventManager. A tutorial on the EventManager is available via <a href="http://www.slideshare.net/weierophinney/zend-framework-20-patterns-tutorial">this ZF2 tutorial slidedeck</a>.</p>
<p>This release is primarily intended to solicit feedback and comments on the proposed Dependency Injection component. Documentation is provided <a href="http://framework.zend.com/wiki/display/ZFDEV2/Zend+DI+QuickStart">on the wiki</a>, which also contains a variety of use cases for which it was designed. Our goal is to develop a component that both promotes rapid application development as well as optimizes for performance in production. We&#8217;d love to get feedback from you on it. </p></blockquote>
<p><a href='http://devzone.zend.com/article/15448'>source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/this-week-in-web-smf2-zf2-python-lamdas-future-of-js-titanium-1-7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Week in Web -Django Hosting, Podcasts, Git Tutorials, Python Apps with Titanium</title>
		<link>http://query7.com/this-week-in-web-django-hosting-podcasts-git-tutorials-python-apps-with-titanium</link>
		<comments>http://query7.com/this-week-in-web-django-hosting-podcasts-git-tutorials-python-apps-with-titanium#comments</comments>
		<pubDate>Sat, 11 Jun 2011 08:19:20 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1769</guid>
		<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>
			<content:encoded><![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><a href="http://kencochrane.net/blog/2011/04/deploying-my-django-application-to-dotcloud/>Dot Cloud</a></li>
<li><a href="http://kencochrane.net/blog/2011/05/apphosted-com-django-hosting-review/">App Hosted</a></li>
<li><a href="http://kencochrane.net/blog/2011/06/djangozoom-com-review/">Django Zoom</a></li>
</ul>
<h3>Podcasts for Programmers, Developers and Web Designers</h3>
<p>James Fuller has assembled a <a href="http://www.jblotus.com/2011/06/04/podcasts-for-programmers-developers-and-web-designers/">list of 8 podcasts</a> that are aimed at web developers. The podcasts range from news discussions to entrepreneur interviews. In addition to the podcasts on the page I recommend <a href="http://techzinglive.com/">TechZing</a>. It&#8217;s a weekly podcast hosted by two freelance programmers who are both working part time on their own start ups. The show alternates between an interview with a web entrepreneur or programmer and a discussion about their startups and news.<br />
<a href="http://www.jblotus.com/2011/06/04/podcasts-for-programmers-developers-and-web-designers/"><img src="http://query7.com/wp-content/uploads/podcasts.png" alt="" title="podcasts" width="483" height="596" class="aligncenter size-full wp-image-1778" /></a></p>
<h3>Writing Titanium Desktop applications with Python</h3>
<p><iframe width="540" height="336" src="http://www.youtube.com/embed/vsgT_-1Es8w" frameborder="0" allowfullscreen></iframe></p>
<h3>php-color</h3>
<p>Harold Asbridge has written a class for PHP that allows easy manipulation and conversion of colors. The source is hosted on <a href="https://github.com/hasbridge/php-color#readme">github</a>.</p>
<pre>$color1 = new Color(0xFFFFFF);<br />
$color2 = new Color(0x888888);</p>
<p>$distance = $color1-&gt;getDistanceRgbFrom($color2);</pre</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/this-week-in-web-django-hosting-podcasts-git-tutorials-python-apps-with-titanium/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Week in Web &#8211; jQuery API, Python Video Archive, Symfony2 Beta, Heatmap.js</title>
		<link>http://query7.com/this-week-in-web-jquery-api-python-video-archive-symfony2-beta-heatmap-js</link>
		<comments>http://query7.com/this-week-in-web-jquery-api-python-video-archive-symfony2-beta-heatmap-js#comments</comments>
		<pubDate>Fri, 03 Jun 2011 10:49:58 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[This Week in Web]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1750</guid>
		<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>
			<content:encoded><![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 it clear, I only coded the navigation and re-styled the documentation. The content is the same as in the <a href="http://api.jquery.com/">official documentation</a> and all credits belong to the jQuery team. Keep up the great work!
</p></blockquote>
<p><a href="http://jqapi.com/"><img src="http://query7.com/wp-content/uploads/jqapi.png" alt="" title="jqapi" width="540" height="366" class="aligncenter size-full wp-image-1752" /></a></p>
<h3>Symfony2 Beta 2&#038;3 Released</h3>
<p>Over the last week the Symfony project has released beta versions 2 and 3 of the Symfony2 PHP Framework. These releases have focused on fixing bugs and improving the <a href="http://symfony.com/doc/current/">documentation</a>. The following tutorials have also been published:</p>
<ul>
<li><a href="http://symfony.com/doc/current/cookbook/console.html">How to create Console/Command-Line Commands</a></li>
<li><a href="http://symfony.com/doc/current/cookbook/configuration/pdo_session_storage.html">How to use PdoSessionStorage to store Sessions in the Database</a></li>
<li><a href="http://symfony.com/doc/current/cookbook/form/twig_form_customization.html">How to customize Form Rendering in a Twig Template</a></li>
<li><a href="http://symfony.com/doc/current/cookbook/assetic/yuicompressor.html">How to minify JavaScripts and Stylesheets with YUI Compressor</a></li>
<li><a href="http://symfony.com/doc/current/cookbook/configuration/external_parameters.html">How to set External Parameters in the Service Container</a></li>
<li><a href="http://symfony.com/doc/current/cookbook/security/voters.html">How to implement your own Voter to blacklist IP Addresses</a></li>
</ul>
<p>Symfony2 can be downloaded from <a href="http://symfony.com/download">here</a>.</p>
<h3>Python Miro Community</h3>
<p><a href="http://python.mirocommunity.org/">python.mirocommunity.org</a> is a video archive and aggregator for Python related videos. Currently they have videos from the last 3 years of Pycon, 2 years of Djangocon as well as other smaller Python conferences. You can subscribe to the RSS feed of latest videos added to the site <a href="http://python.mirocommunity.org/feeds/new/">here</a>.</p>
<p><a href="http://python.mirocommunity.org"><img src="http://query7.com/wp-content/uploads/python.png" alt="" title="python" width="540" height="580" class="aligncenter size-full wp-image-1760" /></a></p>
<h3>Heatmap.js</h3>
<p><a href="http://www.patrick-wied.at/static/heatmapjs/">Heatmap.js</a> is an open source Javascript library written by Patrick Wied that can be used to generate web heatmaps. <em>&#8220;Heatmap instances contain a store in order to colorize the heatmap based on relative data, which means if you&#8217;re adding only a single datapoint to the store it will be displayed as the hottest(red) spot, then adding another point with a higher count, it will dynamically recalculate&#8221;</em>. Heatmap.js is a standalone library (it doesn&#8217;t rely on any frameworks).</p>
<p><img src="http://query7.com/wp-content/uploads/Screen-shot-2011-06-03-at-10.31.57-PM.png" alt="" title="Screen shot 2011-06-03 at 10.31.57 PM" width="540" height="263" class="aligncenter size-full wp-image-1764" /></p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/this-week-in-web-jquery-api-python-video-archive-symfony2-beta-heatmap-js/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Week In Web &#8211; Python, NodeJS CMS, Google APIs, XDebug</title>
		<link>http://query7.com/this-week-in-web-python-nodejs-cms-google-apis-xdebug</link>
		<comments>http://query7.com/this-week-in-web-python-nodejs-cms-google-apis-xdebug#comments</comments>
		<pubDate>Fri, 27 May 2011 11:56:52 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[This Week in Web]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1726</guid>
		<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>
			<content:encoded><![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 APIs will be shut down as per their deprecation policies: Blog Search API, Books Data API and Books JavaScript API (not the new API), Image Search API, News Search API, Patent Search API, Safe Browsing API (v1 only), Translate API, Transliterate API, Video Search API, Virtual Keyboard API</p>
<p>Wherever possible, the documentation includes suggested alternatives designed to help you achieve similar functionality — whether it’s a new version or related offering. We hope these alternatives, along with lengthy deprecation periods, will help minimize the impact and allow us to focus on building great products together. </p></blockquote>
<p>More info and links to APIs in the <a href="http://googlecode.blogspot.com/2011/05/spring-cleaning-for-some-of-our-apis.html">announcement</a>.</p>
<h3>XDebug PHP Talk</h3>
<p>Talk given by Derick Rethans, developer of XDebug. It covers:</p>
<ul>
<li>Getting up and running with XDebug</li>
<li>Interpreting XDebug output</li>
<li>Remote debugging, breakpoints</li>
<li>Finding bottlenecks</li>
</ul>
<p><iframe src="http://player.vimeo.com/video/20618100?title=0&amp;byline=0&amp;portrait=0" width="540" height="304" frameborder="0"></iframe></p>
<h3>Calipso &#8211; NodeJS CMS</h3>
<p><a href="http://calip.so/">Calipso</a> is an open source CMS project started by <a href="https://github.com/cliftonc">Clifton Cunningham</a>. It runs on NodeJS and MongoDB and aims to be a high performance, extendible content publishing platform. Although usable, it is still in early stages of development and Cunningham is looking for more developers. The <a href="http://calip.so/quickstart-install-calipso.html">installation guide</a> will help you get up and running with Calipso quickly and the <a href="http://calip.so/calipso-modules.html">module guide</a> will give you an idea about the architecture of Calipso.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/this-week-in-web-python-nodejs-cms-google-apis-xdebug/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resources for Learning Vim</title>
		<link>http://query7.com/resources-for-learning-vim</link>
		<comments>http://query7.com/resources-for-learning-vim#comments</comments>
		<pubDate>Mon, 23 May 2011 09:48:38 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1710</guid>
		<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>
			<content:encoded><![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 them at <a href="http://vimcasts.org">VimCasts.org</a>. They are typically 5-10 minutes in length and each focus on how to achieve or learn a particular feature of Vim. My favourite VimCast is about <a href="http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/">Synchronizing plugins with git submodules and pathogen</a>. In it Neil walks you through setting up a directory which holds the <em>.vimrc</em> file and all vim plugins. He then shows how you can install Vim plugins as git submodules using the pathogen plugin for Vim.</p>
<h3>vimtutor</h3>
<p>vimtutor is an interactive learning application that comes bundled with Vim. It can be started by entering the command <em>vimtutor</em> into the shell. It should take a beginner around 30 minutes to complete. I recommend doing <em>vimtutor</em> daily until you can comfortably complete it without needing to actively think about the keys you are pressing.</p>
<p><a href="http://query7.com/wp-content/uploads/vimtutor.png"><img src="http://query7.com/wp-content/uploads/vimtutor.png" alt="" title="vimtutor" width="540" height="400" class="aligncenter size-full wp-image-1718" /></a></p>
<h3>Additional Reading</h3>
<ul>
<li><a href="http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118">Understanding Vim</a></li>
<li><a href="http://vim.wikia.com/wiki/Tutorial">Using the basic commands</a></li>
<li><a href="http://jmcpherson.org/editing.html">Efficient Editing with Vim</a></li>
<li><a href="http://rayninfo.co.uk/vimtips.html">Hundreds of Vim 1 liners</a> (amazing read)</li>
<li><a href="http://stackoverflow.com/questions/726894/what-are-the-dark-corners-of-vim-your-mom-never-told-you-about">What are the dark corners your Mom never told you about?</a></li>
<li><a href="http://stackoverflow.com/questions/164847/what-is-in-your-vimrc">What is in your <em>.vimrc</em>?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/resources-for-learning-vim/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Week in Web &#8211; jQuery Chrono, jMongoBrowser, PHP DI, Titanium</title>
		<link>http://query7.com/this-week-in-web-jquery-chrono-jmongobrowser-php-di-titanium</link>
		<comments>http://query7.com/this-week-in-web-jquery-chrono-jmongobrowser-php-di-titanium#comments</comments>
		<pubDate>Fri, 20 May 2011 10:49:14 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[This Week in Web]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1679</guid>
		<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>
			<content:encoded><![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 the following new capabilities:</p>
<ul>
<li>New cross-platform APIs for TCP/IP networking: Sockets and Streams, and supporting APIs for managing Buffers and Codecs.</li>
<li>Fastdev for Android speeds prototyping and testing by enabling local changes to be instantly available to your application. Fastdev eliminates the time-consuming steps of packaging, building and deploying apps with each change.</li>
<li>Universal Binaries: develop a single app for deployment on iPhone and iPad (requires use of Titanium Studio 1.0 Preview).</li>
<li>Improved memory management and stability, especially on iOS.</li>
</ul>
<p>Read the <a href="http://developer.appcelerator.com/apidoc/mobile/1.7.0.RC1/changelog.html">Release Notes</a> for additional details on all new features and improvements available in the release candidate.</p></blockquote>
<h3>Practical PHP Testing Patterns &#8211; Dependency Injection</h3>
<p>As part of his Practical PHP Testing Patterns series Giorgio Sironi has written an <a href="http://css.dzone.com/books/practical-php-testing-patterns/practical-php-testing-patterns-4">article</a> discussing Dependency Injection in PHP. I have read alot of articles about Dependency Injection in PHP and I found this article to be one of the better ones. Rather than focusing on a specific Dependency Injection implementation, Sironi talks about the different injection options available in PHP and shows an example of Dependency Injection being useful in a testing environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/this-week-in-web-jquery-chrono-jmongobrowser-php-di-titanium/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kohana 3.1 Wiki Tutorial Routes</title>
		<link>http://query7.com/kohana-3-1-wiki-tutorial-routes</link>
		<comments>http://query7.com/kohana-3-1-wiki-tutorial-routes#comments</comments>
		<pubDate>Mon, 16 May 2011 07:39:43 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[kohana]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1655</guid>
		<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>
			<content:encoded><![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/&lt;page&gt;/edit')
	-&gt;defaults(array(
		'controller'=> 'wiki',
		'action'	=> 'edit_page',
	));

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

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

Route::set('default', 'wiki')
	-&gt;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'   =&gt; '/query7kwiki/',
	'index_file' =&gt; '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>&lt;?php echo Route::url('wiki-save', array('page' =&gt; $page)); ?&gt;</pre>
<p>In <strong>application/views/single.php</strong> there is a link to the edit that specific page. We can replace the <em>href</em> of the anchor tag with:</p>
<pre>&lt;?php echo Route::url('wiki-edit', array('page' =&gt; $page)); ?&gt;</pre>
<p>In the view <strong>application/views/create.php</strong> change the <em>href</em> of the create page link to:</p>
<pre>&lt;?php echo Route::url('wiki-edit', array('page' =&gt; $page)); ?&gt;</pre>
<p>The wiki application is now portable and can safely be moved to a different server without functionality breaking.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/kohana-3-1-wiki-tutorial-routes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This week in web &#8211; Vim Python IDE, Silex, Dojo JS Classes, New Appengine Datastore API</title>
		<link>http://query7.com/this-week-in-web-vim-python-ide-silex-dojo-js-classes-new-appengine-datastore-api</link>
		<comments>http://query7.com/this-week-in-web-vim-python-ide-silex-dojo-js-classes-new-appengine-datastore-api#comments</comments>
		<pubDate>Fri, 13 May 2011 12:00:56 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[This Week in Web]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1658</guid>
		<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>
			<content:encoded><![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 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 <a href="http://developer.appcelerator.com/blog/2011/05/titanium-mobile-intro-series-fastdev-for-android.html">new debugger support</a> to provide dynamic expression evaluation, and other awesome rapid development features.</p></blockquote>
<p><iframe src="http://player.vimeo.com/video/23382798?title=0&amp;byline=0&amp;portrait=0" width="540" height="337" frameborder="0"></iframe></p>
<h3>JS Classes with Dojo</h3>
<p>David Walsh has written a tutorial titled <a href="http://dojotoolkit.org/documentation/tutorials/1.6/declare/">Classy Javascript with dojo.declare</a>. 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:</p>
<ul>
<li>Inheritance (multiple)</li>
<li>Methods and properties</li>
<li>Constructors</li>
</ul>
<h3>Silex</h3>
<p><a href="http://silex-project.org/">Silex</a> 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 <a href="http://silex-project.org/doc/usage.html">here</a>. Below is a hello world example:</p>
<pre>require_once __DIR__.'/silex.phar'; 

$app = new Silex\Application(); 

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

$app-&gt;run(); </pre>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/this-week-in-web-vim-python-ide-silex-dojo-js-classes-new-appengine-datastore-api/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kohana 3.1 Wiki Tutorial</title>
		<link>http://query7.com/kohana-3-1-wiki-tutorial</link>
		<comments>http://query7.com/kohana-3-1-wiki-tutorial#comments</comments>
		<pubDate>Mon, 09 May 2011 06:09:52 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[kohana]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1632</guid>
		<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>
			<content:encoded><![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>&lt;?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,
  	),
  );

  ?&gt;</pre>
<h3>Model</h3>
<p>Compared to most ORMs (Django, Doctrine, Propel), Kohana&#8217;s ORM is relatively light. You don&#8217;t need to specify the fields of your table as the Kohana ORM doesn&#8217;t attempt to generate the tables for you. It simply maps attribute names of the model object to field names in the database table. Be sure to check the <a href="http://kohanaframework.org/3.1/guide/">Kohana Documentation</a> for a detailed explanation of the ORM.</p>
<p><strong>application/classes/model/page.php</strong></p>
<pre>class Model_Page extends ORM
{

	protected $_table_name = 'page';

	public function rules()
	{
		return array(

			'title' => array(
						array('not_empty')
							)

		);
	}

}</pre>
<p>Execute the following SQL:</p>
<pre>CREATE TABLE `page` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`title` VARCHAR( 255 ) NOT NULL ,
`content` TEXT NOT NULL
) ENGINE = MYISAM ;</pre>
<h3>Routing</h3>
<p>I define all routes at the bottom of <strong>application/bootstrap.php</strong>, however if you are working on a large application it may beneficial in the long run to define them in a separate file and then include them into the bootstrap file.</p>
<p><em>Route::set()</em> accepts 2 parameters. The first is the name of the route and the second is the URI pattern it should match. Because <em>Route::set()</em> returns an instance of <em>Kohana_Route</em>, we can chain the <em>defaults</em> method onto it. There we specify the controller and action that should be executed if the route is matched. </p>
<p>The <em>&lt;page&gt;</em> section of the URI pattern is captured from the URI and automatically passed to the controller method as an argument.</p>
<pre>Route::set('wiki-edit', 'wiki/&lt;page&gt;/edit')
	-&gt;defaults(array(
		'controller'=> 'wiki',
		'action'	=> 'edit_page',
	));

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

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

Route::set('default', 'wiki')
	-&gt;defaults(array(
		'controller' => 'wiki',
		'action'     => 'view_page',
		'id'		 => 'index',
	));
</pre>
<h3>Views</h3>
<p><strong><a href="http://query7.com/kohana-3-1-wiki-tutorial-routes">Read this tutorial on generating domain-independent, non hardcoded URLs</a></strong></p>
<p><strong>application/views/single.php</strong></p>
<pre>&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;&lt;?php echo $page; ?&gt;&lt;/title&gt;
	&lt;/head&gt;

	&lt;body&gt;

		&lt;h1&gt;&lt;?php echo $page; ?&gt;&lt;/h1&gt;
		&lt;p&gt;
			&lt;?php echo $content; ?&gt;
		&lt;/p&gt;
		&lt;hr&gt;
		&lt;p&gt;
			&lt;a href=&quot;/query7kwiki/index.php/wiki/&lt;?php echo $page; ?&gt;/edit&quot;&gt;Edit&lt;/a&gt;
		&lt;/p&gt;
	&lt;/body&gt;
&lt;/html&gt;</pre>
<p><strong>application/views/create.php</strong></p>
<pre>&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;&lt;?php echo $page; ?&gt; - Create&lt;/title&gt;
	&lt;/head&gt;

	&lt;body&gt;

		&lt;h1&gt;&lt;?php echo $page; ?&gt;&lt;/h1&gt;
		&lt;p&gt;This page does not exist. &lt;a href=&quot;/query7kwiki/index.php/wiki/&lt;?php echo $page; ?&gt;/edit/&quot;&gt;Create?&lt;/a&gt;&lt;/p&gt;

	&lt;/body&gt;
&lt;/html&gt;</pre>
<p><strong>application/views/edit.php</strong></p>
<pre>&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;&lt;?php echo $page; ?&gt; - Edit&lt;/title&gt;
	&lt;/head&gt;

	&lt;body&gt;

		&lt;h1&gt;&lt;?php echo $page; ?&gt; - Edit&lt;/h1&gt;
		&lt;p&gt;
			&lt;form method=&quot;POST&quot; action=&quot;/query7kwiki/index.php/wiki/&lt;?php echo $page; ?&gt;/save/&quot;&quot;&gt;

				&lt;textarea rows=&quot;10&quot; cols=&quot;60&quot; name=&quot;content&quot;&gt;&lt;?php echo $content; ?&gt;&lt;/textarea&gt;
				&lt;br /&gt;
				&lt;input type=&quot;submit&quot; value=&quot;Edit Page&quot; name=&quot;submit&quot;&gt;
			&lt;/form&gt;
		&lt;/p&gt;
	&lt;/body&gt;
&lt;/html&gt;</pre>
<h3>Controller</h3>
<p>The wiki only has one controller, <em>Controller_Wiki</em>, located in <strong>application/classes/controller/wiki.php</strong>. All of the methods accept one parameter, the name of the page which is automatically passed by the URL Router.</p>
<p>The <em>action_view_page()</em> method will display the wiki page if it exists or a &#8216;create&#8217; page if it does not exist. <em>$single-&gt;loaded()</em> will return true if the ORM returned a result, so if the page exists we load the &#8216;single&#8217; view and attach the appropriate variables to the view, if it does not exist then we load the &#8216;create&#8217; view.</p>
<pre>public function action_view_page($page)
{

	$single = ORM::factory('page')
			-&gt;where('title', '=', $page)
			-&gt;find();

	if($single->loaded())
	{
		$v = View::factory('single');
		$v-&gt;page = $page;
		$v-&gt;content = $single-&gt;content;
				}
	else
	{
		$v = View::factory('create');
		$v-&gt;page = $page;
	}

	$this-&gt;response-&gt;body($v);

}</pre>
<p><em>action_edit_page()</em> returns the &#8216;edit&#8217; page with the correct <em>content</em> field.</p>
<pre>public function action_edit_page($page)
{
	$single = ORM::factory('page')
			-&gt;where('title', '=', $page)
			-&gt;find();

	if($single-&gt;loaded())
	{
		$content = $single-&gt;content;
	}
	else
	{
		$content = '';
	}

	$v = View::factory('edit');
	$v-&gt;page = $page;
	$v-&gt;content = $content;

	$this-&gt;response-&gt;body($v);
}</pre>
<p><em>action_save_page()</em> handles saving the page after the user submits the edit form. It first checks to see if the page exists. If it does exist then we update the <em>content</em> attribute of the model with whatever was posted in the form. If it doesn&#8217;t exist then we make a new page by instantiating a new model, assigning the <em>title</em> and <em>content</em> attributes and saving it.</p>
<pre>public function action_save_page($page)
{
	$single = ORM::factory('page')
			-&gt;where('title', '=', $page)
			-&gt;find();

	$content = $this-&gt;request-&gt;post('content');

	if($single-&gt;loaded())
	{
		$single-&gt;content = $content;
		$single-&gt;save();
	}
	else
	{
		$new_single = new Model_Page();
		$new_single-&gt;title = $page;
		$new_single-&gt;content = $content;
		$new_single-&gt;save();
	}

	$this-&gt;request-&gt;redirect('http://127.0.0.1/query7kwiki/index.php/wiki/' . $page);

}</pre>
<p>Full source code of the application is available on <a href="https://github.com/lastkarrde/query7kwiki">Github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/kohana-3-1-wiki-tutorial/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

