<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.johnpapa.net/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>John Papa</title>
	
	<link>http://www.johnpapa.net</link>
	<description>Evangelist on the loose</description>
	<lastBuildDate>Fri, 17 May 2013 21:07:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.johnpapa.net/JohnPapa" /><feedburner:info uri="johnpapa" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Add Awesome Images to Your Presentations</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/ItIQ2EDK4QU/</link>
		<comments>http://www.johnpapa.net/fotoliadeal/#comments</comments>
		<pubDate>Fri, 17 May 2013 16:19:54 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fotolia]]></category>
		<category><![CDATA[pluralsight]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=18271</guid>
		<description>Are you interested in using high quality images in your presentations? If you have seen some of my more recent presentations you know do. I love having access to great images I can legally use in my presentations and Pluralsight videos. I&amp;#8217;ve recently worked out a discount with my favorite source for images, Fotolia.com, so you can get a discount on either buying individual images or a subscription. Click Here to Redeem the Exclusive Offer for John Papa’s friends from Fotolia: Fotolia provides me access to affordable images that I can use legally for my videos/presentations (see their terms for [...]</description>
				<content:encoded><![CDATA[<p>Are you interested in using high quality images in your presentations? If you have seen some of my more recent presentations you know do. I love having access to great images I can legally use in my presentations and <a href="http://pluralsight.com/training/Authors/Details/john-papa" target="_blank">Pluralsight videos</a>. I&#8217;ve recently worked out a discount with my favorite source for images, Fotolia.com, so you can get a discount on either buying individual images or a subscription. </p>
<p><a href="http://jpapa.me/fotoliapapa" target="_blank">Click Here to Redeem the Exclusive Offer for John Papa’s friends from Fotolia:<br />
<img src="http://www.johnpapa.net/wp-content/uploads/2013/05/fotolia-52_600.jpg" alt="fotolia-52_600" width="600" height="206" class="aligncenter size-full wp-image-18351" /></a></p>
<p><a href="http://www.fotolia.com/johnpapa" target="_blank">Fotolia</a> provides me access to affordable images that I can use legally for my videos/presentations (<a href="http://www.fotolia.com/Info/Agreements" target="_blank">see their terms for full details</a>). I am always careful to make sure that when I use images I verify that I have rights to do so. Fotolia has been a great source for images and they confirmed that in my case it is OK according to their terms. Of course, please read their terms for yourself. In my case it works as long as I do not distribute the original images, which is fine by me.</p>
<h3>Free Trial Subscription</h3>
<p>This trial offer gets you a 1 month Monthly Subscription for 25 downloads with Fotolia. They&#8217;ll ask for your billing information, but you won’t be charged unless you continue with a paid membership after the trial. You can cancel your subscription at any time. </p>
<p>The subscription is a great way to go as you can get the highest available file size, and the images download directly on to your computer. They even have a direct link to download them to your DropBox (which is what I do).</p>
<h3>Pay as You Go</h3>
<p>The simplest option is to just buy some credits. The deal they set up will give you 50% more Credits on your first purchase and get an additional 5 Credits free. </p>
<h3>See them in Action</h3>
<p><a href="http://jpapa.me/artspeaking" target="_blank"><img src="http://www.johnpapa.net/wp-content/uploads/2013/05/artspeaking-600x91.png" alt="artspeaking" width="600" height="91" class="aligncenter size-large wp-image-17921" /></a></p>
<p>My new course <a href="http://www.pluralsight.com" target="_blank">Pluralsight</a> course &#8220;<a href="http://jpapa.me/artspeaking" target="_blank">The Art of Public Speaking and Effective Presentations&#8221; </a> provides a road-map for delivering effective presentations and motivating an audience through forming your message, designing visuals and demos, preparing for the unexpected, and effective delivery strategies. By the end of this course, you will learn many techniques on how to become a more effective presenter. Along the way you’ll find tips from many accomplished speakers including some of your favorite Pluralsight authors.</p>
<blockquote><p>Disclaimer: I have purchased 40+ images from Fotolia.com using their credit based options and spent over $200 before switching to a subscription. I was very happy with what I got for $200 but the subscription is much cheaper if you want many images. I contacted Fotolia to see if we could work out a discount for a future subscription since I use them so much and they agreed to give me one. In addition they also offered to give a discount to anyone I refer to Fotolia.
</p></blockquote>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ItIQ2EDK4QU:nrvkW3cFBN4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=ItIQ2EDK4QU:nrvkW3cFBN4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ItIQ2EDK4QU:nrvkW3cFBN4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=ItIQ2EDK4QU:nrvkW3cFBN4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ItIQ2EDK4QU:nrvkW3cFBN4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ItIQ2EDK4QU:nrvkW3cFBN4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/ItIQ2EDK4QU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/fotoliadeal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/fotoliadeal/</feedburner:origLink></item>
		<item>
		<title>Toastr 1.3.0 Now Available</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/HsQ9snv3jIQ/</link>
		<comments>http://www.johnpapa.net/toastr-1-3-0-now-available/#comments</comments>
		<pubDate>Thu, 09 May 2013 23:23:02 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[nuget]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[toastr]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=18151</guid>
		<description>One year ago this month Hans Fjällemark and I released Toastr and are happy to see that developers seem to appreciate its simplicity. It&amp;#8217;s now be downloaded on NuGet over 27,000 times. In fact, the recent version was downloaded over 10,000 times the past 2 months! Today we have released version 1.3.0 to github and NuGet. Toastr is a simple JavaScript toast notification library that is small, easy to use, and extendable. It allows you to create simple toasts with HTML5 and JavaScript like this: Simply include the files in your HTML page and write a simple line of code [...]</description>
				<content:encoded><![CDATA[<p>One year ago this month <a href="http://twitter.com/hfjallemark">Hans Fjällemark</a> and I released Toastr and are happy to see that developers seem to appreciate its simplicity. It&#8217;s now be downloaded on NuGet over 27,000 times. In fact, the recent version was downloaded over 10,000 times the past 2 months! Today we have released version 1.3.0 to github and NuGet.</p>
<p><a href="http://jpapa.me/c7toastr" target="_blank">Toastr is a simple JavaScript toast notification library</a> that is small, easy to use, and extendable. It allows you to create simple toasts with HTML5 and JavaScript like this:</p>
<p><a href="/wp-content/uploads/media/Windows-Live-Writer/toastr_13960/image_2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="/wp-content/uploads/media/Windows-Live-Writer/toastr_13960/image_thumb.png" alt="image" width="377" height="79" border="0" /></a></p>
<p>Simply include the files in your HTML page and write a simple line of code like this:</p>
<pre class="prettyprint linenumstrigger linenums">
var msg = 'Are you the six fingered man?';
var title = 'Inigo Montoya';
toastr.success(msg, title);</pre>
<p align="justify">Click the this button to try it yourself.</p>
<p><button id="tryToastrButton">Try Toastr</button></p>
<link href="http://codeseven.github.io/toastr/toastr.css" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script><br />
<script src="http://codeseven.github.io/toastr/toastr.js"></script><br />
<script>
$('#tryToastrButton').click(function(){
    toastr.success('As you wish', 'Princess Bride Quotes');
});
</script></p>
<h3>Get Toastr 1.3.0</h3>
<p>You can grab the latest bits from NuGet or github</p>
<ul>
<li>Install&nbsp;<a href="http://nuget.org/packages/toastr" target="_blank">toastr from NuGet</a></li>
<li>Fork <a href="http://jpapa.me/c7toastr" target="_blank">toastr on github</a></li>
</ul>
<h3>What&#8217;s New in 1.3.0</h3>
<ul>
<li>Added onFadeIn and onFadeOut callbacks.</li>
</ul>
<pre class="prettyprint linenumstrigger linenums">
toastr.options.onFadeIn = 
    function() { 
        console.log('hello'); 
    };
</pre>
<ul>
<li>Added option <code>newestOnTop</code> to show toasts in oldest or newest first order.</li>
</ul>
<pre class="prettyprint ">
toastr.options.newestOnTop = false;
</pre>
<ul>
<li>Fixed margins on full width toasts</li>
<li>Added LESS file.</li>
<li>Added min file for JS and CSS</li>
<li>Added missing vendor prefixes in CSS.</li>
<li>Various minor bug fixes.</li>
<li>Added unit tests for new features.</li>
</ul>
<h3 class="prettyprint linenums">Live Demo</h3>
<p>Needs more information? Check out the readme on the github page for details on the simple API. You can also find a link to <a href="http://jpapa.me/c7toastr" target="_blank">the live toastr demo on github</a> or you can <a href="http://codeseven.github.com/toastr/" target="_blank">go directly to the toastr demo from here</a>.</p>
<blockquote><p>Some of these features came right from pull requests from Toastr users. If you have an idea for Toastr, feel free to contribute and make a pull request. just be sure to also include unit tests to cover any code changes.
</p></blockquote>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=HsQ9snv3jIQ:HvF90yhMJYg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=HsQ9snv3jIQ:HvF90yhMJYg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=HsQ9snv3jIQ:HvF90yhMJYg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=HsQ9snv3jIQ:HvF90yhMJYg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=HsQ9snv3jIQ:HvF90yhMJYg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=HsQ9snv3jIQ:HvF90yhMJYg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/HsQ9snv3jIQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/toastr-1-3-0-now-available/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/toastr-1-3-0-now-available/</feedburner:origLink></item>
		<item>
		<title>The Art of Public Speaking and Effective Presentations</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/NEQ8oPl2x2M/</link>
		<comments>http://www.johnpapa.net/the-art-of-public-speaking-and-effective-presentations/#comments</comments>
		<pubDate>Mon, 06 May 2013 00:37:11 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[pluralsight]]></category>
		<category><![CDATA[speaking]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=18051</guid>
		<description>Looking to nail that coming presentation? Do you want to learn how to tell a story, engage the audience, leave them inspired? Taking a little different direction than my more recent end-to-end Single Page Application development courses, I share with you some of the lessons (some I learned the hard way) and techniques that I&amp;#8217;ve developed over the years in my experience as a presenter. My new course Pluralsight course &amp;#8220;The Art of Public Speaking and Effective Presentations&amp;#8221; provides a road-map for delivering effective presentations and motivating an audience through forming your message, designing visuals and demos, preparing for the [...]</description>
				<content:encoded><![CDATA[<p>Looking to nail that coming presentation? Do you want to learn how to tell a story, engage the audience, leave them inspired? Taking a little different direction than my more recent end-to-end <a href="http://jpapa.me/spajsps" target="_blank">Single Page Application development courses</a>, I share with you some of the lessons (some I learned the hard way) and techniques that I&#8217;ve developed over the years in my experience as a presenter. </p>
<p><a href="http://jpapa.me/artspeaking" target="_blank"><img src="http://www.johnpapa.net/wp-content/uploads/2013/05/artspeaking-600x91.png" alt="artspeaking" width="600" height="91" class="aligncenter size-large wp-image-17921" /></a></p>
<p>My new course <a href="http://www.pluralsight.com" target="_blank">Pluralsight</a> course &#8220;<a href="http://jpapa.me/artspeaking" target="_blank">The Art of Public Speaking and Effective Presentations&#8221; </a> provides a road-map for delivering effective presentations and motivating an audience through forming your message, designing visuals and demos, preparing for the unexpected, and effective delivery strategies. By the end of this course, you will learn many techniques on how to become a more effective presenter. Along the way you’ll find tips from many accomplished speakers including some of your favorite Pluralsight authors.</p>
<h3>Main Focus</h3>
<p>In the course I emphasize the importance of preparation and give practical examples that you can use in your own presentations. It all starts with your message. That&#8217;s message in the singular form, because I truly believe that the most effective presentations have 1 true message. There may be many factors and mini stories in the presentation, but they all should point back to emphasizing that message. Then I flow through how to tell a story around your message, how to prepare visuals and demos, and how to deal with the unexpected. I then move into a few factors that can really help you once you are delivering your presentation.</p>
<h3>Topics</h3>
<p>Here is the flow of the course:</p>
<ul>
<li>Public Speaking</li>
<li>Finding and Crafting Your Message</li>
<li>Tell Your Story</li>
<li>Organizing Your Flow and Your Visuals</li>
<li>Demos</li>
<li>Preparing for a Series of Unfortunate Events</li>
<li>Emotional Intelligence and Communication</li>
<li>Effective Delivery</li>
<li>Epic Successes and Failures</li>
</ul>
<p>I hope you enjoy it!</p>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=NEQ8oPl2x2M:rOu6y2uCzGg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=NEQ8oPl2x2M:rOu6y2uCzGg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=NEQ8oPl2x2M:rOu6y2uCzGg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=NEQ8oPl2x2M:rOu6y2uCzGg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=NEQ8oPl2x2M:rOu6y2uCzGg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=NEQ8oPl2x2M:rOu6y2uCzGg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/NEQ8oPl2x2M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/the-art-of-public-speaking-and-effective-presentations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/the-art-of-public-speaking-and-effective-presentations/</feedburner:origLink></item>
		<item>
		<title>Code Camper Jump-Start SPA Now Open Source</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/6Odq9fdkc3E/</link>
		<comments>http://www.johnpapa.net/code-camper-jump-start-spa-now-open-source/#comments</comments>
		<pubDate>Thu, 02 May 2013 23:15:53 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[pluralsight]]></category>
		<category><![CDATA[SPA]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=17971</guid>
		<description>I&amp;#8217;m proud to announce that the Code Camper Jump-Start SPA with Durandal, Knockout, Breeze and Toastr is now open sourced on GitHub! If you enjoyed my Single Page Application Jump-Start course, you will be happy to learn that the source code for the final SPA Jump-Start solution is now available! The great folks at Pluralsight worked with me to host the final solution of Code Camper Jump-Start (CCJS) on GitHub. You can grab the code, fork it, make pull requests, or just browse! My SPA Jump-Start course helps you walk through and build CCJS step by step. The step by [...]</description>
				<content:encoded><![CDATA[<p>I&#8217;m proud to announce that the Code Camper Jump-Start SPA with <a href="http://www.durandaljs.com" target="_blank">Durandal</a>, <a href="http://www.knockoutjs.com" target="_blank">Knockout</a>, <a href="http://breezejs.com" target="_blank">Breeze </a>and <a href="http://nuget.org/packages/toastr" target="_blank">Toastr </a>is now open sourced on GitHub! </p>
<p>If you enjoyed my <a href="http://jpapa.me/spajsps" target="_blank">Single Page Application Jump-Start course</a>, you will be happy to learn that the <a href="http://jpapa.me/ccjshtcode" target="_blank">source code for the final SPA Jump-Start solution is now available</a>! The great folks at Pluralsight worked with me to host the final solution of Code Camper Jump-Start (CCJS) on GitHub. You can grab the code, fork it, make pull requests, or just browse!</p>
<p><a href="http://jpapa.me/spajsps" target="_blank"><img src="http://www.johnpapa.net/wp-content/uploads/2013/03/spajs.png" alt="spajs" width="600" height="74" class="aligncenter size-full wp-image-16391" /><br />
</a></p>
<p>My SPA Jump-Start course helps you walk through and build CCJS step by step. The step by step code is exclusively  available to Pluralsight Plus subscribers and the final source is now hosted in this GitHub repository.</p>
<p>I hope you enjoy the code and thank you for watching my courses!</p>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=6Odq9fdkc3E:L1UMqmbo5no:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=6Odq9fdkc3E:L1UMqmbo5no:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=6Odq9fdkc3E:L1UMqmbo5no:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=6Odq9fdkc3E:L1UMqmbo5no:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=6Odq9fdkc3E:L1UMqmbo5no:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=6Odq9fdkc3E:L1UMqmbo5no:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/6Odq9fdkc3E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/code-camper-jump-start-spa-now-open-source/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/code-camper-jump-start-spa-now-open-source/</feedburner:origLink></item>
		<item>
		<title>Better Demos with AutoHotKey</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/ltL8mxyUZDc/</link>
		<comments>http://www.johnpapa.net/autohotkey/#comments</comments>
		<pubDate>Thu, 02 May 2013 01:24:40 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[pluralsight]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[speaking]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=17631</guid>
		<description>Stressing over your upcoming presentation where you have to type a bunch of code from memory or from a script? AutoHotKey can help you automate much of the &amp;#8220;writing&amp;#8221; of the code so you can write demos on the fly. AutoHotKey does so much more, but for a quick and simple way to write demos on the fly, it really is top-notch. You can learn more about AutoHotKey and other presentation tips in my upcoming Pluralsight course &amp;#8220;The Art of Public Speaking and Effective Presentations&amp;#8221; You could use notepad, a snippet tool, or even the toolbox in Visual Studio. But [...]</description>
				<content:encoded><![CDATA[<p>Stressing over your upcoming presentation where you have to type a bunch of code from memory or from a script? <a href="http://www.autohotkey.com" target="_blank">AutoHotKey</a> can help you automate much of the &#8220;writing&#8221; of the code so you can write demos on the fly. AutoHotKey does so much more, but for a quick and simple way to write demos on the fly, it really is top-notch.</p>
<blockquote><p>You can learn more about AutoHotKey and other presentation tips in my upcoming <a href="http://www.pluralsight.com" target="_blank">Pluralsight</a> course &#8220;<a href="http://jpapa.me/artspeaking" target="_blank">The Art of Public Speaking and Effective Presentations&#8221; <img src="http://www.johnpapa.net/wp-content/uploads/2013/05/artspeaking-600x91.png" alt="artspeaking" width="600" height="91" class="aligncenter size-large wp-image-17921" /></a>
</p></blockquote>
<p>You could use notepad, a snippet tool, or even the toolbox in Visual Studio. But AutoHotKey provides more than those and it is a free tool. For example, AutoHotKey works in any editor. Create a script where you define your keystrokes and map them to code that will be pasted.</p>
<h3>How it Helps</h3>
<p>Lets say you are in a presentation and staring at a mostly blank code file. You are supposed to be typing in 30 lines of code from scratch. Instead of typing and making mistakes along the way, copying and pasting code, pulling in finished solutions, or using a toolbox, etc &#8230; you can type the code in chunks. Point by point you fill in the blanks by typing custom keystroke mappings that you define.</p>
<p>Often I will start with a blank code file and then use bookmarks in Visual Studio to define where I want my code to go. Another technique I use is to start with an empty file that contains comments where the code should go. This way I know where each snippet should be entered.</p>
<h3>Creating a Script</h3>
<p>First, create a file with an <code>*.ahk</code> extension. Then edit that file in notepad, notepad++ or any other text editor. </p>
<p>Next, create a keystroke mapping that when typed, and followed by a <code>TAB</code> keystroke, will paste your code snippet. The keystroke mapping should be surrounded by colons. Specifically, put 2 colons before the mapping and 2 colons after the mapping. Like this: <code> ::demo01:: </code>. Then when you type <code>demo01</code> followed by a <code>TAB</code> you should expect your code to be pasted.</p>
<p>Wait, what code? Right, it&#8217;s time to show how to define the code that will be pasted. Following your keystroke mapping type <code>Clipboard = (   )</code>. This means when you type your keystroke mapping that it will copy whatever is inside the parenthesis to the clipboard of your PC. Easy enough. So this is where you put your code!</p>
<p>Put your code inside these parentheses, taking care to make sure you use the proper whitespace. Whatever you put in here is exactly what goes to the clipboard. </p>
<p>Finally, now that you have told AutoHotKey what to move to the clipboard, you need to tell it to paste the code. You do that by sending the paste command using <code>send ^v</code> and wrapping up with the <code>return</code> keyword. </p>
<p>The sample below puts this all together.</p>
<pre class="prettyprint linenumstrigger linenums">
::demo01::
Clipboard = 
(
        var saveChanges = function () {
            return manager.saveChanges()
                .then(saveSucceeded)
                .fail(saveFailed);
            

        };
)
send ^v
return
</pre>
<p>Normally, I will have a few of these keystroke mappings in a ahk file. When you install AutoHotKey it adds a feature where you can right click a ahk file in windows explorer and then compile it. So you can compile the script by right clicking the file and choosing <code>compile script</code>. This creates an executable file, which of course you run.</p>
<p>Once the file is running, anytime you use the keystroke mappings followed by a <code>TAB</code> your code will be pasted (as long as you are in an editor of some sort).</p>
<p>This makes it really simple to create a script with a bunch of code snippets that you can type on the fly!</p>
<h3>Try It Now</h3>
<p>You can <a href="https://dl.dropboxusercontent.com/u/4355429/keep/autohotkey%20demo.ahk">download a sample script (also shown in my new Pluralsight course) right here</a>. Try this out by downloading and installing AutoHotKey, compiling the script, running it, then typing the keystrokes in an editor.</p>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ltL8mxyUZDc:_6JRi4kapzw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=ltL8mxyUZDc:_6JRi4kapzw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ltL8mxyUZDc:_6JRi4kapzw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=ltL8mxyUZDc:_6JRi4kapzw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ltL8mxyUZDc:_6JRi4kapzw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ltL8mxyUZDc:_6JRi4kapzw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/ltL8mxyUZDc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/autohotkey/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/autohotkey/</feedburner:origLink></item>
		<item>
		<title>Free Video: SPA Primer with Durandal, Knockout and Breeze</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/1J5Uc1VvjRI/</link>
		<comments>http://www.johnpapa.net/free-video-spa-primer-with-durandal-knockout-and-breeze/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 00:05:03 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[breeze]]></category>
		<category><![CDATA[durandal]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[knockout]]></category>
		<category><![CDATA[SPA]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=17691</guid>
		<description>I had the fortune to join a cast of heavy hitters at the free DotNetConf live event. My session was a 50 minute primer on SPA that tells a story about what a SPA can do. Javier Lozano and Scott Hanselman hosted the free event through a Google Hangout, which turned out pretty cool. They have now made the videos freely available. You can see my video below. If you are looking to evaluate if SPA is right for you, I think you&amp;#8217;ll enjoy this video. If you want more detail on &amp;#8220;how&amp;#8221; to build a SPA, you can check [...]</description>
				<content:encoded><![CDATA[<p>I had the fortune to join a cast of heavy hitters at the <a href="http://www.dotnetconf.net" target="_blank">free DotNetConf live event. </a>My session was a 50 minute primer on SPA that tells a story about what a SPA can do. <a href="https://twitter.com/jglozano" target="_blank">Javier Lozano</a> and <a href="https://twitter.com/shanselman" target="_blank">Scott Hanselman</a> hosted the free event through a Google Hangout, which turned out pretty cool. They have now made the videos freely available. You can see my video below. If you are looking to evaluate if SPA is right for you, I think you&#8217;ll enjoy this video. If you want more detail on &#8220;how&#8221; to build a SPA, you can check out my full length courses at Pluralsight.</p>
<blockquote><p>
<a href="http://jpapa.me/spajsps" target="_blank"><img src="http://www.johnpapa.net/wp-content/uploads/2013/03/spajs.png" alt="spajs" width="600" height="74" class="aligncenter size-full wp-image-16391" /></a><br />
Learn more about Durandal and these topics from my <a href="http://jpapa.me/spajsps" target="_blank">beginner level SPA JumpStart course for Pluralsight</a>.
</p></blockquote>
<p>I&#8217;ve spent a lot of time lately with JavaScript both with and without libraries, and while I love vanilla.js (just using JavaScript as it is powerful on its own), I prefer to take advantage of well built and stable libraries such as Durandal, Knockout and Breeze.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/Q85Ifd4vWGM" frameborder="0" allowfullscreen></iframe></p>
<blockquote><p>
<a href="http://jpapa.me/spaps" target="_blank"><img src="http://www.johnpapa.net/wp-content/uploads/2012/11/spaps.png" alt="spa" width="600" height="74" class="aligncenter size-full wp-image-16391" /></a><br />
Go deeper on how to build a SPA from my <a href="http://jpapa.me/spaps" target="_blank">intermediate level SPA course for Pluralsight</a>. </p>
<p><a href="http://jpapa.me/komvvm" target="_blank"><img src="http://www.johnpapa.net/wp-content/uploads/2013/03/image_3.png" alt="knockout" width="600" height="74" class="aligncenter size-full wp-image-16391" /></a><br />
Learn more about Knockout.js and data binding in JavaScript <a href="http://jpapa.me/komvvm" target="_blank">Knockout course for Pluralsight</a>.</p></blockquote>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=1J5Uc1VvjRI:2QtVIZj24Vo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=1J5Uc1VvjRI:2QtVIZj24Vo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=1J5Uc1VvjRI:2QtVIZj24Vo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=1J5Uc1VvjRI:2QtVIZj24Vo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=1J5Uc1VvjRI:2QtVIZj24Vo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=1J5Uc1VvjRI:2QtVIZj24Vo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/1J5Uc1VvjRI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/free-video-spa-primer-with-durandal-knockout-and-breeze/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/free-video-spa-primer-with-durandal-knockout-and-breeze/</feedburner:origLink></item>
		<item>
		<title>What Breeze can do for You</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/pHC6OC6DSN4/</link>
		<comments>http://www.johnpapa.net/spajs04/#comments</comments>
		<pubDate>Sat, 13 Apr 2013 02:58:43 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=17271</guid>
		<description>Right about now you are wondering what Breeze brings that you can&amp;#8217;t do on your own. Right about now you are wondering why you should bother learning another technology. Right about now you are wondering if you should continue to read this post. If you do, you won&amp;#8217;t be sorry. Breeze is that valuable to rich web apps. Breeze.js is a client side JavaScript library that manages rich data. Before Breeze existed, I wrote a SPA and it had 20 JavaScript files and modules for data management that total about 1550+ lines of code. I wrote all of this code [...]</description>
				<content:encoded><![CDATA[<p>Right about now you are wondering what Breeze brings that you can&#8217;t do on your own. Right about now you are wondering why you should bother learning another technology. Right about now you are wondering if you should continue to read this post. If you do, you won&#8217;t be sorry. Breeze is that valuable to rich web apps.</p>
<p><img src="http://www.johnpapa.net/wp-content/uploads/2013/04/sansbreeze-130x300.png" alt="sansbreeze" width="130" height="300" class="alignright size-medium wp-image-17451" /><a href="http://breezejs.com" target="_blank">Breeze.js</a> is a client side JavaScript library that manages rich data. Before Breeze existed, I wrote a SPA and it had 20 JavaScript files and modules for data management that total about 1550+ lines of code. I wrote all of this code to do a fraction of what Breeze does. It was painful to write and every time I added a new entity or CRUD method it got much bigger. I rewrote this logic using Breeze and ended up with 2 files (datacontext.js and model.js) and had 350+ lines of code, more functionality, and every time I add a new entity the code increases by just a few lines. <strong>That&#8217;s 1/4 the code, about 1/4 the time, and a more value. Does that interest you?</strong></p>
<h3>Remember Upshot?</h3>
<p>You may recall a library that the ASP.NET team started a while back called Upshot.js. Upshot had a lot of promise for rich data management, but <a href="http://aspnetwebstack.codeplex.com/wikipage?title=Roadmap" target="_blank">was dropped due to resources</a>. That left the door wide open and in came a Breeze. Breeze does quite a bit, including making all entity properties observable (for Knockout), but for this post let&#8217;s focus on the features below as they are proof enough that you should take it seriously:</p>
<ul>
<li>Caching and Sharing</li>
<li>Easy Queries</li>
<li>Object Graphs</li>
<li>Works with <a href="http://knockoutjs.com" target="_blank">Knockout</a> and <a href="http://angularjs.org" target="_blank">Angular</a></li>
<li>Support</li>
</ul>
<blockquote><p>
<a href="http://jpapa.me/spajsps" target="_blank"><img src="http://www.johnpapa.net/wp-content/uploads/2013/03/spajs.png" alt="spajs" width="600" height="74" class="aligncenter size-full wp-image-16391" /></a><br />
Learn more about Durandal and these topics from my <a href="http://jpapa.me/spajsps" target="_blank">beginner level SPA JumpStart course for Pluralsight</a>, available now.
</p></blockquote>
<h3>Separation</h3>
<p>I choose to use separation patterns. So my data logic goes in a datacontext module in JavaScript. It exposes that data logic to the view models or controllers on the client. I slide Breeze right inside of the datacontext and expose a simple API so my viewmodels and controllers can share the datacontext. This makes it easy for the viewmodel to call for data doing something like <code>datacontext.getCustomers</code> or <code>datacontext.Save</code>.</p>
<h3>Caching and Sharing</h3>
<p>Let&#8217;s say you have an app with customer data. You may show customer information on views for a customer list, customer details, orders, sales, reports, and more. If you change a customer&#8217;s name or other information in one view, you expect it to ripple throughout the app. If you get the customer data in each viewmodel and store it separately, this becomes problematic. Sure you could use events to communicate with them all, but then you are storing that customer data in several places: not very <a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself" target="_blank">DRY</a>.</p>
<p>Breeze helps cache the customer data the first time you get it. Then when you go to another view that needs that data, Breeze supplies it. By wrapping this all in the datacontext, you have one place to go for your data. If you update the customer, Breeze has 1 copy of it and all places that point there are updated. Pretty slick!</p>
<h3>Easy Queries</h3>
<p>A library isn&#8217;t valuable unless it&#8217;s you can use it easily. Who wants to maintain something convoluted? Not me. Words can&#8217;t say how easy it is to query Breeze. So let&#8217;s just look at some examples.</p>
<pre class="prettyprint linenumstrigger linenums">
var query = breeze.EntityQuery
           .from(&quot;Customers&quot;)
           .where(&quot;CompanyName&quot;, &quot;startsWith&quot;, &quot;A&quot;)
           .orderBy(&quot;CompanyName&quot;);

var promise = manager.executeQuery(query)
              .then(querySucceeded)
              .fail(queryFailed);
</pre>
<p>This code creates a query that gets customers whose company name starts with the letter A and orders them by the company name. Then the query is executed against the remote data service and the data is returned through a promise. Pretty simple and self-explanatory.</p>
<h3>Object Graphs</h3>
<p>Real apps use object graphs. Real apps need to navigate between the entities in an object graph (both parent-child and child-parent). Real apps can be difficult. Breeze can retrieve object graphs and make it easy to navigate their relationships. Go from customer to one of their orders to one of the order details, and then back up if you like. Grab an entire object graph in one call or just get the top-level. Whatever you need, it&#8217;s pretty great to be able to get parts of or entire object graphs as needed.</p>
<p>Breeze allows you to connect objects on the client that you retrieved in separate calls, too. For example, go get a list of sales people objects (for customers). Breeze caches the sales people entities. Then go get a list of customers and their orders and Breeze caches those too. breeze also sees that the customer objects have a salesperson. We already have the sales people in cache so Breeze connects the entities and allows you to navigate between them. So as you get the data Breeze connect them in its cache.</p>
<h3>Knockout and Angular</h3>
<p>Breeze is built to adapt to other frameworks. So if you want to use Angular, Knockout, or Backbone you are in luck: Breeze is very happy to work with all of those. Out of the box Breeze works with Knockout, but you can change the adapter setting and switch to using Angular or Backbone. This gives Breeze a big advantage for future proofing in case you want to use one of these frameworks now and in the future choose a new popular framework.</p>
<p><img src="http://www.johnpapa.net/wp-content/uploads/2013/04/breezestack1-300x155.png" alt="breezestack1" width="300" height="155" class="aligncenter size-medium wp-image-17371" /></p>
<p>Here is an example of getting employee data with Breeze and data binding the resulting entities using Knockout.</p>
<pre class="prettyprint linenumstrigger linenums">
&lt;!-- Knockout template --&gt;
&lt;ul data-bind=&quot;foreach: results&quot;&gt;
  &lt;li&gt;
    &lt;span data-bind=&quot;text:FirstName&quot;&gt;&lt;/span&gt;
    &lt;span data-bind=&quot;text:LastName&quot;&gt;&lt;/span&gt;
  &lt;/li&gt;
&lt;/ul&gt;
 
// bound to employees from query
manager.executeQuery(breeze.EntityQuery.from(&quot;Employees&quot;))
   .then(function(data){ 
       ko.applyBindings(data);
    });
</pre>
<p>Here is an example of getting employee data with Breeze and data binding the resulting entities using Angular.</p>
<pre class="prettyprint linenumstrigger linenums">
&lt;!-- Angular template --&gt;
&lt;li data-ng-repeat=&quot;emp in employees&quot;&gt;
    &lt;label&gt;{{emp.FirstName}}&lt;/label&gt;
    &lt;label&gt;{{emp.LastName}}&lt;/label&gt;
&lt;/li&gt;
 
// bound to employees from query
manager.executeQuery(breeze.EntityQuery.from(&quot;Employees&quot;))
   .then(function(data) { 
       $scope.employees = data.results; 
    });
</pre>
<h3>Need SPA Support?</h3>
<p>Want someone to have your back? The folks who make Breeze licensed it with an MIT license. They also offer support and consulting services for building a SPA with Breeze using technologies such as Durandal, Knockout, Backbone and Angular. <a href="http://www.ideablade.com/" target="_blank">IdeaBlade </a>has been in the rich data business for a decade and has a great track record in this space with various other products. Breeze is their answer to the JavaScript and web space. So <a href="http://www.breezejs.com/support?from=jp" target="_blank">if you need support for your project, check out your options here</a>.</p>
<h3>What Else?</h3>
<p>Do you want to save entities to local storage and later pull them back into Breeze? No problem. Do you want to query locally first and if the data is not there go to the remote service? No problem. Do you want the client to tell the server to do server-side paging and filtering? No problem! Breeze can do quite a lot and has saved me tons of code in my apps. I highly recommend checking it out.</p>
<h3>SPA Jump-Start Series</h3>
<ul>
<li><a href="http://johnpapa.net/spajs01" target="_blank">Beginning SPA &#8211; Part 1</a></li>
<li><a href="http://johnpapa.net/spajs02" target="_blank">SPA Architecture &#8211; Part 2</a></li>
<li><a href="http://johnpapa.net/spajs03" target="_blank">Durandal &#8211; Part 3</a></li>
<li><a href="http://johnpapa.net/spajs04" target="_blank">Breeze &#8211; Part 4</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=pHC6OC6DSN4:m8PfH2DiPnI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=pHC6OC6DSN4:m8PfH2DiPnI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=pHC6OC6DSN4:m8PfH2DiPnI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=pHC6OC6DSN4:m8PfH2DiPnI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=pHC6OC6DSN4:m8PfH2DiPnI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=pHC6OC6DSN4:m8PfH2DiPnI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/pHC6OC6DSN4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/spajs04/feed/</wfw:commentRss>
		<slash:comments>55</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/spajs04/</feedburner:origLink></item>
		<item>
		<title>Best JavaScript Library Ever</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/cAyGuvXZ_jU/</link>
		<comments>http://www.johnpapa.net/best-javascript-library-ever/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 00:14:07 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=17131</guid>
		<description>Here is a sneak peek at my next course for Pluralsight. It is all about telekinesis.js, available on github! This is an April Fools Day joke &amp;#8230; leave your sighs at the door. It fully entertained my children</description>
				<content:encoded><![CDATA[<p>Here is a sneak peek at my next course for <a href="http://pluralsight.com" target="_blank">Pluralsight</a>. It is all about <a href="https://github.com/johnpapa/telekinesis" target="_blank">telekinesis.js, available on github</a>!</p>
<p><iframe width="480" height="360" src="http://www.youtube.com/embed/_CBU8slKeN8" frameborder="0" allowfullscreen></iframe></p>
<blockquote><p>This is an April Fools Day joke &#8230; leave your sighs at the door. It fully entertained my children <img src='http://www.johnpapa.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></blockquote>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=cAyGuvXZ_jU:fsZPPtBwdRg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=cAyGuvXZ_jU:fsZPPtBwdRg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=cAyGuvXZ_jU:fsZPPtBwdRg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=cAyGuvXZ_jU:fsZPPtBwdRg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=cAyGuvXZ_jU:fsZPPtBwdRg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=cAyGuvXZ_jU:fsZPPtBwdRg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/cAyGuvXZ_jU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/best-javascript-library-ever/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/best-javascript-library-ever/</feedburner:origLink></item>
		<item>
		<title>3 Features You Absolutely Need in a SPA</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/aRmBL5bSNk0/</link>
		<comments>http://www.johnpapa.net/spajs03/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 19:19:17 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[durandal]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[SPA]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=16861</guid>
		<description>Uh oh, someone broke your HTML app! Those darn users pressed the back button and just lost all the changes they made on the previous View! And you put all that work into building an amazing View and ViewModel pair &amp;#8230; sigh. You coded all these great View and ViewModel (aka VVM) pairs but how do you marry them together and display them in your browser in the appropriate area? What You Need To Know These are issues that many HTML app developers face. You could code this &amp;#8220;plumbing&amp;#8221; yourself but it would quickly become something you&amp;#8217;d feel should be [...]</description>
				<content:encoded><![CDATA[<p>Uh oh, someone broke your HTML app! Those darn users pressed the back button and just lost all the changes they made on the previous View! And you put all that work into building an amazing View and ViewModel pair &#8230; sigh. You coded all these great View and ViewModel (aka VVM) pairs but how do you marry them together and display them in your browser in the appropriate area? </p>
<h3>What You Need To Know</h3>
<p>These are issues that many HTML app developers face. You could code this &#8220;plumbing&#8221; yourself but it would quickly become something you&#8217;d feel should be shared to all of your projects. You need to handle application life-cycle for those common situations. When does your VVM load? When does it go away? What if you want to prevent (or at least interrogate) a user leaving a View/ViewModel? How do compose the View and the ViewModel? App life-cycle and VVM Composition is a critical piece of an app. How do you intercept url navigation and keep the user on the client? These 3 areas are where Durandal can really make a positive difference. </p>
<ul>
<li>URL Routing</li>
<li>VVM Composition</li>
<li>App Life Cycle</li>
</ul>
<blockquote><p>
<a href="http://jpapa.me/spajsps" target="_blank"><img src="http://www.johnpapa.net/wp-content/uploads/2013/03/spajs.png" alt="spajs" width="600" height="74" class="aligncenter size-full wp-image-16391" /></a><br />
Learn more about Durandal and these topics from my <a href="http://jpapa.me/spajsps" target="_blank">beginner level SPA JumpStart course for Pluralsight</a>, available now.
</p></blockquote>
<h3>Durandal</h3>
<p>In a SPA it&#8217;s pretty darn important to be able to show a View, pair it with a ViewModel, and be able to hook into events in the app&#8217;s life-cycle. <a href="http://durandaljs.com" target="_blank">Durandal</a> makes this super simple. You may not have heard of Durandal before as it is a newer player in this field, but it is built by the makers of Caliburn Micro, a very popular MVVM framework for .NET and XAML. It follows convention over configuration, which simply means if you name things certain ways, they just work. Kind of cool <img src='http://www.johnpapa.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Of course you can override those conventions yourself too. </p>
<p>Is it worth learning? Yes! I rewrote my entire demo app in just a few days using Durandal and was able to reduce the code base considerably, and end up with a more fully featured app. The end result was well worth it and you will see Durandal through my course and as a featured player in Hot Towel.</p>
<p><img src="http://johnpapa.net/wp-content/images/HotTowelPreview.png" width="796" height="387" class="aligncenter" /></p>
<p>Sure, Durandal has a lot of features, but let&#8217;s focus only on these 3 areas any serious SPA has to deal with: routing, app life-cycle, and composition.</p>
<h3>URL Routing</h3>
<p>Most apps have more than 1 View. So how do you go from View A to View B in a SPA without hitting the server for a page refresh? The answer routing (aka navigation). Let&#8217;s say you have a Sessions View and a Speakers View. You want to navigate from one to the other and stay on the client. Durandal can you help you do this.<br />
<a href="http://www.johnpapa.net/wp-content/uploads/2013/03/3-29-2013-2-25-08-PM.png"><img src="http://www.johnpapa.net/wp-content/uploads/2013/03/3-29-2013-2-25-08-PM-600x452.png" alt="Routing" width="600" height="452" class="aligncenter size-large wp-image-16921" /></a></p>
<p>You simply tell Durandal which routes to listen for. When It sees a route in the address bar it does a pattern match against it and if it is a route you defined, then it will not go to the server and instead it will marry up the V and VM pair.</p>
<pre class="prettyprint linenumstrigger linenums">
// Inside a shell ViewModel

// Get the router module (Durandal provides this)
var router = require('durandal/plugins/router');

// Define the routes and look 
// for a V and VM pair both with the 
// same name, by convention
router.mapNav('sessions');
router.mapNav('speakers');

function activate() {
    // Tell the router to start listening for 
    // routes and where to start
    return router.activate('sessions');
}
</pre>
<p>You can override the default conventions and place your V and VM anywhere you want, but this code shows the easiest path. Make careful note that the activte method has a return statement. Durandal runs on promises, which are the promise that a method will return an answer to the code. The activate method of this code is called (we&#8217;ll see more in a bit on this) and waits to hear back for the code to be done. This is where the return router.activate statement kicks in. Without this, the caller would not know when it was done.</p>
<h3>VVM Composition</h3>
<p>You can put a V and VM together anywhere you like in the HTML. Usually I name my root HTML page shell.html. This is like my master page where I lay out the set of areas I want to compose V and VM pairs. I may have a header, content and footer areas, vertically. Or perhaps a dashboard with 4 content areas, 2 tall by 2 wide. How you lay it out is up to you. </p>
<p>Once a route is invoked you want to pair the V and VM and make the V appear in the right area. We do this through composition. Notice the image below shows the HTML <code>section</code> tag contains a <code>compose</code> binding. This is a custom Knockout binding that Durandal uses to help you compose the V and VM. </p>
<p>The <code>section</code> tag  will go get the current item that was navigated to and find its V and VM pair. It will place the View in this HTML tag and when it is done, it will invoke the <code>afterCompose</code> (this is a handy feature that enables things like turning of a progress bar while composing). You can also use the <code>entrance</code> transitionwhich comes with Durandal or write your own to animate the arrival of the V.</p>
<pre class="prettyprint linenumstrigger linenums">
   &lt;section data-bind=&quot;
            compose: {model: router.activeItem, 
            afterCompose: router.afterCompose, 
            transition: 'entrance'}&quot;&gt;
    &lt;/section&gt;
</pre>
<p>If you want more areas, just create more HTML tabs and compose bindings. You can also make a V share a VM, as I explain more in my course. This is handy for composing a few Views that all share a VM.</p>
<h3>App Life Cycle</h3>
<p>The life-cycle of your VVM pair is important. You may need to load data when you crank up a VVM pair. Maybe you want to perform some logic before you leave a VVM pair. You can do this easily with Durandal.<br />
<a href="http://www.johnpapa.net/wp-content/uploads/2013/03/Picture1.png"><img src="http://www.johnpapa.net/wp-content/uploads/2013/03/Picture1-600x333.png" alt="Picture1" width="600" height="333" class="aligncenter size-large wp-image-16971" /></a></p>
<p>Durandal will look for these 4 methods in your VM. When one of the events occurs, Durandal will look in your VM and if it finds one it will invoke it. They are pretty self explanatory. </p>
<ul>
<li>activate</li>
<li>deactivate</li>
<li>canActivate</li>
<li>canDeactivate</li>
</ul>
<p>If you want to cancel one of the <code>can</code> events, then return false. </p>
<pre class="prettyprint linenumstrigger linenums">
// Inside your ViewModel
var canDeactivate = function () {
    var title = 'Do you want to leave?';
    var msg = 'Navigate away and cancel? ';
    return app.showMessage(title, msg, ['Yes', 'No '])
        .then(function (selectedOption) {
        if (selectedOption === 'Yes ') {
            // Call some cancel function
            cancel();
        }
        return selectedOption;
    });
};

return {
    activate: activate,
    canDeactivate: canDeactivate //,
    //...
};
</pre>
<p>There is so much more you can use Durandal to do, but these 3 concepts are absolutely huge in helping build a SPA. If all you use it for are these 3 tips, then you are getting your value.</p>
<p>Next time I&#8217;ll talk a about how to get rich data using <a href="http://breezejs.com" target="_blank">BreezeJS</a>.</p>
<h3>SPA Jump-Start Series</h3>
<ul>
<li><a href="http://johnpapa.net/spajs01" target="_blank">Beginning SPA &#8211; Part 1</a></li>
<li><a href="http://johnpapa.net/spajs02" target="_blank">SPA Architecture &#8211; Part 2</a></li>
<li><a href="http://johnpapa.net/spajs03" target="_blank">Durandal &#8211; Part 3</a></li>
<li><a href="http://johnpapa.net/spajs04" target="_blank">Breeze &#8211; Part 4</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=aRmBL5bSNk0:q-4nf2te_8I:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=aRmBL5bSNk0:q-4nf2te_8I:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=aRmBL5bSNk0:q-4nf2te_8I:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=aRmBL5bSNk0:q-4nf2te_8I:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=aRmBL5bSNk0:q-4nf2te_8I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=aRmBL5bSNk0:q-4nf2te_8I:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/aRmBL5bSNk0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/spajs03/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/spajs03/</feedburner:origLink></item>
		<item>
		<title>Why All Those JavaScript Libraries?</title>
		<link>http://feeds.johnpapa.net/~r/JohnPapa/~3/ms0g2QdVeMY/</link>
		<comments>http://www.johnpapa.net/howmanyistoomany/#comments</comments>
		<pubDate>Sun, 24 Mar 2013 16:28:33 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[SPA]]></category>

		<guid isPermaLink="false">http://www.johnpapa.net/?p=16701</guid>
		<description>Flustered by so much JavaScript? Concerned with all the seemingly new patterns to learn? Confused about how to organize it? You are not alone. Many JavaScript Libraries You may look and think, wow, there are a lot of JavaScript libraries in this project. The &amp;#8220;Many&amp;#8221; is subjective based upon your perspective. Is 3 many? Is it 10, 20, 30 ? I think it depends on who you ask. Let me put it another way: if you work on a ASP.NET MVC project take a look at all of the dll&amp;#8217;s in your references folder. How many is too many there? [...]</description>
				<content:encoded><![CDATA[<p>Flustered by so much JavaScript? Concerned with all the seemingly new patterns to learn? Confused about how to organize it? You are not alone.</p>
<h3>Many JavaScript Libraries</h3>
<p>You may look and think, wow, there are a lot of JavaScript libraries in this project. <a href="http://www.johnpapa.net/wp-content/uploads/2013/03/3-24-2013-11-49-54-AM.jpg" rel="attachment wp-att-16711"><img src="http://www.johnpapa.net/wp-content/uploads/2013/03/3-24-2013-11-49-54-AM-204x600.jpg" alt="3-24-2013 11-49-54 AM" width="204" height="600" class="alignright size-large wp-image-16711" /></a> The &#8220;Many&#8221; is subjective based upon your perspective. Is 3 many? Is it 10, 20, 30 ? I think it depends on who you ask. Let me put it another way: if you work on a ASP.NET MVC project take a look at all of the dll&#8217;s in your references folder. How many is too many there? I bet they don&#8217;t bother most folks. Rarely do I hear complaints about that. Is it because Microsoft put them there? Or is it because they are out of sight out of mind? Or possibly we are just used to them being there.</p>
<p>Now let&#8217;s take a look at the 3rd party JavaScript libraries I included in my course and in the Hot Towel SPA template.<br />
<a href="http://www.johnpapa.net/howmanyistoomany/3-24-2013-11-56-52-am/" rel="attachment wp-att-16741"><img src="http://www.johnpapa.net/wp-content/uploads/2013/03/3-24-2013-11-56-52-AM.jpg" alt="3-24-2013 11-56-52 AM" width="192" height="198" class="alignleft size-full wp-image-16741" /></a></p>
<p>My point is that the number of JavaScript libraries I use is dependent on the value they offer. If a library offers more value to me than me writing it, then I am fine using it.</p>
<p>Note that I rolled up the min versions using a feature of VS 2012. Some people remove these files, others leave them alone. Choose your own adventure <img src='http://www.johnpapa.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="prettyprint ">
&lt;Content Include=&quot;Scriptsjquery-1.9.1.js&quot; /&gt;
&lt;Content Include=&quot;Scriptsjquery-1.9.1.min.js&quot;&gt;
  &lt;DependentUpon&gt;jquery-1.9.1.js&lt;/DependentUpon&gt;
&lt;/Content&gt;
&lt;Content Include=&quot;Scriptsjquery-1.9.1.min.map&quot;&gt;
  &lt;DependentUpon&gt;jquery-1.9.1.js&lt;/DependentUpon&gt;
&lt;/Content&gt;
&lt;None Include=&quot;Scriptsjquery-1.9.1.intellisense.js&quot;&gt;
  &lt;DependentUpon&gt;jquery-1.9.1.js&lt;/DependentUpon&gt;
&lt;/None&gt;
</pre>
<h3>Tracking Dependencies</h3>
<p>I had a comment recently on a <a href="http://www.pluralsight.com/training/Courses/Discussion/single-page-apps-jumpstart" target="_blank">discussion board</a> for my latest <a href="http://jpapa.me/spajsps" target="_blank">SPA JumpStart course at Pluralsight</a>. &#8220;TheWayItIs&#8221; explains</p>
<blockquote><p>My concern comes with the many code libraries and hierarchical dependencies of your patterns upon these.This in itself seems to become spaghetti of external dependencies on your patterns.</p></blockquote>
<p>I already know these things, and <code>that</code> is the heart of the problem. I&#8217;ve gone through this jungle and come out the other end. Seeing the relationships and dependencies between these libraries is clear to me now. However, that is because I now know what to look for and how they all work together. Further, the patterns I employ help clarify this for new libraries and dependencies I may add or remove in the future. Now that I have this knowledge, it is more difficult to imagine what it is like to be without the knowledge. It is like this for anyone who tries to explain something that they know to someone who doesn&#8217;t know. I have to break it back down to the time when I lacked it. This is my job: to walk through these issues and show you what to look for and how to gain this clarity. </p>
<p>The dependencies are handled by 2 main players: the require.js and the module pattern. The module pattern separates code into more files, where each file has one specific role. then require.js helps load those dependencies between modules in their proper order. This is over simplification, but really, that&#8217;s the key to this point: it doesn&#8217;t have to be complex. </p>
<blockquote><p>Keep your code separated and let require.js handle dependencies.</p></blockquote>
<p>I&#8217;ve been a .NET coder since the beginning and I use these same concepts with .NET. It all falls down to Single Responsibility Principle  (SRP). Keep your code separated (and do not repeat yourself) and you gain code re-use, reduce bugs, make it easier to maintain, and can scale easier. </p>
<h3>Production Capable?</h3>
<p>The same person on the discussion thread at my SPA course also asks</p>
<blockquote><p>&#8230; are you proposing your sessions as production capable patterns relying on these many libs or should we view these patterns as useful for an expiring app such as a code camp with speakers?</p></blockquote>
<p>My answer is yes. Yes these libraries and patterns are production capable right now, today, this moment (notice the pun on moment.js). Of course patterns and libraries evolve. </p>
<h3>Why Introduce New Libraries?</h3>
<p>Case in point is that I knew Durandal.js and Breeze.js were being developed when I wrote my intermediate SPA course. They were not ready for apps at that time (this was last summer), so I wrote replacements by hand. This accomplished a few things. First, when you go through my intermediate course you understand the complexities of solving these problems that these 2 libraries solve for you.  Why? Because I walked through how to do it all manually and it was much more work. Second, there is value in seeing how this all works so you do not have magical black boxes solving your issues. Not that you want to recreate the wheel, but its important to know how a wheel rolls. Finally, after going through that experience, you now understand and appreciate the value of Durandal and Breeze much more than if you had not seen how to do it all by hand.</p>
<h3>Clarity</h3>
<p>Clarity won&#8217;t come in a heartbeat, but rest assured that it will come. Just like 100&#8242;s of files in .NET appear manageable to you today, the amount of JavaScript won&#8217;t appear so daunting. You&#8217;ll see that many of the important patterns you know so well in .NET are still there in JavaScript. Organizing your code in .NET is slightly personal preference &#8230; it&#8217;s the same with JavaScript/HTML. You&#8217;ll find the arrangement that works for you and find your chi.</p>
<p>These were awesome questions and they deserved some time in print. I hope they help you!</p>
<div class="feedflare">
<a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ms0g2QdVeMY:79MDltQdhZg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=ms0g2QdVeMY:79MDltQdhZg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ms0g2QdVeMY:79MDltQdhZg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JohnPapa?i=ms0g2QdVeMY:79MDltQdhZg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ms0g2QdVeMY:79MDltQdhZg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=ms0g2QdVeMY:79MDltQdhZg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JohnPapa/~4/ms0g2QdVeMY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.johnpapa.net/howmanyistoomany/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		<feedburner:origLink>http://www.johnpapa.net/howmanyistoomany/</feedburner:origLink></item>
	</channel>
</rss>
