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

<channel>
	<title>Jesse Liberty &#187; Mini-Tutorial</title>
	<atom:link href="http://jesseliberty.com/Tags/mini-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://jesseliberty.com</link>
	<description>Code To Live. Live To Code.</description>
	<lastBuildDate>Tue, 31 Jan 2012 17:18:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Playing A Sound, Simplified</title>
		<link>http://jesseliberty.com/2012/01/27/playing-a-sound-simplified/</link>
		<comments>http://jesseliberty.com/2012/01/27/playing-a-sound-simplified/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 16:49:25 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Essentials]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[WindowsPhone]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/?p=5187</guid>
		<description><![CDATA[Windows Phone Tutorial In a previous posting I discussed how to play a sound using a background process.&#160; That is great when you need the sound to continue playing even if you leave your application. But much of the time &#8230; <a href="http://jesseliberty.com/2012/01/27/playing-a-sound-simplified/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jesseliberty.com/windows-from-scratchindex/">Windows Phone Tutorial</a></p>
<p>In a <a href="http://jesseliberty.com/2011/10/11/background-audio/">previous posting</a> I discussed how to play a sound using a background process.&nbsp; That is great when you need the sound to continue playing even if you leave your application. But much of the time you need something far simpler: just the ability to play a sound and be done with it.</p>
<p>For that, all you need is to add a MediaElement to your Xaml.&nbsp; In the following sample we place two buttons on the MainPage; one to start playing the sound and one to stop it.</p>
<p>The trick is also to add an invisible MediaElement to the Xaml, which will be the control on which you’ll call such methods as Play() and Stop().</p>
<p><span id="more-5187"></span>
<p>Here’s the content panel from the Xaml:</p>
<pre class="brush: csharp; toolbar: false; highlight: [5,6,7,8];">&lt;Grid
   x:Name="ContentPanel"
   Grid.Row="1"
   Margin="12,0,12,0"&gt;
   &lt;MediaElement
      Name="SoundPlayer"
      AutoPlay="False"
      Source="/dtmf.mp3" /&gt;
   &lt;StackPanel&gt;
      &lt;Button
         Name="PlayButton"
         Content="Play"
         Width="200"
         Height="85"
         Click="PlayButton_Click" /&gt;
      &lt;Button
         Name="StopButton"
         Content="Stop"
         Width="200"
         Height="85"
         Click="StopButton_Click" /&gt;
   &lt;/StackPanel&gt;

&lt;/Grid&gt;
</pre>
<p>&nbsp;</p>
<p>Note that the file I’m using for sound is one I created in Audacity:&nbsp; dtmf.mp3; but you can use any handy .wav, .wma, .mp3 or .aac media file.</p>
<p>In the codebehind we simply reference the Media Element calling its Start() and Stop() buttons respectively.&nbsp; </p>
<pre class="brush: csharp; toolbar: false;">public MainPage()
{
    InitializeComponent();
}

private void PlayButton_Click( object sender, RoutedEventArgs e )
{
    SoundPlayer.Play();
}

private void StopButton_Click( object sender, RoutedEventArgs e )
{
    SoundPlayer.Stop();
}
</pre>
<p>&nbsp;</p>
<p>That’s all there is to it.&nbsp; If you want to play a different sound than the one you hard coded in the Xaml, you can programmatically change it using the SoundPlayer’s SetSource method.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2012/01/27/playing-a-sound-simplified/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Calling Navigate From The View Model</title>
		<link>http://jesseliberty.com/2012/01/17/calling-navigate-from-the-view-model/</link>
		<comments>http://jesseliberty.com/2012/01/17/calling-navigate-from-the-view-model/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 16:04:01 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Mango]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[Patterns & Skills]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/?p=5169</guid>
		<description><![CDATA[Windows Phone Mini-Tutorial In the third part of the MVVM Light Toolkit Soup To Nuts (part 1 is here) I started with an application that had two pages, and a button on the first that was to cause a navigation &#8230; <a href="http://jesseliberty.com/2012/01/17/calling-navigate-from-the-view-model/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5><a href="http://jesseliberty.com/windows-from-scratchindex/">Windows Phone Mini-Tutorial</a></h5>
<p>In the <a href="http://jesseliberty.com/2011/01/06/windows-phone-from-scratch%E2%80%93mvvm-light-toolkit-soup-to-nuts-3/">third part</a> of the MVVM Light Toolkit Soup To Nuts (part 1 is <a href="http://jesseliberty.com/2011/01/04/wpfs-mvvm-light-toolkit-soup-to-nuts-part-i/">here</a>) I started with an application that had two pages, and a button on the first that was to cause a navigation to the second page.&nbsp; You can download the starting source code <a href="http://jesseliberty.com/wp-content/files/MvvmLightNavigationBehaviorAndMessages2.zip">here</a>.&nbsp; </p>
<p>In that article I explained how the VM cannot call the Navigate service, but that you could use messaging to have the View make the call.&nbsp; While that is correct, there is an easier way; which is to grab the rootFrame and to call Navigate on that.</p>
<p><span id="more-5169"></span>
<p>To do this, open the starting application and navigate to the GoToPage2() method that is called by the relay command.&nbsp; Remove the MessageBox and instead add this line to obtain the RootFrame of the current application,</p>
<pre class="brush: csharp; toolbar: false;">var rootFrame = (App.Current as App).RootFrame;
</pre>
<p>Once you have that in hand, you can call the navigation service directly from the View Model,</p>
<p>&nbsp;</p>
<pre class="brush: csharp; toolbar: false;">rootFrame.Navigate(
  new System.Uri( "/Views/Page2.xaml", System.UriKind.Relative ));
</pre>
<p>This greatly simplifies the code and avoids the added complexity of using messaging back to the original page to perform the navigation.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2012/01/17/calling-navigate-from-the-view-model/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Vibrating the phone</title>
		<link>http://jesseliberty.com/2012/01/03/vibrating-the-phone/</link>
		<comments>http://jesseliberty.com/2012/01/03/vibrating-the-phone/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 17:31:15 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Essentials]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[WindowsPhone]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/?p=5158</guid>
		<description><![CDATA[Windows Phone Tutorial A little vibration added to your application can be just the haptic feedback needed. It turns out that vibration is absurdly easy to add; so much so that discussions of adding vibration typically come with the caveat &#8230; <a href="http://jesseliberty.com/2012/01/03/vibrating-the-phone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jesseliberty.com/windows-from-scratchindex/">Windows Phone Tutorial</a></p>
<p>A little vibration added to your application can be just the <em><a href="http://en.wikipedia.org/wiki/Haptic_technology">haptic feedback</a></em> needed. It turns out that vibration is absurdly easy to add; so much so that discussions of adding vibration typically come with the caveat that you want to use it sparingly; too much of a good thing can make for a very annoying application.</p>
<p>To see how to add vibration to an application, let’s start by creating a new application named <em>Vibrate.&nbsp; </em></p>
<p><span id="more-5158"></span>
<p>The UI is dead simple, just a button centered on MainPage.xaml,</p>
<pre class="brush: csharp; toolbar: false;">&lt;Button
   Content="Vibrate"
   Name="Vibrate"
   Height="100"
   Width="300"/&gt;
</pre>
<p>The event handler for this button will call the Vibrate Controller’s Start method passing in a value for how long to vibrate.&nbsp; You’ll need to add a using statement for Microsoft.Devices.</p>
<pre class="brush: csharp; toolbar: false;"> void Vibrate_Click(
     object sender,
     RoutedEventArgs e )
 {
     VibrateController.Default.Start(
         TimeSpan.FromMilliseconds( 200 ) );
 }
</pre>
<p>That’s really all there is to it.&nbsp; Press the button, the phone vibrates.&nbsp; You can imagine using this in a game of course, but also for specific (and startling) feedback in other applications as well. </p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2012/01/03/vibrating-the-phone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Binding Formatting</title>
		<link>http://jesseliberty.com/2011/12/29/binding-formatting/</link>
		<comments>http://jesseliberty.com/2011/12/29/binding-formatting/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 17:48:15 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[Essentials]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[WindowsPhone]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/?p=5154</guid>
		<description><![CDATA[Windows Phone Tutorial When you are binding data there are additional properties that allow you to format the display and to handle errors and null values. The StringFormat property allows you to add any standard .NET format string that matches &#8230; <a href="http://jesseliberty.com/2011/12/29/binding-formatting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jesseliberty.com/windows-from-scratchindex/">Windows Phone Tutorial</a></p>
<p>When you are binding data there are additional properties that allow you<a href="http://jesseliberty.com/wp-content/uploads/2011/12/BindingFormatting.jpg"><img style="margin: 10px 0px 10px 10px; display: inline; float: right" title="BindingFormatting" alt="BindingFormatting" align="right" src="http://jesseliberty.com/wp-content/uploads/2011/12/BindingFormatting_thumb.jpg" width="390" height="437"/></a> to format the display and to handle errors and null values. </p>
<p>The <strong>StringFormat</strong> property allows you to add any standard .NET format string that matches the type you are binding to.</p>
<p>The <strong>FallbackValue</strong> instructs the binding on what to display if the binding fails.</p>
<p>The <strong>TargetNullValue</strong> instructs the binding on what to display if the value bound to is null.</p>
<p><span id="more-5154"></span>
<p>To see this at work, let’s create a very simple application with three StackPanels, each holding a prompt and a TextBlock,</p>
<pre class="brush: csharp; toolbar: false; highlight: [8,9,10];">&lt;StackPanel Grid.Row="0"
   Orientation="Horizontal"&gt;
   &lt;TextBlock
      Text="Promised Date: " /&gt;
   &lt;TextBlock
      Margin="5,0,0,0"
      Text="{Binding PromisedDate,
      StringFormat=d,
      FallbackValue='Date Not Found',
      TargetNullValue='No Date'}" /&gt;
   &lt;/StackPanel&gt;
&lt;StackPanel
   Grid.Row="1"
   Orientation="Horizontal"&gt;
   &lt;TextBlock
      Text="Delivered Date: " /&gt;
   &lt;TextBlock
      Margin="5,0,0,0"
      Text="{Binding DeliveredDate,
      StringFormat=d,
      FallbackValue='Date Not Found',
      TargetNullValue='No Date'}" /&gt;
&lt;/StackPanel&gt;
&lt;StackPanel
   Grid.Row="2"
   Orientation="Horizontal"&gt;
   &lt;TextBlock
      Text="Action: " /&gt;
      &lt;TextBlock
         Margin="5,0,0,0"
      Text="{Binding Path=ReturnDate,
      StringFormat=d
      FallbackValue='Date Not Found',
      TargetNullValue='No Date'}" /&gt;
&lt;/StackPanel&gt;
</pre>
<p>&nbsp;</p>
<p>Notice that all three TextBlocks use the identical properties except for the name of the property that it will bind to.</p>
<p>In Main.xaml.cs we’ll create a tiny class to act as the data context for the binding,</p>
<pre class="brush: csharp; toolbar: false;">public partial class MainPage : PhoneApplicationPage
{
    public class Book
    {
        public DateTime? PromisedDate
        {
            get { return DateTime.Now; }
            set { PromisedDate = value; }
        }

        public DateTime? ReturnDate
        {
            get { return null; }
        }
    }
</pre>
<p>&nbsp;</p>
<p>Notice that PromisedDate returns a date, there is no property for DeliveredDate. amd ReturnDate returns null.&nbsp; In the body of Main we’ll instantiate a Book object and set as the page’s DataContext.&nbsp; </p>
<pre class="brush: csharp; toolbar: false;">public MainPage()
{
    Book b = new Book();
    DataContext = b;
    InitializeComponent();
}
</pre>
<p>&nbsp;</p>
<p>When this is run, PromisedData provides a date which is formatted by the StringFormat property.&nbsp; Because there is no DeliveredDate the binding on that property fails and the FallbackValue is used.&nbsp; Finally, because ReturnDate is null, the TargetNullValue is used for that value.&nbsp; The output is shown in the illustration at the start of this posting.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2011/12/29/binding-formatting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>DecryptR Part 2</title>
		<link>http://jesseliberty.com/2011/12/21/decryptr-part-2/</link>
		<comments>http://jesseliberty.com/2011/12/21/decryptr-part-2/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 15:37:03 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Essentials]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[Patterns & Skills]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/?p=5149</guid>
		<description><![CDATA[In a recent post, I discussed the DecryptR application I have been toying with.&#160; While the fundamentals are working, there is much to do.&#160; Today I’ll make a few minor improvements. First, let’s set the font in the list box &#8230; <a href="http://jesseliberty.com/2011/12/21/decryptr-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://jesseliberty.com/2011/12/12/decryptra-glass-house-application/">recent post</a>, I discussed the DecryptR application I have been toying with.&nbsp; <a href="http://jesseliberty.com/wp-content/uploads/2011/12/DecryptR-V2.jpg"><img style="margin: 10px 0px 10px 10px; display: inline; float: right" title="DecryptR V2" alt="DecryptR V2" align="right" src="http://jesseliberty.com/wp-content/uploads/2011/12/DecryptR-V2_thumb.jpg" width="294" height="185"/></a>While the fundamentals are working, there is much to do.&nbsp; Today I’ll make a few minor improvements.</p>
<p>First, let’s set the font in the list box to a fixed font, so that the columns align better.&nbsp; To do so I’ll open the application in Expression Blend.&nbsp; In the Objects and Timeline I’ll click my way down to <em>Results</em>- the list box and then in the Text properties window I’ll set the font family to Courier New (a fixed width font) and the font size to 24.</p>
<p><span id="more-5149"></span>
<p>Let’s save this as is, and return to Visual Studio.&nbsp; The next job is to implement the event handler for the Configure button.&nbsp; Create a new page Configuration.xaml. </p>
<p>We’ll want prompts and text boxes for the user to fill in how many letters should be used in the game and how many letters in the code.&nbsp; We also want a check box to indicate whether the code should be revealed or printed as asterisks.</p>
<p>Here’s the Xaml for that page’s ContentPanel,</p>
<pre class="brush: csharp; toolbar: false;">&lt;!--ContentPanel - place additional content here--&gt;
&lt;Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"&gt;
 &lt;Grid.RowDefinitions&gt;
    &lt;RowDefinition
       Height="1*" /&gt;
    &lt;RowDefinition
       Height="1*" /&gt;
    &lt;RowDefinition
       Height="1*" /&gt;
    &lt;RowDefinition
       Height="1*" /&gt;
    &lt;RowDefinition
       Height="1*" /&gt;
    &lt;RowDefinition
       Height="1*" /&gt;
    &lt;RowDefinition
       Height="3*" /&gt;

 &lt;/Grid.RowDefinitions&gt;
 &lt;Grid.ColumnDefinitions&gt;
    &lt;ColumnDefinition
       Width="184*" /&gt;
    &lt;ColumnDefinition
       Width="272*" /&gt;
 &lt;/Grid.ColumnDefinitions&gt;
 &lt;TextBlock
    Text="Number of letters"
    Margin="0,0,6,0" /&gt;
 &lt;TextBox
    Name="NumLetters"
    Width="50"
    HorizontalAlignment="Left"
    Grid.Row="0"
    Grid.Column="1" /&gt;
 &lt;TextBlock
    Text="Size of code"
    Grid.Row="1" /&gt;
 &lt;TextBox
    Name="SizeOfCode"
    Width="50"
    HorizontalAlignment="Left"
    Grid.Row="1"
    Grid.Column="1" /&gt;
 &lt;CheckBox
    Content="Show Code?"
    IsChecked="False"
    Name="ShowCode"
    Grid.Row="2"
    Grid.Column="1" /&gt;
 &lt;Button
    Content="Done"
    Name="Done"
    Grid.Row="3"
    Grid.Column="1" /&gt;
&lt;/Grid&gt;
</pre>
<p>The job of the code-behind is to store these choices for the main page, which we’ll do with Isolated Storage.&nbsp; To do so, create a private member of type Isolated Storage Settings</p>
<pre class="brush: csharp; toolbar: false;">private IsolatedStorageSettings _isoStorage;
</pre>
<p>and initialize it in the constructor,</p>
<pre class="brush: csharp; toolbar: false;">_isoStorage = IsolatedStorageSettings.ApplicationSettings;
</pre>
<p>All the real work is done in Navigated_From, called when you leave the page (to return to Main.xaml),</p>
<pre class="brush: csharp; toolbar: false;">protected override void OnNavigatedFrom(
    System.Windows.Navigation.NavigationEventArgs e )
{
    if (_isoStorage.Contains( "NumberOfLetters" ))
        _isoStorage["NumberOfLetters"] = NumLetters.Text;
    else
        _isoStorage.Add( "NumberOfLetters", NumLetters.Text );

    if (_isoStorage.Contains( "SizeOfCode" ))
        _isoStorage["SizeOfCode"] = SizeOfCode.Text;
    else
        _isoStorage.Add( "SizeOfCode", SizeOfCode.Text );

    if (_isoStorage.Contains( "ShowCode" ))
        _isoStorage["ShowCode"] = ShowCode.IsChecked;
    else
        _isoStorage.Add( "ShowCode", ShowCode.IsChecked );
}
</pre>
<p>&nbsp;</p>
<p>With these values tucked away in Isolated Storage we can retrieve them and assign them to the appropriate variables in OnNavigatedTo in MainPage,</p>
<pre class="brush: csharp; toolbar: false;">protected override void OnNavigatedTo(
    System.Windows.Navigation.NavigationEventArgs e )
{
    if (_isoStorage.Contains( "NumberOfLetters" ))
        Number_Of_Letters =
            int.Parse(_isoStorage["NumberOfLetters"].ToString());

    if (_isoStorage.Contains( "SizeOfCode" ))
        Answer_Size =
            int.Parse( _isoStorage["SizeOfCode"].ToString() );

    if (_isoStorage.Contains( "ShowCode" ))
        ShowCode =
            bool.Parse( _isoStorage["ShowCode"].ToString() );

    string initialRow = GenerateAnswer();
    InterimResults.Add( initialRow );
    Results.ItemsSource = InterimResults;

}
</pre>
<p>&nbsp;</p>
<p>Note that the last three lines (generating the answer and setting the initial row) were moved from the constructor to the bottom of the OnNavigatedTo method.</p>
<p>The small changes greatly enhance the game, allowing the user to set the number of letters in play, the number of letters in the code and whether or not the code is revealed.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2011/12/21/decryptr-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DecryptR&#8211;A Glass House Application</title>
		<link>http://jesseliberty.com/2011/12/12/decryptra-glass-house-application/</link>
		<comments>http://jesseliberty.com/2011/12/12/decryptra-glass-house-application/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 20:40:16 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Essentials]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[Patterns & Skills]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/2011/12/12/decryptra-glass-house-application/</guid>
		<description><![CDATA[&#160; Periodically, I like to build a “glass house” application – that is one which I document as I go, hiding nothing and showing all the thinking that goes into the application as well as the raw, not ready-for-production code &#8230; <a href="http://jesseliberty.com/2011/12/12/decryptra-glass-house-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>Periodically, I like to build a “glass house” application – that is one <a href="http://jesseliberty.com/wp-content/uploads/2011/12/Decrypter2.jpg"><img style="margin: 10px 0px 10px 10px; display: inline; float: right" title="Decrypter2" alt="Decrypter2" align="right" src="http://jesseliberty.com/wp-content/uploads/2011/12/Decrypter2_thumb.jpg" width="207" height="292"/></a>which I document <em>as I go</em>, hiding nothing and showing all the thinking that goes into the application as well as the raw, not ready-for-production code along the way.</p>
<p><strong>DecryptR</strong></p>
<p>DecryptR is a game, but one which will illustrate a number of Mango features.&nbsp; It will not be written in XNA, but rather will be written in Xaml and C#.&nbsp; </p>
<p>The idea of the game is that the computer thinks of a code, using <em>n </em>of the first <em>m</em> letters of the alphabet (where <em>n</em> and <em>m</em> are configurable).&nbsp; Thus, we might decide that it will use 6 of the first 8 letters (A-H).&nbsp; The code does not duplicate letters, so a typical code might be <em>ACBFED </em>but of course the code is not displayed.&nbsp; Your job is to break the code.&nbsp; Each “turn” you put in 6 letters and Decrypter tells you how many you matched, and how many were in the right position.&nbsp; </p>
<p><span id="more-5143"></span>
<p>Thus, if the code is ACBFED and you put in BCAFDH the response would be 5,1, because five of your letters are in the code (BCAFD) and one (F) is in the right position.</p>
<p>Eventually, we will make a beautiful UI for this game, allowing the user to pick letters from tiles, and to have the tiles animate as they appear, with the results displayed nicely.&nbsp; For now, we want to make do with the simplest UI that will work.</p>
<p><strong>What? No MVVM?</strong></p>
<p>Another glass house application that I’m working on with Jon Galloway (as part of the Full Stack Project) is being written test-first and with MVVM.&nbsp; I’ve decided to write <em>this</em>&nbsp; application in the <em>get it working and keep it working</em> design pattern, making use of code-behind rather than creating VMs.&nbsp; </p>
<p><strong>YAGNI</strong></p>
<p>The idea of <em>get it working and keep it working</em> is to create something simple that works, and then to progressively refine it and to add features as needed.&nbsp; G<em>et it working and keep it working</em> also subscribes to <em>YAGNI</em> – You Ain’t Gonna’ Need It, which says not to add a feature until the last possible minute, as you may never need it after all.</p>
<p><strong>The Core</strong></p>
<p>Step 1 in <em>get it working and keep it working</em> is to build just enough UI to be able to put in guesses and get results.&nbsp; That requires</p>
<ul>
<li>A TextBox to enter each guess</li>
<li>A Button to say “accept and score this guess”</li>
<li>A List Box to show all the guesses and their scores</li>
</ul>
<p>Here’s the Xaml for the content panel,</p>
<pre class="brush: csharp; toolbar: false;">&lt;Grid x:Name="ContentGrid"
      Grid.Row="1"&gt;
   &lt;Grid.RowDefinitions&gt;
      &lt;RowDefinition
         Height="80" /&gt;
      &lt;RowDefinition
         Height="*" /&gt;
   &lt;/Grid.RowDefinitions&gt;
   &lt;StackPanel
      Orientation="Horizontal"&gt;
      &lt;TextBox
         Name="Entry"
         Height="Auto"
         Width="150"
         Grid.Row="0"
         HorizontalAlignment="Left" /&gt;
      &lt;Button
         Name="Go"
         Content="Go"
         Margin="5,0,0,0" /&gt;
   &lt;/StackPanel&gt;
   &lt;ListBox
      Name="Results"
      HorizontalAlignment="Stretch"
      VerticalAlignment="Stretch"
      Margin="5"
      Grid.Row="1"/&gt;
&lt;/Grid&gt;
</pre>
<p>&nbsp;</p>
<p>The basic application consists of two major areas of functionality:</p>
<ul>
<li>Setting up the code using a random number generator</li>
<li>Scoring the user’s guesses</li>
</ul>
<p><strong>Setting Up The Code</strong></p>
<p>To get started, we need a number of members and properties.&nbsp; For example, we need a collection to hold the correct answer</p>
<pre class="brush: csharp; toolbar: false;">private List&lt;char&gt; answer = new List&lt;char&gt;();
</pre>
<p>We also need a collection of the guesses that we can set as the ItemsSource of the list box.&nbsp; Rather than fussing with INotifyPropertyChanged, we can make the collection and ObservableCollection and notification is handled automagically.</p>
<pre class="brush: csharp; toolbar: false;">public ObservableCollection&lt;string&gt; InterimResults =
    new ObservableCollection&lt;string&gt;();
</pre>
<p>Finally, we need a number of constants that we’ll implement as properties so that we can, eventually, configure these from a configuration page (and then from isolated storage) [YAGNI alert!]</p>
<pre class="brush: csharp; toolbar: false;">public int Answer_Size { get; set; }
public int Number_Of_Letters { get; set; }
private List&lt;char&gt; alphabet = new List&lt;char&gt;
   { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
     'I', 'J', 'K', 'L', 'M' };
</pre>
<p>The constants are initialized in the constructor, where a call is also made to GenerateAnswer() – the method responsible for generating the code and stashing it away in the <em>answer</em> member.</p>
<pre class="brush: csharp; toolbar: false;">private string GenerateAnswer()
{
    Random r = new Random();
    StringBuilder sb = new StringBuilder();
    for (;;)
    {
        int alphaOffset = r.Next( Number_Of_Letters );
        if (answer.Contains( alphabet[alphaOffset] ))
            continue;

        // sb.Append( '*' );
        sb.Append( alphabet[alphaOffset] );

        answer.Add( alphabet[alphaOffset] );
        if (answer.Count == Answer_Size)
            break;
    }
    sb.Append("\t\t?\t?");
    return sb.ToString();
}
</pre>
<p>We begin by creating an instance of Random, which will generate random numbers, and a StringBuilder to build up the answer string. We then iterate in a forever loop, randomly generating offsets of 0 through the Number of Letters that we’re using as our answer pool (minus one due to the zero offset). </p>
<p>As we get unique letters, we add them to the answer, and we add them to the StringBuilder.&nbsp; Note that right now, while we’re creating the project, we’re displaying the code on the first line, but once we are ready to play we’ll comment that out and use the asterisk instead.&nbsp; </p>
<p>Here’s the complete constructor, for context:</p>
<pre class="brush: csharp; toolbar: false;">public MainPage()
{
    InitializeComponent();
    // TODO: Get from configuration
    Answer_Size = 6;
    Number_Of_Letters = 8;
    Duplicates = false;  //YAGNI?

    string initialRow = GenerateAnswer();
    InterimResults.Add( initialRow );
    Results.ItemsSource = InterimResults;

    Go.Click += new System.Windows.RoutedEventHandler( Go_Click );
}
</pre>
<p>Notice that the string returned from GenerateAnswer becomes the first string in the collection, and the collection is set as the ItemsSource for the list box.</p>
<p>The only remaining work is to set up the event handler on the Go Button.</p>
<p><strong>Go Button Event Handler</strong></p>
<p>When the user clicks <em>Go</em> we have a guess, which we then need to compare to the answer.&nbsp; Our first job is to make sure that the guess is not null and that there are exactly <em>n</em> characters in the guess,</p>
<pre class="brush: csharp; toolbar: false;">void Go_Click( object sender, System.Windows.RoutedEventArgs e )
{
    string guess = Entry.Text.ToUpper();
    Entry.Text = string.Empty;
    if (string.IsNullOrEmpty( guess ) ||
           guess.Length != Answer_Size)
    {
        MessageBox.Show(
           "Must be " + Answer_Size.ToString() + " characters." );
        return;
    }</pre>
<p>We’re now ready to count the matches.&nbsp; We do this with an outer loop (looping over each guess) and an inner loop (looping over each letter in the answer).&nbsp; If the letter is found, we have a match; if the offsets are the same then we also match position.</p>
<pre class="brush: csharp; toolbar: false;">int totalFound = 0;
int totalPosition = 0;

for (int i = 0; i &lt; Answer_Size; i++)
{
    for (int j = 0; j &lt; Answer_Size; j++)
    {
        if (guess[i] == answer[j])
        {
            totalFound++;

            if (i == j)
            {
                totalPosition++;
            }
            continue;
        }
    }
}
</pre>
<p>with that in hand, we’re ready to form the string that will be put into the list box, and if all six were found in the right position, we congratulate the player,</p>
<pre class="brush: csharp; toolbar: false;">string interimResult =
    guess +
    "\t\t" +
    totalFound.ToString() +
    "\t" +
    totalPosition.ToString();
InterimResults.Add( interimResult );

if (totalFound == totalPosition
    &amp;&amp; totalFound == Answer_Size)
{
    MessageBox.Show( "You win!" );
}
</pre>
<p>We’re done.&nbsp; There are plenty of features to add, and much work to do on the UI, but this is now an entirely playable game.&nbsp; Change GenerateAnswer to hide the code, and give it a whirl.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2011/12/12/decryptra-glass-house-application/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Context Menu</title>
		<link>http://jesseliberty.com/2011/11/30/context-menu/</link>
		<comments>http://jesseliberty.com/2011/11/30/context-menu/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 12:39:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Essentials]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[Patterns & Skills]]></category>
		<category><![CDATA[Toolkit]]></category>
		<category><![CDATA[WindowsPhone]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/2011/11/30/context-menu/</guid>
		<description><![CDATA[Windows Phone Tutorial The Silverlight For Windows Phone Toolkit is a magnificent collection of controls and utilities for writing Windows Phone applications.&#160; Unfortunately, there is little or no documentation, and the samples, while wonderful, are quite complex.&#160; At times, it &#8230; <a href="http://jesseliberty.com/2011/11/30/context-menu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jesseliberty.com/windows-from-scratchindex/">Windows Phone Tutorial</a></p>
<p>The <a href="http://silverlight.codeplex.com/">Silverlight For Windows Phone Toolkit</a> is a magnificent collection of controls<a href="http://jesseliberty.com/wp-content/uploads/2011/11/ContextMenu.jpg"><img style="margin: 10px 0px 10px 10px; display: inline; float: right" title="ContextMenu" alt="ContextMenu" align="right" src="http://jesseliberty.com/wp-content/uploads/2011/11/ContextMenu_thumb.jpg" width="185" height="266"/></a> and utilities for writing Windows Phone applications.&nbsp; Unfortunately, there is little or no documentation, and the samples, while wonderful, are quite complex.&nbsp; At times, it is difficult to tease out how to use a control; how to “just make it work.”</p>
<p>As I have done in previous mini-tutorials, this posting will show one of the toolkit controls stripped down to its bare essentials.&nbsp; Creating a context menu, and responding to the user’s choice in the menu turns out to be wicked easy.</p>
<p><span id="more-5140"></span>
<p>To get started, create a new Mango application.&nbsp; On MainPage we’re going to add a StackPanel which in turn will hold two things: </p>
<ul>
<li>An inner StackPanel to show the menu choice</li>
<li>A button which will have a context-menu.</li>
</ul>
<pre class="brush: csharp; toolbar: false;">&lt;Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"&gt;

 &lt;StackPanel
    VerticalAlignment="Top"&gt;
    &lt;StackPanel
       Orientation="Horizontal"&gt;
       &lt;TextBlock
          Text="last selection:"
          Style="{StaticResource PhoneTextSubtleStyle}" /&gt;
       &lt;TextBlock
          Text="none"
          x:Name="lastSelection"
          Style="{StaticResource PhoneTextNormalStyle}" /&gt;
    &lt;/StackPanel&gt;

    &lt;Button
    Margin="0,40"
    VerticalAlignment="Center"
    Padding="12"
    Content="ContextMenu"
    FontSize="18"&gt;
</pre>
<p>&nbsp;</p>
<p>Within the declaration of the button we’ll declare a ContextMenu</p>
<pre class="brush: csharp; toolbar: false;"> &lt;toolkit:ContextMenuService.ContextMenu&gt;
   &lt;toolkit:ContextMenu&gt;
      &lt;toolkit:MenuItem
         Header="this is a menu item"
         Click="MenuItem_Click" /&gt;
      &lt;toolkit:MenuItem
         Header="this is another menu item"
         Click="MenuItem_Click" /&gt;
      &lt;toolkit:MenuItem
         Header="this is a yet another menu item"
         Click="MenuItem_Click" /&gt;
   &lt;/toolkit:ContextMenu&gt;
 &lt;/toolkit:ContextMenuService.ContextMenu&gt;
&lt;/Button&gt;
</pre>
<p>That’s all there is to it, except handling the click of a Menu item.&nbsp; All we want to do, in this case, is ask the sender for its text, and display that in the TextBlock above the button.&nbsp; Here’s the code:</p>
<pre class="brush: csharp; toolbar: false;">private void MenuItem_Click( object sender, RoutedEventArgs e )
{
    lastSelection.Text =
        ((( MenuItem ) sender).Header).ToString();
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2011/11/30/context-menu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Beautiful Page Transitions (Practically) Free</title>
		<link>http://jesseliberty.com/2011/11/29/beautiful-page-transitions-practically-free/</link>
		<comments>http://jesseliberty.com/2011/11/29/beautiful-page-transitions-practically-free/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 16:48:58 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Essentials]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[Patterns & Skills]]></category>
		<category><![CDATA[Toolkit]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[WindowsPhone]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/2011/11/29/beautiful-page-transitions-practically-free/</guid>
		<description><![CDATA[Windows Phone Tutorial I don’t just mean you don’t pay for the code, or the control, I mean we’re talking about 2 minutes of effort.&#160; No joke. Step 1 is to download the November Windows Phone Toolkit and install it &#8230; <a href="http://jesseliberty.com/2011/11/29/beautiful-page-transitions-practically-free/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jesseliberty.com/windows-from-scratchindex/">Windows Phone Tutorial</a></p>
<p>I don’t just mean you don’t pay for the code, or the control, I mean we’re talking about 2 minutes of effort.&nbsp; No joke.</p>
<p>Step 1 is to download the November <a href="http://silverlight.codeplex.com/">Windows Phone Toolkit</a> and install it</p>
<p><span id="more-5135"></span>
<p>Step 2 is to create a new application with two pages.&nbsp; Add a button to the first page and in the click even handler for the button navigate to page 2,</p>
<pre class="brush: csharp; toolbar: false;">private void button1_Click( object sender, RoutedEventArgs e )
{
    NavigationService.Navigate(
        new Uri( "/Page2.xaml", UriKind.Relative ) );
}
</pre>
<p>&nbsp;</p>
<p>Run the application and note that the transition between page 1 and 2 is instantaneous and does not have that nice Metro feel to it.</p>
<p>Now, make three changes.&nbsp; First, in App.xaml.cs locate </p>
<pre class="brush: csharp; toolbar: false;">RootFrame = new PhoneApplicationFrame();
</pre>
<p>and replace it with</p>
<pre class="brush: csharp; toolbar: false;">RootFrame = new TransitionFrame();
</pre>
<p>Second, at the top of both pages place this namespace definition.</p>
<p>Note, if you drag any control from the toolkit onto your page, the system will generate this namespace definition for you automatically.</p>
<p>&nbsp;</p>
<pre class="brush: csharp; toolbar: false;">xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;
   assembly=Microsoft.Phone.Controls.Toolkit"&gt;
</pre>
<p>Finally, add the following Xaml to each page (above the LayoutRoot),</p>
<pre class="brush: csharp; toolbar: false;">&lt;toolkit:TransitionService.NavigationInTransition&gt;
   &lt;toolkit:NavigationInTransition&gt;
      &lt;toolkit:NavigationInTransition.Backward&gt;
         &lt;toolkit:TurnstileTransition
            Mode="BackwardIn" /&gt;
      &lt;/toolkit:NavigationInTransition.Backward&gt;
      &lt;toolkit:NavigationInTransition.Forward&gt;
         &lt;toolkit:TurnstileTransition
            Mode="ForwardIn" /&gt;
      &lt;/toolkit:NavigationInTransition.Forward&gt;
   &lt;/toolkit:NavigationInTransition&gt;
&lt;/toolkit:TransitionService.NavigationInTransition&gt;
&lt;toolkit:TransitionService.NavigationOutTransition&gt;
   &lt;toolkit:NavigationOutTransition&gt;
      &lt;toolkit:NavigationOutTransition.Backward&gt;
         &lt;toolkit:TurnstileTransition
            Mode="BackwardOut" /&gt;
      &lt;/toolkit:NavigationOutTransition.Backward&gt;
      &lt;toolkit:NavigationOutTransition.Forward&gt;
         &lt;toolkit:TurnstileTransition
            Mode="ForwardOut" /&gt;
      &lt;/toolkit:NavigationOutTransition.Forward&gt;
   &lt;/toolkit:NavigationOutTransition&gt;
&lt;/toolkit:TransitionService.NavigationOutTransition&gt;
</pre>
<p>Run the application. You should see a much nicer transition now between your first and second page.&nbsp; That’s really all there is to it.</p>
<p>You can of course use the toolkit to create other kinds of transitions, and even your own transitions, but here you have beautiful Metro-style transitions with 2 minutes effort.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2011/11/29/beautiful-page-transitions-practically-free/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New Mini-Tutorial Video Series</title>
		<link>http://jesseliberty.com/2011/11/04/new-mini-tutorial-video-series/</link>
		<comments>http://jesseliberty.com/2011/11/04/new-mini-tutorial-video-series/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 18:14:03 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[WindowsPhone]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/2011/11/04/new-mini-tutorial-video-series/</guid>
		<description><![CDATA[I’m very pleased to announce that I’m starting a new video series based on my mini tutorials about Windows phone mango. These will all be posted on Channel 9 and you can also find them listed alphabetically on my Windows &#8230; <a href="http://jesseliberty.com/2011/11/04/new-mini-tutorial-video-series/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’m very pleased to announce that I’m starting a new video series based on my mini tutorials about Windows phone mango. These will all be posted on Channel 9 and you can also find them listed alphabetically on my <a href="http://jesseliberty.com/windows-phone-videos/">Windows Phone Videos</a> page.</p>
<p>The first of the series is on animation for Windows phone without code…</p>
<p><iframe style="width: 512px; height: 288px;" src="http://channel9.msdn.com/posts/Animation-Without-Code/player?w=512&amp;h=288" frameborder="0" scrolling="no" width="320" height="240"></iframe></p>
<p>Find links to the rest of the series <a href="http://jesseliberty.com/windows-phone-videos/">here</a>.</p>
<p>First six videos:</p>
<ul>
<li><a href="http://channel9.msdn.com/Posts/Animation-Without-Code">Animation Without Code</a></li>
<li><a href="http://wpdev.ms/BGAgents">Background Agent</a></li>
<li><a href="http://channel9.msdn.com/posts/Understanding-Lambda-Expressions">Lambda Expressions</a></li>
<li><a href="http://channel9.msdn.com/posts/Simple-OData-Server">OData – Simple Server</a></li>
<li><a href="http://channel9.msdn.com/posts/Simple-OData-Client">OData – Simple Client</a></li>
<li><a href="http://channel9.msdn.com/posts/Update-Tiles">Updating Tiles</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2011/11/04/new-mini-tutorial-video-series/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Full Stack, Phase 2&#8211;Overview</title>
		<link>http://jesseliberty.com/2011/11/02/the-full-stack-phase-2overview/</link>
		<comments>http://jesseliberty.com/2011/11/02/the-full-stack-phase-2overview/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 18:48:57 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[Background Agents]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Essentials]]></category>
		<category><![CDATA[Full Stack]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[Multitasking]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Patterns & Skills]]></category>
		<category><![CDATA[SL Unit Tests]]></category>
		<category><![CDATA[Toolkit]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WindowsPhone]]></category>

		<guid isPermaLink="false">http://jesseliberty.com/2011/11/02/the-full-stack-phase-2overview/</guid>
		<description><![CDATA[Windows Phone Tutorial Last year Jon Galloway and I launched the Full Stack experiment,in which we video-documented the creation of a nontrivial application. Today we begin the second phase of this experiment, building a new application that will have implementations &#8230; <a href="http://jesseliberty.com/2011/11/02/the-full-stack-phase-2overview/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jesseliberty.com/windows-from-scratchindex/">Windows Phone Tutorial</a></p>
<p>Last year Jon Galloway and I launched the <a href="http://channel9.msdn.com/Series/The-Full-Stack">Full Stack</a> experiment,in which we <a href="http://jesseliberty.com/wp-content/uploads/2011/11/Pomodoro.jpg"><img style="margin: 10px 0px 10px 10px; display: inline; float: right" title="Pomodoro" alt="Pomodoro" align="right" src="http://jesseliberty.com/wp-content/uploads/2011/11/Pomodoro_thumb.jpg" width="188" height="343"/></a> video-documented the creation of a nontrivial application.</p>
<p>Today we begin the second phase of this experiment, building a new application that will have implementations or related applications on the following platforms:</p>
<ul>
<li>Windows phone 7.5</li>
<li>ASP.net MVC</li>
<li>HTML 5/JavaScript</li>
<li>Windows 8</li>
</ul>
<p>For this phase not only will we be creating a video-documentation record, but I will also be documenting all of my progress and all the work that I’m doing in this series of blog posts.</p>
<p><span id="more-5090"></span>
<p><strong>Pomodoro Timer</strong></p>
<p>The application we will be building is a Pomodoro timer, with a few extra features.&nbsp; The Pomodoro timer is used as part of the <a href="http://en.wikipedia.org/wiki/Pomodoro_Technique">Pomodoro technique</a>, created in the late 1980s by Francesco Cirillo and fully documented on the Pomodoro technique <a href="http://www.pomodorotechnique.com/">homepage</a>.</p>
<p>The essential aspects of using the Pomodoro technique are:</p>
<ul>
<li>work without accepting any interruptions for 25 min <br />(25 minutes of work is called 1 Pomodoro)</li>
<li>take a 5 min. break</li>
<li>every fourth Pomodoro take a 20 min. break</li>
</ul>
<p>Before you begin working on your Pomodoro’s for the day, your first task is to determine what all of your tasks for the day will be,&nbsp; assign estimated Pomodoros to each task and then begin working through the task list in priority order.</p>
<p><em>Please note, this is my interpretation of the essence of the Pomodoro technique; Pomodoro experts may very well disagree.</em></p>
<p><strong>Building the Pomodoro Timer</strong></p>
<p>It is our intent to make extensive use of unit testing, and to a degree test driven development. We will also be building this application using the MVVM design pattern.</p>
<p>To get started however, and to explore some of the primary user experience issues, I opted to spike a quick and dirty application which will serve both to explore implementation issues, and as a working spec (see figure at the start of this post). The spiked version will be the subject of the next couple posts in this series.</p>
<p><strong>Application Features</strong></p>
<p>Among the features that will be implemented for this timer are</p>
<ul>
<li>countdown from 25 min.</li>
<li>pause for 5 min.</li>
<li>all timing is configurable</li>
<li>keep track of blown and completed Pomodoro’s</li>
<li>track notes for interruptions</li>
<li>reminder after five-minute break even when not in foreground</li>
<li>optional ticking sound, even when not in foreground</li>
<li>reports</li>
<li>editable task list</li>
<li>server-based report generation</li>
<li>sharing status across platforms</li>
</ul>
<p>We expect to implement the same or similar UI and features on the phone, on the web, and on the desktop. All of these will be coordinated by a hosting service written in ASP.net MVC.</p>
<p>All of the entries in this series will be catalogued in the <a href="http://jesseliberty.com/windows-from-scratchindex/">min-tutorial homepage</a>, under the word Pomodoro, and in chronological order.</p>
<p>[Dictated to Dragon Dictation. Apologies for errors]</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2011/11/02/the-full-stack-phase-2overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

