<?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.feedburner.com/~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/" version="2.0">

<channel>
	<title>Jeff Wilcox</title>
	
	<link>http://www.jeff.wilcox.name</link>
	<description>Silverlight, rich client apps and web development</description>
	<lastBuildDate>Mon, 14 May 2012 04:24:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/JeffWilcox" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="jeffwilcox" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>I reduced my cloud bill 9% this month by favoring my most active Windows Phone app users (Live Tiles, Leaderboards, Toasts)</title>
		<link>http://www.jeff.wilcox.name/2012/05/favoring-active-users-for-tiles-and-processing/</link>
		<comments>http://www.jeff.wilcox.name/2012/05/favoring-active-users-for-tiles-and-processing/#comments</comments>
		<pubDate>Mon, 14 May 2012 04:24:56 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=931</guid>
		<description><![CDATA[I run a compute-intensive set of cloud operations for my users to let them see their points through a live tile generated in the cloud. I send toast notifications when your friends are nearby you. And these operations all build on top of mostly polling-based work I perform, as well as some real-time data I [...]]]></description>
			<content:encoded><![CDATA[<p>I run a compute-intensive set of cloud operations for my users to let them see their points through a live tile generated in the cloud. I send toast notifications when your friends are nearby you. And these operations all build on top of mostly polling-based work I perform, as well as some real-time data I receive. As my push user base has grown into the 5- and 6- figures of users, I’ve found that my most appreciative users who love my app should be where I dedicate my cloud resources, as opposed to very rare users.</p>
<p>Ever since launching the cloud-backed services that power a lot of the neat value-add in Windows Phone for my application, 4th &amp; Mayor, I’ve learned a lot, and been trying some fun things along the way. Recently I’ve had a fun conversation with a few people about how I’m finding good ways to save money in my cloud computing bill, and though they may be “common sense” to some, they didn’t all occur to me when I created my initial implementation.</p>
<p><strong>I’m saving 9% on my bill over last month, although my user base has increased at a good clip, just by favoring my most active users.</strong></p>
<p>My app has four major cloud components powered by <a href="http://nodejs.org/">Node.js</a>:</p>
<ul>
<li>Hosting the <a href="http://www.4thandmayor.com">www.4thandmayor.com</a> web site</li>
<li>Hosting RESTful web services for the application to communicate with</li>
<li>Processing push notifications through real-time APIs as well as polling mechanisms (“worker” role)</li>
<li>Live tile image generation</li>
</ul>
<p>The web server and services are all load balanced and in general experience pretty steady but low-CPU traffic. However, watching processing spikes and what’s going on, I realized that I was a) spending a ton of processing power updating live tiles of infrequent users of the app who may not even be looking and b) my push notifications mechanism is rather expensive and involved, and about 40% of the users of my app are relatively infrequent users.</p>
<p>Since I run a free app and all my costs are my own, I’m interested in cutting costs for those that must not get as much value from the app.</p>
<h3>History</h3>
<p>Over the months I’ve used a lot of different techniques, from exponential-backoff algorithms, server CPU loads, and even bugs, to see how it affects my costs. I saved a ton of money in April when a bug I introduced stopped most toasts from working! After fixing that bug, though, it was clear I needed to back off my expenses some by reducing load, compute, and traffic some – and so many of the users I was doing processing for effectively have no net change, no need for a new sweet live tile, etc.</p>
<h3>Tracking the ‘last seen’ date/time</h3>
<p>Every time that a Windows Phone application starts, for users who have opted in to receiving push notifications, you acquire the channel, and that takes the form of a URI. You typically want to send that URI to your service tiers to make sure that your app can continue to send notifications, especially if the channel URI changes.</p>
<p>I store a lot of fields for push notification users to help me provide cloud services at an implementation level, including:</p>
<ul>
<li>The date/time the connection happens (typically close to app start-up time)</li>
<li>The channel URI</li>
<li>The operating system version</li>
<li>The application version</li>
<li>The number of times the app has been run</li>
</ul>
<p>One of the core reasons for these is to be able to remove processing and storing information about users who have abandoned my application. I generally define that as someone who hasn’t used the app in 60 days. Since my application doesn’t actually do much active processing and data storage (the “truth” is stored on foursquare, not my services), the worst case is that someone abandons the app for 60 days, runs it again, and I think they are a brand new user at a server implementation level.</p>
<p>Nothing fancy here, just make sure that you track the &#8216;last seen’ date and time information. I use Mongo DB for my data storage, and so I use an <em>upsert</em> to do this operation. If it’s a brand new user, I set the seen information. If they’ve been a user before, that’s fine, I just update the ‘seen’ information.</p>
<h3>Where is the work going?</h3>
<p>An analysis of the work I’m doing found some expensive things:</p>
<ul>
<li>My live tiles are half static, half dynamic</li>
</ul>
<ul>
<li>Static: the front of my app’s tile, with “unread” notification count, are static and hosted on a CDN – cheap</li>
<li>Dynamic: the back tile is a leaderboard with friend profile pics, “points” for the current week, etc. Very expensive – images to download, images to composite, points that are always changing – very little can be cached</li>
</ul>
<li>Latency and data transfer costs communicating between my services, the web, image servers, data tiers, foursquare’s APIs, etc.</li>
<li>Having a fixed “poll” period for users’ scheduled work doesn’t make sense</li>
<p>Meanwhile, cheap things: Sending a toast push notification to MPNS is dirt cheap. Sending a tile notification is just as cheap, but not generating the tile! Calculating basic information is quick.</p>
<h3>Defining tiers of service</h3>
<p>Watching users in terms of app use and ‘last seen’, I decided to offer these levels of “service” where I could scale back the application. Some of this is still in progress in terms of updates, but basically:</p>
<table border="0" cellspacing="0" cellpadding="2" width="680">
<tbody>
<tr>
<td valign="top" width="134"><strong><em>Tier</em></strong></td>
<td valign="top" width="117"><strong><em>Last seen</em></strong></td>
<td valign="top" width="207"><strong><em>Push Notification Processing</em></strong></td>
<td valign="top" width="222"><strong><em>Live Tiles</em></strong></td>
</tr>
<tr>
<td valign="top" width="134">Active</td>
<td valign="top" width="117">Within 2 days</td>
<td valign="top" width="207">Very active. Real-time and 20-30 polls per hour.</td>
<td valign="top" width="222">Real-time with any check-in, plus when the leaderboard tile is stale.</td>
</tr>
<tr>
<td valign="top" width="134">Recent</td>
<td valign="top" width="117">3.5 days</td>
<td valign="top" width="207">Polls fall back to 10-20 per hour.</td>
<td valign="top" width="222">When the leaderboard tile is stale.</td>
</tr>
<tr>
<td valign="top" width="134">“The One-Weeker”</td>
<td valign="top" width="117">7 days</td>
<td valign="top" width="207">1 pph</td>
<td valign="top" width="222">One leaderboard per day max.</td>
</tr>
<tr>
<td valign="top" width="134">Older</td>
<td valign="top" width="117">13 days</td>
<td valign="top" width="207">No polling</td>
<td valign="top" width="222">One leaderboard per day.</td>
</tr>
<tr>
<td valign="top" width="134">Oldest</td>
<td valign="top" width="117">Remainder</td>
<td valign="top" width="207">No polling</td>
<td valign="top" width="222">Once every 3 days max.</td>
</tr>
</tbody>
</table>
<p>And I should say, I just made these tiers up. So far, so good.</p>
<h3>Tiers without memory</h3>
<p>To minimize computation of actually figuring out how active a user is, I don’t do any active processing at all: rather, the tier is determined when I process a piece of due work for a client, and that helps me to figure out when to schedule the next piece of work.</p>
<p>I suppose another idea would be to try and figure out who my true “active” users are, but I’ve found that the days-since-seen indicator is actually quite great, simple, and really reducing my server processing loads.</p>
<h3>Implementation details</h3>
<p>Not that fancy! Here is the simple code for figuring out which tier a user is in. Dirty JavaScript, really.</p>
<pre class="js" name="code">this.getPollFrequency = function () {
  var r = thisTask.r;
        var prop = 'oldest';
  if (r.seen) {
      var now = new Date().getTime();
            var then = r.seen.getTime();
            var diff = now - then;
            diff /= 1000;
            diff /= 60;
            diff /= 60;
            diff /= 24;

            if (diff &lt; 2) {
              prop = 'active';
            } else if (diff &lt; 3.5) {
              prop = 'recent';
            } else if (diff &lt; 7) {
              prop = 'week';
            } else if (diff &lt; 13) {
              prop = 'older';
            }
        }
        thisTask.storage.activityFrequency = prop;
        return context.configuration.poll[prop];
}</pre>
<p>I then use this tier designation to look up a configurable property that I have, which is how long to wait before scheduling the next piece of work for the client. The other code isn’t that exciting, but will be part of some other posts at some point, I am sure.</p>
<p>Let me know if you’re able to make use of this concept, or how you might use it in your apps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/05/favoring-active-users-for-tiles-and-processing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A few 4th &amp; Mayor things: Node cloud backend, Nokia Apps Madness, new markets &amp; localization efforts</title>
		<link>http://www.jeff.wilcox.name/2012/03/4th-march-28th/</link>
		<comments>http://www.jeff.wilcox.name/2012/03/4th-march-28th/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 20:52:02 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[4th & Mayor]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=924</guid>
		<description><![CDATA[I wanted to take a few minutes to share some random notes on some of the exciting 4th &#38; Mayor happenings. I’ve been working more on refactoring the cloud backend and wanted to share some light into how that all works. Also, would love some love in the ongoing Nokia March Apps Madness competition! Nokia [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to take a few minutes to share some random notes on some of the exciting 4th &amp; Mayor happenings. I’ve been working more on refactoring the cloud backend and wanted to share some light into how that all works. Also, would love some love in the ongoing Nokia March Apps Madness competition!</p>
<h2>Nokia Apps Madness: the Excellent Eight</h2>
<p><a href="http://polldaddy.com/poll/6083138/"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="TheExcellent8" border="0" alt="TheExcellent8" align="right" src="http://www.jeff.wilcox.name/wp-content/uploads/2012/03/TheExcellent8.png" width="240" height="400" /></a>Nokia’s been doing a lot of really cool promotional work for app developers and their phones recently. Initially starting at 32 apps in their March App Madness, I’ve made it a few rounds and am now in the ‘Excellent 8’, exciting!</p>
<p>If you’ve used the app or support what I’ve done there as a scrappy little independent developer in my spare time, <a href="http://polldaddy.com/poll/6083138/">I’d love your support by voting</a> – it’s up against the Facebook app for Windows Phone! You can also read about the other apps <a href="http://conversations.nokia.com/2012/03/27/march-apps-madness-announcing-the-excellent-eight-and-commencing-voting/">on the competition blog post here</a>.</p>
<h2>Cloud backend</h2>
<p>The entire backend of 4th &amp; Mayor is powered by <a href="http://nodejs.org/">Node.js</a>, a really powerful JavaScript runtime designed for building great apps and services. This powers push notifications, live tiles, the web site and services, and so on. All standard Foursquare services (checking in, finding nearby places, etc.) are handled by Foursquare’s web services directly however – the backend for my app is mostly auxiliary and Windows Phone value-add.</p>
<p>Node is very fast and efficient, but it’s just part of the story. The cloud is also performing live tile graphic generation, handling preferences and cloud settings, and crash reports in some situations.</p>
<p>I’d like to start sharing more information on the backend, and in the meantime, want to provide some points to the technology and modules that have made development fast and fun:</p>
<ul>
<li><a href="http://nodejs.org/#download">Node.js</a> (get it for Mac, Windows, or a tarball to build it from source on Linux; <a href="http://nodejs.org/api/">documentation here</a>)</li>
<li><a href="http://www.mongodb.org/">MongoDB</a> (I use <a href="https://mongolab.com/home">MongoLab</a> for paid hosting, they rock)</li>
<li><a href="https://github.com/jeffwilcox/mpns">MPNS node module</a> (written by me, it’s a simple Node request interface to the Microsoft Push Notification Service for Windows Phone – used for sending tiles, toasts, etc.)</li>
<li><a href="http://expressjs.com/">Express</a> for serving the static web site at <a href="http://www.4thandmayor.com">www.4thandmayor.com</a> plus responding to web service requests</li>
<li><a href="https://github.com/christkv/node-mongodb-native">node-mongodb-native</a> node.js driver for working with Mongo</li>
<li><a href="https://github.com/clintandrewhall/node-foursquare">node-foursquare</a> for talking to Foursquare’s web services (though I’ve modified it a bit in my <a href="https://github.com/jeffwilcox/node-foursquare">forked</a> repo)</li>
</ul>
<p>Node makes it very easy to hang APIs and other endpoints using modules such as express. Here’s the endpoint for handling a disconnect request to the app. It simply validates a little bit then calls a helper method I have for removing entries from the clients table:</p>
<pre class="js" name="code">// ---------------------------------------------------------------------------
// Disconnecting client channel
// ---------------------------------------------------------------------------
app.post('/v1/disconnect', function(req, res) {
    // https://www.4thandmayor.com/v1/disconnect/?uri={0}

    var uri = req.param('uri');
    if(uri &amp;&amp; pushutil.isValidUri(uri)) {
        mongoRemovePushFromClients(uri, function() {
            cloudHistory.log('push notifications disconnected by the user for ' + uri);
        });
    }

    res.send('ok');
});</pre>
<p>I’ll be writing more about my cloud backend services in the future, but maybe this will whet your whistle!</p>
<h2>New markets</h2>
<p>I’ve submitted the app for certification in all the new markets for the Windows Phone, so this is exciting. Expect it to hopefully be approved and start showing up very soon.</p>
<p>4th and Mayor will now be available in Bahrain, Bulgaria, China, Costa Rica, Croatia, Estonia, Iceland, Iraq, Israel, Kazakhstan, Latvia, Lithuania, Qatar, Romania, Saudi Arabia, Slovakia, Slovenia, Thailand, Turkey, UAE, Ukraine, Venezuela, and Vietnam.</p>
<p>Several months ago the app was added to the 5 earlier marketplaces introduced by Microsoft this year, including Argentina, Indonesia, Malaysia, Peru, and the Philippines.</p>
<p><strong><em>Don’t have the app?</em> </strong><a href="http://www.windowsphone.com/s?appId=c7d13b8d-9951-e011-854c-00237de2db9e"><strong>Download it now from the Windows Phone Marketplace</strong></a></p>
<h2>Localization efforts</h2>
<p>I’ve begun working with some people on localization efforts for the app. My plan is to use GitHub (<a href="https://github.com/jeffwilcox/4thandmayor-resources">already setup a repository for this</a>) to work with developers who have volunteered their skills and services and keep that part of the work all open source.</p>
<p>One thing to note is that I’m somewhat limited by what Foursquare has localized: they’ve done a ton of locales, but often if the web services cannot return localized information (think badges, witty text, etc.) then it won’t be a great experience, so that is the largest limiter.</p>
<p>The initial languages will be Japanese, German, and a few others – with many more to come after that. If you’re interested in participating, please send e-mail to <a href="mailto:4thandmayor@gmail.com">4thandmayor@gmail.com</a> (the support address for the app).</p>
<p><em>Thanks for reading this far – Jeff.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/03/4th-march-28th/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>4th &amp; Mayor–1 Year Later</title>
		<link>http://www.jeff.wilcox.name/2012/03/one-year-of-4thandmayor/</link>
		<comments>http://www.jeff.wilcox.name/2012/03/one-year-of-4thandmayor/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 18:31:29 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[4th & Mayor]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=920</guid>
		<description><![CDATA[I launched 4th &#038; Mayor one year ago to the Windows Phone Marketplace. Thank you all for using and enjoying the app!]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.windowsphone.com/en-US/apps/c7d13b8d-9951-e011-854c-00237de2db9e"><img style="display: inline; float: right" align="right" src="http://d2bk44826ux9xe.cloudfront.net/DarkRed_250.png" /></a>One year ago today, <a href="http://www.windowsphone.com/en-US/apps/c7d13b8d-9951-e011-854c-00237de2db9e">4th &amp; Mayor</a> went public and became a popular, fun and simple Foursquare app for Windows Phone. I’m glad to have launched it, have learned a lot along the way, and am excited that people continue to rave, enjoy, and share the app with their friends. (Also, version 3.3 has been published to the Windows Phone Marketplace today!)</p>
<h4>App’s in Nokia’s March App Madness!</h4>
<p>This would be a great time to vote for the app in <a href="http://conversations.nokia.com/2012/03/20/march-app-madness-social-apps/">Nokia’s March App Madness</a>, btw [<a href="http://cdn.conversations.nokia.com.s3.amazonaws.com/wp-content/uploads/2012/03/March-App-Madness2.pdf">PDF for your brackets</a>]! Please keep watch as new rounds approach.</p>
<h4>Follow &amp; Interact</h4>
<p>Consider:</p>
<ul>
<li>following <a href="http://twitter.com/4thandmayor">@4thandmayor</a> on Twitter</li>
<li><a href="http://facebook.com/4thandmayor">Liking the app on Facebook</a> to get update information, service &amp; status info, etc.</li>
<li>There’s also a place to <a href="http://4thandmayor.uservoice.com">suggest new features</a>.</li>
</ul>
<h3 style="clear: all">4th &amp; Mayor Today</h3>
<p>Today, 4th &amp; Mayor is:</p>
<ul>
<li>Used by over 60,000 people, most every single day </li>
<li>Over 35,000 people have push notifications enabled, receiving check-in toast notifications, leaderboard live tiles, and other useful updates from Foursquare </li>
<li>Of users who’ve opted into sharing usage information, the app has been used to check-in over 7,650,000 times </li>
<li>The app’s been run over 8,000,000 times </li>
</ul>
<h3>Key Milestones</h3>
<ul>
<li>December 2010: Development of the app started in my spare time. </li>
<li>March 2011: The official Foursquare app for Windows Phone stopped working </li>
<li>March 20, 2011: 4th &amp; Mayor launched as a free app on the Windows Phone Marketplace (<a href="http://www.jeff.wilcox.name/2011/03/announcing-4thandmayor/">blog post introducing it here</a>), supporting great new features from Foursquare version 3 that had released the week before for iPhone and other platforms </li>
<li>June 28, 2011: 4th &amp; Mayor v2 launched, supporting Windows Phone Mango and adding great new features</li>
<li>November 17, 2011: v3 launched with check-in tiles, live tile studio, fast app switching, and more (<a href="http://blog.4thandmayor.com/post/12930532954/4th-mayor-3-0-is-out-for-windows-phone-7-5">post</a>)</li>
<li>March 20, 2012: v3.3 anniversary edition launched, adding significant performance improvements and corrected some GPS accuracy issues</li>
<li><em>Soon:</em> Version 3.4 is on its way and will add a lot more features for international users, including more map choices such as OpenStreetMap and Google Maps, plus business hours support.</li>
</ul>
<h3>The Future of 4th &amp; Mayor</h3>
<p><img style="display: inline" src="http://d2bk44826ux9xe.cloudfront.net/4thApp.png" /></p>
<p>Although I’ve left the Windows Phone team (that was my day job), I continue developing updates, adding features, and am looking to also offer 4th &amp; Mayor on other platforms such as Windows 8 tablets. The cloud infrastructure for the app is especially interesting and a place I’m actively investing and adding features. Stay tuned for details!</p>
<h4>Interested in localization?</h4>
<p>I’ve finally started to begin the localization process, in the past I’ve reached out to the community for this – so if you’d like to get it to your language, contact me at some point to be added to the localization list.</p>
<p>Thanks for using and enjoying my app! Please recommend it to your friends and rate it well if you love it, otherwise, let me know!</p>
<p><em>Jeff Wilcox      <br />Developer       <br />4th &amp; Mayor</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/03/one-year-of-4thandmayor/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Windows Azure App Platform: We’re hiring strong developers!</title>
		<link>http://www.jeff.wilcox.name/2012/03/azure-app-platform-jobs/</link>
		<comments>http://www.jeff.wilcox.name/2012/03/azure-app-platform-jobs/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 15:31:19 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[Jobs]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=911</guid>
		<description><![CDATA[We are looking to hire a few strong developers to work on the Windows Azure app platform team - we use technologies including Node.js, PHP, Java, and of course C#, ASP.NET, etc.]]></description>
			<content:encoded><![CDATA[<p>Update 4/17/2012: At this point we&#8217;ve received a lot of great resumes &#8211; to apply for positions please go to the Microsoft Careers site.</p>
<p>Want to “go to the cloud”, working on the exciting application platform for developers to use with <a href="http://www.windowsazure.com/">Windows Azure</a>? We’re looking to hire strong developers with passion for working with the modern cloud and its associated web &amp; services technologies. We’re hiring across the team, so I’m providing two job descriptions as examples of the devs we want and the work we do.</p>
<p>Our hiring process takes into account interests, business need, and we’re flexible in finding the right work for folks. Given the blog audience and Twitter conversations many of us have had, I know there’s interest, and so a blog seemed like a good place to start. </p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Azure" border="0" alt="Azure" src="http://www.jeff.wilcox.name/wp-content/uploads/2012/03/Azure1.png" width="400" height="62" /></p>
<h3>What technologies does the Windows Azure App Platform &amp; Tools team work on?</h3>
<p>Across the organization (we all report to <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> – <a href="http://channel9.msdn.com/Events/windowsazure/learn/Keynote-Getting-Started-with-Windows-Azure">here he explains how to get started with Azure</a>) we work on a lot of technologies – both on the Microsoft stack and on the non-Microsoft stack. Some of us use Macs every day. We’re a unique org – our code is up on GitHub in true open source and we accept community contributions at <a href="http://www.github.com/WindowsAzure/">http://www.github.com/WindowsAzure/</a>.</p>
<p>Some of the open source tech we use:</p>
<ul>
<li>Node.js </li>
<li>PHP </li>
<li>Java </li>
</ul>
<p>We ship this Microsoft tech:</p>
<ul>
<li>ASP.NET </li>
<li>ASP.NET MVC </li>
<li>Web API </li>
<li>WebMatrix </li>
<li>Windows Azure developer tooling, command line interfaces, etc. </li>
</ul>
<p>And of course we’re busy working on a lot of exciting future things that Azure is building, plus of course shipping frameworks and tools built using Microsoft .NET/C#.</p>
<h3>Sample Job Posting #1 – Azure One SDK Development Team</h3>
<blockquote><p>The Azure One SDK team has a goal of making Windows Azure a great development platform all developers, using both Microsoft and non-Microsoft technologies. Windows Azure is a critical part of Microsoft’s future business, and for it to be successful, it has to be a home for developers using Windows or Apple OS X, writing C#, PHP, Java, or Node.js.</p>
<p>The Azure One SDK dev team operates like very few at Microsoft: We use GitHub.com for our open source control, we take community code contributions, and we use today’s hottest development tools and processes. We are an open source, cloud-focused, developer-attracting machine.</p>
<p>We are looking for developers that have experience using a variety of languages and platforms, and are good at quickly learning and integrating new tools and skills. If you’re the kind of developer that regularly writes code outside of work in a variety of platforms and you enjoy playing with today’s technologies, regardless of who builds them, we’d love to chat.</p>
<p>Come join us and help figure out how to make Windows Azure attractive to startups and other developers building tomorrow’s cloud based applications.</p>
</blockquote>
<h3>Sample Job Posting #2 – Azure App Plat &amp; Tools Team</h3>
<blockquote><p>The Azure Application Platform &amp; Tools Team owns a wide variety of web technologies, including the core ASP.NET, ASP.NET MVC, Razor, WebAPI, and WCF runtimes and the development tools that target these platforms. We are currently in the development stages for major deliverables slated for after the next version of Visual Studio ships, which are targeted at improving the developer experience for both on-premise and cloud applications.</p>
<p>We are a highly dynamic and often loosely structured team with a reputation for agile customer-focused innovation. Our decisions around development issues are most often pragmatic and focused on the spirit of the rules rather than the letter. We often operate in an agile, open source like environment, always striving to do the right thing. We have close partnerships with teams throughout Microsoft, including most groups in the .NET Framework and Visual Studio as well as SQL Server and Azure.</p>
<p>We are looking for a developer to help us make our vision real.</p>
<p>You should be passionate about code quality as well as clean, simple, and sound designs. You should aspire to grow into technical leadership roles. You should also be a good code reviewer and believe in the value of collaborative coding and problem solving. You should appreciate being challenged in a wide variety of areas and embrace making people and technology around you better. </p>
</blockquote>
<h3>Job Requirements</h3>
<p>In general we have these requirements (may vary with the specific position) – we are looking for experienced developer talent:</p>
<ul>
<li>Bachelor’s degree in Computer Science or equivalent experience</li>
<li>Minimum of 3-5 years experience in a Software Development Engineer role (*varies by position)</li>
<li>Passion for developer tools &amp; developer platforms + the work you do every day</li>
<li>Experience with web technologies such as PHP, Java, Node.js, Ruby, Python or with C#/ASP.NET</li>
<li>Proficient in a core language such as C++/C#/Java, including Computer Science fundamentals, algorithms, etc.</li>
<li>Excellent written and verbal communication skills – including a sense for how to make it easy for developers to be successful</li>
<li>Great candidates will also have experience working in an open-source environment with an open web technology such as PHP or Java, and ideally experience with agile methodologies</li>
</ul>
<p>The <a href="http://careers.microsoft.com">Microsoft Careers</a> site (<a href="http://careers.microsoft.com">http://careers.microsoft.com</a>) always has all our job openings as well. Always feel free to apply and use that site if you’re looking to work at other teams, roles, or technologies at the company.</p>
<p>Thanks, I look forward to hearing from some of you!</p>
<p><em>Jeff Wilcox     <br />Development Lead      <br />Windows Azure OneSDK Team</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/03/azure-app-platform-jobs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To the cloud!</title>
		<link>http://www.jeff.wilcox.name/2012/02/to-the-cloud/</link>
		<comments>http://www.jeff.wilcox.name/2012/02/to-the-cloud/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 05:07:26 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=906</guid>
		<description><![CDATA[One of the great things about working at Microsoft is the enormous flexibility afforded to individuals to move from project-to-project, team-to-team, and to explore new areas of growth and challenge. It’s been an amazing ride for me, a progression from starting on the test team of ASP.NET to moving over to the Silverlight 1.1 Alpha, [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great things about working at Microsoft is the enormous flexibility afforded to individuals to move from project-to-project, team-to-team, and to explore new areas of growth and challenge. It’s been an amazing ride for me, a progression from starting on the test team of ASP.NET to moving over to the Silverlight 1.1 Alpha, then on to so much more with the Silverlight Toolkit, many Silverlight runtime versions, the Windows Phone 7.0 and 7.1 SDKs, and so many things since then that most people probably don’t even know about. As employees we really do work on so many sides of the products it would amaze you– we put a lot of passion into the products, and I’m proud to have been able to do some amazing things for the community out there.</p>
<p>On that note, I’ve decided that for 2012, I would like to move to the Windows Azure team to focus on the open source story for Microsoft’s cloud. At Microsoft we’re becoming more and more involved in exciting new success stories and tech such as <a href="http://nodejs.org/">Node.js</a> &#8211; along the way we’ve even started using GitHub to accept community open source contributions and make these things better. There’s a great opportunity here and I want to be there to be a part of it all.</p>
<p>This blog will continue to service all the things I find interesting – Windows Phone, XAML, C#, design tips, control development, you name it.</p>
<p><img src="http://d2bk44826ux9xe.cloudfront.net/JWilcoxCloud.jpg" /></p>
<p>If you didn’t know it, the entire backend of my popular phone app, 4th &amp; Mayor, is powered by Node.js in the cloud (yup, pure JavaScript, with a mix of MongoDB). It’s just amazing how productive, fun, and exciting the tech is to work in. Supporting over 60,000 users of my app in the cloud has been a fun challenge, and I’ve been learning so much.</p>
<p>This is a journey back to some of the original service and client roots that I joined originally at Microsoft (joining ASP.NET in 2005; I was a PHP and Linux dev in college). I’m moving to work with the likes of <a href="http://www.hanselman.com/blog/">Scott Hanselman</a> and <a href="http://blogs.msdn.com/b/gblock/">Glenn Block</a>, and have a stellar team of developers working with me on this project.&#160; They’ve already been doing great work – you can see a lot of it taking shape on GitHub at <a href="https://github.com/windowsazure/">https://github.com/windowsazure/</a>. You’ll find my personal/phone projects on GitHub <a href="https://github.com/jeffwilcox">here</a> and my Azure work account <a href="https://github.com/jeffwilcoxmsft">here</a>, if you’re in to following pull requests and forks.</p>
<p>I wanted to share the e-mail that I sent many of my friends and co-workers last week:</p>
<blockquote><p>From: Jeff Wilcox      <br />Subject: JWilcox: “To the cloud!”       <br />Date: Thu 2/9/2012 5:00 PM</p>
<p>Hi,      <br />I’ve accepted a role on the open source side of the Windows Azure application platform team in the land of ScottGu. The opportunity is great, and many of you know that I’ve been hacking in the cloud a while. After a lot of client development, I’m excited to see what happens when we put all these things together.</p>
<p>I’m proud to have worked with the smartest and most driven teams at Microsoft: together many of us have built out the Windows Phone developer platform complete with dev guidance, apps, controls, pivots &amp; panoramas &amp; progress bars. We’ve done the Olympics together and helped devs around the world rock their bits. We’ve shipped Silverlight starting with 1.1 Alpha, 13 Silverlight Toolkit releases, a unit test framework, and more!</p>
<p>I plan to stay active in the Windows Phone developer community. The new phone work I have seen so far is really spectacular, I’m sorry that I won’t be there when you cross the finish line – but I’ll be in line to buy one.</p>
<p>Sincerely,      <br />Jeff Wilcox</p>
</blockquote>
<p>Windows Phone is really taking off, everyone loves their Nokias -&#160; I must say that I love my Windows Phone – I own a Lumia 800 that I imported into the US at personal expense, and it’s the best phone I have ever owned. It’s also fun to see that the platform is being adopted by users of all sorts – just today <a href="https://twitter.com/#!/hasselbeck">Matt Hasselbeck</a> became my 4,000th follower on Twitter, and <a href="https://twitter.com/#!/Hasselbeck/status/168903826580062211">he regularly uses</a> both <a href="http://www.windowsphone.com/en-US/apps/c7d13b8d-9951-e011-854c-00237de2db9e">4th &amp; Mayor</a> (my Foursquare app for the phone) as well as <a href="http://www.windowsphone.com/en-US/apps/304c9bfd-9b65-e011-81d2-78e7d1fa76f8">Rowi</a> (an excellent Twitter app for the phone). I was hoping for a geek follower, but I’ll take an NFL quarterback, too!</p>
<p>Thank you to the amazing community. I am not going anywhere! We’ve built an amazing platform and it’s going to get better – I’ve really enjoyed traveling the world, interacting with students at hackathons, attending fun developer conferences, and seeing the Windows Phone Marketplace fill up with amazing apps. 2012 is going to be the year of Windows Phone for sure and I’m not abandoning it. I think the spot where mobile meets the cloud will continue to get more and more interesting and hope to have you all along for that exciting ride.</p>
<h3>What about 4th &amp; Mayor?</h3>
<p>One of the joys of my last year has been offering 4th &amp; Mayor free to the Windows Phone world. It was a blast to build. On top of learning so much about our very own phone platform on the team, it’s taught me a lot about shipping a product that’s used hundreds of thousands of times a day.</p>
<p>As I have previously tweeted in various capacities, my 3-pronged hope for 2012-2013 is:</p>
<ul>
<li>Keep updating 4th &amp; Mayor for the Windows Phone. </li>
<li>Offer a Windows 8 implementation on the Windows Store </li>
<li>Open source 4th &amp; Mayor sometime in the future with the friendly, flexible Apache 2.0 license. </li>
</ul>
<p>Hope it’s appreciated. Thanks for reading this far.</p>
<p>Jeff</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/02/to-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying static maps on the Windows Phone for performance and scenario wins</title>
		<link>http://www.jeff.wilcox.name/2012/01/jeffwilcox-maps/</link>
		<comments>http://www.jeff.wilcox.name/2012/01/jeffwilcox-maps/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 00:36:45 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Control Development]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=903</guid>
		<description><![CDATA[One of the nice visuals of 4th &#38; Mayor is the animation and display of a simple area map whenever you view a place in the app. Unfortunately, most map controls, such as the Bing Maps control included with the platform, are highly sophisticated: they let you have a bunch of pushpins, gather information about [...]]]></description>
			<content:encoded><![CDATA[<p>One of the nice visuals of 4th &amp; Mayor is the animation and display of a simple area map whenever you view a place in the app.</p>
<p>Unfortunately, most map controls, such as the Bing Maps control included with the platform, are highly sophisticated: they let you have a bunch of pushpins, gather information about bounding boxes, etc. This awesome feature set can have a negative effect on performance.</p>
<blockquote><p>2/1/2012 Update: Thanks to <a href="http://timheuer.com/blog/">Tim Heuer</a>, who just provided a pull request that adds an OpenStreetMap provider, MapQuest provider, offers the ability to add an authentication key optionally as a property on the control, and to specify the type of maps. I’ve updated NuGet to 1.1 with these contributions, thanks!</p>
</blockquote>
<p>My static map control is simple but nice because it’s an easy replacement, can be used in Panorama/Pivots, and overall still has a great, high-speed experience that your users will enjoy.</p>
<p><a href="http://www.jeff.wilcox.name/wp-content/uploads/2012/01/SampleMap.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SampleMap" border="0" alt="SampleMap" src="http://www.jeff.wilcox.name/wp-content/uploads/2012/01/SampleMap_thumb.png" width="341" height="346" /></a>     <br /><em>A sample static Bing Map from 4th &amp; Mayor: touching the map takes you to an interactive map view page allow for directions, panning, etc.</em></p>
<h3>“JeffWilcox.Maps” Component</h3>
<p>I’ve refactored one of the libraries used in my app to be general enough for others to use: it offers simple static map code in the form of a “StaticMap” control: just drop it into your XAML page and you’re mostly good to go.</p>
<p>The <strong>MapCenter</strong> property takes a GeoCoordinate, either data bind it or set the property as the page is navigated to.</p>
<p>Over time I’ll consider adding more of the functionality I’ve had to the library, including the interactive libraries.</p>
<h3>Get the library</h3>
<p>I’m using my favorite pair of deployment places for this library: GitHub for source, NuGet for binaries.</p>
<h4>NuGet</h4>
<p>The library is <a href="http://nuget.org/packages/JeffWilcox.Maps">JeffWilcox.Maps</a></p>
<h4>Source on GitHub</h4>
<p>Fork the repo, <a href="https://github.com/jeffwilcox/wp-maps">wp-maps</a></p>
<h3>Offering an interactive experience</h3>
<p>To optimize the maps experience, I instead decided to use the static map REST APIs from Bing Maps for my mobile application: this lets me perform a HTTP request, grab the image, and data bind it into my display.</p>
<p>I then place it inside a borderless, retemplated Button control, so that touching the map takes you to a new page: an experience where I can show the real Bing Maps control, your current position, as well as the location of the place you are trying to go. By moving this to a separate assembly, I get great performance wins: the Bing Maps control and other code needed to offer the rich interactive experience is delay loaded and only there when needed.</p>
<h3>Properties on the control</h3>
<p>These properties are on the initial version of the control:</p>
<p><strong>Foreground</strong> is supported and used for the implicit, centered point: it’s Black by default to match the Windows Phone’s “Maps” app, but I find that using {StaticResource PhoneAccentBrush} looks great in my opinion.</p>
<p><strong>MapCenter</strong> takes a GeoCoordinate, this is a key property.</p>
<p><strong>ZoomLevel</strong> sets the zoom level (default of 15 I think) for the map. 1 effectively shows a bunch of the world, and 21 shows street level sizes. The zoom levels for Goog and Bing are pretty similar.</p>
<p><strong>MapCenterVisibility</strong> defaults to Visible, and if you decide you don’t want the center point to be on the view, just set this to Collapsed.</p>
<p><strong>IsSensorCoordinate</strong> should be data bound, some APIs (like Google’s) require that the API call identify whether it’s a position from a sensor, or a database. In my case, sensor is used for any GeoCoordinateWatcher/LocationService code, while I set it to False for data from the Foursquare venues database where I get info about a place.</p>
<p><strong>Provider</strong> sets the static map provider to use.</p>
<p>The height and width are automatically identified by the system, but many APIs limit the width and height to small numbers (typically &lt;= 640 pixels in any direction), FYI.</p>
<h3>Bing Maps API Key</h3>
<p>If you’re using Bing Maps, you’ll need a <a href="http://www.microsoft.com/maps/developers/web.aspx">Bing Maps API key</a> and to make sure that your app is compliant with the requirements of its terms and conditions. This is the same key you use with the Bing Maps control.</p>
<p>For this first version you have to set the API key as a string resource inside your App.xaml file.</p>
<p>Here’s how you would go about this: add the namespace and set the string – I’ve put a comment where your key should go in App.xaml:</p>
<pre class="xml" name="code">&lt;Application
    x:Class=&quot;StaticMapSample.App&quot;
    xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
    xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
    xmlns:phone=&quot;clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone&quot;
    xmlns:shell=&quot;clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone&quot;
    xmlns:core=&quot;clr-namespace:System;assembly=mscorlib&quot;&gt;

    &lt;!--Application Resources--&gt;
    &lt;Application.Resources&gt;
        &lt;core:String x:Key=&quot;BingMapsKey&quot;&gt;&lt;!-- Place your Bing Maps API key here--&gt;&lt;/core:String&gt;
    &lt;/Application.Resources&gt;

    &lt;Application.ApplicationLifetimeObjects&gt;
        &lt;!--Required object that handles lifetime events for the application--&gt;
        &lt;shell:PhoneApplicationService
            Launching=&quot;Application_Launching&quot; Closing=&quot;Application_Closing&quot;
            Activated=&quot;Application_Activated&quot; Deactivated=&quot;Application_Deactivated&quot;/&gt;
    &lt;/Application.ApplicationLifetimeObjects&gt;

&lt;/Application&gt;</pre>
<p>I haven’t decided if this is better or worse than just exposing an API key property for you to bind or set on the page, but I really like just having one central place in an app to put the key.</p>
<h3>Static map providers</h3>
<p>The initial implementation has a simple enum for chosing between two provider choices, Bing Maps and Google Maps. I’ve decided to include Google Maps because it turns out that in some parts of the world, Google Maps are much better, and I’ve had hundreds of app users ask for a setting to instead use Google Maps. There are slightly different requirements for its API, such as exposing an “open in web browser” function so that the user could decide to open the same map view in the browser on the phone.</p>
<p>Just set the <strong>Provider</strong> property on the StaticMap to either Bing or Google. The default is Bing, as it should be!</p>
<p>Here’s a screenshot of the sample app I’ve included in the GitHub repo (though if you use it, remember to put your Bing Maps API key inside of the App.xaml file first!) – it has both Bing and Google Maps, and the application bar is hooked up to events to open the Maps app on the phone <em>or</em> to open the browser with the appropriate map page. Take a look.</p>
<p><a href="http://www.jeff.wilcox.name/wp-content/uploads/2012/01/SampleApp.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SampleApp" border="0" alt="SampleApp" src="http://www.jeff.wilcox.name/wp-content/uploads/2012/01/SampleApp_thumb.png" width="680" height="567" /></a></p>
<p><em>On the right, the expanded app bar: your app may need to expose the “open in browser” option to comply with the terms and conditions that you interpret on the maps API of your choice. Also, the “open in maps app” is a nice function to provide users who want to open the location in the main OS’s Maps app.</em></p>
<h3>Design note: flush maps</h3>
<p>One design technique that I use in my app, as does the “Local Scout” app in Mango, is having a “flush” map experience: the map extends to the edge of the phone, instead of the standard spacing with margins from the edges of the phone.</p>
<p>This visual effect looks great, and can in general be created by setting the Margin of the control to “-12,0,-12,0”.</p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/01/jeffwilcox-maps/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Windows Phone apps, built out of “the 3 P’s”: Panoramas, Pivots, and Pages</title>
		<link>http://www.jeff.wilcox.name/2012/01/windows-phone-apps-built-out-of-the-3-ps-panoramas-pivots-and-pages/</link>
		<comments>http://www.jeff.wilcox.name/2012/01/windows-phone-apps-built-out-of-the-3-ps-panoramas-pivots-and-pages/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 03:46:33 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=897</guid>
		<description><![CDATA[I can’t post a new component or library every day, but I can point you at other great blogs and folks on Twitter that would be super useful to app devs and teams building on the Microsoft stack. This afternoon I read another of Arturo Toledo’s amazing series on Windows Phone Design – and it’s [...]]]></description>
			<content:encoded><![CDATA[<p>I can’t post a new component or library every day, but I can point you at other great blogs and folks on Twitter that would be super useful to app devs and teams building on the Microsoft stack.</p>
<p>This afternoon I read another of Arturo Toledo’s amazing series on Windows Phone Design – and it’s a simple but important point: apps are <em>not</em> just a choice between a Page, a Panorama, or a Pivot: many apps have aspects of all of these. The Music+Videos hub on the phone is built of all 3, and your app can pull that off, too: just understand the ideal content and purposes of these different types of core experiences.</p>
<blockquote><p><font size="4"><a href="http://ux.artu.tv/?p=234">31 Weeks of Windows Phone Metro Design | #5 Choosing between Panoramas, Pivots and/or Pages</a>        <br /></font><a href="http://ux.artu.tv/">Arturo Toledo</a>      <br />Senior User Experience Designer – Windows Phone Team at Microsoft</p>
</blockquote>
<p><a href="http://ux.artu.tv/?p=234"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ScreenVSContentType" border="0" alt="ScreenVSContentType" src="http://www.jeff.wilcox.name/wp-content/uploads/2012/01/ScreenVSContentType.png" width="339" height="210" /></a>    <br /><em>I “borrowed” this image <a href="http://ux.artu.tv/?p=234">from Arturo’s post</a>.</em></p>
<p>He’s had other great posts in the past, too, and expect great content to come.</p>
<p><strong>Do follow Arturo: </strong><a href="https://twitter.com/#!/arturot"><strong>@arturot</strong></a><strong>, </strong><a href="http://ux.artu.tv/"><strong>Blog here</strong></a>, <a href="http://ux.artu.tv/?feed=rss2">RSS</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/01/windows-phone-apps-built-out-of-the-3-ps-panoramas-pivots-and-pages/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PhoneThemeManager: allow your app to have the Light, Dark, or Inverted theme with 1 line of code</title>
		<link>http://www.jeff.wilcox.name/2012/01/phonethememanager/</link>
		<comments>http://www.jeff.wilcox.name/2012/01/phonethememanager/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 03:43:08 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=890</guid>
		<description><![CDATA[Set your Windows Phone Mango app to have the Light, Dark, or inverted theme with just one line of code and this helper library, PhoneThemeManager.]]></description>
			<content:encoded><![CDATA[<p>I’ve just pushed a small library that I created this evening to the world and wanted to share details on the short project in this post. (<a href="http://nuget.org/packages/PhoneThemeManager">NuGet assembly</a>, <a href="http://nuget.org/packages/PhoneThemeManager.Source">NuGet source</a>, <a href="https://github.com/jeffwilcox/wp-thememanager">project on GitHub</a>)</p>
<p>One of the most common feature requests that I receive for 4th &amp; Mayor is a setting in the app to force it to always use the “Light” theme, overriding the dark/light theme that the user’s set for their theme.</p>
<p>Having a light background is a nice contrasting design look for the phone, and the Mail application always does this. I personally always submit mostly light theme screen shots for my applications to the Windows Phone Marketplace, it just looks better and nice to me – but I rarely use all-light themed apps other than Mail.</p>
<p><img src="http://d2bk44826ux9xe.cloudfront.net/NewMenus.png" /></p>
<p>In preparing for the next update of my app, v3.3, I’ve coded up this capability and I’m sharing it ahead of time.</p>
<h3>Technical Overview</h3>
<p>In 7.0 there were a few ways to do theme overriding, sometimes through a few silly platform bugs that we left in there – but it’s actually not an easy thing to do, and many people end up overriding every single style in their app to get the effect that they are going for.</p>
<p>This helper library is designed for altering the entire application’s running instance, <em>not</em> for providing per-page theme overriding.</p>
<p>In researching possible ways to solve this, I did come across <a href="http://windowsphonegeek.com/articles/Windows-Phone-Mango-Custom-application-Theme-Step-by-Step">this page on windowsphonegeek</a> that talks about ways to merge in styles or to programmatically override resources that are brushes.</p>
<p>I decided to create a system to walk through the known values and names for all the core theme resources of colors, brushes, plus the light/dark theme visibility and opacity properties.</p>
<p>In your app, you simply call `ThemeManager.ToLightTheme()`, `ThemeManager.ToDarkTheme()`, `ThemeManager.InvertTheme`, to force this. You need to have this call happen inside your <strong>App.xaml.cs </strong>file, in the constructor, after the Initialize calls.</p>
<p>You cannot change or call this more than once, so if you offer a setting for users to “Force Light”, use a MessageBox to inform them that their setting will be used the next time they start the app. You will have to read their setting right away when they start up the app. Once styles start applying the values, you could start to get inconsistent results.</p>
<p>The code walks and updates the Color instances, then walks the Brush resources and sets their Colors to be the original Color instances, just in case.</p>
<p>I have placed the ThemeManager class within the Microsoft.Phone.Controls namespace for this to be easy to add to your App.xaml.cs file.</p>
<p>You should have an App constructor like this:</p>
<pre class="csharp" name="code">/// &lt;summary&gt;
/// Constructor for the Application object.
/// &lt;/summary&gt;
public App()
{
    // Global handler for uncaught exceptions.
    UnhandledException += Application_UnhandledException;

    // Standard Silverlight initialization
    InitializeComponent();

    // Phone-specific initialization
    InitializePhoneApplication();

    ThemeManager.ToLightTheme();

    // Other code that might be here already...
}</pre>
<h3>What’s themed</h3>
<p>By default this is what happens:</p>
<ul>
<li>The <strong>resources</strong> for foreground, background, all the contrast/chrome/etc. colors and brushes are updated</li>
<li>The light and dark theme visibility and opacity resources are updated</li>
<li>The background brush of the Frame is set explicitly to the color (may have a negative performance impact!)</li>
<li>The <strong>System Tray </strong>whenever a page navigation completes</li>
<li>The <strong>ApplicationBar</strong> of a page if set immediately</li>
</ul>
<p>I’ve added a simple OverrideOptions enum (static) to the ThemeManager that can be used to disable the auto-behaviors I’ve added.</p>
<h4>Newing up AppBars</h4>
<p>If you have code in your app like “var ab = new ApplicationBar”, beware that that application bar will take on the system’s actual theme colors by default, and not the overridden light/dark coloring that happens with the app.</p>
<p>If you need to new up an ApplicationBar, you should use the convenience method of `ThemeManager.CreateApplicationBar()` <em>or</em> use the extension method on app bar that I added, `MatchOverriddenTheme`, to set the color values.</p>
<h3>What’s not themed</h3>
<p>Unfortunately this cannot theme <strong>MessageBox</strong> at all.</p>
<h3>Talking about fill rate performance</h3>
<p>I’ve designed the system so that resources are <em>only overridden when needed</em>.</p>
<p>If your app uses ToLightTheme to force the light theme, and the user is running the Light theme already, nothing happens – it’s a no-op.</p>
<p>Although updating resources has no negative effect really on the app’s performance, the trouble is setting the Background color of the phone application’s frame.</p>
<p>The frame is always present and may add a fill count of 1.0 to every single page in your app.</p>
<p>Anything above a fill rate of 2-3 is not a good thing, so you may notice a degraded experience. Might want to inform your users of that when providing the option to force the light theme, for example.</p>
<h3>A note about your battery</h3>
<p>Many Windows Phones use AMOLED or similar technology where bright colors, such as the background color used in the Light theme, will use a lot of power. Please respect your users and realize that long-running apps probably should not force the Light option.</p>
<p>Consider only making such a “Force Light Theme” option as a setting that users opt-in to, as opposed to always overriding the theme.</p>
<h3>About custom themes</h3>
<p>When I designed this library, I thought about offering a ton of capability in it for using “branding” colors, modifying the accent brush, etc., but instead decided to tackle just one thing. So the name ThemeManager is a little overkill maybe, but it’s where we are for now.</p>
<h2>Get the bits</h2>
<p><strong>NuGet Binary</strong></p>
<p>The binary is super easy to use. With NuGet just add the <a href="http://nuget.org/packages/PhoneThemeManager">PhoneThemeManager</a> package reference.</p>
<p><strong>NuGet Source File</strong></p>
<p>Instead of adding yet another assembly to your project, just add the single source file (or add it to your existing shared library, etc.) by using the <a href="http://nuget.org/packages/PhoneThemeManager.Source">PhoneThemeManager.Source</a> package.</p>
<p><strong>GitHub Repo</strong></p>
<p>Fork and enjoy <a href="https://github.com/jeffwilcox/wp-thememanager">https://github.com/jeffwilcox/wp-thememanager</a></p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/01/phonethememanager/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Please ship your next Windows Phone app with GZip: speed requests 50-80%</title>
		<link>http://www.jeff.wilcox.name/2012/01/windows-phone-gzip-support-by-morten/</link>
		<comments>http://www.jeff.wilcox.name/2012/01/windows-phone-gzip-support-by-morten/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 01:04:23 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=887</guid>
		<description><![CDATA[Please ship your next Windows Phone app or app update using this awesome GZipWebClient library by Morten Nielsen (NuGet, blog post, source) – it’s been out there since August and we should all be using this now for HTTP-heavy apps! The next update of my app is in the works and performance is significantly improved [...]]]></description>
			<content:encoded><![CDATA[<p>Please ship your next Windows Phone app or app update using this awesome GZipWebClient library by Morten Nielsen (<a href="http://nuget.org/packages/SharpGIS.GZipWebClient">NuGet</a>, <a href="http://www.sharpgis.net/post/2011/08/28/GZIP-Compressed-Web-Requests-in-WP7-Take-2.aspx">blog post</a>, <a href="http://www.sharpgis.net/www.sharpgis.net/file.axd?file=2011%2f8%2fSharpGIS.GZipWebClient.zip">source</a>) – it’s been out there since August and we should all be using this now for HTTP-heavy apps!</p>
<p>The next update of my app is in the works and performance is significantly improved by this library. I used both generation 1 and gen 2 devices to gather a ton of data and am loving the results. Can’t wait to submit the update to the marketplace. I’ve been seeing requests speed up 50%-80%, it’s amazing – but I should note, these are unofficial numbers, I’m just grabbing these from my app that is JSON-heavy.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="GZipChart" border="0" alt="GZipChart" src="http://www.jeff.wilcox.name/wp-content/uploads/2012/01/GZipChart.png" width="680" height="310" /></p>
<p><em>Some sample data: a large set of averaged requests of a very large JSON request to the Foursquare web services used in my app, 4th &amp; Mayor for Windows Phone 7.5.</em></p>
<p>These numbers aren’t official or anything like that, just what I was observing using my 3G data connection here in Seattle or home WiFi. Also interesting are the fastest times for the content – I often found that once a data connection was open, I would get as low as 100ms for some GZip requests. Just amazing.</p>
<p>One of the awesome modern web server features that nearly every browser happily supports today is <a href="http://en.wikipedia.org/wiki/Gzip">Gzip</a> compression of its output. Text and JSON beautifully compress, often by more than half, resulting in quick content downloads. It’s a simple and awesome way to improve the performance and responsiveness of your applications.</p>
<p>This isn’t a new technology, but unfortunately it isn’t just a default, built-in option for you to use in your Windows Phone apps, and you can expect that competing apps on other platforms (and even on Windows Phone) will be using Gzip to improve the performance. Hopefully we fix this in the future.</p>
<p>Frankly it isn’t a default in most mobile platforms, either, and you need to opt-in. However, some, like iOS, seem to automatically deflate incoming streams as long as you opt-in by setting the content encoding headers; in an iOS app, you just addValue “gzip” forHTTPHeaderField before your request and you’re good from there. Android is similar but you do need to check for gzip in responses and manually new up a deflating stream with GZipInputStream.</p>
<h3>HTTP Gzip and Windows Phone apps</h3>
<p>So Morten Nielsen created a wrapping WebClient library over 6 months ago and through a few iterations has made it great.</p>
<p>So now it’s super easy to get this perf win. To make this work:</p>
<ul>
<li>Add the library to your project via <a href="http://nuget.org/packages/SharpGIS.GZipWebClient">NuGet</a> [SharpGIS.GZipWebClient]</li>
<li>Replace your WebClient code to use GZipWebClient instead – yes, just rename! (GZipWebClient is in Morten’s `SharpGIS` namespace)</li>
<li>Test and ship your app!</li>
</ul>
<p>Now I’m not considering the server-side, but if you’re rolling your own web services, you might need to do some work to make sure that you’ll serve GZip content when the capability is ready on the client. Check with the documentation for your server-side app platform, cloud provider or web server technology.</p>
<p>I can totally see myself adding this to my core libraries for all future projects. Hope this helps. <strong>Thanks Morten for providing this to the community!</strong> You can follow Morten on Twitter (<a href="https://twitter.com/#!/dotMorten">@dotMorten</a>) or check out his blog (<a href="http://www.sharpgis.net/">http://www.sharpgis.net/</a>).</p>
<p>(And on the performance side: the smaller payload means networking rocks and is fast; it is worth noting that GZip adds a small amount of CPU load – hopefully in your background thread – but I haven’t detected anything negative from this yet)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/01/windows-phone-gzip-support-by-morten/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>A quick look at MetroRadio: quick spacing, margin, and icon tips for Windows Phone devs</title>
		<link>http://www.jeff.wilcox.name/2012/01/metroradio-design/</link>
		<comments>http://www.jeff.wilcox.name/2012/01/metroradio-design/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 05:56:07 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2012/01/metroradio-design/</guid>
		<description><![CDATA[I’ve harped on this one a few times before in my Windows Phone Metro Design Guidelines post for devs. But it’s time for another helping! Metro Radio is a slick and functional Pandora application for the Windows Phone. Like many apps, there are plenty of small little UX things that could make it even better. [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve harped on this one a few times before in my <a href="http://www.jeff.wilcox.name/2011/03/metro-design-guide-v1/">Windows Phone Metro Design Guidelines</a> post for devs. But it’s time for another helping!</p>
<p><a href="http://www.windowsphone.com/en-US/apps/0caac4aa-962f-483b-9c26-76a3d8a1fd10">Metro Radio</a> is a slick and functional Pandora application for the Windows Phone. Like many apps, there are plenty of small little UX things that could make it even better. I saw the app recently and really like it, but as a stickler on design things, I’d love to make a few small tweaks if I could!</p>
<p>I briefly spoke with the application’s developer, Mustafa Taleb, and obtained his OK to me to write a little post just pointing out a few things. The app really does rock, but it’s also probably a place that in the next update a few visual blemishes could be fixed to yield an even better app.</p>
<p>So I’m going to point out simple things to think about when building out your UI. I have 9 points about simple spacing/design/margin things, and then a quick comment on the icon.</p>
<h2>Margin Issues and other easy XAML Fixes</h2>
<p>It’s pretty easy to overlook margins while developing applications. Between having controls like TextBlock that expect an associated Style, and most controls like Button that have an integrated margin and touch area, it&#160; can be tough to either notice OR spend the time to fine-tune these things.</p>
<p>I don’t have the source to the app, so I am going to be overlaying yellow lines on top of the marketplace screen shots to help show potential issues with margins.</p>
<h3>Text blocks: when to case plus the classic 12px left margin issue when not using styles</h3>
<p><img src="http://media.jeff.wilcox.name/blog/2012/AboutPage.png" /></p>
<p>So here we have a few basics.</p>
<p>1. Consider all uppercase for the small font app title (very top visual in a page’s default template), unless you have branding or other reasons for that change.</p>
<p>2. Consider all lowercase for the larger page title.</p>
<p>Now these two aren’t hard-and-fast. I’m inconsistent in my apps, too. But I believe that you should be consistent: if you choose one, choose both.</p>
<p>3. Use the PhoneTextNormalStyle or other provided textblock styles OR hard-code at least a 12px left margin for text blocks. That way you align with other default visuals.</p>
<p>In this screen capture I overlaid a yellow block over the 12px space – really all the text should be to the right of that block, not under.</p>
<p><img src="http://media.jeff.wilcox.name/blog/2012/LoginPage.png" /></p>
<p>Here’s a super classic login page experience. And actually it is affected by the same issue of not using Style={StaticResource PhoneTextNormalStyle} in those TextBlocks, I’m guessing.</p>
<p>4. 12px issues create jagged forms often.</p>
<p><strong>Recommended fix: </strong>Use the styles that are provided. The left of the text <em>and</em> the other controls should be aligned flush, not jagged like in this form.</p>
<p>Again this is because the default Margin of all TextBlocks is 0, but on the phone the styles set a left margin of 12px to allow for flush alignment.</p>
<h3>Looking into Pivot specifics</h3>
<p><img src="http://media.jeff.wilcox.name/blog/2012/SmallPivotThings.png" /></p>
<p>Now on this one, there are just a few simple things when using pivots.</p>
<p>5. Consider lowercase pivot item headers.</p>
<p>It’s consistent with what you’ll find throughout the official phone user interface. This can either be accomplished through hard-coding lowercase in your XAML, using a string converter that goes lowercase with binding, or by doing it on the model/data side of your app.</p>
<p>6. Everything in a Pivot control should usually align left flush.</p>
<p>This page seems to have the actual item content off by 12-to-24 pixels, instead of allowing all things on the left to be flush.</p>
<p>Additionally, the space between the Pivot header and item is off by maybe just 2- or 4- pixels.</p>
<h3>Look into spacing and alignment a lot on list pages</h3>
<p><img src="http://media.jeff.wilcox.name/blog/2012/SongsPage.png" /></p>
<p>This is one of the screen captures of the list results when searching for the text ‘today’, one of the marketplace example screen shots. It could use some alignment and cleanup and could probably be cleaned up in a good 10 minutes of XAML hacking</p>
<p>7. Visually check for alignment consistency.</p>
<p>I’ve drawn a yellow line to try and show that many items here are not aligned: images, group headers, the top search controls, etc. This could be fixed in Blend through some movements or just in XAML by slowly adjusting by 2-, 4-, 8-, however many pixels until things are nicely aligned.</p>
<p>8. Try spacing list items by the same value on the top and bottom.</p>
<p>It looks pretty inconsistent when a list item (like the first here) has 2- or 4- pixels on the top, but then what looks to be 18 pixels or so on the bottom.</p>
<p>Instead using a consistent value for the top and bottom will let all items look natural regardless of whether they are first or last.</p>
<p>9. Have space between items and text.</p>
<p>The data template for these results could use some spacing between the album art and the text.</p>
<p>My guess is that this is another example of hard-coding font values instead of using the standard PhoneTextLargeStyle or PhoneTextNormalStyle with a TextBlock. That would add a nice left margin of 12px back into the UI.</p>
<p>And another quick example, this is a list page from the app that has some of the same underlying potential spacing issues:</p>
<p><img src="http://media.jeff.wilcox.name/blog/2012/AnotherList.png" /></p>
<p>And now, the best page in the app!</p>
<p><img src="http://media.jeff.wilcox.name/blog/2012/PlaybackPage.png" /></p>
<p>This is the playback experience and page. It rocks. It’s smooth, visually awesome, has good information, and is styled on the in-app Music+Videos UI. If I had to nit-pic, I might want to put 6- or 12- pixels of margin spacing on top between the artist name and song title at the top, but it’s nice.</p>
<h2>Marketplace Application Tile</h2>
<p>When I looked up Metro Radio using the Web Marketplace, the icon was … hardly there. This might be on purpose, but it’s really not a great branding experience – my guess is this either is a take on, or based on, the regular app icon, which adjusts itself to the accent color of the phone (hence a transparent background color).</p>
<p>Trouble with using the same asset is that the Web Marketplace, the Zune Marketplace, and even in some situations the regular Marketplace app on the phone, don’t do the same replacement with accent colors – so you get a visually difficult to see tile.</p>
<h3>On-the-phone</h3>
<p>This looks great. It’s important to realize that the different asset sets and sizes are used in different places – whether web marketplace, app, etc., you should always try and submit your best icon forward if you can!</p>
<p><img src="http://media.jeff.wilcox.name/blog/2012/MetroRadioOnPhone.png" /></p>
<h3>Web Marketplace</h3>
<p><img src="http://media.jeff.wilcox.name/blog/2012/WebMarketplaceTile.png" /></p>
<p>Here you can see the hard-to-see tile for the app.</p>
<p><strong>Suggested Fix: </strong>Always use a background color (easy if you’re layering in Photoshop or a similar tool) for your actual marketplace submission’s tile.</p>
<h3>Zune Marketplace</h3>
<p><img src="http://media.jeff.wilcox.name/blog/2012/ZuneMR.png" /></p>
<p>Same icon issue here.</p>
<p>Hope this is useful. Thanks Mustafa for letting me write this post! And I should note, I’m publishing this without running it by him – he’s completely possible that some of these things were intentional design choices. If so, sorry if I have not agreed with them!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/01/metroradio-design/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>A simple Windows Phone control for reading QR codes</title>
		<link>http://www.jeff.wilcox.name/2012/01/wpqr-control/</link>
		<comments>http://www.jeff.wilcox.name/2012/01/wpqr-control/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 00:05:09 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Control Development]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2012/01/wpqr-control/</guid>
		<description><![CDATA[A Windows Phone visual control that uses the camera to read a QR code.]]></description>
			<content:encoded><![CDATA[<p>There are great libraries out there written or ported to C# that let us developers rock by standing on the shoulders of giants. Here’s one such project.</p>
<p>A phone developer who’s also an enthusiast of foursquare suggested a feature that I should add in a future release, and provided some sample code based on the <a href="http://code.google.com/p/zxing/">zxing barcode library</a> and the <a href="http://silverlightzxing.codeplex.com/">Silverlight port of it</a>. I’m working on adding the new feature soon.</p>
<p>In the process I realized it would be a good and quick opportunity to ship such a simple but useful control to the phone development community, so I’ve gone ahead and pushed that control refactoring and implementation to GitHub, check it out: <a href="https://github.com/jeffwilcox/wpqr-control">https://github.com/jeffwilcox/wpqr-control</a>&#160;</p>
<p>Special thanks to Michael Osthege (<a href="http://twitter.com/theCake">@theCake</a>, <a href="http://kuchenzeit.wordpress.com/">blog</a>) for providing the initial contact, sample, and encouragement.</p>
<p>The control is nice:</p>
<ul>
<li>Drop it on the design surface</li>
<li>Wire up the ScanComplete event (and optionally the Error event)</li>
<li>The control handles all the underlying image manipulation, scanning work, PhotoCamera initialization, etc.</li>
</ul>
<p>Here’s what a simple sample app looks like in use. The control includes default border thickness and coloring properties that use the accent color and provide a nice visual separator:</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ReadingQR" border="0" alt="ReadingQR" src="http://www.jeff.wilcox.name/wp-content/uploads/2012/01/ReadingQR.jpg" width="685" height="514" /></p>
<p>Technically the control will expand to its container size, but I prefer the squared-off 400&#215;400 grid myself.</p>
<h3>Building the sample app</h3>
<p>All I did to build this app was drop the control into a new Windows Phone app project and wire it up. Here’s how.</p>
<h4>References and XMLNS</h4>
<p>Add either a project reference (if you cloned the git repo) <em>or</em> build the project and include references to assemblies, both the zxing library plus this control library.</p>
<p>To your XAML page where you’d like to use the control, make sure to include a namespace. Here’s what I used:</p>
<pre><font size="2" face="Consolas">xmlns:jwqr=&quot;clr-namespace:JeffWilcox.Controls;assembly=JeffWilcox.Controls.QR&quot;</font></pre>
<h4>Add the control</h4>
<p>I added this XAML to my MainPage’s ContentPanel area:</p>
<pre class="xml" name="code">&lt;jwqr:QRCodeScanner
    ScanComplete=&quot;QRCodeScanner_ScanComplete&quot;
    Error=&quot;QRCodeScanner_Error&quot;
    Width=&quot;400&quot;
    Height=&quot;400&quot;/&gt;</pre>
<h4>Implement code behind</h4>
<p>The event handlers are easy enough. In my case, I went for these (just throwing exceptions):</p>
<pre class="csharp" name="code">private void QRCodeScanner_ScanComplete(object sender, JeffWilcox.Controls.ScanCompleteEventArgs e)
{
    ApplicationTitle.Text = e.Result;
}

private void QRCodeScanner_Error(object sender, JeffWilcox.Controls.ScanFailureEventArgs e)
{
    throw e.Exception;
}</pre>
<h4>Run the project on a Windows Phone</h4>
<p>Hit F5! When you hover over a QR code, you should see its embedded text appear in place of the application title (top of the page).</p>
<h4>Future/Improvements</h4>
<p>I’d like to maybe add a sound when the scan is successful, but right now, nothing like that.</p>
<p>Eventually I may package this up as a NuGet package, but I’m not ready to prep the right spec files plus figure out how to properly attribute the sub-libraries at this time. So fork the <a href="https://github.com/jeffwilcox/wpqr-control">GitHub</a> version in the meantime! License is Apache 2.0 for both this library as well as the underlying zxing project.</p>
<p>(Looking to display codes? A few years back I briefly talked about the QR code system used by the sweet Starbucks mobile app on the iPhone. I implemented a prototype for Silverlight and Windows Phone that lets you render a QR code on the app’s surface, thanks to a nice QR code library. That <a href="http://www.jeff.wilcox.name/2010/03/windowsphone-barcode/">post is here</a>.)</p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2012/01/wpqr-control/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>My new Windows Phone Emulator theme–simple and sleek</title>
		<link>http://www.jeff.wilcox.name/2011/12/my-new-windows-phone-emulator-theme/</link>
		<comments>http://www.jeff.wilcox.name/2011/12/my-new-windows-phone-emulator-theme/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 23:24:08 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2011/12/my-new-windows-phone-emulator-theme/</guid>
		<description><![CDATA[Back in April I shared my custom Windows Phone Emulator theme/skin files that made the emulator look like an AT&#38;T phone, the Samsung Focus. I recently realized that the newer Windows Phone Marketing resources on the MSDN site include a much nicer looking chassis mock-up, without branding, and thought I would move to start using [...]]]></description>
			<content:encoded><![CDATA[<p>Back in April I <a href="http://www.jeff.wilcox.name/2011/04/focus-theme/">shared my custom Windows Phone Emulator theme</a>/skin files that made the emulator look like an AT&amp;T phone, the Samsung Focus. I recently realized that the newer <a href="http://create.msdn.com/en-us/education/basics/marketing">Windows Phone Marketing resources on the MSDN site</a> include a much nicer looking chassis mock-up, without branding, and thought I would move to start using something based on it for my development work &amp; presentations that I give.</p>
<p>I’m sharing this with the community, I hope you enjoy! It makes the emulator look great I must say.</p>
<p><a href="http://media.jeff.wilcox.name/blog/MyMangoChassisEmulatorTheme.zip"><img src="http://media.jeff.wilcox.name/blog/MyMangoEmulator.jpg" /></a></p>
<h3>Download and install the theme</h3>
<ul>
<li><a href="http://media.jeff.wilcox.name/blog/MyMangoChassisEmulatorTheme.zip">Download a zip file of these these resources</a> (158 KB)</li>
<li>Ensure the emulator is closed</li>
<li>Locate the emulator directory – usually something like <font size="2" face="Consolas"><strong>C:\Program Files (x86)\Microsoft XDE\1.0\</strong></font></li>
<li>Backup the existing WM7_Skin.xml file if you may want to go back</li>
<li>Extract the files into the emulator directory – note that you will need administrative permissions to overwrite the files</li>
<li>Start up the emulator!</li>
</ul>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2011/12/my-new-windows-phone-emulator-theme/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>MPNS module for Node: A simple push notification helper for the cloud</title>
		<link>http://www.jeff.wilcox.name/2011/12/node-mpns/</link>
		<comments>http://www.jeff.wilcox.name/2011/12/node-mpns/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 05:01:06 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2011/12/node-mpns/</guid>
		<description><![CDATA[One of the fun projects I’ve been working on recently related to my app has been bringing online a cloud to handle sending push notifications processing. I’m using Node.js for this and have a ton of people enjoying the beta push experience right now: toasts, live tiles, etc. Tonight I pushed to GitHub ‘mpns’, a [...]]]></description>
			<content:encoded><![CDATA[<p>One of the fun projects I’ve been working on recently related to my app has been bringing online a cloud to handle sending push notifications processing. I’m using <a href="http://nodejs.org/">Node.js</a> for this and have a ton of people enjoying the beta push experience right now: toasts, live tiles, etc.</p>
<p>Tonight I pushed to GitHub ‘mpns’, a simple interface and helper to the Microsoft Push Notification Service (MPNS). It essentially takes the simple properties for your live tile update or toast, packages it in a simple XML payload, and then posts it to the subscription endpoint.</p>
<p>It isn’t a lot of code, but I sure hope it helps others who may be experimenting with other platforms while building a great push experience. If you’re using Azure, the Windows Phone team has already provided some awesome content here – <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/01/14/windows-push-notification-server-side-helper-library.aspx">Yochay has previously posted</a> about a <a href="http://create.msdn.com/en-us/education/catalog/article/pnhelp-wp7">Windows Push Notification Server Side Helper Library</a>.</p>
<blockquote><p>This module is on NPM as &#8216;mpns&#8217; or you clone or submodule it from GitHub: <a href="https://github.com/jeffwilcox/mpns">https://github.com/jeffwilcox/mpns</a></p>
</blockquote>
<h4>Here’s some simple usage information that I’ve also posted to GitHub.</h4>
<h3>Load in the module</h3>
<pre class="js" name="code">var mpns = require('mpns');</pre>
<h3>Create a new notification</h3>
<p>You can create a new notification object (either of type live tile or toast). Raw notifications are not yet supported.</p>
<p>Property names for the notification object directly correlate to the names used in the MPNS XML payload as documented on MSDN. Properties can either be set directly on the object (such as toast.text1) or by passing the values in as options to the constructor.</p>
<pre class="js" name="code">options =   { text1: 'Hello!'
            , text2: 'Great to see you today.'
            };

var toast = new mpns.toast(options);</pre>
<h3>Sending a notification</h3>
<p>To send a notification simply call the <code>send</code> method on the object. The first parameter is the HTTP URI to the MPNS endpoint of the client you&#8217;d like to send the notification to. You may provide an optional callback function as well.</p>
<pre class="js" name="code">toast.send('http://sn1.notify.live.net/throttledthirdparty/01.00/YOUR_ENDPOINT_HERE');</pre>
<p>You can also use the other syntax. Let&#8217;s send a live tile update!</p>
<pre class="js" name="code">var toast = new mpns.liveTile();
toast.title: 'My App';
toast.backgroundUri: 'http://sample.com/image.png';
toast.send('http://sn1.notify.live.net/throttledthirdparty/01.00/YOUR_ENDPOINT_HERE', function(err,res) {
    if (err) console.dir(err);
    else console.dir(res);
});</pre>
<h3>Results object information</h3>
<p>A results object is passed back through the callback and has important information from MPNS.</p>
<ul>
<li><code>deviceConnectionStatus</code>: The device status as reported by the service. </li>
<li><code>notificationStatus</code>: The status of your provided notification. </li>
<li><code>subscriptionStatus</code>: The status of the subscription URI. </li>
</ul>
<p>The object will also contain all the key fields for your toast or live tile update, plus the pushType. This makes it easy to store this information in a history log somewhere in the ether.</p>
<h3>Handling Errors</h3>
<p>It is very important as a consumer that you store appropriate actionable data about failed push notification attempts. As a result, the callback&#8217;s first parameter (err) is set to the standard results object as well as a few additional fields depending on the returned status code from the server.</p>
<p>Remember to take action on that information in order to be a good MPNS citizen. These values may be set in the error object and of interest to you:</p>
<ul>
<li><code>minutesToDelay</code>: If this is present, it is the suggested minimum amount of time that you should wait until making another request to the same subscription URI. For HTTP 412s, for example, the minimum time is one hour and so the returned value defaults to 61. </li>
<li><code>shouldDeleteChannel</code>: If this is set to <code>true</code>, the channel is gone according to MPNS. Delete it from your channel/subscription database and never look back. </li>
<li><code>error</code>: If an error is captured while trying to make the HTTP request, this will be set to that error callback instance. </li>
</ul>
<h3>A note about Windows Phone 7.5</h3>
<p>This module permits sending toasts and tiles specific to Mango. If you include the <code>param</code> field when sending a push to a 7.0 (first Windows Phone release) phone, unfortunately it may not be received, or will error out the subscription.</p>
<p>Take care when registering your subscription channels with your cloud service to include the application platform version of the app (7.1 for Mango apps). To rock, maybe also grab the OS version and deployed app version. That information can be helpful when supporting customers.</p>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2011/12/node-mpns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>November release of the Silverlight for Windows Phone Toolkit</title>
		<link>http://www.jeff.wilcox.name/2011/11/nov2011phonetoolkit/</link>
		<comments>http://www.jeff.wilcox.name/2011/11/nov2011phonetoolkit/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 23:47:56 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2011/11/nov2011phonetoolkit/</guid>
		<description><![CDATA[Today we pushed the button and published the November 2011 release of the Silverlight for Windows Phone Toolkit. This is a bug-fixing release and addresses a number of important issues as reported by customers on the product’s CodePlex site. For this release the team focused entirely on reported issues, important blockers for people, and we’ve [...]]]></description>
			<content:encoded><![CDATA[<p>Today we pushed the button and published the <a href="http://silverlight.codeplex.com/releases/view/75888">November 2011 release of the Silverlight for Windows Phone Toolkit</a>. This is a bug-fixing release and addresses a number of important issues as reported by customers on the product’s <a href="http://silverlight.codeplex.com/">CodePlex site</a>.</p>
<p>For this release the team focused entirely on reported issues, important blockers for people, and we’ve been sharing updates in near-real-time through the Source Control part of the CodePlex site.</p>
<h3>Download the Nov 2011 release</h3>
<blockquote><p><a href="http://silverlight.codeplex.com/releases/view/75888#DownloadId=304100"><strong>Download the MSI</strong></a>      <br /><a href="http://nuget.org/List/Packages/SilverlightToolkitWP"><strong>Get the package through NuGet</strong></a></p>
<p><a href="http://silverlight.codeplex.com/releases/view/75888#DownloadId=304099">Download the Samples and Source</a>      <br /><a href="http://silverlight.codeplex.com/releases/view/75888">View the release notes and download page</a>      <br /><a href="http://silverlight.codeplex.com/SourceControl/BrowseLatest">Browse the Source on CodePlex</a></p>
</blockquote>
<h3>Changes in this release</h3>
<p>Here is a summary listing of the changes in this release:</p>
<h4>Larger changes</h4>
<ul>
<li>ListPicker once again works in a ScrollViewer</li>
<li>LongListSelector bug fixes around OutOfRange exceptions, wrong ordering of items, grouping issues, and scrolling events. ItemTuple is now refactored to be the public type LongListSelectorItem to provide users better access to the values in selection changed handlers.</li>
<li>PerformanceProgressBar binding fix for IsIndeterminate (item 9767 and others)</li>
<li>There is no longer a GestureListener dependency with the ContextMenu, WrapPanel, and ListPicker</li>
<li>The GestureListener should be considered deprecated for all Windows Phone 7.1 SDK development. There is no direct replacement at this time, though the platform now supports events such as Tap right on visual elements.</li>
</ul>
<h4>Other improvements</h4>
<ul>
<li>Updates the ExpanderView sample so that each individual item has its own tilt effect.</li>
<li>Fixes PhoneTextBox bugs 9342 and 9345</li>
<li>PhoneTextBox hides actionitem when empty</li>
<li>ListPicker can be in horizontally scrollable views.</li>
<li>ListPicker now only supports Tap for activation (before it supported any touch that began in bounds and stayed in bounds)</li>
<li>The LongListSelector&#8217;s Background color now is used for the picker grid to enable better app/brand styling</li>
<li>LongListSelector state name correction</li>
<li>Comments added to clarify that ListPicker does not support UIElements directly by design since the framework only permits one instance of a UI Element in the tree at a time</li>
<li>ExpanderView visual glitch fixed (9525)</li>
<li>Additional null checks in ContextMenu visual state change methods</li>
<li>ListPicker SelectedItems is now settable</li>
<li>Small fixes to ToggleSwitch</li>
<li>A startup crash correction in the gesture listener.</li>
<li>The ExpanderView sample is documented better</li>
<li>LockablePivot&#8217;s IsLocked property is now a dependency property</li>
<li>RelativeTimerConverter fixes a UTC bug and no longer throws on future dates</li>
<li>Fixes some reported issues with VB.NET samples</li>
<li>Fixed a ToggleSwitchButton reanimation issue.</li>
<li>Owner is a public property now on ContextMenu</li>
<li>Handle listpicker selected item with a null items</li>
<li>Fixes sample issues when building.</li>
<li>Fixes build warnings.</li>
</ul>
<p>Hope you enjoy the new release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2011/11/nov2011phonetoolkit/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Drive your application’s navigation through templated HyperlinkButtons and smart data binding to app-wide URIs</title>
		<link>http://www.jeff.wilcox.name/2011/10/hyperlinkbutton-empty-style-for-phone/</link>
		<comments>http://www.jeff.wilcox.name/2011/10/hyperlinkbutton-empty-style-for-phone/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 20:32:01 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2011/10/hyperlinkbutton-empty-style-for-phone/</guid>
		<description><![CDATA[A majority of the navigation throughout my application’s many pages and experiences are powered by the HyperlinkButton control. It’s fun and easy to data bind, and something I pointed out in a Channel 9 video that was being recorded this morning. I wanted to share this simple method with others – it’s so easy to [...]]]></description>
			<content:encoded><![CDATA[<p>A majority of the navigation throughout my application’s many pages and experiences are powered by the <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.hyperlinkbutton(VS.95).aspx">HyperlinkButton</a> control. It’s fun and easy to data bind, and something I pointed out in a Channel 9 video that was being recorded this morning.</p>
<p><a href="http://www.jeff.wilcox.name/wp-content/uploads/2011/10/HyperlinkButtonOverlays.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="HyperlinkButtonOverlays" border="0" alt="HyperlinkButtonOverlays" src="http://www.jeff.wilcox.name/wp-content/uploads/2011/10/HyperlinkButtonOverlays_thumb.png" width="680" height="586" /></a></p>
<p>I wanted to share this simple method with others – it’s so easy to re-template HB, and it removes the need to have code-behind for handling touches on buttons and other visual elements. It’s also a good way to create large hit-target friendly places for your users’ to touch.</p>
<p>I even make it more simple by exposing a ‘LocalUri’ property on almost all of my data objects, navigating to the proper contextual page for the item, complete with the identifying data in the URI, so that the new page can work from anywhere. It’s fun and quick to data bind.</p>
<p>HyperlinkButton Benefits</p>
<ul>
<li>No code behind is needed to navigate to pages within your application or even a web page in Internet Explorer</li>
<li>Easy to data bind the NavigateUri if you expose a local navigation Uri property on your model / view model / data bound objects</li>
<li>Mimics the Windows Phone’s metro UI that offers similar concepts throughout the People hubs and other apps</li>
<li>Saves lots of useless code for calling NavigationService.Navigate</li>
<li>Cuts down on bugs since your data objects provide their own app navigation URIs, so you can make bug fixes and changes in a centralized place</li>
</ul>
<h3>Large touch targets</h3>
<p>One thing I di was enlarge the touch targets. I make sure that the hyperlink button is stretched to the width of the phone, so you can touch the item even easier. In the image above, if you imagine a poorer implementation, the hyperlink button might end right at the edge of the “here now” text, making it more difficult to touch:</p>
<p><a href="http://www.jeff.wilcox.name/wp-content/uploads/2011/10/badExample.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="badExample" border="0" alt="badExample" src="http://www.jeff.wilcox.name/wp-content/uploads/2011/10/badExample_thumb.png" width="333" height="78" /></a></p>
<p>Instead I make sure the item is stretched so there’s more space for someone to interact by setting HorizontalAlignment to Stretch on the control, etc.</p>
<h4>Touch target testing made easy</h4>
<p>An easy way to test your touch targets while developing is to temporarily modify your central “EmptyButtonStyle” style and have the Grid background set to Yellow (or another color) temporarily. Then you can walk through your application and easily see the touch targets your hyperlink buttons are exposing.</p>
<h3>Tilt effect</h3>
<p>Make sure to use the <a href="http://silverlight.codeplex.com/">Silverlight for Windows Phone Toolkit’s TiltEffect</a>. Since HyperlinkButton derives from ButtonBase, you will get the nice tilt effect for free this way when you use it on your pages.</p>
<h3>Styling the inner content</h3>
<p>Things that I look for when placing content inside such a hyperlink button includes alignment, spacing (6, 12, 24px offsets), and coloring. I try and mimic much of the user interface that I see throughout the Windows Phone’s main apps, as well as using the standard Styles and static resources provided in the framework.</p>
<p>The idea of my “EmptyButtonStyle” is that whatever content you put inside <em>is</em> the control, otherwise it has no visuals.</p>
<p>A common piece of XAML might look like this:</p>
<pre class="xml" name="code">&lt;HyperlinkButton
    NavigateUri=&quot;{Binding HereNow.LocalUri}&quot;
    Margin=&quot;0,12,0,0&quot;
    HorizontalAlignment=&quot;Stretch&quot;
    HorizontalContentAlignment=&quot;Left&quot;
    Style=&quot;{StaticResource EmptyButtonStyle}&quot;&gt;
    &lt;StackPanel&gt;
        &lt;TextBlock
            Style=&quot;{StaticResource PhoneTextLargeStyle}&quot;
            Text=&quot;here now&quot; /&gt;
        &lt;TextBlock
            Style=&quot;{StaticResource PhoneTextNormalStyle}&quot;
            Foreground=&quot;{StaticResource PhoneAccentBrush}&quot;
            Text=&quot;{Binding HereNow.Text, Converter={StaticResource Cap}, ConverterParameter=lowercase}&quot; /&gt;
    &lt;/StackPanel&gt;
&lt;/HyperlinkButton&gt;</pre>
<h3>My HyperlinkButton style (also works with Button)</h3>
<p>This is the template that I use. By placing it in my App.xaml file, it is accessible anywhere throughout my application, making it easy and quick to use. I actually expose both a Style and a ControlTemplate in my app, but the Style should be fine for most folks.</p>
<pre class="xml" name="code">&lt;Style x:Key=&quot;EmptyButtonStyle&quot; TargetType=&quot;primitives:ButtonBase&quot;&gt;
    &lt;Setter Property=&quot;Background&quot; Value=&quot;Transparent&quot; /&gt;
    &lt;Setter Property=&quot;Padding&quot; Value=&quot;0&quot; /&gt;
    &lt;Setter Property=&quot;Template&quot;&gt;
        &lt;Setter.Value&gt;
            &lt;ControlTemplate TargetType=&quot;primitives:ButtonBase&quot;&gt;
                &lt;Border Background=&quot;{TemplateBinding Background}&quot;
                    Padding=&quot;{TemplateBinding Padding}&quot;&gt;
                    &lt;ContentPresenter
                    HorizontalAlignment=&quot;{TemplateBinding HorizontalContentAlignment}&quot;
                    VerticalAlignment=&quot;{TemplateBinding VerticalContentAlignment}&quot;
                    Content=&quot;{TemplateBinding Content}&quot;
                    ContentTemplate=&quot;{TemplateBinding ContentTemplate}&quot;/&gt;
                &lt;/Border&gt;
            &lt;/ControlTemplate&gt;
        &lt;/Setter.Value&gt;
    &lt;/Setter&gt;
&lt;/Style&gt;</pre>
<p>Don’t forget to set the xmlns primitives at the top of your App.xaml (or page’s XAML):</p>
<pre class="xml" name="code">xmlns:primitives=&quot;clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows&quot;</pre>
<p>Since it actually targets ButtonBase, you can use it with regular Buttons, as well as hyperlink buttons. Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2011/10/hyperlinkbutton-empty-style-for-phone/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

