<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6443816021567857696</id><updated>2012-01-18T10:54:37.147-06:00</updated><category term='Visual Studio'/><category term='Team Foundation Server'/><category term='Microsoft'/><category term='MVVM'/><category term='.Net'/><category term='SQL Server'/><category term='CodeProject'/><category term='Juvenile Diabetes'/><category term='Expression Blend'/><category term='JDRF'/><category term='jQuery UI'/><category term='Security'/><category term='Apple'/><category term='Entity Set'/><category term='Azure'/><category term='EMS'/><category term='ASP.NET MVC'/><category term='ASP.NET'/><category term='c#'/><category term='Windows Phone'/><category term='Design-time Data'/><category term='Post-Mortem'/><category term='Linq to Objects'/><category term='ComboBox'/><category term='Linq to SQL'/><category term='Work'/><category term='End of World'/><category term='Humor'/><category term='Applications'/><category term='Autocomplete'/><category term='Animation'/><category term='Cloud'/><category term='Windows 7'/><category term='Really Good Graphics'/><category term='Not so Serious'/><category term='jQuery'/><category term='MySQL'/><category term='Not Coding'/><category term='Visualization'/><category term='Office'/><category term='Server'/><category term='Popup'/><category term='Tips'/><category term='IIS'/><category term='April Fool&apos;s'/><category term='Templates'/><category term='systray'/><category term='Raven'/><category term='Browser'/><category term='Firefox'/><category term='WP7 SDK'/><category term='Donate'/><category term='Active Directory'/><category term='VS2010'/><category term='Patterns'/><category term='jQuery Series'/><category term='WPF'/><category term='Blog'/><category term='Entity Framework'/><title type='text'>Mister James</title><subtitle type='html'>This is me blogging the experience of programming at the speed of me. I work mostly on web apps and Windows Phone 7 and enjoy writing about the ups and downs of development in those spaces.  I program on the .NET stack, am lovin' Windows 7 and Visual Studio 2010.  Truth be told, the only ones that call me 'Mister James' are the three- and four-year-olds at Sunday school.  But I'll take what I can get...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default?start-index=101&amp;max-results=100'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>226</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-882307855938154520</id><published>2011-10-12T21:45:00.000-05:00</published><updated>2011-10-13T09:50:44.888-05:00</updated><title type='text'>CustomBinding on Service Reference Results in TransportBindingElement Error</title><content type='html'>&lt;p&gt;I’m coding an ASP.NET MVC 3 web site in Visual Studio 2010.&amp;#160; I added a service reference to a SOAP 1.2 version of a web service and started updating my code (I was using a SOAP 1.1 endpoint previously).&lt;/p&gt;  &lt;p&gt;Unfortunately the switchover wasn’t as clean as I had hoped. The first method I changed resulted in an error, even on a call that appeared identical to the previous version. The error message I received was:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The CustomBinding on the ServiceEndpoint with contract 'SubscriberServices' lacks a TransportBindingElement.&amp;#160; Every binding must have at least one binding element that derives from TransportBindingElement&lt;/em&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;…which looked like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-lvHGm3tWK78/Tpb6uLKx--I/AAAAAAAAAJY/O8cDGKAA_Ys/s1600-h/image%25255B2%25255D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/-SQeVtZINsgk/Tpb6u1OiwPI/AAAAAAAAAJg/UCPDZxzh8XY/image_thumb.png?imgmax=800" width="244" height="146" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For the quick fix, head to the end of this article.&amp;#160; Keep reading if you want to know what’s going on.&lt;/p&gt;  &lt;h3&gt;What Was Going On?&lt;/h3&gt;  &lt;p&gt;The two things that gave me the strongest clues where “CustomBinding” and “TransportBindingElement”, but for different reasons.&amp;#160; CustomBinding was a little unexpected as the service was added via HTTP. I guess I always assumed that it would be using an HTTP binding? The other piece suggested a derivative of the TransportBindingElement, which according to &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.transportbindingelement.aspx"&gt;MSDN&lt;/a&gt; is an abstract base class.&lt;/p&gt;  &lt;h3&gt;Off to Our Config File&lt;/h3&gt;  &lt;p&gt;Actually, at this point, I wanted less noise, so I quickly created a console app and added references to both services.&amp;#160; The differences were, at this point, fairly obvious. The 1.1 version of the service &lt;em&gt;was&lt;/em&gt; using a basicHttpBinding element (which I was expecting), whereas the 1.2 service was using a custom binding:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-rdMvyDA19g4/Tpb6vM1srII/AAAAAAAAAJo/oHSMJbiUMkQ/s1600-h/image%25255B8%25255D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/-nxROjgOXAqo/Tpb6vsmwOII/AAAAAAAAAJw/5jiDb6hzUCg/image_thumb%25255B4%25255D.png?imgmax=800" width="491" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So, what we’re looking at is trying to get the custom binding to know which transport we want to use. This is something that is implicit in the basicHttpBinding but needs to be explicitly set for customBindings.&lt;/p&gt;  &lt;h3&gt;The Fix&lt;/h3&gt;  &lt;p&gt;Following the links on the TransportBindingElement will lead us to the &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.httptransportbindingelement.aspx"&gt;httpTransportbindingElement&lt;/a&gt;, which has both code and config file samples.&amp;#160; Adding a short and simple section to the binding did the trick; all I needed was an httpTransport element in the customBinding\binding element. The updated config section looked like this with the MSDN sample config injected:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-Y7UroypSCRo/Tpb6v7Tz7MI/AAAAAAAAAJ4/T5grHFrrqEU/s1600-h/image%25255B20%25255D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh3.ggpht.com/-pCTBQGJsBNw/Tpb6wuxa1JI/AAAAAAAAAKA/AmoptI3vYVc/image_thumb%25255B12%25255D.png?imgmax=800" width="463" height="204" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms405872.aspx"&gt;Further reading&lt;/a&gt; shows that all the properties set in the MSDN example are actually all defaults, which means that our httpTransport element can simply be reduced to a single, self-closing tag:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Y7ll14lQkKk/Tpb6wtNLlyI/AAAAAAAAAKI/4d2msx_G_kc/s1600-h/image%25255B25%25255D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh3.ggpht.com/-VZoviG7Q0dU/Tpb6xH74tyI/AAAAAAAAAKQ/JpW16QxRkUA/image_thumb%25255B15%25255D.png?imgmax=800" width="467" height="173" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Great!&lt;/p&gt;  &lt;h3&gt;Quick Recap&lt;/h3&gt;  &lt;p&gt;So, in short, if you’re using a SOAP 1.2 service reference, or any service reference that requires the use of a custom binding, make sure you’ve added a TransportBindingElement (such as httpTransport) to your config file or in your code.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-882307855938154520?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/882307855938154520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/10/custombinding-on-service-reference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/882307855938154520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/882307855938154520'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/10/custombinding-on-service-reference.html' title='CustomBinding on Service Reference Results in TransportBindingElement Error'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/-SQeVtZINsgk/Tpb6u1OiwPI/AAAAAAAAAJg/UCPDZxzh8XY/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8395514391451562213</id><published>2011-10-06T06:45:00.000-05:00</published><updated>2011-10-06T14:30:58.340-05:00</updated><title type='text'>Setting up ASP.NET MVC 3 to work with jQuery UI 1.9</title><content type='html'>&lt;blockquote&gt;   &lt;p&gt;Caution: I don't recommend trying this in a production environment. The branch of jQuery UI I'm using in this series is not considered stable and is not meant for prod releases.&amp;#160; You can, however, learn about the new features in the UI library and stretch your development capabilities!&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;The New and Juicy Bits&lt;/h3&gt;  &lt;p&gt;jQuery UI continues to impress. The development team's commitment to extensibility means that their own widgets are up for review at each release, and even at each milestone of a release.&amp;#160; The great thing about the modularity in jQuery UI is that you can build your own widgets or customize the existing ones with the very parts used to build the core set in the first place.&amp;#160; &lt;/p&gt;  &lt;p&gt;But, before you even have to venture in that direction, you already have the ability to work with the many themes (or roll your own!) to make it look and feel the way you want to.&lt;/p&gt;  &lt;p&gt;Focusing on stability and flexibility in the 1.9 build, here are some of the important bits that will be surfacing in this release of jQuery UI:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Improved, tested code in many of the existing widgets &lt;/li&gt;    &lt;li&gt;Much better accessibility accross the suite (for disabled users/browsers) &lt;/li&gt;    &lt;li&gt;Revisited the API design on a number of widgets (Button, Dialog, Position, ProgressBar, Slider, Tabs) &lt;/li&gt;    &lt;li&gt;Improved collision detection on Position and added a new flipfit mode &lt;/li&gt;    &lt;li&gt;A new version of Theme Roller, the download builder and the web site &lt;/li&gt;    &lt;li&gt;New widgets: Tooltip, Spinner, Menu and Menubar &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here's the descriptions of the new Widgets from the horse's mouth:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Tooltip&lt;/strong&gt;: A tooltip is a small overlay that sits over the main page that can be used to provide content or functionality that does not need to be always visible. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Spinner&lt;/strong&gt;: A spinner (stepper) is a simple widget that allows users to increment or decrement the current text box value without having to input it manually. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Menu&lt;/strong&gt;: Menu transform a list of anchors into a widget with mouse and keyboard support for selecting an item. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Menubar&lt;/strong&gt;: A horizontal menu with nested vertical flyout menus for each menu item. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Getting jQuery UI 1.9&lt;/h3&gt;  &lt;p&gt;   &lt;br /&gt;While I'm a huge fan of the integrated package manager in VS2010, you're not going to find these bits on Nuget.&amp;#160; You're going to either need to follow the links from the &lt;a href="http://blog.jqueryui.com/2011/09/jquery-ui-1-9-milestone-6-spinner-2/"&gt;Milestone 6 post&lt;/a&gt; or grab the bits directly from &lt;a href="http://jquery-ui.googlecode.com/files/jquery-ui-1.9m6.zip"&gt;googlecode.com&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Once you grab the zip, unpack it and have a look at the contents.&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-quLvj9uIt-c/To4B4O3_oPI/AAAAAAAAAIs/N6eafG0ymiw/image%25255B11%25255D.png?imgmax=800" width="292" height="209" /&gt;&lt;/p&gt;  &lt;p&gt;Pretty much everything we're going to need will be in the UI and Themes directories.&amp;#160; If you're not familiar with jQuery UI, the Themes directory is where all the CSS is stored for making the entire UI has a consistant look-and-feel.&amp;#160; UI is where all the code exists for all components.&amp;#160; &lt;/p&gt;  &lt;p&gt;You have the choice of building up your own set of functionality for the widgets you're using by including the smaller UI libraries, or you can fire up the full kit with one library.&amp;#160; This allows the bandwidth-concerned developer the opportunity to choose lighter weight code files (or even compile only the needed scripts into a minified script of their own creation).&lt;/p&gt;  &lt;p&gt;As an example, if you wanted to make use of the new spinner, you'd need to include:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;jquery.ui.core.js &lt;/li&gt;    &lt;li&gt;jquery.ui.widget.js &lt;/li&gt;    &lt;li&gt;jquery.ui.button.js &lt;/li&gt;    &lt;li&gt;jquery.ui.spinner.js &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;   &lt;br /&gt;Of course, you would also need to include the relevant CSS files, but with a total weight of 7Kb (and the option to use multiple CDNs out on the web) you might as well just include the full jQuery-ui.css.&lt;/p&gt;  &lt;h3&gt;Using jQuery UI 1.9 in ASP.NET MVC&lt;/h3&gt;  &lt;p&gt;I'm going to assume you've done a little MVC work before, if not, hold tight for the walkthrough after the bullet list. I'm using version 3 of the MVC Framework in Visual Studio 2010 SP1.&lt;/p&gt;  &lt;p&gt;Here's the steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create a new MVC 3 project using the &amp;quot;Empty&amp;quot; template &lt;/li&gt;    &lt;li&gt;Delete the &amp;quot;themes&amp;quot; folder in Content &lt;/li&gt;    &lt;li&gt;Update jQuery with NuGet &lt;/li&gt;    &lt;li&gt;Add jQuery UI 1.9 files to the project (&amp;quot;themes&amp;quot; go in Content and &amp;quot;UI&amp;quot; go in Scripts) &lt;/li&gt;    &lt;li&gt;Add a HomeController &lt;/li&gt;    &lt;li&gt;Add an Index view for HomeController &lt;/li&gt;    &lt;li&gt;Modify the _Layout.cshtml file (your master page) to include jQuery UI and the theme CSS &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Walking Through the Setup&lt;/h2&gt;  &lt;p&gt;Here's the visual play-by-play of that in action.&lt;/p&gt;  &lt;h3&gt;Creating and Cleaning up the Project&lt;/h3&gt;  &lt;p&gt;Open up Visual Studio 2010 and select File –&amp;gt; New Project.&amp;#160; Create a new ASP.NET MVC 3 Application.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/-iPbq6x1CFRk/To4B4TvNmRI/AAAAAAAAAIw/eyaryXcMByU/image%25255B5%25255D.png?imgmax=800" width="448" height="43" /&gt;&lt;/p&gt;  &lt;p&gt;Name the project and click OK.&amp;#160; Finally, select the “Empty” template from the list and click okay.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-II09hG2iu18/To4B4isPgtI/AAAAAAAAAI0/1qtkaj7DiOE/s1600-h/image%25255B14%25255D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/-y-v6v8UmlWw/To4B5TxMYGI/AAAAAAAAAI4/cw6_nNlPgMk/image_thumb%25255B5%25255D.png?imgmax=800" width="244" height="119" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Navigate to the content folder at the root of the project and delete it.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/-jEJu6xKKE9c/To4B52EPzaI/AAAAAAAAAI8/T1TDe4YuBJM/image%25255B22%25255D.png?imgmax=800" width="186" height="117" /&gt;&lt;/p&gt;  &lt;h3&gt;Updating jQuery&lt;/h3&gt;  &lt;p&gt;Next, we need to get the latest version of jQuery so that jQuery UI 1.9 is happy with us.&amp;#160; Go to the Package Manager Console and type:&lt;/p&gt;  &lt;p&gt;&lt;font face="Lucida Console"&gt;Update-Package jQuery&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;…and you’ll see the following:&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/-zzoUeB0y2Jg/To4B6GpV3pI/AAAAAAAAAJA/MSpfQsLRAJk/image%25255B29%25255D.png?imgmax=800" width="612" height="114" /&gt;&lt;/p&gt;  &lt;p&gt;NuGet (the heart of this console) happily goes off and updates all our dependencies for us.&lt;/p&gt;  &lt;h3&gt;Adding jQuery UI 1.9&lt;/h3&gt;  &lt;p&gt;Pop over to that zip folder you downloaded. You’ll need to make sure you’ve extracted all the files. Copy the themes directory, then switch over to VS2010 and paste it into the content folder.&amp;#160; Do the same with UI, but paste it as a sub folder into Scripts.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/-EQhMUKpcXpc/To4B6ViE1PI/AAAAAAAAAJE/9fD0dzAx5ss/image%25255B42%25255D.png?imgmax=800" width="212" height="177" /&gt;&lt;/p&gt;  &lt;h3&gt;Adding the Controller and View&lt;/h3&gt;  &lt;p&gt;We’re going to use the tooling in MVC 3 to do the next bit of work for us, in particular, the code generation that creates controllers and views for us.&amp;#160; Right-click on the Controller folder, then select &lt;strong&gt;Add –&amp;gt; Controller&lt;/strong&gt;.&amp;#160; Call it HomeController when the dialog prompts you (this is so that we can take advantage of the default routing rules in MVC).&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/-HbGMUMm7XgQ/To4B6zvKvwI/AAAAAAAAAJI/ksOtoU6Ion4/image%25255B41%25255D.png?imgmax=800" width="455" height="228" /&gt;&lt;/p&gt;  &lt;p&gt;Your HomeController class is automatically generated with the Index action created for you.&amp;#160; Right click on the name of this action and select &lt;strong&gt;Add View&lt;/strong&gt;. Accept the default name (it picks Index for you because that’s the action you right-clicked).&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/-secBu9XJWk4/To4B7TuRwZI/AAAAAAAAAJM/JcsU8zCWKhw/image%25255B48%25255D.png?imgmax=800" width="403" height="73" /&gt;&lt;/p&gt;  &lt;h3&gt;Updating the Layout&lt;/h3&gt;  &lt;p&gt;Almost there!&amp;#160; All that’s left to do is to adjust our Layout.&amp;#160; The _Layout.cshtml file is like a MasterPage from our days of WebForms and we use it to inject our head element containing the script and CSS references.&amp;#160; &lt;/p&gt;  &lt;p&gt;There’s already a jQuery reference there, so that needs to be update to the correct version (1.6.4 as at the time of this writing).&amp;#160; You’ll need to add the jquery-ui.css and jquery-ui.js files as well.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-WMd0tS9O17Q/To4B7sLh8xI/AAAAAAAAAJQ/TE18eZito8U/s1600-h/image%25255B52%25255D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh3.ggpht.com/-6cicOrRKiHQ/To4B8RZ3FxI/AAAAAAAAAJU/rs8LShwxasA/image_thumb%25255B21%25255D.png?imgmax=800" width="496" height="125" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For you copy-and-pasters out there:&lt;/p&gt;  &lt;pre&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;link href=&amp;quot;@Url.Content(&amp;quot;~/Content/themes/base/jquery-ui.css&amp;quot;)&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;script src=&amp;quot;@Url.Content(&amp;quot;~/Scripts/jquery-1.6.4.min.js&amp;quot;)&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;script src=&amp;quot;@Url.Content(&amp;quot;~/Scripts/ui/jquery-ui.js&amp;quot;)&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And that’s it! You’re all set up to use jQuery UI 1.9.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Next Up: Using the Spinner with Entity Metadata&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now that you’ve got the library in your project, we’re going to have look at some of the controls in more detail. One of the great things in MVC is the insanely simple templates and data binding, especially when coupled with something like Entity Framework.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Hold on to your hats, in the next segment we’re going to use data annotation attributes to wire up a jQuery UI Spinner widget!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8395514391451562213?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8395514391451562213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/10/setting-up-aspnet-mvc-3-to-work-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8395514391451562213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8395514391451562213'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/10/setting-up-aspnet-mvc-3-to-work-with.html' title='Setting up ASP.NET MVC 3 to work with jQuery UI 1.9'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/-quLvj9uIt-c/To4B4O3_oPI/AAAAAAAAAIs/N6eafG0ymiw/s72-c/image%25255B11%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2252209519273897962</id><published>2011-04-21T23:17:00.001-05:00</published><updated>2011-06-26T19:30:25.440-05:00</updated><title type='text'>Time to Move On</title><content type='html'>I'm starting to chart a new course - still in software development, but trying to focus more on a couple of technologies in particular: Asp.Net MVC framework and the NuGet open source package manager.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As well, I'm going to start sharing my development experiences with other developers and aspiring developers at conferences, workshops and user group meetings.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You'll be able to find my new ramblings at my new site: &lt;a href="http://jameschambers.com/blog"&gt;http://jameschambers.com/blog&lt;/a&gt; which will be created with the open source &lt;a href="http://www.orchardproject.net/"&gt;Orchard project&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After being with Blogger for so many years (since 2003, I think?) it will be fun to be working on a new blog engine that is extensible and on the same platform that I develop on (.Net).  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Thanks to the many 1000s of you who come here each month, dozens who leave comments and to those of you who have asked questions, made corrections or sent me towards resources I had otherwise overlooked.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2252209519273897962?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2252209519273897962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/04/time-to-move-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2252209519273897962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2252209519273897962'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/04/time-to-move-on.html' title='Time to Move On'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3829841191238304307</id><published>2011-04-04T23:48:00.000-05:00</published><updated>2011-04-05T16:49:56.937-05:00</updated><title type='text'>Canadians Pay for Music</title><content type='html'>&lt;p&gt;…but you have to let us at it.&lt;/p&gt;  &lt;p&gt;In 2010 Canadians purchased 31.5 million albums.&amp;#160; Folks, that’s darn near the equivalent of one CD &lt;em&gt;per person&lt;/em&gt; in the country.&lt;/p&gt;  &lt;p&gt;I’m guessing the average album would have sold around the $10 mark.&amp;#160; A digital music store would have taken $3.33 of that.&lt;/p&gt;  &lt;p&gt;I hate to continually flog the Zune folks here, but I fail to understand how there is absolutely NO UPDATE or additional information of music in the Zune Marketplace. I started following a few threads in the forums and it seems there is a rising level of frustration, more with the fact that there are no straight answers.&lt;/p&gt;  &lt;p&gt;Like I’ve previously said, tell me who the hold up is, and I’d be happy to chase resolution.&lt;/p&gt;  &lt;p&gt;This is a market worth 1/3 of a billion dollars, and one that will continue to grow when Canadians have access to reasonable digital content from multiple competitors at a fair price.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3829841191238304307?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3829841191238304307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/04/canadians-pay-for-music.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3829841191238304307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3829841191238304307'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/04/canadians-pay-for-music.html' title='Canadians Pay for Music'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3572347535504902026</id><published>2011-03-25T08:08:00.000-05:00</published><updated>2011-03-25T11:24:39.000-05:00</updated><title type='text'>Problems with Diamond DisplayLink BVU160</title><content type='html'>&lt;p&gt;I run a multi-monitor setup and love the extra real estate.&amp;#160; Unfortunately, due to an error in ordering my PC I ended up with a slim chasis and can’t find a dual-head card that fits. I resorted to using the Diamond USB adapter, which for the most part has been a nice way to get that third monitor running.&lt;/p&gt;  &lt;p&gt;But lately this little guy has been causing me headaches.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TYzBxTuOapI/AAAAAAAAAIE/ayTlox3xLsk/s1600-h/WP_000186%5B4%5D.jpg"&gt;&lt;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="WP_000186" border="0" alt="WP_000186" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TYzBxvYzNFI/AAAAAAAAAII/_n03XBzTP-g/WP_000186_thumb%5B1%5D.jpg?imgmax=800" width="397" height="315" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here’s the formula:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Windows 7 Ultimate x64&lt;/li&gt;    &lt;li&gt;Diamond BVU160 v1.0 DisplayLink adapter, driver is up to date&lt;/li&gt;    &lt;li&gt;Windows Phone 7 attached (Samsung Focus)&lt;/li&gt;    &lt;li&gt;Dell E198FP monitor&lt;/li&gt;    &lt;li&gt;ATI Radeon HD 3400 Series display drivers, up to date&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The screen “freezes” up and does one of two things:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The image is locked in a sense, and only redraws small invalidated regions as I drag my mouse across the monitor.&amp;#160; I can also restore a window, invalidating the whole screen, and get the whole thing to redraw.&amp;#160; This works a few times, but then the screen goes black.&lt;/li&gt;    &lt;li&gt;It skips #1 (or I just don’t notice as I’m working on a different monitor) and just goes black.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;At this point I have to unplug the power of the monitor (power cycling doesn’t do anything, I have to physically remove the AC cable), disconnect the Diamond adapter, reconnect power and then attach the USB adapter again.&lt;/p&gt;  &lt;p&gt;This is happening about 2-3 times a day when I have the phone connected and the display adapter is almost hot to the touch when it gets to this state.&lt;/p&gt;  &lt;p&gt;I have a fairly high level of certainty that this is related to a conflict with Diamond’s adapter and Windows Phone.&amp;#160; It only ever freezes like this with the WP7 device attached.&amp;#160; I thought it was perhaps Folding@Home, but I uninstalled that and I’m still getting this problem.&lt;/p&gt;  &lt;p&gt;If anyone else is running into this and has a workaround, please let me know!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3572347535504902026?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3572347535504902026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/problems-with-diamond-displaylink.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3572347535504902026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3572347535504902026'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/problems-with-diamond-displaylink.html' title='Problems with Diamond DisplayLink BVU160'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_QfB_TFa5FOQ/TYzBxvYzNFI/AAAAAAAAAII/_n03XBzTP-g/s72-c/WP_000186_thumb%5B1%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-1760528953147604908</id><published>2011-03-23T22:48:00.000-05:00</published><updated>2011-03-24T12:40:53.511-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone'/><title type='text'>How Windows Phone 7 Could Fail in Canada</title><content type='html'>&lt;p&gt;Folks, let me start by saying that I love my Samsung Focus.&amp;#160; Everyone’s seen an iPhone by now, but you can still turn heads when you’re zipping through the home screen on a WP7 device.&amp;#160; The interface is slick, the apps you need are mostly in the marketplace and the cooler ones – I’m still waiting for the possibilities of augmented reality apps with video and compass APIs – are on the way.&lt;/p&gt;  &lt;p&gt;The phone is well integrated into my other communication points, from email and messaging to scheduling and sharing, and though I’m a heavy user I’ve seen little by the way of bugs.&lt;/p&gt;  &lt;p&gt;But I live in Canada.&amp;#160; And the sale of this phone platform to my friends will be tough.&amp;#160; It’s not because the platform isn’t great – and I do think WP7 phones &lt;em&gt;are&lt;/em&gt; on a great platform – it’s because the phones in Canada are crippled.&lt;/p&gt;  &lt;h3&gt;The Show Me Factor&lt;/h3&gt;  &lt;p&gt;We are moving away from a people with music players to a people with multifunction devices that have music players on them.&amp;#160; At least, those of us with the ability to support a smartphone contract are.&amp;#160; Well, us and the teenagers whose parents spoil them, but I digress.&amp;#160; I had my first MP3 player over 10 years ago and haven’t missed it a bit.&lt;/p&gt;  &lt;p&gt;But the music marketplace in Canada Sucks.&amp;#160; Yes, “sucks” with a capital “S”.&amp;#160; We have very limited choices in where we can purchase our digital content outside of the iVerse.&amp;#160; I’ve used Puretracks and played with the paid versions of some other services but not all the content I want is there and I’ve previously had troubles with DRM content on mulitple devices.&lt;/p&gt;  &lt;p&gt;I want my family – we have four PCs all running Windows 7 as well our our Xbox 360 – to be able to use something more fluid within our ecosystem, connected to and built into the devices we use.&lt;/p&gt;  &lt;p&gt;Including our phones.&lt;/p&gt;  &lt;p&gt;Look, there’s going to be a point where people will have seen it/been there/done that and if the experience isn’t positive they won’t want to go there again.&amp;#160; There’s a really good, but shortening, window that Microsoft should be able to leverage.&lt;/p&gt;  &lt;h3&gt;The Switchover Debate&lt;/h3&gt;  &lt;p&gt;Look, if I can’t convince my wife, my soul mate, my partner until forever to buy a Windows Phone device then I’m not going to get too far with others.&amp;#160; These things should sell themselves, but this media marketplace keeps kicking WP7 in the face.&lt;/p&gt;  &lt;p&gt;We’ve talked about the switch to a smart phone and she’s been leaning towards an iPhone for some time.&amp;#160; All of her music is in iTunes and we’d need to spend some time converting it (in some cases with DRM that might not be possible) and then we’d be left with the purchase void.&lt;/p&gt;  &lt;p&gt;That chasm is too far to cross at the moment.&amp;#160; We’ve agreed to wait for a bit to see if the marketplace changes, but at this point it’s a wide open yawn’s worth of information available and no one is giving any updated information.&amp;#160; For fully three years we’ve been hearing “Keep checking the Zune web site for your region” and nothing more.&lt;/p&gt;  &lt;h3&gt;Challenge #1 - Marketing&lt;/h3&gt;  &lt;p&gt;I eagerly waited for the Zune HD here in Canada, only to have my hopes dashed when Future Shop pulled the remaining original Zune devices from the shelves.&amp;#160; A new employee said to me, literally three days after I almost bought one, that he’d never even heard of Zune.&lt;/p&gt;  &lt;p&gt;What?!&amp;#160; How could that be?&amp;#160; How could the only device poised to be an iPod killer not even enter the general population’s vernacular? We are talking about a company who did the unthinkable here and broke into the video game industry, a move previously believed impossible as the market already had enough players.&amp;#160; How could, in this young and developing area with few serious players, Microsoft miss the boat with visibility?&lt;/p&gt;  &lt;p&gt;The same thing seems to be happening with Windows Phone.&amp;#160; I can still walk into a room of people completely unaware that WP7 devices were actually out.&lt;/p&gt;  &lt;h3&gt;Challenge #2 – The Marketplace&lt;/h3&gt;  &lt;p&gt;This appears as #2 on my list, but not because it’s less important.&amp;#160; I will say this as directly as possible, Microsoft: the music marketplace &lt;em&gt;must&lt;/em&gt; be fixed.&lt;/p&gt;  &lt;p&gt;Technically, it’s not broken.&amp;#160; Because it’s not here.&amp;#160; This is the number one reason my wife won’t buy into the ecosystem, and it’s almost always one of the first things I’m asked of when I’m showing my phone.&amp;#160; You fire up Shazam and it’s right in your face: excellent execution followed by a lack of follow-through.&lt;/p&gt;  &lt;p&gt;I am a sell out here, folks and I know it.&amp;#160; I’m a die hard.&amp;#160; This is a platform with great potential and I’ve even gone so far as to evaluate my “grey area” options (US credit card, friend’s address).&amp;#160; But I’d much rather see the ecosystem change for WP7 in Canada so that we can do things legitimately and without hassle.&lt;/p&gt;  &lt;p&gt;I understand that there may be other problems.&amp;#160; I’ve heard everything from the CRTC blocking Microsoft, to third party licensing complications, to Apple threatening to make things messy.&amp;#160; But Microsoft hasn’t said peep squat about what the problems are.&lt;/p&gt;  &lt;h3&gt;Challenge #3 – Marketing&lt;/h3&gt;  &lt;p&gt;Yes, it’s the same as reason one, but different.&amp;#160; You see, the thing is that Apple didn’t sell it’s iPods to the millions of customers that have them.&amp;#160; The other customers did. Unfortunately, proud Canadians wielding their WP7 phones are ill-equipped to make the sale.&lt;/p&gt;  &lt;p&gt;Heck, even the stores clerks aren’t really there as far as sales pitches.&amp;#160; When I asked to see the Focus at Future Shop, I was greeted with a, “Really? Why?”.&amp;#160; He was even more shocked when I took it home with me.&lt;/p&gt;  &lt;p&gt;I’m not selling these phones and I don’t work for a cell phone company or Microsoft (yet&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TYuB98tU0DI/AAAAAAAAAIA/EjxYd5SkTw8/wlEmoticon-winkingsmile%5B2%5D.png?imgmax=800" /&gt;), but if a guy can’t convince his wife to get one, we’ve got a problem.&amp;#160; Shoot, I even convinced her to &lt;em&gt;marry me&lt;/em&gt;, but I can’t pawn a phone on her!&lt;/p&gt;  &lt;h3&gt;The Fix&lt;/h3&gt;  &lt;p&gt;Actually, Fixes.&amp;#160; It’s plural.&amp;#160; Here are the things that can right the course for this beauty of a ship:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Figure out the content licensing and make music available in the marketplace. If it’s a ways out, for now you must, &lt;em&gt;must&lt;/em&gt; clearly communicate what the issues are.&amp;#160; Customers would be happy to lobby any group that is blocking the process. &lt;/li&gt;    &lt;li&gt;Set up Zune Pass now, even at a lower cost and with limited content. Get buy in from the Canadian content providers to get them in the streaming mix be it independent radio stations, the CBC, CTV or the sports broadcasters. Flesh out the product and give Canadians the same level of product that’s available in other countries around the world. &lt;/li&gt;    &lt;li&gt;Give out some more free phones.&amp;#160; Future Shop wouldn’t even let me play with one of WP7 phones until I said I was surely going to buy one.&amp;#160; They wouldn’t take it out of the box.&amp;#160; This is wrong and bad and a poor purchase experience and bad, too.&amp;#160; Apple has kiosks setup to demo different models of the iPod/Pad/Phone/Thing and for WP7 I get to look at a cellophane wrapped box? Boo! &lt;/li&gt;    &lt;li&gt;Increase visibility.&amp;#160; Get storefront space. Encourage cell phone dealers to use and promote the phone.&amp;#160; Roger’s booth in our mall here had the iPhone 4 announcement posters up &lt;em&gt;six weeks&lt;/em&gt; before the phone was launched.&amp;#160; There is still &lt;em&gt;nothing&lt;/em&gt; in the mall about WP7.&amp;#160; Nada. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I am a software developer and though my previous experience has been on other platforms and technologies, right now I work exclusively on the MS stack.&amp;#160; I am going to MIX11 and am super pumped to see what the year ahead will bring us. &lt;/p&gt;  &lt;p&gt;I’ve already come to terms with the fact that most of my concerns will not be addressed by the time the event rolls around, but you can be sure I’ll be sharing my thoughts with whomever will give me an audience.&amp;#160; Basically, it’s a conference where I’ll be hanging out with a ton of folks who’s phones are cooler than mine; sadly, we’ll have the same phone.&lt;/p&gt;  &lt;p&gt;This is a phone that can really give customers a fresh experience with a unique level of integration with communication, search, maps, gaming and social networking.&amp;#160; I really hope that WP7 survives in Canada long enough to bear the fruit it is longing to produce.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-1760528953147604908?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/1760528953147604908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/how-windows-phone-7-could-fail-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1760528953147604908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1760528953147604908'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/how-windows-phone-7-could-fail-in.html' title='How Windows Phone 7 Could Fail in Canada'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_QfB_TFa5FOQ/TYuB98tU0DI/AAAAAAAAAIA/EjxYd5SkTw8/s72-c/wlEmoticon-winkingsmile%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-1298480339184845085</id><published>2011-03-20T22:50:00.000-05:00</published><updated>2011-03-21T10:51:59.584-05:00</updated><title type='text'>jQuery IntelliSense with ASP.NET MVC and the Razor View Engine</title><content type='html'>&lt;p&gt;The Razor view engine in ASP.NET MVC3 brings great improvements to the readability of code in the view.&amp;#160; Unfortunately, some of what I’d previously lamented in missed productivity improvements has stuck around.&lt;/p&gt;  &lt;p&gt;If you are working with Razor’s reimplementation of Master Pages – Layouts – then you will likely run into the same kind of limitations with IntelliSense that existed in previous ASP.NET editors: you simply don’t get IntelliSense for jQuery on your views when you include the script reference in your _Layout.cshtml.&lt;/p&gt;  &lt;h3&gt;Enabling IntelliSense&lt;/h3&gt;  &lt;p&gt;The only way to get those digits moving at the speed of computer-type-it-for-me is to add the script references to your view.&amp;#160; Because we don’t want the script written to the page twice – once through the viewstart/layout and once through the view – we simply use our old if(false) trick &lt;a href="http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-and-jquery-part-1-getting.html" target="_blank"&gt;(see part way down)&lt;/a&gt; to get IntelliSense back online.&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Lucida Console"&gt;&lt;font style="background-color: #ffff00"&gt;@&lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt; (&lt;font color="#0000ff"&gt;false&lt;/font&gt;)      &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;script &lt;font color="#c0504d"&gt;src&lt;/font&gt;=&amp;quot;../../Scripts/jquery-1.4.4.min.js&amp;quot; &lt;font color="#c0504d"&gt;type&lt;/font&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;script &lt;font color="#c0504d"&gt;src&lt;/font&gt;=&amp;quot;../../Scripts/jquery-ui.min.js&amp;quot; &lt;font color="#c0504d"&gt;type&lt;/font&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Write the if block out and then drag and drop the files from your scripts folder in the Solution Explorer as an easy way to do this.&amp;#160; Once you’ve done this once, you can then put it in your Toolbox by highlighting the code and dragging it to the Toolbox window.&amp;#160; Here, I’m about to rename it to something more useful:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TYd0HV774rI/AAAAAAAAAHw/S8rLK37hwrY/s1600-h/image%5B5%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TYd0HgeEgxI/AAAAAAAAAH0/DedkaMh_CFY/image_thumb%5B3%5D.png?imgmax=800" width="448" height="214" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;How This Could Be Fixed&lt;/h3&gt;  &lt;p&gt;To understand why it’s not working we have to look at what the IDE is aware of and what it does to figure out what styles/scripts are available in the editor.&lt;/p&gt;  &lt;p&gt;When you’re on a view, Visual Studio doesn’t really know which layout will be used to render the view.&amp;#160; In some cases you may have many and you may be dynamically selecting it based on, for instance, the role of a logged in user.&lt;/p&gt;  &lt;p&gt;However, we also know that the MVC Framework relies heavily on convention, and chances are that the default, most-used scenario with the ViewStart/_Layout.cshtml being used is likely the one that most folks will be dealing with.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;So I would propose this:&lt;/strong&gt; in the event that there is only one _Layout in the Views folder, assume that this is the one that will be used. Infer style sheet and script references from this file and enable IntelliSense based on the same.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-1298480339184845085?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/1298480339184845085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/jquery-intellisense-with-aspnet-mvc-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1298480339184845085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1298480339184845085'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/jquery-intellisense-with-aspnet-mvc-and.html' title='jQuery IntelliSense with ASP.NET MVC and the Razor View Engine'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_QfB_TFa5FOQ/TYd0HgeEgxI/AAAAAAAAAH0/DedkaMh_CFY/s72-c/image_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2762738999688330544</id><published>2011-03-20T18:42:00.001-05:00</published><updated>2011-03-23T10:15:02.061-05:00</updated><title type='text'>Making the Most of It</title><content type='html'>&lt;p&gt;Well, we’re set to receive up to a total of 35cm of snow in the next 24 hours.  With the gorgeous weather at hand, but the threat of a raging river looming, you need to do something to take your mind off the impending flood.&lt;/p&gt;  &lt;p&gt;We had a great afternoon of sledding, snow ball fights, snowman building and hot chocolate with marshmallows.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_QfB_TFa5FOQ/TYeEdwTrPMI/AAAAAAAAAH4/g1JpZhIUMgQ/s1600-h/image%5B4%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TYeEeoh3faI/AAAAAAAAAH8/uhQGfgepKO4/image_thumb%5B2%5D.png?imgmax=800" width="298" height="424" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Mr. Frosty here is a good 45cm taller than my son.  An incredible afternoon.&lt;/p&gt;  &lt;p&gt;After completing the snow adventures we drove back home past the sandbagging efforts of the city, which are required in order to keep major traffic routes from being submerged.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2762738999688330544?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2762738999688330544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/making-most-of-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2762738999688330544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2762738999688330544'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/making-most-of-it.html' title='Making the Most of It'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_QfB_TFa5FOQ/TYeEeoh3faI/AAAAAAAAAH8/uhQGfgepKO4/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3748549033691698080</id><published>2011-03-17T18:28:00.000-05:00</published><updated>2011-03-17T18:28:00.243-05:00</updated><title type='text'>ASP.NET MVC3: The Razor View Engine and Text</title><content type='html'>&lt;p&gt;I knew this, but I had a brain fart here and couldn’t figure out what was wrong. I was trying to output some simple text to the browser based on some condition:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TYKLVCN2bEI/AAAAAAAAAHY/kTwwd2DlV1o/s1600-h/image%5B4%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TYKLVrqJfhI/AAAAAAAAAHc/9T-onAFLhPI/image_thumb%5B2%5D.png?imgmax=800" width="356" height="95" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I started to get the following error message:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The type or namespace name 'Do' could not be found (are you missing a using directive or an assembly reference?)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Along with a list of others:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TYKLV4KtVuI/AAAAAAAAAHg/Ok7sfPUS-6w/s1600-h/image%5B10%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TYKLWd0rVzI/AAAAAAAAAHk/hnca-piEJEs/image_thumb%5B6%5D.png?imgmax=800" width="542" height="167" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;But nothing really said what was wrong.&lt;/p&gt;  &lt;p&gt;Nothing’s really &lt;em&gt;wrong&lt;/em&gt;, per se, but Razor can’t figure out what I want to do here and doesn’t know that Do should be text and not me trying to code something. To fix it, simply wrap the text in a &amp;lt;span&amp;gt; tag and roll:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TYKLWgVL6QI/AAAAAAAAAHo/oHK4R4ICFFs/s1600-h/image%5B15%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TYKLXEggXbI/AAAAAAAAAHs/_-E3PH0rvmw/image_thumb%5B9%5D.png?imgmax=800" width="397" height="99" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Tada! &amp;lt;/facepalm&amp;gt;&lt;/p&gt;  &lt;p&gt;The only reason I ran into this was because I copy &amp;amp; pasted the text. Normally you’d get IntelliSense as soon as you start typing and that should throw up a context flag pretty quick.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3748549033691698080?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3748549033691698080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/aspnet-mvc3-razor-view-engine-and-text.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3748549033691698080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3748549033691698080'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/aspnet-mvc3-razor-view-engine-and-text.html' title='ASP.NET MVC3: The Razor View Engine and Text'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_QfB_TFa5FOQ/TYKLVrqJfhI/AAAAAAAAAHc/9T-onAFLhPI/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-5477413133933211622</id><published>2011-03-15T22:57:00.000-05:00</published><updated>2011-03-15T22:57:00.256-05:00</updated><title type='text'>Google News Fail</title><content type='html'>&lt;p&gt;Ran into this today when checking the news:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TX-Mzngj0UI/AAAAAAAAAHI/ND0OJtYRlaI/s1600-h/image%5B4%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TX-M0K-oQNI/AAAAAAAAAHM/ijCICf-PwT4/image_thumb%5B2%5D.png?imgmax=800" width="507" height="211" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The headline reads:&lt;/strong&gt; Japan’s PM warns of radiation risk&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The body of text below:&lt;/strong&gt; Scientists say they may have discovered the lost city of Atlantis buried deep under the marshlands of southern Spain, north of Cadiz and near the Straights of Gibraltar.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-5477413133933211622?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/5477413133933211622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/google-news-fail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5477413133933211622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5477413133933211622'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/google-news-fail.html' title='Google News Fail'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_QfB_TFa5FOQ/TX-M0K-oQNI/AAAAAAAAAHM/ijCICf-PwT4/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-1607745929809896339</id><published>2011-03-06T22:35:00.000-06:00</published><updated>2011-03-07T14:47:13.225-06:00</updated><title type='text'>Who’s Smarter Now, Mr. Computer?</title><content type='html'>&lt;p&gt;The New York Times have posted the game &lt;a href="http://www.nytimes.com/interactive/science/rock-paper-scissors.html" target="_blank"&gt;Rock-Paper-Scissors – You vs. the Computer&lt;/a&gt; in the wake of the big Watson computer win over the human Jeopardy contestants.&amp;#160; They reduce AI to “building on simple rules and statistical averages” and present a game of chance, with some big claims.&lt;/p&gt;  &lt;p&gt;They have two versions of the game, one that has to learn as it plays, the other that has some experience in the mix.&lt;/p&gt;  &lt;h3&gt;Picking an Opponent&lt;/h3&gt;  &lt;p&gt;I’m no rookie, I have been known to dominate the RPS scene at my office and I know how to stare down an opponent.&amp;#160; Oh, wait…shoot.&amp;#160; I start with the sure-fire winner, the one you should put your money on.&lt;/p&gt;  &lt;h3&gt;The Veteran Presence&lt;/h3&gt;  &lt;p&gt;So here’s their idea…after several rounds of play their computer will use statistical analysis to figure out your strategy, backed by 200,000 previous rounds of play. They don’t define the 200,000 rounds – as in, were they human played, were they 200,000 different people, if nationality or race or education played in – but for some reason that’s enough data to “exploit a person’s tendencies”, and yet, I have my doubts.&lt;/p&gt;  &lt;p&gt;I decided to play 40 rounds.&amp;#160; If there was anything akin to AI in the pot, this thing should at least win one third of its games.&lt;/p&gt;  &lt;p&gt;Here’s where I was a few moves in:&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TXVETVDJ33I/AAAAAAAAAG4/OIaYgMtI9rw/image%5B5%5D.png?imgmax=800" width="534" height="292" /&gt;&lt;/p&gt;  &lt;p&gt;While it made some ground up towards the end, I was able to hold it off of any streak and the closest it got was within two.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TXVETmaja1I/AAAAAAAAAG8/kZDfbCYieP8/image%5B15%5D.png?imgmax=800" width="244" height="102" /&gt;&lt;/p&gt;  &lt;p&gt;After that, I teetered on +2-3 points and as high at +4-5 points, and ended up +4 over the computer, thus solidly proving that, &lt;em&gt;minimally&lt;/em&gt;, if we’re going to partner a game of chance with technology called “AI”, we have a long way to go.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TXVET7R3xtI/AAAAAAAAAHA/SOTKgjewG7U/image%5B16%5D.png?imgmax=800" width="244" height="99" /&gt;&lt;/p&gt;  &lt;p&gt;There was no stopping me by some ‘simple rules’ engine. ;o)&lt;/p&gt;  &lt;p&gt;I want to point something important out about this statistic: for the one who is winning more that the opponent &lt;em&gt;and&lt;/em&gt; the tie, they are beating the odds.&amp;#160; I am a combined +10 on 40 rounds here at the end of the game, meaning that not only am I beating an expert player, but I’m beating the tie-chance handily as well.&lt;/p&gt;  &lt;h3&gt;Bring in the Rookie&lt;/h3&gt;  &lt;p&gt;Finally, I tried out the “dumb” version, the rookie alter-ego that must first learn the rules and doesn’t get the benefit of 200,000 other players’ moves in a database.&amp;#160; I decided to give it an extra 5 moves as a chance to learn some of the rules before getting into the play.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TXVEUE_zV6I/AAAAAAAAAHE/ZSEnfyD-FeE/image%5B17%5D.png?imgmax=800" width="242" height="98" /&gt;&lt;/p&gt;  &lt;p&gt;What? Shocker?! How could it be that with 5 more moves against an (arguably) weaker opponent I could have fewer wins?!&lt;/p&gt;  &lt;p&gt;Oh right…it a &lt;em&gt;freeking game of chance.&lt;/em&gt; Unless you put on your idiot cap and play the same hand each time, this is a game of odds and they are 1/3, 1/3, 1/3 as to what I’ll play next.&amp;#160; Period.&amp;#160; Just because 200,000 other people picked R-R-P-S-S-R before me doesn’t mean that I’ll play P instead of R on my next move.&lt;/p&gt;  &lt;p&gt;This is not a prediction, even when backed by hundreds of thousands of records, not any more than a lady in a tent with a lit glass ball.&amp;#160; Over time I will win 33%, lose 33% and tie 33%.&amp;#160; It’s no different than a coin toss, with one more side to the coin.&lt;/p&gt;  &lt;p&gt;The only learning that this ‘AI’ does is around the rules of the game.&amp;#160; To that end, there’s only really six (counting ties), and it seems to know when it’s learned them all, suggesting a bias in the first place.&lt;/p&gt;  &lt;h3&gt;Okay, Yeah, But…&lt;/h3&gt;  &lt;p&gt;There’s more going on. I know it does some pattern matching and what not, but that doesn’t mean it’s AI. &lt;/p&gt;  &lt;p&gt;After playing these games I walked through it’s demonstration about how it thinks.&amp;#160; It uses some good buzz words making it sound like it’s thinking, but really, this is just straightforward math equations muxed with some simple filtering that any first year CompSci student should be able to figure out.&amp;#160; &lt;/p&gt;  &lt;p&gt;No magic here, folks, move along.&lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;The programmers at the New York Times have created a good gimmick that will fool most of the general population into believing that they have created some form of artificial intelligence that, when it mates with Watson, is ready to techno-freak the humans into submission.&amp;#160; &lt;/p&gt;  &lt;p&gt;Hey, it may even be an impressive chunk of code, but it does not represent any of the modern complexities that some impressive minds (like those at IBM) have solved.&lt;/p&gt;  &lt;p&gt;I could likely to write a version just as capable by picking randomly the answer. &lt;/p&gt;  &lt;p&gt;Better yet, I’m going to write a traffic light color prediction engine.&amp;#160; &lt;/p&gt;  &lt;p&gt;Look out, Matrix, we’re all about to take the blue pill. Or was that the red?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-1607745929809896339?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/1607745929809896339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/whos-smarter-now-mr-computer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1607745929809896339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1607745929809896339'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/whos-smarter-now-mr-computer.html' title='Who’s Smarter Now, Mr. Computer?'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_QfB_TFa5FOQ/TXVETVDJ33I/AAAAAAAAAG4/OIaYgMtI9rw/s72-c/image%5B5%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8799220788195723963</id><published>2011-03-05T11:28:00.001-06:00</published><updated>2011-03-05T11:28:10.753-06:00</updated><title type='text'>This update improves the experience of updating your phone in the future.</title><content type='html'>&lt;p&gt;Well, it’s arrived, my phone’s hit the list for updating.&amp;#160; I got the notification on my phone and plugged it into my laptop to start the process.&amp;#160; My update was delayed as I was on the brick list; I have a Samsung Focus.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image.png"&gt;&lt;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="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb.png" width="479" height="565" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;First Things First&lt;/h3&gt;  &lt;p&gt;Before I was able to apply the update, Windows Phone 7 required an update to Zune.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_3.png"&gt;&lt;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="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_3.png" width="409" height="61" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This process took about four minutes, including the download.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_4.png"&gt;&lt;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="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_4.png" width="493" height="202" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Updating the Phone&lt;/h3&gt;  &lt;p&gt;After the Zune update was complete the software shut down but did not restart on its own.&amp;#160; I left my phone plugged in, but was not prompted to update. &lt;/p&gt;  &lt;p&gt;When I restarted Zune I had to go into Settings-&amp;gt;Update where I was able to launch the update process.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_5.png"&gt;&lt;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="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_5.png" width="510" height="142" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The only thing different this time around was that the warning had been updated to note that telephony would be disabled.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_6.png"&gt;&lt;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="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_6.png" width="499" height="67" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The estimate was 20 minutes for the entire process and I was on step 6 of 9 in about 15 seconds, so I was optimistic.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_7.png"&gt;&lt;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="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_7.png" width="487" height="122" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When the reboot was complete the updates were pushed to the phone and the computer installed new device drivers. One more reboot, the updates completed installation, and the phone was as good as gold!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_8.png"&gt;&lt;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="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/This-update-improves-the-experience-of-_9BB3/image_thumb_8.png" width="513" height="238" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Total time: 18 minutes, start to finish.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8799220788195723963?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8799220788195723963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/this-update-improves-experience-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8799220788195723963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8799220788195723963'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/this-update-improves-experience-of.html' title='This update improves the experience of updating your phone in the future.'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2848395058807345915</id><published>2011-03-03T22:52:00.001-06:00</published><updated>2011-03-05T15:04:46.271-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Windows Phone 7 Wishlist #3</title><content type='html'>&lt;p&gt;There are two things I am looking forward to in a big way, but not on my wish list (because these will be realized for sure):&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The upgrade to HSPA+ in my area, and,&lt;/li&gt;    &lt;li&gt;The Windows Phone 7 first update.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I’ll get to my wish list in a moment.&lt;/p&gt;  &lt;p&gt;I am stuck on the Edge service network because of my locale.  The towers were upgraded months ago, but one of the partners in the carrier network (not mine) have equipment and services and software older than bunk and they can’t flip the switch until everyone’s ready.  This is going to happen in &lt;em&gt;days&lt;/em&gt; and I can’t wait until I’m pulling down 7Mbps on my phone.&lt;/p&gt;  &lt;p&gt;I have a Samsung device and have not yet received the update.  I’m not sure if it’s a candidate thing, or a rolling update thing, or even if my carrier is blocking it (I’ve heard all three) but I am looking forward to the pre-update update that is currently in the works, especially as it paves the way for The-Big-One in the next few weeks.&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;I wondered here if my carrier might be blocking the update, but I don't think that could really be the case.  The phone checks for updates, likely directly to a WP7 service, and the device itself is &lt;a href="http://theycallmemrjames.blogspot.com/2011/03/this-update-improves-experience-of.html"&gt;updated through the Zune software&lt;/a&gt; on PC.&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Here’s My List&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;I would like a way to search my text messages.  This is present in mail, so it seems like it’s not too far fetched in texts.  I had someone text me the phone number of my friend ‘Mike’, but I couldn’t remember who sent it to me.  The text was something like “Hey Mike’s new cell is…” so I should have been able to find it fairly easily.&lt;/li&gt;    &lt;li&gt;I would like an editor for my alarms and ring tones.  Build it into Zune, or make a Windows Live ZuneTone application that you can download and make your own ringtones and alarms.  Let me set cues for vibration.  Let me shift pitch and even layer multiple audio tracks.  Let me share it through Zune or Live or something with my friends.&lt;/li&gt;    &lt;li&gt;A first-party, no frills sound recorder.  The same level of function as the one built in to Windows 7.  In fact, I would love it if I could also use the audio jack as a line in to record.  I volunteer on a regular basis and work the sound board (or at least help) and I hate lugging around a laptop to record the audio.&lt;/li&gt;    &lt;li&gt;Because I feel as strongly as I do about this, I’m going to say it again: Canadians &lt;em&gt;want&lt;/em&gt; to pay for their content.  Please make Zune Pass available in Canada.  If this plea doesn’t work, I’m going to track down folks at MIX11 and talk to them in person! ;o)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I have a couple of other items on my list, as mentioned previously:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://theycallmemrjames.blogspot.com/2011/01/windows-phone-7-wishlist.html" target="_blank"&gt;Windows Phone Wishlist #1&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://theycallmemrjames.blogspot.com/2011/02/windows-phone-7-wishlist-2.html" target="_blank"&gt;Windows Phone Wishlist #2&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://theycallmemrjames.blogspot.com/2010/07/dear-microsoft-give-us-zune.html" target="_blank"&gt;Dear Microsoft: Give us Zune&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2848395058807345915?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2848395058807345915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/windows-phone-7-wishlist-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2848395058807345915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2848395058807345915'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/windows-phone-7-wishlist-3.html' title='Windows Phone 7 Wishlist #3'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3154628844839596480</id><published>2011-03-03T21:13:00.000-06:00</published><updated>2011-03-03T21:13:00.602-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Extension Methods for Converting ints and bools</title><content type='html'>&lt;p&gt;I was recently working on a chunk of code where I had three different scenarios for conversion.&amp;#160; With two external libraries (something I couldn’t change) and this not being a big enough project (so not worth a facade) as driving factors I rolled a couple of simple to use extension methods.&lt;/p&gt;  &lt;h3&gt;The Code&lt;/h3&gt;  &lt;p&gt;I won’t lollygag here too much.&amp;#160; You need a namespace and static class name that work for your (they’re more-or-less irrelevant in the grander scheme), and a couple of static methods.&lt;/p&gt;  &lt;p&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#0000ff"&gt;namespace&lt;/font&gt; ExtensionMethods      &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;public static class&lt;/font&gt; &lt;font color="#a5a5a5"&gt;Extensions&lt;/font&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;public static bool&lt;/font&gt; ToBool(&lt;font color="#0000ff"&gt;this int&lt;/font&gt; i)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;return&lt;/font&gt; i == 0 ? false : true;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;public static int&lt;/font&gt; ToInt(&lt;font color="#0000ff"&gt;this bool&lt;/font&gt; b)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;return&lt;/font&gt; b ? 1 : 0;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;public static int&lt;/font&gt; ToInt(&lt;font color="#0000ff"&gt;this bool&lt;/font&gt;? b)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;return&lt;/font&gt; b.HasValue ? (b.Value ? 1 : 0) : 0;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Basically, we’re just using a tertiary operation to decide which value is appropriate to use in each of the contexts. &lt;/p&gt;  &lt;p&gt;The third method is there to help out with nullable boolean values.&amp;#160; This was handy in my case, not sure how many people would need this.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3154628844839596480?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3154628844839596480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/extension-methods-for-converting-ints.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3154628844839596480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3154628844839596480'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/03/extension-methods-for-converting-ints.html' title='Extension Methods for Converting ints and bools'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2451050143964327654</id><published>2011-02-28T22:57:00.000-06:00</published><updated>2011-03-01T10:59:32.255-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeProject'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Fixing “Unrecognized configuration section userSetting” Errors</title><content type='html'>&lt;p&gt;Though I have not seen the error “Unrecognized configuration section userSetting” as a standalone exception, it has come up a number of times for me and surfaces as the inner exception on a “Configuration system failed to initialize” exception.&lt;/p&gt;  &lt;p&gt;If you’re running into this error and following along, I’m currently using Visual Studio 2010, mostly on .NET 4.0 and I program in c#.&amp;#160; If you’re using a different environment some of the file names or UI might be a bit different, so you’ll have to adjust accordingly.&lt;/p&gt;  &lt;p&gt;The exception will be raised in Settings.Designer.cs, on the first attempt to read a value from the application’s configuration.&lt;/p&gt;  &lt;p&gt;You can fix the error by navigating to the current directory where the user settings are being saved for your app.&amp;#160; This will be in %system%\users\your_user\AppData\Local\Microsoft\YourApp.vshost.######\version&lt;/p&gt;  &lt;p&gt;Delete the user.config file, clean your solution and rebuild all.&amp;#160; This should fix the problem.&lt;/p&gt;  &lt;p&gt;If that doesn’t work, you may need to go so far as to shut down Visual Studio, clean out all the %system%\users\your_user\AppData\Local\Microsoft\YourApp directories of any config files and then follow the above steps.&lt;/p&gt;  &lt;h3&gt;What’s Happening?&lt;/h3&gt;  &lt;p&gt;When you first add a setting to the application through the UI, the default is to create a user-scoped setting.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TW0l8lZUMvI/AAAAAAAAAGw/6PUI3G2FxvY/s1600-h/image%5B4%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TW0l8zN095I/AAAAAAAAAG0/hnlSvtxnqnc/image_thumb%5B2%5D.png?imgmax=800" width="437" height="81" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;User settings and Application settings are primarily different on two fronts:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Storage location&lt;/li&gt;    &lt;li&gt;Run-time accessibility&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;User settings are read/write and can be altered at run-time. These are perfect to save things like favorites, window layout, user-specific options, color preferences and the like. These files are stored in a directory created for the application, basically sand-boxed from system-wide access and the only place your app can read/write from for free (elevated privileges aside).&lt;/p&gt;  &lt;p&gt;Application settings are read only at run-time and can only be altered by changing the XML file and relaunching the application, or by some creative XML file management (and then a reload on your configuration data).&amp;#160; These files are stored in the app directory in app.config and also contain the default settings for users who have not yet launched the app (these are the settings that will be defaulted in for the new users).&lt;/p&gt;  &lt;p&gt;I have hit the “Configuration system failed to initialize”Configuration system failed to initialize error a couple of times, and it always seems to be the User scope default biting me in the arse.&lt;/p&gt;  &lt;p&gt;Basically, I create a setting, plug along for a while, then go back to add another setting and realize that I had left it in user scope.&amp;#160; I switch the first setting to application scope and keep plugging away.&amp;#160; Somewhere between then and the next time the application tries to access that property, the exception is thrown and doesn’t give you much detail at the surface level.&lt;/p&gt;  &lt;h3&gt;Figuring out the Files You Need to Delete&lt;/h3&gt;  &lt;p&gt;I said you can likely delete the user.config files without much regard.&amp;#160; Truth is if you’re into testing something settings-related that can be a real inconvenience. &lt;/p&gt;  &lt;p&gt;I will drill into the inner exception to find the problem file; it’s only two deep, so it’s easy to find the path of the file in question if you’re willing to dig.&amp;#160; &lt;/p&gt;  &lt;p&gt;Trust me, folks, your debugger is your best friend.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2451050143964327654?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2451050143964327654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/fixing-unrecognized-configuration.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2451050143964327654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2451050143964327654'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/fixing-unrecognized-configuration.html' title='Fixing “Unrecognized configuration section userSetting” Errors'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_QfB_TFa5FOQ/TW0l8zN095I/AAAAAAAAAG0/hnlSvtxnqnc/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-6642450945158393386</id><published>2011-02-25T20:52:00.003-06:00</published><updated>2011-02-25T20:55:49.211-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone'/><title type='text'>Windows Phone 7 - What if?</title><content type='html'>&lt;p&gt;Nice. Looks like Microsoft is starting to ramp up the ooh-la-la with their advertising.  Combined with the web-based ads with the head-to-head comparisons, the new Windows Phone 7 commercials are starting to look a little more playful.&lt;/p&gt;&lt;br /&gt;&lt;iframe title="YouTube video player" width="640" height="375" src="http://www.youtube.com/embed/mrhpXQqS3Is?rel=0&amp;amp;hd=1" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;p&gt;Yeah.  My phone does that. :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-6642450945158393386?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/6642450945158393386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/nice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/6642450945158393386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/6642450945158393386'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/nice.html' title='Windows Phone 7 - What if?'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/mrhpXQqS3Is/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-4252556577379328413</id><published>2011-02-14T22:50:00.000-06:00</published><updated>2011-02-15T13:25:58.697-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeProject'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><title type='text'>An Azure Deployment Primer</title><content type='html'>&lt;p&gt;&lt;em&gt;&lt;font color="#a5a5a5"&gt;From the Developer &amp;amp; Evangelism Labs: Introduction to Windows Azure&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;This post is a summary of the notes I took while working through the Introduction to Windows Azure lab in the January 2011 Platform Training Kit.&amp;#160; I ran into a couple of road bumps and bruises along the way and thought I’d share. &lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#000000"&gt;&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=413e88f8-5966-4a83-b309-53b7b77edf78&amp;amp;displaylang=en" target="_blank"&gt;The Platform Training Kit&lt;/a&gt; – The download for the kit&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The sample is a guestbook that lets you write your name, a message and post a photo.&amp;#160; A background service resizes the photo and the thumbnail is linked to the full size image.&lt;/p&gt;  &lt;p&gt;The lab walks you through setting up the relevant bits of the application locally, then walks you through deploying it the application to the cloud.&amp;#160; I found it to be a good balance of hand-holding and explanation, but you may find many questions left unanswered. The Microsoft Platform Evangelism team has certainly lowered the bar for folks to get in over their head! Thankfully there are 26 other labs to help quench your thirst.&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;When you get it up and running, here’s what the end product looks like:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TVq9idClk6I/AAAAAAAAAGE/a2aG3G8_GRQ/s1600-h/image%5B21%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TVq9inCgVRI/AAAAAAAAAGI/ifGeVlwY7MM/image_thumb%5B13%5D.png?imgmax=800" width="425" height="253" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Well…that’s what it looks like if you post a picture of the snow on my roof with a name of MisterJames!&amp;#160; &lt;/p&gt;  &lt;h3&gt;&lt;font color="#000000"&gt;Snags, Detours and Road Bumps&lt;/font&gt;&lt;/h3&gt;  &lt;h4&gt;Documentation Gap&lt;/h4&gt;  &lt;p&gt;Following the lab from the first step and trying to use the project through all of the exercises has its pitfalls. First of all if you make a mistake, that carries through the whole way.&amp;#160; Secondly, when preparing for and throughout exercise 3 (deployment) there isn’t much clarity around the implications of misnaming your hosted service or storage account.&amp;#160; There are also rules around naming (they have to be DNS suitable names) but this isn’t clear through the docs.&amp;#160; Worse, the error you get when you make an account naming mistake is not very leading: One of the request inputs is out of range.&amp;#160; I was getting this error when making a call to CreateTablesFromModel, and nothing really pointed me back to the name.&lt;/p&gt;  &lt;p&gt;You can, however, opt to jump in with the files provided for the lab.&amp;#160; At each step of the exercise the team has provided us with an updated, accurate solution to continue from.&lt;/p&gt;  &lt;p&gt;This is good, as in step 3 it assumes you’re using that and doesn’t give clear instructions on the updates required in the service configuration file.&amp;#160; The nodes and values required are in the provided solution.&lt;/p&gt;  &lt;h4&gt;Error Loop on Deployment&lt;/h4&gt;  &lt;p&gt;After I completed the lab I started playing around with config files and some simple changes to the app.&amp;#160; In that process I managed to botch a deployment package (the configuration bits).&amp;#160; Unfortunately, I didn’t realize that until I had already deployed the package as an upgrade to the first version.&amp;#160; The instances were stuck in some updating/starting/waiting/resetting cycle that took over 40 minutes to work itself out. The result was an error state, which until reaching I was unable to stop and update the service.&lt;/p&gt;  &lt;h4&gt;A Missing Warning&lt;/h4&gt;  &lt;p&gt;I just want to add another voice to the mix here: remember to stop and delete your project as you don’t want to be incurring charges or burning up valuable compute cycles.&lt;/p&gt;  &lt;h4&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/h4&gt;  &lt;h3&gt;Time Expectations&lt;/h3&gt;  &lt;p&gt;This is a lab that is scheduled to take approximately 60 minutes.&amp;#160; In addition to the coding bits I took two phone calls, answered a few IMs and emails and was wrapped up on the code/deployment side of things inside 55 minutes. I did muscle through it pretty quickly, though, as I’ve done several of these labs and know the style.&amp;#160; &lt;/p&gt;  &lt;p&gt;If you aren’t patterned to recognizing the parts you should and shouldn’t need to read, this lab could take up to 75 minutes to complete.&amp;#160; One other note: I already had my Azure account up and running, so I was able to skip that part of the task.&lt;/p&gt;  &lt;p&gt;After plugging through the juicy bits, I then had to wait for the succession of updates, host starts, role starts and what not.&amp;#160; This easily pushed me over the allotted 60 minutes.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TVq9jTA1MUI/AAAAAAAAAGM/Q18atx1Em5g/s1600-h/image%5B4%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TVq9jsO7cqI/AAAAAAAAAGQ/ToDiIMCSCuw/image_thumb%5B2%5D.png?imgmax=800" width="660" height="223" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For all of these services to finish their progression to their final states took about 20 minutes, at which point we end up here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TVq9jwrFncI/AAAAAAAAAGU/9jxiNZxEE38/s1600-h/image%5B15%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TVq9kHwEF-I/AAAAAAAAAGY/5ZmpBRLdk34/image_thumb%5B9%5D.png?imgmax=800" width="416" height="152" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;Set aside a two-hour slice of time and you should be able to move casually through the lab, start to finish. The Introduction to Windows Azure does a great job of touching on many of the concepts you’ll be working with when you get into cloud development.&amp;#160; You will be left with questions around deployment and configuration, but this start is good exposure and the walkthrough doesn’t leave out any important steps.&lt;/p&gt;  &lt;p&gt;Don’t forget to delete the services created in the lab!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-4252556577379328413?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/4252556577379328413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/azure-deployment-primer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4252556577379328413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4252556577379328413'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/azure-deployment-primer.html' title='An Azure Deployment Primer'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_QfB_TFa5FOQ/TVq9inCgVRI/AAAAAAAAAGI/ifGeVlwY7MM/s72-c/image_thumb%5B13%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-1042800910959598280</id><published>2011-02-13T20:58:00.000-06:00</published><updated>2011-02-14T11:59:30.639-06:00</updated><title type='text'>Mixin’ it up</title><content type='html'>&lt;p&gt;Bootcamps. Keynote. Sessions I’m actually interested in. Meeting folks that I’ve only ever known online.&amp;#160; Should be a great event!&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" border="0" src="https://msteched.blob.core.windows.net/media/Default/BlogPost/news/MIX11_BB_SeeYouAt_1.gif" /&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-1042800910959598280?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/1042800910959598280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/mixin-it-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1042800910959598280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1042800910959598280'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/mixin-it-up.html' title='Mixin’ it up'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2862652176295248385</id><published>2011-02-08T18:22:00.000-06:00</published><updated>2011-02-08T18:22:00.124-06:00</updated><title type='text'>Parents, Open Your Eyes</title><content type='html'>&lt;p&gt;I just read this blog post from over on ZDNet: &lt;a href="http://www.zdnet.com/blog/hardware/its-time-for-itunes-and-xbox-live-to-put-spending-limits-in-place/11303" target="_blank"&gt;It's time for iTunes and Xbox Live to put spending limits in place&lt;/a&gt;.&amp;#160; Mr. Adrian Kingsley-Hughes writes that:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;There’s a fine line between something being lucrative, and starting to feel scammy. Apple is certainly sailing close to the wind with some of the in-app purchases it is allowing, and Microsoft could certainly do more to prevent this kind of bad publicity. [...] And it’s clear that the current mechanism of relying on parental controls isn’t enough. Both companies need to get their act together.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I would agree that parental controls are failing – couldn’t that be said about a lot of things? – &lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TVHDDGS_9kI/AAAAAAAAAF8/u1aTlcv3laA/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 20px 0px 20px 22px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TVHDD4Pa_5I/AAAAAAAAAGA/yg6Jq8TPuH4/image_thumb%5B2%5D.png?imgmax=800" width="240" height="35" /&gt;&lt;/a&gt;but we would stop short of flogging a parent who pulled off the same stunt at Wal-Mart and then tried to blame the store management.&amp;#160; &lt;/p&gt;  &lt;p&gt;Could you imagine walking your child into the store, giving them a shopping cart and meeting them at the checkout – at which point you blindfold yourself and let the check-out clerk scan all items…and then your credit card?&amp;#160; And you don’t even check?&lt;/p&gt;  &lt;p&gt;Look, I’m no fan of Apple, but I don’t think they (or Microsoft) are in the wrong here.&amp;#160; My wife has disabled in-app purchases and we don’t share our password for the iPod Touch or the Windows Phone 7 devices we own.&amp;#160; Not going to happen.&lt;/p&gt;  &lt;p&gt;Our kids just don’t get unchecked access to our credit cards.&amp;#160; Period.&lt;/p&gt;  &lt;p&gt;While Mr. Kingsley-Hughes refers to it as ‘insanity’ and points blame to the companies in question, I refuse to be an enabler for parents who want to make stupid, unconditionally blameless children.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2862652176295248385?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2862652176295248385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/parents-open-your-eyes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2862652176295248385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2862652176295248385'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/parents-open-your-eyes.html' title='Parents, Open Your Eyes'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_QfB_TFa5FOQ/TVHDD4Pa_5I/AAAAAAAAAGA/yg6Jq8TPuH4/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-1236834460797298296</id><published>2011-02-07T21:29:00.000-06:00</published><updated>2011-02-08T16:13:23.400-06:00</updated><title type='text'>Dedicated Back Button: Genius</title><content type='html'>&lt;p&gt;My wife has an iPod Touch and we were running through some of the same apps that exist on iOS and Windows Phone 7.&lt;/p&gt;  &lt;p&gt;At several points we both accidentally clicked the wrong link/button/UI element etc. on our own device.&amp;#160; There was one glaring difference, however; the iOS versions often land you in a place where you have to navigate through the home screen and back into the app where you accidentally made the click.&lt;/p&gt;  &lt;p&gt;Not so, with Windows Phone 7: there’s a dedicated, hardware-based back button.&amp;#160; This makes it easy to back up through your screen progression to the last place you were at.&lt;/p&gt;  &lt;p&gt;It’s so simple that you think that it wouldn’t be necessary, and yet, there she is…my wife pushing the empty space on her iPod like there should actually be something useful there.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-1236834460797298296?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/1236834460797298296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/dedicated-back-button-genius.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1236834460797298296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1236834460797298296'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/dedicated-back-button-genius.html' title='Dedicated Back Button: Genius'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-7561544045373398977</id><published>2011-01-31T22:51:00.001-06:00</published><updated>2011-02-14T15:37:42.464-06:00</updated><title type='text'>Windows Phone 7 Wishlist #2</title><content type='html'>&lt;p&gt;So I’ve been playing with the phone now for over two weeks now and having a great time showing it to my friends.  They are shocked that it’s a Windows phone. I have two friends, in particular – one from Vancouver and one from Toronto – who were in town for this past weekend and are huge iPhone fans. &lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TUhkd7LwoGI/AAAAAAAAAF0/PpGdK6L8gD0/s1600-h/image%5B3%5D.png"&gt;&lt;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="image" border="0" alt="image" align="right" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TUhkeMuuIUI/AAAAAAAAAF4/d-BQYxZ7Wxc/image_thumb%5B1%5D.png?imgmax=800" width="220" height="98" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Between the two of them they’ve owned every iteration of the iPhone, including their now current iPhone 4.  They put their phones down and were fighting over my Samsung Focus.&lt;/p&gt;  &lt;p&gt;The one was quite miffed that the Rogers rep at the mall didn’t demo it for him as he just picked up his iPhone 4 three weeks ago.&lt;/p&gt;  &lt;h3&gt;Things I’ve Noticed&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;When you give the home screen a little inertia to let it scroll, then repeatedly hit the Windows button, you can make the tiles skip and keep rolling from the start.  This turned out to be a fun game for my kids, who have contests by pinning all the apps to the home screen and then seeing who can be the first to scroll-home-tap and give it enough momentum to get to the bottom of the list.&lt;/li&gt;    &lt;li&gt;I tend to hit the back or search buttons when I’m using the camera.  I am so used to holding my other phone that had no buttons in that area that my fingers get in the way.  This isn’t so much a WP7 problem as a Samsung Focus problem.  It happens enough to be annoying but not so much that it’s a problem.&lt;/li&gt;    &lt;li&gt;Same thing with the volume and power, which are on exact opposite sides.  You use the phone for leverage on the opposite side to push the button…with unintended results.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Things I’d (Still) Like to See&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;Video sharing&lt;/li&gt;    &lt;li&gt;Zune Pass and music in the Zune marketplace for Canadians (&lt;a href="http://theycallmemrjames.blogspot.com/2010/07/dear-microsoft-give-us-zune.html" target="_blank"&gt;I’ve already mentioned this&lt;/a&gt;, but it’s worth repeating)&lt;/li&gt;    &lt;li&gt;Updates to the Facebook app – (doesn’t really seem to do it’s work in the background)&lt;/li&gt;    &lt;li&gt;Some way to organize the apps list.  I love the tiles, I love the way the other apps are off to the side, but what would really work is to carry forth the Metro metaphor and allow me to make a panorama out of the apps, with categories I can set.  I wouldn’t even mind – at first – if I had to do it in Zune.&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-7561544045373398977?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/7561544045373398977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/windows-phone-7-wishlist-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7561544045373398977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7561544045373398977'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/02/windows-phone-7-wishlist-2.html' title='Windows Phone 7 Wishlist #2'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_QfB_TFa5FOQ/TUhkeMuuIUI/AAAAAAAAAF4/d-BQYxZ7Wxc/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3722894811622566254</id><published>2011-01-20T19:34:00.000-06:00</published><updated>2011-01-21T07:35:59.184-06:00</updated><title type='text'>ASP.NET, MVC 3, the Razor View Engine and Google Maps</title><content type='html'>&lt;p&gt;With the release of MVC 3, the updated project templates and the Razor view engine we have several new features and tool improvements at our disposal.&amp;#160; I wanted to see how hard it would be to get a quick mash-up of some ASP.NET goodness and the Google Maps API.&amp;#160; For this project, I’m going to walkthrough creating a new project in ASP.NET using MVC 3 in Visual Studio 2010.&amp;#160; You’ll need to have the &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d2928bc1-f48c-4e95-a064-2a455a22c8f6&amp;amp;displaylang=en" target="_blank"&gt;RTM build of MVC 3&lt;/a&gt; (which contains other ASP.NET enhancements, btw).&lt;/p&gt;  &lt;h3&gt;Getting Started&lt;/h3&gt;  &lt;p&gt;Once installed, it’s fairly easy to invoke the New Project dialog and select ASP.NET MVC 3 Web Application from the Web templates.&amp;#160; If you don’t see the project type listed, make sure that you are targeting the correct framework.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TTmLQS0a9KI/AAAAAAAAAFY/o9ZSPH_FyFY/image%5B14%5D.png?imgmax=800" width="553" height="202" /&gt;&lt;/p&gt;  &lt;p&gt;I named my project RazorMaps.&amp;#160; When we click ok, we are then presented with a bit of a wizard to select our options for the project.&amp;#160; This is a simple but good improvement over the previous MVC bits because it rolls up the wizard, test project creation and multiple templates (empty versus the “internet application”) and lets us select the view engine.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TTmLQidE1YI/AAAAAAAAAFc/_r2VsBxrT3Q/image%5B13%5D.png?imgmax=800" width="409" height="381" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TTmLQ5ZGqOI/AAAAAAAAAFg/VxQEAYpwnnI/s1600-h/image%5B12%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TTmLRBehQ8I/AAAAAAAAAFk/lQc777X53nI/image_thumb%5B6%5D.png?imgmax=800" width="169" height="244" /&gt;&lt;/a&gt;For simplicity sake here I’ve just selected an Empty template and no test project.&amp;#160; &lt;/p&gt;  &lt;p&gt;Most of the project pieces feel familiar, in fact, there’s no noticeable changes to the MVC project at a root level and all the expected folders are there.&lt;/p&gt;  &lt;p&gt;It’s nice to see that jQuery is added by default to the _layout.cshtml file, and to see that jQuery UI is included in the project.&lt;/p&gt;  &lt;p&gt;As at my writing this, it’s also the latest bits for the jQuery library, and they have the vsdoc file updated (AWESOME! No more renaming the old one and replacing the library!), and there are other libraries in the mix as well (enabling unobtrusive validation, etc.).&lt;/p&gt;  &lt;h3 style="clear: both"&gt;A Simple Home Page&lt;/h3&gt;  &lt;p&gt;We need to get a view set up so that we have something to look at.&amp;#160; The base project doesn’t include the controller or the view we’re going to want, so we’ll start there.&lt;/p&gt;  &lt;p&gt;Right-click on controllers, Add &amp;gt; Controller and name it HomeController.&amp;#160; We get our basic controller up-and-running and the code for our first ActionResult (our home page) is free:&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TTmLRko8mZI/AAAAAAAAAFo/UiarVJ5TaQY/image%5B31%5D.png?imgmax=800" width="346" height="206" /&gt;&lt;/p&gt;  &lt;p&gt;Next, right-click anywhere in the Index method and select Add View from the context menu.&amp;#160; If the View Name is &lt;strong&gt;Index&lt;/strong&gt; then you shouldn’t need to change anything else.&amp;#160; We’re using the Razor view engine and we already have our layout specified in _viewstart.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TTmLR7uf-vI/AAAAAAAAAFs/EtGznnGPd4g/image%5B30%5D.png?imgmax=800" width="361" height="362" /&gt;&lt;/p&gt;  &lt;p&gt;Press F5 to see your lovely work!&lt;/p&gt;  &lt;h3&gt;Hello, Google Maps&lt;/h3&gt;  &lt;p&gt;We have a couple of things that we need to do to get the basic, no-frills map up-and-running.&amp;#160; Though I worked from the simple tutorial on the &lt;a href="http://code.google.com/apis/maps/documentation/javascript/tutorial.html" target="_blank"&gt;Google Maps Javascript API&lt;/a&gt; page, I’m going to try to MVC this up as much as possible and look at some of the features of the Razor view engine.&lt;/p&gt;  &lt;p&gt;We know that we need to add the Google Maps script to our page, and we can see from the tutorial that you also need to have a couple of styles.&amp;#160; Because we are using layouts in Razor and don’t want these on every page we create, we’ll take advantage of Razor Sections in our layout.&lt;/p&gt;  &lt;p&gt;Open up _Layout.cshtml and add the following lines of code to the &amp;lt;head&amp;gt; portion of the document:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Lucida Console"&gt;@RenderSection(&amp;quot;Scripts&amp;quot;, false)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; @RenderSection(&amp;quot;Styles&amp;quot;, false)         &lt;br /&gt;&amp;lt;/style&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We’re adding two optional RenderSections here.&amp;#160; This is very similar to creating content sections when using master pages.&lt;/p&gt;  &lt;p&gt;Next, pop back into our index.cshtml file so that we can add the juicy bits to get the map loading.&lt;/p&gt;  &lt;h3&gt;Fleshing out the Page&lt;/h3&gt;  &lt;p&gt;Right at the top of the file, you’re going to want to add the following code:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Lucida Console"&gt;@{        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ViewBag.Title = &amp;quot;MVC 3 and Google Maps&amp;quot;;         &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Lucida Console"&gt;@section Scripts {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;#160; src=&amp;quot;&lt;/font&gt;&lt;a href="http://maps.google.com/maps/api/js?sensor=false&amp;quot;"&gt;&lt;font face="Lucida Console"&gt;http://maps.google.com/maps/api/js?sensor=false&amp;quot;&lt;/font&gt;&lt;/a&gt;&lt;font face="Lucida Console"&gt;&amp;gt;&amp;lt;/script&amp;gt;        &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Lucida Console"&gt;@section Styles {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; html { height: 100% }         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; body { height: 100%; margin: 0px; padding: 0px }         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; #map_canvas { height: 80% }         &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The ViewBag is a dynamic expression and evaluated at runtime.&amp;#160; The “Title” property is filled into our layout template with the @ViewBag.Title expression.&amp;#160; &lt;/p&gt;  &lt;p&gt;Next, we have our two sections; the first adds the map script to our page, the second applies and specifies the styles we need to get the map rendering correctly.&lt;/p&gt;  &lt;p&gt;The rest of the page consists of:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A div element (to host the map) &lt;/li&gt;    &lt;li&gt;An initialize function that sets up the map, and &lt;/li&gt;    &lt;li&gt;A jQuery shortcut to invoke the initialize function when the page is ready &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Here’s the code:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;lt;h2&amp;gt;Hello, Google Maps&amp;lt;/h2&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;lt;div id=&amp;quot;map_canvas&amp;quot; style=&amp;quot;width:80%; height:80%&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;#160;&amp;#160;&amp;#160; function initialize() {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var latlng = new google.maps.LatLng(40.716948, -74.003563);         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var options = { zoom: 14, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP };         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var map = new google.maps.Map(document.getElementById(&amp;quot;map_canvas&amp;quot;), options);         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;#160;&amp;#160;&amp;#160; $(function () {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; initialize();         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; });         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And there you have it!&amp;#160; Press F5 again and the map loads.&lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;If you have a good handle on ASP.NET MVC and you understood MasterPages, the switch to the Razor engine and templates is going to be easy and refreshing.&amp;#160; Integrating per-page code, via Razor section rendering, is straightforward and keeps our templates clean.&lt;/p&gt;  &lt;p&gt;Updated script libraries and improved templates and a ton of feature enhancements round out this release nicely.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3722894811622566254?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3722894811622566254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/01/aspnet-mvc-3-razor-view-engine-and.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3722894811622566254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3722894811622566254'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/01/aspnet-mvc-3-razor-view-engine-and.html' title='ASP.NET, MVC 3, the Razor View Engine and Google Maps'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_QfB_TFa5FOQ/TTmLQS0a9KI/AAAAAAAAAFY/o9ZSPH_FyFY/s72-c/image%5B14%5D.png?imgmax=800' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-1207016560395501375</id><published>2011-01-19T22:48:00.000-06:00</published><updated>2011-01-19T22:48:00.615-06:00</updated><title type='text'>Built-In Authentication and Authorization Providers in ASP.NET with the MVC Framework</title><content type='html'>&lt;p&gt;If you’re not already doing so, you should seriously be using the the built-in Auth &amp;amp; Auth in ASP.NET. While the subject is fairly well covered, I continue to get several questions and comments related to creating accounts, logging in and permissions and when talking with other developers. I am shocked at how many still roll their own authentication and authorization bits – often for no better reason than not knowing how great (and FREE!) the default providers are.&lt;/p&gt;  &lt;h3&gt;The Basics of Authentication and Authorization&lt;/h3&gt;  &lt;p&gt;There are two things you will need to do on most web sites with “account” functionality: identify existing users based on provided user names and passwords (authentication) and then express privileges to control access to protected resources (authorization).&lt;/p&gt;  &lt;p&gt;These two facilities allow us to do some creative things, like showing different content to users when they are logged in, or to restrict and redirect requests based on the logged in user’s set of privileges.&lt;/p&gt;  &lt;h3&gt;In ASP.NET, Auth &amp;amp; Auth are Free&lt;/h3&gt;  &lt;p&gt;The first official, for-a-customer e-commerce web site that I notched on my belt was back in 1997. I spent days creating a system to log users in, store cookies (that I do not care to discuss security about!), store user information, track log-ins and the like.&amp;#160; Each page that I wanted to protect with security meant checking cookies for certain keys, looking those keys up, then checking against a static set of rules for permissions.&amp;#160; I spent weeks fixing the broken parts.&amp;#160; Because most of it was wrapped up in per-page scripts, I had to essentially recreate the whole mess when the customer decided they wanted to self-administer the storefront.&lt;/p&gt;  &lt;p&gt;Today, so much of that mess is cleaned up for us.&amp;#160; I want to give you the steps to set up Authentication and Authorization in your next MVC web site.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open Visual Studio 2010 and create a new &lt;strong&gt;ASP.NET MVC 2 Web Application&lt;/strong&gt;. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Yeup.&amp;#160; We’re done.&lt;/p&gt;  &lt;h3&gt;Walking Through What’s There&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TTdOlaDSexI/AAAAAAAAAEI/3AEN_fe8AzM/s1600-h/image21.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TTdOln1VKVI/AAAAAAAAAEM/CqEhJBo58F4/image_thumb19.png?imgmax=800" width="187" height="320" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you are familiar with the MVC pattern the default project is quite straightforward, but not entirely trivial.&amp;#160; There is no magic here, just convention and after working with the project for a few minutes you should be able to orient yourself.&lt;/p&gt;  &lt;p&gt;The three basic concepts of MVC – Model, View and Controller – are expressed as classes and .aspx pages (as well as .ascx for partial pages and templates).&amp;#160; As part of the convention, each part has it’s own directory, and in the View folder we have subfolders for each controller.&lt;/p&gt;  &lt;h5&gt;The Project Components&lt;/h5&gt;  &lt;p&gt;What is relevant to us today are the items related to user accounts. You can see that there is an AccountController for us as well as the classes we need to log a user on in AccountModels.&amp;#160; The Account subfolder in Views gives us four pages dealing with account creation, maintenance and sign on.&amp;#160; Finally, the Shared subfolder in Views has a LogOnUserControl that displays different content based on the authentication status of the user.&lt;/p&gt;  &lt;p&gt;At this point, we’re actually still missing a couple of pieces.&amp;#160; If you drill into your App_Data directory you would find that there is no database to hold your account data.&amp;#160; Thankfully, we don’t need to do much to create one; namely, we just use the site.&lt;/p&gt;  &lt;h5&gt;The Registration Process&lt;/h5&gt;  &lt;p&gt;Press F5 to start debugging the application.&amp;#160; When the site opens up you’ll see the default master page and index in action:&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TTdOlyMlh4I/AAAAAAAAAEQ/sl8Dj6YXwHE/image27.png?imgmax=800" width="691" height="356" /&gt;&lt;/p&gt;  &lt;p&gt;Follow the Log On link up in the top right corner of the page.&amp;#160; This will take you to a page with a form to log on, but also a link to the registration page. Follow that, and create an admin account.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TTdOmcesbNI/AAAAAAAAAEU/FIwBdw76lVE/s1600-h/image34.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TTdOmj_rkVI/AAAAAAAAAEY/lLd-y1NVhos/image_thumb24.png?imgmax=800" width="260" height="245" /&gt;&lt;/a&gt;Once you’ve created your account you can return to the App_Data directory and see that the database has been created (you may need to click the show all button in the Solution Explorer). &lt;/p&gt;  &lt;p&gt;The show all button looks like this: &lt;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="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TTdOm26r5KI/AAAAAAAAAEc/Uo6FwEP_emg/image39.png?imgmax=800" width="22" height="23" /&gt;&lt;/p&gt;  &lt;h3&gt;Authorization In An Attribute&lt;/h3&gt;  &lt;p&gt;This is where the easy kicks in.&lt;/p&gt;  &lt;p&gt;To add authorization to your application you can make use of the attributes available to us in the ASP.NET MVC Framework.&amp;#160; It is as simple as adding one line of code to your controller.&lt;/p&gt;  &lt;p&gt;Let’s turn our about page into something that only authenticated users can view.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TTdOnHLDJjI/AAAAAAAAAEg/q0pnSf2juQI/s1600-h/image%5B5%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TTdOntnghcI/AAAAAAAAAEk/ZSjmbxErkm8/image_thumb%5B2%5D.png?imgmax=800" width="317" height="111" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Perfect! The [Authorize] attribute describes the controller action as something that only users who have been authenticated can access.&amp;#160; And now, when we load up our site, if we try to navigate to the About page prior to logging in you will be redirected to the login page.&amp;#160; To prove this, start debugging the site and add /home/about to your URL.&amp;#160; You’ll see this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TTdOn7Fde5I/AAAAAAAAAEo/zwKRqWRiCEw/s1600-h/image%5B12%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TTdOoaP1t9I/AAAAAAAAAEs/pSBVpiaS-u8/image_thumb%5B7%5D.png?imgmax=800" width="407" height="335" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After logging in, you can see the About page in all its empty glory.&amp;#160; In fact, because your request was originally for the About page, the default AccountController pushes you through to that page once you’ve authenticated.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_QfB_TFa5FOQ/TTdOohAI12I/AAAAAAAAAEw/_rjYCUaIutM/s1600-h/image%5B20%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TTdOpKOI3mI/AAAAAAAAAE0/2H5vPo49fYk/image_thumb%5B13%5D.png?imgmax=800" width="405" height="214" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Some MVC Sweetness&lt;/h3&gt;  &lt;p&gt;Views in ASP.NET MVC inherit from the System.Web.Mvc.ViewPage object and therefor expose some interesting objects for us that we don’t have to work for to use.&amp;#160; Taking advantage of this fact allows us to shortcut to some features right in our views.&lt;/p&gt;  &lt;p&gt;For example, the User object on our ViewPage allows us to test for authenticated users:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TTdOpDeRsjI/AAAAAAAAAE4/uEswJPMdO-E/s1600-h/image%5B25%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TTdOpmq7YpI/AAAAAAAAAE8/u5QitWMnRyk/image_thumb%5B16%5D.png?imgmax=800" width="418" height="103" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Or, we can test to see if they belong to roles in the ASP.NET membership/role provider:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TTdOp13y0fI/AAAAAAAAAFA/w7M_wOYWGSg/s1600-h/image%5B30%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TTdOqf853bI/AAAAAAAAAFE/i5-676FAfT8/image_thumb%5B19%5D.png?imgmax=800" width="489" height="115" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;While this can be super handy, it’s important to consider coding practices and whether or not your logic for such elements should be in your controller or your view.&amp;#160; This post will not enter that conversation, but it’s important to note that a similar roles-based approach is just as easy inside your controller:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TTdOquAaawI/AAAAAAAAAFI/jgL2xVOYI9Q/s1600-h/image%5B40%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TTdOq777-tI/AAAAAAAAAFM/TWy4gD3xZ1U/image_thumb%5B25%5D.png?imgmax=800" width="366" height="119" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Oh Yeah, About Those Roles&lt;/h3&gt;  &lt;p&gt;The easiest way to get roles going would be to navigate to the ASP.NET Configuration site.&amp;#160; You can enable and define roles from there:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_QfB_TFa5FOQ/TTdOrYql-oI/AAAAAAAAAFQ/fueHqDcFeYM/s1600-h/image%5B35%5D.png"&gt;&lt;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="image" border="0" alt="image" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TTdOrlPdrHI/AAAAAAAAAFU/pzXzGv9fS4w/image_thumb%5B22%5D.png?imgmax=800" width="210" height="68" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This built-in administration tool simplifies the process of enabling roles on your site, adding existing users to roles and/or creating roles and bringing in existing users.&amp;#160; It also allows you to add a role to a user as you create them.&amp;#160; It’s tidy and functional, but doesn’t have many bells and whistles.&lt;/p&gt;  &lt;p&gt;This isn’t the best for a production environment as the ASP.NET Configuration site is not deployed when you publish your app.&amp;#160; One solution would be to use a community-based console to help administer the site post-launch such as &lt;a href="http://mywsat.codeplex.com/" target="_blank"&gt;this one&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;Some Reading Homework&lt;/h3&gt; &lt;iframe style="width: 120px; float: right; height: 240px" marginheight="0" src="http://rcm-ca.amazon.ca/e/cm?lt1=_blank&amp;amp;bc1=000000&amp;amp;IS2=1&amp;amp;bg1=FFFFFF&amp;amp;fc1=000000&amp;amp;lc1=0000FF&amp;amp;t=chasthelist-20&amp;amp;o=15&amp;amp;p=8&amp;amp;l=as1&amp;amp;m=amazon&amp;amp;f=ifr&amp;amp;md=07AN74PQXHR1PJRCZ582&amp;amp;asins=0672331128" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;  &lt;p&gt;I recently had the privilege of working with one of the authors of this book (Stephen Walther) and I can attest to the fact that these guys know this stuff inside and out.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.amazon.ca/gp/product/0672331128?ie=UTF8&amp;amp;tag=chasthelist-20&amp;amp;linkCode=as2&amp;amp;camp=15121&amp;amp;creative=390961&amp;amp;creativeASIN=0672331128"&gt;ASP.NET 4 Unleashed&lt;/a&gt;&lt;img style="border-bottom-style: none !important; border-right-style: none !important; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.ca/e/ir?t=chasthelist-20&amp;amp;l=as2&amp;amp;o=15&amp;amp;a=0672331128" width="1" height="1" /&gt;contains a ton of great information on using and abusing the .NET Framework when working on web applications, including a section devoted to the membership framework.&lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;We’ve come a long way in web development.&amp;#160; Tasks that used to require “rolling your own” and a day or a week of dedicated time can now be reduced to simply clicking on “New –&amp;gt; Project”.&lt;/p&gt;  &lt;p&gt;The beauty in that is that way that we can fully customize those bits, integrate them with our existing auth/auth stores and more.&amp;#160; We can choose our view engine (classic ASP.NET, MVC or now Razor).&amp;#160; We can integrate jazzy Ajax features through the fully supported jQuery libraries and its good-looking sister, jQuery UI.&lt;/p&gt;  &lt;p&gt;It’s a good time to be a web developer.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-1207016560395501375?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/1207016560395501375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/01/built-in-authentication-and.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1207016560395501375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1207016560395501375'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/01/built-in-authentication-and.html' title='Built-In Authentication and Authorization Providers in ASP.NET with the MVC Framework'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_QfB_TFa5FOQ/TTdOln1VKVI/AAAAAAAAAEM/CqEhJBo58F4/s72-c/image_thumb19.png?imgmax=800' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-7493302852891778723</id><published>2011-01-18T18:42:00.000-06:00</published><updated>2011-01-18T18:42:00.143-06:00</updated><title type='text'>Windows Phone 7 Wishlist</title><content type='html'>&lt;p&gt;I have the &lt;a href="http://www.amazon.ca/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.ca%2Fs%3Fie%3DUTF8%26x%3D0%26ref_%3Dnb_sb_ss_i_4_13%26y%3D0%26field-keywords%3Dsamsung%2520focus%26url%3Dsearch-alias%253Daps%26sprefix%3Dsamsung%2520focus&amp;amp;tag=chasthelist-20&amp;amp;linkCode=ur2&amp;amp;camp=15121&amp;amp;creative=390961"&gt;Samsung Focus&lt;/a&gt;&lt;img style="border-bottom-style: none !important; border-right-style: none !important; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="https://www.assoc-amazon.ca/e/ir?t=chasthelist-20&amp;amp;l=ur2&amp;amp;o=15" width="1" height="1" /&gt;and am &lt;a href="http://theycallmemrjames.blogspot.com/2011/01/got-my-phonesamsung-focus.html" target="_blank"&gt;quite happy with the phone&lt;/a&gt;.&amp;#160; I’ve been using it for just about a week.&amp;#160; The device &lt;em&gt;is the device&lt;/em&gt; and can’t change; it’ll be what I use for the next two years or so unless WP8 comes out and I can get a hardware upgrade.&lt;/p&gt;  &lt;p&gt;However, this is still a first-generation iteration and there is room for improvement. Here are some things that I would like to see as far as changes to the platform go:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Give Canadians Zune Music in the Marketplace, as well as Zune Pass. &lt;/li&gt;    &lt;li&gt;Build a way to keep the elegance of differentiation with email account notifications (on the lock screen) but unify the inbox. I am going to prototype what I would like to see here.&amp;#160; I want just one email tile on my home screen. &lt;/li&gt;    &lt;li&gt;Copy and paste, as well as better cursor placement. &lt;/li&gt;    &lt;li&gt;Let Canadian customers buy music in the Zune Marketplace, and let us purchase a Zune Pass. &lt;/li&gt;    &lt;li&gt;I want a first-party app for Live Messenger that runs in the background and runs as quickly as email and text messenging. &lt;/li&gt;    &lt;li&gt;Enable uploads for video to my Live account, Facebook and YouTube.&amp;#160; Give me an easy way to share (like, “Post to YouTube and Share on Facebook”).&amp;#160; Give me the option to only do this when I’m on WiFi (but to queue it when I’m not). &lt;/li&gt;    &lt;li&gt;Finally, make music from Zune available for purchase to Canadian customers (and enable Zune Passes in Canada, while you’re at it!). &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The first update to WP7 is rumored to be coming in the next few weeks.&amp;#160; I am looking forward to seeing what on my list makes the cut.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-7493302852891778723?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/7493302852891778723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/01/windows-phone-7-wishlist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7493302852891778723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7493302852891778723'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/01/windows-phone-7-wishlist.html' title='Windows Phone 7 Wishlist'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2390233569597845511</id><published>2011-01-17T23:28:00.000-06:00</published><updated>2011-01-18T11:39:39.641-06:00</updated><title type='text'>Got My Phone–Samsung Focus</title><content type='html'>&lt;p&gt;It took a bit of wheeling and dealing – I had three cell phone contracts for my wife and I – but I was able to lock down this little beast of a phone this weekend.&lt;/p&gt;  &lt;p&gt;I had a WinMo 6.5 phone with another carrier, and two flip phones with Rogers here in Canada.&amp;#160; I had to dump my other contract, which cost me $150, and then pay $99 to upgrade my flip phone to the snazzy little Windows Phone 7 number from Samsung.&lt;/p&gt;  &lt;p&gt;Though I am a software developer, I am writing this review as a user and trying not to pay attention to the elements I would normally focus on as someone in the development camp.&lt;/p&gt;  &lt;h3&gt;First Impressions&lt;/h3&gt;  &lt;p&gt;I have to admit: I’ve long been been a WinMo user, so I had really low expectations going into this phone.&amp;#160; When I picked it up and tried it at the booth in the mall I was looking for something not to like.&lt;/p&gt;  &lt;p&gt;I got locked into my last smart phone contract before the iPhone had any decent corporate email and calendaring support (and those who follow know my &lt;a href="http://theycallmemrjames.blogspot.com/2009/11/apple-will-ruin-world.html" target="_blank"&gt;history with Apple&lt;/a&gt; anyways) so my choices back then were quite limited.&lt;/p&gt;  &lt;p&gt;But I was refreshingly surprised.&amp;#160; The interface was speedy, swipey, flippy, crisp, and that really lured me in.&amp;#160; I entered into Operation Crapdump: getting rid of my old WinMo 6.5 device and jumping into the new now.&lt;/p&gt;  &lt;h3&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TTXOjMnI8KI/AAAAAAAAAD8/zh14G72B59Y/image%5B5%5D.png?imgmax=800" width="134" height="240" /&gt;The Device Itself&lt;/h3&gt;  &lt;p&gt;This is a lightweight phone, easy to hold.&amp;#160; I have big man-hands, and it is on the upper-end of wide when you’re holding it to talk, but it’s no wider than an iPhone.&amp;#160; I’ve only had it for a couple of days, but it has not been awkward to hold, use or store in my pockets.&lt;/p&gt;  &lt;p&gt;The battery judgement will have to come later, as I’ve only had the phone for a few days, but it’s lasted now almost 90 hours without much charging (I charged it when I got it, then had it plugged in a couple of hours while I was pooting around in Zune).&lt;/p&gt;  &lt;p&gt;The screen is great – big, sharp, contrasty, good colors.&amp;#160; My wife thinks her iPod Touch looks like a relic next to this.&amp;#160; When we pulled up the same photos on Facebook and held the devices side-by-each, the difference was startling.&amp;#160; Black is black, white is white and the colors POP off the screen.&amp;#160; I absolutely love how good this phone looks.&lt;/p&gt;  &lt;p&gt;The touch experience is different than iPhone/iPod.&amp;#160; I haven’t used it enough to say I have a preference either way, but I don’t mind it.&amp;#160; It’s less ‘pressy’ than iPhone and more ‘tappy’.&amp;#160; You also get a little vibration from the device to confirm button &lt;strike&gt;presses&lt;/strike&gt; taps.&lt;/p&gt;  &lt;p&gt;The camera on the device takes reasonably good pics and I love having the video handy as well.&amp;#160; My HTC Touch Diamond took “okay” pictures, but the video the device captured wasn’t worth the boot time of the video camera on the device.&amp;#160; I already have a Grammy-winning prize video of my daughter off the Focus, and I’m about as un-biased as they come. ;o)&amp;#160; &lt;/p&gt;  &lt;p&gt;I’ve heard that on some other brands running WP7 that the camera and screen aren’t that great, but the Focus really shines well here for a 1st generation phone.&lt;/p&gt;  &lt;p&gt;My only complaint is more related to my previous phone, which trained me that the manufacturer logo is at the bottom of the screen.&amp;#160; Every time I pull the thing out of my pocket it’s upside down and I’m looking for the power button before I realize what I’m doing.&lt;/p&gt;  &lt;h3&gt;The Windows Phone 7 Platform&lt;/h3&gt;  &lt;p&gt;I have to say that I am really impressed with what I’ve seen, with a few caveats.&amp;#160; The minimum specs and the way the framerate is locked at 60fps will make any phone on the OS nice and snappy.&amp;#160; The very quick boot (though nearly irrelevant in my always-on world) is such a difference from the 1m30s + boot times I’m used to.&lt;/p&gt;  &lt;p&gt;Back to the camera quickly…I think it was a really good choice to make some vendor-level requirements and have the device respond quickly to a held-in camera button.&amp;#160; If you’re not familiar with this feature, basically, whatever state your device is in (locked, phone call, playing a game) if you press and hold the camera button for about 2 seconds the camera flips on.&amp;#160; Again, less than 4 days in, but I’ve used this feature half a dozen times already.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" align="right" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TTXQWcVBsHI/AAAAAAAAAEA/RC2p3EZfrtg/image%5B15%5D.png?imgmax=800" width="240" height="157" /&gt;The look-and-feel of the phone is driven by the Metro UI and a custom font that is reportedly inspired by Verdana.&amp;#160; Everything is flippy and slick.&amp;#160; Things peel away in 3D and slide around nicely.&amp;#160; There are some great design elements here.&lt;/p&gt;  &lt;p&gt;Pinning is great and can’t really be explained without some video.&amp;#160; This is the feature that lets you put important people, apps or deep links onto the home screen.&lt;/p&gt;  &lt;p&gt;The home screen itself I’m a little mixed on.&amp;#160; At first it was great…there was enough there to be functional and show off push-enabled tiles and the likes, but as I pin more and more things, it’s getting a little long.&amp;#160; You can leave apps off the home screen and just in the apps page (a right-to-left swipe of the home screen) but with only the two options I think there is definitely room for some organizational improvements.&amp;#160; My hope in this regard is that they are able to maintain the truly awesome Metro interface.&lt;/p&gt;  &lt;p&gt;Finally, the apps.&amp;#160; They’re coming, but there’s not a lot there yet.&amp;#160; I’ve picked up a few and will post on those later.&amp;#160; The Marketplace is easy to navigate and uses the integrated search button on the phone, but I think it’ll also need some improvements when the volume of apps goes up. &lt;/p&gt;  &lt;h3&gt;The Ecosystem&lt;/h3&gt;  &lt;p&gt;I get it now.&amp;#160; Xbox changed.&amp;#160; Messenger changed.&amp;#160; Zune changed.&amp;#160; And now, they all look the same as Windows Phone 7.&amp;#160; Though I hadn’t really used Zune too much prior to getting the Focus, I knew exactly what to do just by loading it up.&amp;#160; &lt;/p&gt;  &lt;p&gt;It is very natural to move between these devices and applications and I think that Microsoft has done a better job at this than any other vendor.&amp;#160; Apple, for example, has their Apple TV, their iOS stuff and the Mac platform, and it doesn’t feel the same at all. iTunes feels nothing like the iPod touch or iPhone.&amp;#160; This is where the unified UI really works for Microsoft…Zune looks like it could run on the WP7 phones.&amp;#160; Apparently the other vendors have noticed, too, as Apple preps to overhaul Mac OS to look more like iOS.&lt;/p&gt;  &lt;p&gt;&lt;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="image" border="0" alt="image" align="right" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TTXQWgVp2HI/AAAAAAAAAEE/VMKM3vDbr0k/image%5B10%5D.png?imgmax=800" width="240" height="88" /&gt;The Zune software is slick and easy to use.&amp;#160; In a few minutes I had podcasts and playlists set up.&amp;#160; I burned several CDs and set up wireless syncing.&amp;#160; I also browsed through some movie rentals, was able to view my points balance and check out apps in the Marketplace.&lt;/p&gt;  &lt;p&gt;Using Windows Live ID for me worked really well as I’m an Xboxer and I use Live Messenger and Hotmail.&amp;#160; With Xbox live and Zune and the phone and everything synced to the cloud, I’m really liking the experience so far but have yet to push it to its edges.&lt;/p&gt;  &lt;h3&gt;Things I don’t Like&lt;/h3&gt;  &lt;p&gt;“Hello?&amp;#160; Microsoft?&amp;#160; Yeah, this is Canada calling.&amp;#160; Please give us the Zune Music Marketplace.&amp;#160; And Zune Pass. &lt;strong&gt;&lt;em&gt;Please.&lt;/em&gt;&lt;/strong&gt;”&amp;#160; And I’m &lt;a href="http://theycallmemrjames.blogspot.com/2010/07/dear-microsoft-give-us-zune.html" target="_blank"&gt;very serious about this&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;That’s right, fellow Canucks, no music store. Lamers to the max extreme.&amp;#160; &lt;/p&gt;  &lt;p&gt;Again, one thing I’m kind of torn on is messaging all in one place.&amp;#160; I would also like to see a unified inbox, though I do like the way I am able to differentiate between email accounts on the home screen.&lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;This phone and platform is a different experience.&amp;#160; It doesn’t behave like an Android or an iPhone.&amp;#160; If you go into something expecting it to work like something else you know – as though the other one was better simply by definition of its creation – you will never be impressed with other items in the same commercial space.&amp;#160; You will also be labeled a fan boy.&lt;/p&gt;  &lt;p&gt;I am pleasantly surprised by this device.&amp;#160; I am happy to be a (relatively) early-adopter but I am looking forward to the updates and some of the features down the road.&amp;#160; My hope is that Microsoft rolls out features and updates early and often and continues to accept consumer feedback.&lt;/p&gt;  &lt;p&gt;I suspect that any non-smartphone user would be excited about this phone, as well as any of the early iPhone users.&amp;#160; My iPhone friends and non-smartphone users are all really impressed with the phone (especially the screen).&lt;/p&gt;  &lt;p&gt;If it is time to upgrade, you may wish to wait until later in the year, but if you pick up the Focus right now I don’t think you’d be disappointed.&amp;#160; If you use Hotmail, Live and have an Xbox, you’ll be geekin’ out.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2390233569597845511?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2390233569597845511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/01/got-my-phonesamsung-focus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2390233569597845511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2390233569597845511'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2011/01/got-my-phonesamsung-focus.html' title='Got My Phone–Samsung Focus'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_QfB_TFa5FOQ/TTXOjMnI8KI/AAAAAAAAAD8/zh14G72B59Y/s72-c/image%5B5%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-1971072981832912196</id><published>2010-10-28T18:03:00.000-05:00</published><updated>2010-10-29T15:05:53.180-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><title type='text'>Visual Studio 2010 Wishlist – Better Collapsing Region Support</title><content type='html'>&lt;p&gt;Here it all is, in one picture: everything that could be better with Visual Studio 2010’s collapsing helpers.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TMspG3sy6dI/AAAAAAAAADg/CH-z6lOAcYc/s1600-h/image%5B10%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TMspHcxA3lI/AAAAAAAAADk/Px9XXMJWdy0/image_thumb%5B6%5D.png?imgmax=800" width="452" height="402" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;1) XML Comment Block Collapsing&lt;/h3&gt;  &lt;p&gt;Visual Studio has had great support for XML commenting for some time, specifically with the trip slash to quickly document existing functions.&amp;#160; Which is why this sucks so bad.&lt;/p&gt;  &lt;p&gt;Summary?&amp;#160; Seriously?&amp;#160; I don’t need to know what the first tag is in my comment block.&amp;#160; The IDE &lt;em&gt;already knows&lt;/em&gt; to treat these blocks differently (it allows you to collapse them), so why not show me something &lt;em&gt;useful&lt;/em&gt;?&amp;#160; Even the first 40 chars followed by a … would be great.&amp;#160; Keep it on a line, that’s why I collapsed it, but let me see what it’s about.&lt;/p&gt;  &lt;p&gt;End of rant.&lt;/p&gt;  &lt;h3&gt;2) and 4) Contiguous Comment Lines&lt;/h3&gt;  &lt;p&gt;Here I have a series of comments one after each.&amp;#160; I’d like to be able to collapse them.&lt;/p&gt;  &lt;h3&gt;3) and 5) Language Constructs&lt;/h3&gt;  &lt;p&gt;This should be a no-brainer.&amp;#160; Ifs, for eaches, trys, fors…they should all be collapsible.&lt;/p&gt;  &lt;p&gt;Further, how about supporting SHIFT + CTRL + ‘+’ and ‘-’ to handle this one.&amp;#160; What’s that? You’re in a for each?&amp;#160; No worries, let me collapse that for you quickly while you figure out context, then you can easily expand back out!&lt;/p&gt;  &lt;p&gt;That would be sweet.&lt;/p&gt;  &lt;h3&gt;6) Arbitrary Selection&lt;/h3&gt;  &lt;p&gt;When I margin-select, or multi-line select any block of code, I would like to see a collapse marker appear in the margin.&lt;/p&gt;  &lt;h3&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TMspH1QYMHI/AAAAAAAAADo/bLIURzl9dro/image%5B16%5D.png?imgmax=800" width="359" height="255" /&gt;But it’s all good…&lt;/h3&gt;  &lt;p&gt;The truth is that I am so completely fortunate to have the means to work on a big fat 24” monitor and I am not challenged with space.&amp;#160; &lt;/p&gt;  &lt;p&gt;Just about, but not quite.&lt;/p&gt;  &lt;p&gt;I can still use CTRL+Mouse Wheel to zoom in/out and I do have 3 screens in front of me (one 1900x1200 and two 1280x1024) for real estate.&amp;#160; When things get &lt;strong&gt;really&lt;/strong&gt; tight, vertically, I can always resort to using auto-hide on my error list.&amp;#160; Pshshh!&amp;#160; I don’t have any errors anyways!&lt;/p&gt;  &lt;p&gt;I can work through the lack of support for these collapsing features, but I don’t envy the fellah who’s got to work on a smaller screen.&amp;#160; In spite of the level of awesomeness in Visual Studio 2010, I love how many good things &lt;em&gt;must&lt;/em&gt; be coming down the road.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-1971072981832912196?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/1971072981832912196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/10/visual-studio-2010-wishlist-better.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1971072981832912196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1971072981832912196'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/10/visual-studio-2010-wishlist-better.html' title='Visual Studio 2010 Wishlist – Better Collapsing Region Support'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_QfB_TFa5FOQ/TMspHcxA3lI/AAAAAAAAADk/Px9XXMJWdy0/s72-c/image_thumb%5B6%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2194183876821003414</id><published>2010-10-08T19:13:00.000-05:00</published><updated>2010-10-08T19:13:00.418-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Post-Mortem'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeProject'/><title type='text'>Unravelling the Data – Ill-Formatted Data</title><content type='html'>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://theycallmemrjames.blogspot.com/2010/10/unravelling-data-understanding-starting.html"&gt;Read the background to this post.&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;When Bad Data Is Required&lt;/h3&gt;  &lt;p&gt;Fixing the data in the legacy system was not something that could be done in place.&amp;#160; What I would refer to as ‘bad’ data was in some cases the glue that held reports together and made things like billing work.&lt;/p&gt;  &lt;p&gt;This was one of the first things I had to resolve.&amp;#160; My original approach was that I was going to try to “self-heal” the data through a combination of regular expressions, string replacements and templated hints and helpers.&amp;#160; With the sheer number of discrepancies, this approach was DOA, and manual intervention was required.&lt;/p&gt;  &lt;h3&gt;A Side Order of Data Fixin’&lt;/h3&gt;  &lt;p&gt;I took a snapshot of the database and added additional columns to the tables where combined data was present.&amp;#160; To understand ‘combined data’ a little background will help.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TK3ydrLvbWI/AAAAAAAAADU/VfixubX4RkA/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TK3yeO0KuSI/AAAAAAAAADY/KnLkX8gu9a8/image_thumb%5B3%5D.png?imgmax=800" width="321" height="172" /&gt;&lt;/a&gt; At various points in the application lifecycle the management had decided that they weren’t going to use the fields for their original purpose and started using them for a new one.&amp;#160; In other scenarios, they decided to use the fields in one context for some customers and in a different context for other customers.&amp;#160; &lt;/p&gt;  &lt;p&gt;Depending on the customer and how long it took employees to shake old habits, these fields were used in differing ways over extended periods of time.&amp;#160; Furthermore, even if there was a clear drawing point, none of the records in the database have a last modified date or any kind of audit log that reveals when a customer record is modified (in a meaningful way).&lt;/p&gt;  &lt;p&gt;Thus, my side order approach faced another problem: there was no clear cut of the data &lt;strong&gt;&lt;em&gt;and&lt;/em&gt;&lt;/strong&gt; the existing applications needed to keep running.&amp;#160; A snapshot of data today wouldn’t help in the transition 6 months down the road.&lt;/p&gt;  &lt;h3&gt;The Birth of the Transition Platform&lt;/h3&gt;  &lt;p&gt;The solution was to create an ASP.NET MVC application, hosted only on the intranet, that used much of my original approaches to identifying bad data, but left the “healing” to an end user. &lt;/p&gt;  &lt;p&gt;Where possible, I used jQuery to look up context-based fixes through controller actions and mashed-up some save functionality by POSTing to the legacy ASP pages of the original application.&amp;#160; Where it wasn’t possible (where functionality would be affected by changes to data) I created proxy tables to house the ‘corrected’ version of the data and wrote some monitors to periodically check to make sure that data was up-to-date.&lt;/p&gt;  &lt;p&gt;I grouped functionality of the fixes into distinct controllers.&amp;#160; For instance, anything related to a billing address was in the BillingAddressController with actions to support the corrections required for errors related to that piece. The models focused on model-view versions of the “bad data” and I used repositories to not only connect to the legacy system, but also to maintain a worklog of outstanding and completed tasks.&lt;/p&gt;  &lt;p&gt;This worked great, as I was also able to say, at any given point, where we were at percentage-wise for correcting any set of data.&lt;/p&gt;  &lt;p&gt;This process continues on today, and time is devoted to cleaning data each week.&amp;#160; All three of the legacy systems continue to get (mis)used, though accuracy has been &lt;em&gt;greatly&lt;/em&gt; improved.&amp;#160; As users became aware of expected formats they also became more conscience of how they were entering the data into the older software.&lt;/p&gt;  &lt;p&gt;This first win made the next steps more plausible.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;em&gt;Next up: Data that Could be Auto-Corrected&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2194183876821003414?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2194183876821003414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/10/unravelling-data-ill-formatted-data.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2194183876821003414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2194183876821003414'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/10/unravelling-data-ill-formatted-data.html' title='Unravelling the Data – Ill-Formatted Data'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_QfB_TFa5FOQ/TK3yeO0KuSI/AAAAAAAAADY/KnLkX8gu9a8/s72-c/image_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3766153227335723967</id><published>2010-10-07T23:08:00.000-05:00</published><updated>2010-10-08T09:14:13.836-05:00</updated><title type='text'>Where are we Taking this Thing?</title><content type='html'>&lt;p&gt;In a way, I have been a linguist and advocate of literacy for most of my life, but perhaps not as you would expect.&amp;#160; &lt;/p&gt;  &lt;p&gt;I started copying programs from books and magazines when I was 4 years old.&amp;#160; I started writing my own code when I was about 7.&amp;#160; As I gained a greater knowledge of computer programming my concern also grew about how others would learn.&amp;#160; As technology has advanced and the topics in computer science become &amp;quot;solved&amp;quot;, the underlaying complexities have also grown and I worry that we are raising a generation that will not be equipped to deal with the emerging languages. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TK8nNRcQLFI/AAAAAAAAADc/MJTIUkd-XBY/image%5B6%5D.png?imgmax=800" width="240" height="137" /&gt;In fifth grade I wrote a text-based choose your own adventure game on the Commodore 64 and brought my creation to school.&amp;#160; My classmates could put their own names in and play along, choosing their way through my somewhat limited and unoriginal stories. I stood back in the computer lab and watched as they played; they were facinated!&amp;#160; I remember my teacher, Mr. Pugh, came over and said, &amp;quot;You know, James, most of them won't understand what you've done.&amp;quot; &lt;/p&gt;  &lt;p&gt;When we wanted to see graphics on the screen as a kid, I set array values mapped to registers in the video memory that would turn a pixel on and off on the screen.&amp;#160; We programmed the hardware. We “mapped bits” and created “bit maps”. &lt;/p&gt;  &lt;p&gt;Today, with a single line of code, we can bring a myriad of pixels to life with vibrant color and movement and full-screen HD video streaming across a network we don't even own.&amp;#160; What you tell the computer to do is no longer what the computer is doing: it's doing much, much more and it doesn't require of you a greater understanding. &lt;/p&gt;  &lt;p&gt;Here's an excerpt from Douglas Rushkoff's new book, &lt;em&gt;Program or be Programmed&lt;/em&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;When human beings acquired language, we learned not just how to listen but how to speak. When we gained literacy, we learned not just how to read but how to write. And as we move into an increasingly digital reality, we must learn not just how to use programs but how to make them. &lt;/p&gt;    &lt;p&gt;In the emerging, highly programmed landscape ahead, you will either create the software or you will be the software. It’s really that simple: Program, or be programmed. Choose the former, and you gain access to the control panel of civilization. Choose the latter, and it could be the last real choice you get to make. &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I don't necessarily buy into the doomsday duality scenario of zombies and computer programmers, but there is some truth in there and I wonder what it holds as outcomes for humanity and culture. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3766153227335723967?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3766153227335723967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/10/where-are-we-taking-this-thing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3766153227335723967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3766153227335723967'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/10/where-are-we-taking-this-thing.html' title='Where are we Taking this Thing?'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_QfB_TFa5FOQ/TK8nNRcQLFI/AAAAAAAAADc/MJTIUkd-XBY/s72-c/image%5B6%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-5926383214181046442</id><published>2010-10-06T23:12:00.000-05:00</published><updated>2010-10-07T10:36:08.767-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Post-Mortem'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeProject'/><title type='text'>Unravelling the Data – Understanding the Starting Point</title><content type='html'>&lt;p&gt;So, we’re now into October and the year is passing quickly.&amp;#160; The major function of my employment – helping the organization flip to a new operations platform – is nearing completion.&amp;#160; As well, I have just wrapped up an 11 week series of articles with a publisher that I am very excited to share (but have to wait a little still!).&amp;#160; The articles explain my rarity here on my blog, but I am glad to have some time to invest in this again…especially with the release of the MVC 3 framework!&lt;/p&gt;  &lt;h3&gt;What I &lt;em&gt;Actually&lt;/em&gt; Do&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TK3oukoEh8I/AAAAAAAAAC8/er8hB98x8ZU/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://lh3.ggpht.com/_QfB_TFa5FOQ/TK3ovDH1rjI/AAAAAAAAADA/9QCcrVnvbj0/image_thumb%5B3%5D.png?imgmax=800" width="345" height="224" /&gt;&lt;/a&gt; My current work – at it’s core – is a data conversion project, but don’t let the simplicity of that synopsis fool you.&amp;#160; &lt;/p&gt;  &lt;p&gt;The reality is, when it comes to inventory, billing, service and customer management, that when you flip the company’s software the data conversion is the easy part.&amp;#160; &lt;/p&gt;  &lt;p&gt;Often, it’s the process changes that can cripple the adoption of a new platform, especially when you’re moving from custom developed software and moving to an off-the-shelf product.&amp;#160; Change can be very hard for some users.&lt;/p&gt;  &lt;p&gt;I have the good (ha!) fortune here of working through both data and process transformations.&lt;/p&gt;  &lt;h3&gt;The Transition Platform&lt;/h3&gt;  &lt;p&gt;Being the only developer on the project – and in the organization – I do have the pleasure of being able to pick whatever tools I want to work and the backing of a company that pays for those tools for me.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TK3ovTgxcdI/AAAAAAAAADE/vIyA29lJaOE/s1600-h/image%5B16%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TK3ovvyckpI/AAAAAAAAADI/E-tu4zxu2P8/image_thumb%5B10%5D.png?imgmax=800" width="350" height="184" /&gt;&lt;/a&gt;If you’ve ever hit my blog you know that I am a huge fan of the .NET Framework and the ecosystem that you get to be a part of when you develop software within it.&amp;#160; The tools have come so far in the last decade that you would not even believe that the same company made them.&lt;/p&gt;  &lt;p&gt;Great progress has been made – albeit at times slower than other vendors in certain areas.&amp;#160; But with Visual Studio 2010 (which I switched to halfway through the project) and the MVC Framework I was literally laughing at how trivial some of the tasks were rendered.&lt;/p&gt;  &lt;p&gt;The vertical nature of a development environment and a deployment environment that are designed to work together make things even that much more straightforward.&lt;/p&gt;  &lt;p&gt;It is important to note that my development over the last year was not the end to the means.&amp;#160; What I produced was simply a staging platform that would facilitate a nearly-live transition to the target billing and customer management system.&amp;#160; My job, done right, would leave no end-user software in use.&lt;/p&gt;  &lt;h3&gt;Onto The Problem with the Data&lt;/h3&gt;  &lt;p&gt;Not all data is a nightmare.&amp;#160; A well-normalized database with referential integrity, proper field-level validation and the like will go a long way to helping you establish a plan of action when trying to make the conversion happen.&amp;#160; Distinct stored procedures coupled with single-purpose, highly-reusable code make for easily comprehended intention.&lt;/p&gt;  &lt;p&gt;Sadly, I was not working with any of these.&amp;#160; The reality is that I was faced with the following &lt;strike&gt;problems&lt;/strike&gt; opportunities that I had to develop for:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;There are over 650,000 records in 400 tables. This is not a problem in and of itself, and it’s not even a large amount of data compared to projects I’ve worked on with 10’s of millions of rows.&amp;#160; It likely wouldn’t be a problem for anyone, unless they had to go through it line by line…&lt;/li&gt;    &lt;li&gt;I had to go through it line by line.&amp;#160; Sort of.&amp;#160; There were several key problems with the data that required careful analysis to get through like dual-purpose fields, fields that were re-purposed after 4 years of use, null values where keys are expected, orphaned records.&amp;#160; &lt;/li&gt;    &lt;li&gt;The data conversion couldn’t happen – or begin to happen – until some of the critical issues were resolved.&amp;#160; This meant developing solutions that could identify potentially bad data and providing a way for a user to resolve it.&amp;#160; It also meant waiting for human resources that had the time to do so.&lt;/li&gt;    &lt;li&gt;The legacy software drove the business processes, then the software was shaped around the business processes that were derived from the software.&amp;#160; This feedback loop lead to non-standard practices and processes that don’t match up with software in the industry (but have otherwise served the company well).&lt;/li&gt;    &lt;li&gt;Key constraints weren’t enforced, and there were no indexes.&amp;#160; Key names were not consistent.&amp;#160; There were no relationships defined.&amp;#160; Some “relationships” were inferred by breaking apart data and building “keys” on the fly by combining text from different parts of different records (inventory was tied to a customer only by combining data from the customer, the installation work order and properties of the installer, for example).&lt;/li&gt;    &lt;li&gt;The application was developed in classic ASP and the logic for dealing with the data was stored across hundreds of individual files.&amp;#160; Understanding a seemingly simple procedure was undoubtedly wrapped up in hundreds of lines of script, sometimes in as many as a dozen different files.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Mashing Up Data&lt;/h3&gt;  &lt;p&gt;The items listed above were all significant challenges in-and-of themselves, but&amp;#160; the reality is that these are just a sample of the &lt;strike&gt;problems&lt;/strike&gt; opportunities, from just one system.&amp;#160; I had three to work with, and all were joined by a single, &lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TK3ov9vqVXI/AAAAAAAAADM/5AYifLO65SA/s1600-h/image%5B10%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TK3owfdNbfI/AAAAAAAAADQ/cqeKAZLqIiY/image_thumb%5B6%5D.png?imgmax=800" width="240" height="177" /&gt;&lt;/a&gt;ASP script-generated key.&amp;#160; If you just threw up in your mouth a little bit, I forgive you.&amp;#160; I did the same when I saw that, too.&lt;/p&gt;  &lt;p&gt;Worse, the key was stored as editable text in all three systems.&amp;#160; Because of a lack of role- and row-level security, someone working their second day at the company could change the key, switch keys between users.&amp;#160; It was a little scary.&lt;/p&gt;  &lt;p&gt;And I can’t imagine a manager in the world who likes to hear, “Hey, I’m going to just take three unrelated sets of data, mash them up and let you run your business on it, mmmkay?”&amp;#160; Obviously a better approach was needed.&lt;/p&gt;  &lt;h3&gt;Now, Here’s How I Got Through&lt;/h3&gt;  &lt;p&gt;It took over a year, but I am now close enough to the finish line that I could throw a chicken over it.&amp;#160; In post-mortem fashion, I’ll talk about each of the challenges I had to work through, and how I tackled them over the next few posts.&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;&lt;strong&gt;Stay tuned for: Ill-Formatted Data&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-5926383214181046442?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/5926383214181046442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/10/unravelling-data-understanding-starting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5926383214181046442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5926383214181046442'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/10/unravelling-data-understanding-starting.html' title='Unravelling the Data – Understanding the Starting Point'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_QfB_TFa5FOQ/TK3ovDH1rjI/AAAAAAAAADA/9QCcrVnvbj0/s72-c/image_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-365533608316346038</id><published>2010-09-16T15:37:00.001-05:00</published><updated>2010-09-16T15:37:21.110-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Firefox is Really Slow Testing Sites on Localhost</title><content type='html'>&lt;p&gt;If you are developing web sites and are trying to test on the major browsers you’ll likely notice that IE and Chrome are quick like bacon but Firefox poots along like a hamster on crutches.&amp;#160; This is true when you have an IPv6 IP address on your NIC and you are working on localhost.&lt;/p&gt;  &lt;p&gt;It is particularly frustrating when you’re doing Ajax scripting…especially with autocomplete-type functionality.&lt;/p&gt;  &lt;h3&gt;The Fix&lt;/h3&gt;  &lt;p&gt;Here’s how to bury it and fuel Firefox to surf your development server at superhighway speeds:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Open up Firefox and type about:config in the address bar     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_QfB_TFa5FOQ/TJJ_9LSrduI/AAAAAAAAACU/O_LCUXxugg0/s1600-h/image%5B2%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TJJ_9-P0mgI/AAAAAAAAACY/hrUvn-2ZMzw/image_thumb.png?imgmax=800" width="122" height="32" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Promise to be careful…seriously ;o)     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_QfB_TFa5FOQ/TJJ_-GwlvlI/AAAAAAAAACc/j2MI7VrbGX8/s1600-h/image%5B6%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TJJ_-bT0-II/AAAAAAAAACg/8DWCvKg3vos/image_thumb%5B2%5D.png?imgmax=800" width="475" height="156" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;In the filter input, type ipv     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TJJ_-8Llb3I/AAAAAAAAACk/QDBi3CkGvM0/s1600-h/image%5B13%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TJJ__URKAAI/AAAAAAAAACo/F2Whr7qb8a8/image_thumb%5B5%5D.png?imgmax=800" width="312" height="95" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Double-click on ipv4OnlyDomains, and type localhost     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TJJ__uUwG2I/AAAAAAAAACs/s7s0IeSNkU4/s1600-h/image%5B14%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TJKAAEqvYFI/AAAAAAAAACw/OVcmngR4AJY/image_thumb%5B6%5D.png?imgmax=800" width="277" height="98" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Click OK to confirm changes. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I didn’t have to restart Firefox to get this to work, but YMMV.&amp;#160; Now she should run like a beauty.&lt;/p&gt;  &lt;p&gt;Hope this helps!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-365533608316346038?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/365533608316346038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/09/firefox-is-really-slow-testing-sites-on.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/365533608316346038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/365533608316346038'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/09/firefox-is-really-slow-testing-sites-on.html' title='Firefox is Really Slow Testing Sites on Localhost'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_QfB_TFa5FOQ/TJJ_9-P0mgI/AAAAAAAAACY/hrUvn-2ZMzw/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3736479384761680092</id><published>2010-09-09T14:29:00.001-05:00</published><updated>2010-09-09T14:29:51.469-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Not Coding'/><category scheme='http://www.blogger.com/atom/ns#' term='Humor'/><title type='text'>Good for a Smile</title><content type='html'>&lt;p&gt;Been really busy at work and with a couple of side projects (including a writing contract that I will announce shortly).&amp;#160; &lt;/p&gt;  &lt;p&gt;A buddy emailed this to me (sorry, I can’t credit the original artist, if you know, please pass it on!) and I thought it was worth sharing.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_QfB_TFa5FOQ/TIk1oYeTInI/AAAAAAAAACE/KQ_q7seoTek/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TIk1oy9ztLI/AAAAAAAAACI/SLT-158KxhM/image_thumb%5B2%5D.png?imgmax=800" width="413" height="297" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is particularly funny to me because:&lt;/p&gt;  &lt;p&gt;a) I do shadow puppets with my kids all the time, and,    &lt;br /&gt;b) I’m actually pretty tired.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3736479384761680092?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3736479384761680092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/09/good-for-smile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3736479384761680092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3736479384761680092'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/09/good-for-smile.html' title='Good for a Smile'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_QfB_TFa5FOQ/TIk1oy9ztLI/AAAAAAAAACI/SLT-158KxhM/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8824909892318742905</id><published>2010-09-01T22:09:00.000-05:00</published><updated>2010-09-02T11:35:31.991-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeProject'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><title type='text'>Getting Started in Azure - The PhluffyFotos Sample Application</title><content type='html'>&lt;p&gt;I initially wanted to create a post that would get someone up-and-running with Windows Azure, start to finish, but the reality is that there is no “simple” app you can create. While you can create a simple data service, or a simple MVC web site, or even walk through the implementation of a simple worker role, there are many parts to an Azure application, each warranting their own series of posts.&lt;/p&gt;  &lt;p&gt;However, I found an out: the Azure samples and training site.&amp;#160; I have been around long enough to develop within most of the paradigms required for Azure development, so, with my head as big as it is, I didn’t want to go through a walkthrough that was dozens of pages long.&amp;#160; There is something that is instantly gratifying about having a working app in front of you that you can poke and prod and change and learn to understand.&lt;/p&gt;  &lt;h4&gt;What this post is &lt;em&gt;not&lt;/em&gt;&lt;/h4&gt;  &lt;p&gt;This is not a comprehensive walkthrough or a hand-holding exercise to get you up-to-speed in Azure development. You will not be a professional Azure developer ready for your first cloud app assignment.&lt;/p&gt;  &lt;p&gt;I am not sharing the code as text in this post.&amp;#160; If you’re going to follow along, you’re going to have to have the sample downloaded (the link is inline in the post).&amp;#160; My assumption is that you’re able to navigate your way through a solution and find the code files I’m discussing.&lt;/p&gt;  &lt;h4&gt;What this post &lt;em&gt;actually&lt;/em&gt; is&lt;/h4&gt;  &lt;p&gt;The first part of this post should take you less than 30 minutes and you will have PhluffyFotos running locally.&amp;#160; The application makes use of Azure data services, workers, and the ASP.NET MVC 2 framework.&amp;#160; It’s billed as fairly 2.0-ish, and has a functional Silverlight 2.0 slideshow viewer to boot.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TH--hGh72zI/AAAAAAAAABM/ZuSZ5uExtL4/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TH--h-_NdzI/AAAAAAAAABQ/XWIwCY7vW5A/image_thumb%5B3%5D.png?imgmax=800" width="518" height="297" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The second part of the post breaks down some of the UX elements and explores some of the tech that powers said UX. &lt;/p&gt;  &lt;p&gt;I have a fairly clean install of Window 7 with Visual Studio 2010 running on it, so there should be no surprises if you’re running with a similar setup.&amp;#160; As I progressed through the procedure I have taken notes so that you should be able to replicate my steps.&amp;#160; If you find that I have missed anything, please let me know!&lt;/p&gt;  &lt;h4&gt;Enable Azure tools through the Visual Studio 2010 Project Templates&lt;/h4&gt;  &lt;p&gt;Create a new project and select the category of “cloud”.&amp;#160; Walkthrough the download, exit VS and install the tools.&amp;#160; You can obviously omit this step if you’ve already setup Azure tools on your machine.&lt;/p&gt;  &lt;h4&gt;Download the sample app&lt;/h4&gt;  &lt;p&gt;This is located &lt;a href="http://phluffyfotos.codeplex.com"&gt;here&lt;/a&gt; on CodePlex.&amp;#160; Unzip it to it’s default location.&lt;/p&gt;  &lt;h4&gt;Enable PowerShell Scripts for Scripts Signed by a Trusted Source&lt;/h4&gt;  &lt;p&gt;To do this, run PowerShell in administrator mode and use the following command:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Set-ExecutionPolicy RemoteSigned&lt;/p&gt; &lt;/blockquote&gt;  &lt;h4&gt;Build PhluffyFotos&lt;/h4&gt;  &lt;p&gt;Open Visual Studio 2010 in administrator mode, then navigate to and open up the solution in the code directory.&amp;#160; It’s located in the root of the folder you unzipped in the second step.&lt;/p&gt;  &lt;p&gt;Do a CTRL+SHIFT+B on the solution to build out the bits.&lt;/p&gt;  &lt;p&gt;Close down VS2010.&lt;/p&gt;  &lt;h4&gt;Provision Local Queues and Storage&lt;/h4&gt;  &lt;p&gt;This is required so that you do not have to sign up for an Azure account.&amp;#160; At this time, only residents in the USA have the opportunity to create one (even for test purposes) without a credit card.&lt;/p&gt;  &lt;p&gt;Open up a command prompt in administrator mode and navigate to your setup/scripts directory in the project folder.&amp;#160; Type the following command and hit ENTER:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;provision.cmd &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You don’t technically have to run this from a command line, but if you just execute the script without a command line you’ll miss any feedback/error messages should any surface.&lt;/p&gt;  &lt;h4&gt;Run the App!&lt;/h4&gt;  &lt;p&gt;Finally, open Visual Studio 2010 with administrative privileges. Open the PhluffyFotos solution and press F5.&amp;#160; &lt;/p&gt;  &lt;p&gt;Create yourself an account and start uploading some images.&amp;#160; You can try to navigate around the site, add additional albums and use the slide show.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TH--iXeR4MI/AAAAAAAAABU/Z68c3pG3_Q8/image%5B23%5D.png?imgmax=800" width="459" height="360" /&gt; &lt;/p&gt;  &lt;p&gt;This concludes the first part of this post, and you should be running the app without much fuss.&lt;/p&gt;  &lt;h4&gt;First Thoughts – Interface and Basics&lt;/h4&gt;  &lt;p&gt;There’s a lot to set up here, but keep in mind that we’re actually jumping into a project that essentially complete.&amp;#160; You’re required to do all of the things a project would require as you develop it, but you have to do it all at once to get it setup.&lt;/p&gt;  &lt;p&gt;The sample application isn’t robust enough to be production quality, but as a sample, that is to be expected. &lt;/p&gt;  &lt;p&gt;After uploading a new foto…erm…photo, the image does not seem to appear:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_QfB_TFa5FOQ/TH--i4N-kxI/AAAAAAAAABY/Gxaab_10usk/s1600-h/image%5B12%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_QfB_TFa5FOQ/TH--jaEtJKI/AAAAAAAAABc/W1vtWWseyHg/image_thumb%5B6%5D.png?imgmax=800" width="260" height="160" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;However, after navigating back to the same page through the album/photo selection process (or waiting several seconds and pressing refresh), the photo appears:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TH--jpxxEFI/AAAAAAAAABg/gELwOXNdqhM/s1600-h/image%5B13%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TH--kJxwD6I/AAAAAAAAABk/BAGGEAFexo0/image_thumb%5B7%5D.png?imgmax=800" width="243" height="260" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After deeper review, this seems to be as a result of the worker process not finishing the thumbnail generation prior to the site returning the view which requires the image.&amp;#160; I don’t know if this has to do with local performance of the fabric at this point or other variables (such as the 2-second queue sleep in the config).&lt;/p&gt;  &lt;p&gt;Another glitch (in my mind) would be that albums without photos are not represented in the interface until you have a picture.&amp;#160; While this makes sense for people who don’t own the albums (you, visiting my profile), for the person who just created the album, it’s a little confusing.&lt;/p&gt;  &lt;p&gt;For example, if I create an album called “My Cherished Family Photos”, then navigate to my list of albums, the newly created album is not there.&amp;#160; If you then try to create a new one with the same name (assuming that the “add” didn’t take), the application just throws an exception.&lt;/p&gt;  &lt;p&gt;Finally, and without an extremely deep dive, once you’ve selected an album to view, the MasterPage link to Home is broken, only ever returning you to the album cover and not your full list of albums.&amp;#160; Either the link text should be changed, or the link, or both.&lt;/p&gt;  &lt;h4&gt;Interesting Technical Bits&lt;/h4&gt;  &lt;p&gt;I was a little worried when I first opened the app as there were several projects in the solution. As a first-stop for Azure exploration, this might be a little intimidating.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TH--kbqWahI/AAAAAAAAABo/AATrimnsLLs/s1600-h/image%5B17%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_QfB_TFa5FOQ/TH--kuGTAsI/AAAAAAAAABs/FCAYJT9LaO0/image_thumb%5B9%5D.png?imgmax=800" width="248" height="150" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Let’s have a quick look at the breakdown here, but a little out of order:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;PhluffyFotos.WebUX      &lt;ul&gt;       &lt;li&gt;Used to render the interface, this is an ASP.NET MVC 2.0 project.&amp;#160; There are some very simple view models, the appropriate controllers and expected views and references to all the other projects, save Worker. &lt;/li&gt;        &lt;li&gt;There is a third-party component here as well, Vertigo.SlideShow, which is a Silverlight control used to display a slide show of the photos.&amp;#160; It accepts an XML string of photo URLs and renders the images from the selected album on the site. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;AspProviders      &lt;ul&gt;       &lt;li&gt;These are the ASP.NET role, membership, profile and session state providers that will be used with the application.&amp;#160; This goes back to the beauty of ASP.NET 2.0 – we are still able to use the good bits in ASP.NET like authentication and authorization, but we can sub out our providers to use the back-ends that we like.&amp;#160; In this case, it’s built on the Azure StorageClient and linked to the MVC site in the project with entries in Web.Config. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;PhluffyFotos.Data &amp;amp; PhluffyFotos.Data.WindowsAzure      &lt;ul&gt;       &lt;li&gt;Data is where the models for the site – Album, Photo and Tag – are defined.&amp;#160; We also have the definition of the IPhotoRepository interface which sets up the contract for creating and manipulating the above models, as well as searching for photos based on tags.&amp;#160; A few other helper methods support some lower-level procedures such as initializing the user’s storage and building the list of photos for the slideshow. &lt;/li&gt;        &lt;li&gt;Data.WindowsAzure takes the models and Azurifies them, primarily by adding simple wrapper classes that inherit from TableServiceEntity and store the model objects as Azure-compatible rows.&amp;#160; This project also contains the PhotoAlbumDataContext as well as conversion classes for moving the Azure version of the entities back to project models. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;PhluffyFotos.Worker      &lt;ul&gt;       &lt;li&gt;The WorkerRole class in this project is the implementation of the abstract base RoleEntryPoint class for the Azure worker.&amp;#160; There are OnStart, OnStop and Run methods common to all services.&amp;#160; When run, it will execute one of three predefined commands: CreateThumbnail, CleanupPhoto or CleanupAlbum.&amp;#160; This worker is executed until processing in all queues is completed. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;PhluffyFotos      &lt;ul&gt;       &lt;li&gt;This is the project that defines the roles that are used in this Azure application: WebUX and Worker. &lt;/li&gt;        &lt;li&gt;The configuration defines the HTTP endpoints, the maximum number of instances of a role, and any custom settings that may be required for the roles. &lt;/li&gt;        &lt;li&gt;This is also the default start-up project for the solution.&amp;#160; The magic of Visual Studio uses this project to ensure that the local development fabric is running then deploys the service and launches our web site (the default HTTP endpoint on port 80).&amp;#160; Pretty slick. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;The Azure Bits&lt;/h4&gt;  &lt;p&gt;After you get a good lay of the land, there’s not really too much going on to make it tick.&amp;#160; As I implied, I thought it could be a little intimidating to get an Azure solution running if you needed five projects to make it tick.&amp;#160; With a better understanding, that’s not really the case.&lt;/p&gt;  &lt;p&gt;For all intents and purposes, the web UX site behaves as you would expect any MVC 2.0 site to behave. You have an album controller with an Upload view.&amp;#160; When submitted, the photo is pulled from the forms collection and passed to the repository.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_QfB_TFa5FOQ/TH--k0pMjKI/AAAAAAAAABw/YX8NBGKxQao/s1600-h/image%5B35%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TH--lbADOHI/AAAAAAAAAB0/dIim1VpRuOk/image_thumb%5B22%5D.png?imgmax=800" width="595" height="294" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The Azure part comes in at this point: the photo’s on the way to the storage cloud after adding a new object to the data context.&amp;#160; There are two parts to this, the table entry and the blob storage.&amp;#160; This is great, as we can now explore this and know how to send binary objects to Azure storage.&amp;#160; &lt;/p&gt;  &lt;p&gt;Next, the image properties are sent to the queue for further processing by this private method in the repository:&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_QfB_TFa5FOQ/TH--mBigFSI/AAAAAAAAAB4/g0RUY2kDQaA/image%5B41%5D.png?imgmax=800" width="382" height="150" /&gt; &lt;/p&gt;  &lt;p&gt;That worker role we saw earlier will now have some work to do with an image waiting to be processed.&amp;#160; This queue behavior is similar to other bits in the project when albums or photos are deleted.&lt;/p&gt;  &lt;h4&gt;Next Steps&lt;/h4&gt;  &lt;p&gt;The one thing I would like to spend more time exploring is the provisioning of tables and queues in the cloud.&amp;#160; The PowerShell script for queues is quite straightforward (a single call for each queue) and the table provisioning is only slightly more complex (a call is made to a method in the PhotoAlbumDataContext) but all this is done without explanation in this project.&amp;#160; &lt;/p&gt;  &lt;p&gt;Data and queue provisioning is part of the setup you perform to get running, but it’s also critical to the project working.&amp;#160; PowerShell is fine locally, but how do you reproduce this creation in the cloud?&lt;/p&gt;  &lt;p&gt;I also want to understand better some of the architectural decisions on this particular project…like, why is deleting a photo an operation that needs to be queued?&amp;#160; Are blob storage operations inherently slow enough to justify this?&amp;#160; Was it simply for demonstration purposes?&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h4&gt;Wrapping Up&lt;/h4&gt;  &lt;p&gt;Creating this post was a great way to contextualize the basic components of an Azure application.&amp;#160; Sure, I’ve created sites, services, models and setup endpoint bindings before, but not in the context of Azure.&lt;/p&gt;  &lt;p&gt;I could have joined any team and crafted an MVC site that sits on top of a repository such as the one in the project, and I would never have to know skip-lick-a-beat about Azure – it is &lt;em&gt;that&lt;/em&gt; seamlessly integrated into the solution – but I much prefer to get my hands dirty and learn about what’s going on behind the scenes.&lt;/p&gt;  &lt;p&gt;I hope this post helps you navigate through the PhluffyFotos sample application and gives you a grounding in Azure-based cloud development.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8824909892318742905?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8824909892318742905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/09/getting-started-in-azure-phluffyfotos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8824909892318742905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8824909892318742905'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/09/getting-started-in-azure-phluffyfotos.html' title='Getting Started in Azure - The PhluffyFotos Sample Application'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_QfB_TFa5FOQ/TH--h-_NdzI/AAAAAAAAABQ/XWIwCY7vW5A/s72-c/image_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2059630316384975623</id><published>2010-08-05T06:55:00.000-05:00</published><updated>2010-08-05T06:55:00.117-05:00</updated><title type='text'>Too Many Computers</title><content type='html'>&lt;p&gt;Many have cited the demise of the PC. Now that tablet X is on the market or that smartphone y has sold millions, it’s only a matter of time before you pitch your PC out the window, right?&lt;/p&gt;  &lt;p&gt;I actually believe it’s going to be around for a long time (and that’s not just because I need to get paid).&amp;#160; What we are starting to witness is the transcendence of functionality beyond what our devices were originally used for.&lt;/p&gt;  &lt;p&gt;Let’s be honest, here: you don’t need a PC to check email and surf the web.&amp;#160; The way I see it, too many people have computers; the evolution of smart, integrated devices will correct the size of the PC market.&lt;/p&gt;  &lt;p&gt;Workstations used to be used for solving problems, not checking your bank balance and surfing Facebook.&amp;#160; I think they are entering a time of homecoming, where people who use computers for their original intent will reclaim the PC and purpose-driven devices will fill in the void for others.&lt;/p&gt;  &lt;h3&gt;The Need For PCs&lt;/h3&gt;  &lt;p&gt;Let’s consider a worldwide acceptance of the tenet that PCs are dust.&amp;#160; On &lt;strong&gt;International Ditch Your PC Day&lt;/strong&gt;, everyone throws out their computer in favor of whatever device they are carrying around.&amp;#160; What happens next?&lt;/p&gt;  &lt;p&gt;Nothing.&amp;#160; All the applications you have on your device will be all you ever have.&amp;#160; Device development would halt.&amp;#160; There would be no new gaming systems, much less games.&amp;#160; There would be no new prototypes for handheld devices (as many of these start out by taking up several square feet, built off of an emulator on a superfast PC).&amp;#160; Advances in medical research would be crippled.&lt;/p&gt;  &lt;p&gt;They can’t all go away, simply for the reason that the bulky little buggers we’ve grown used to on our desktops over the last two decades are needed to advance the things we take with us when we leave our desk.&lt;/p&gt;  &lt;p&gt;I don’t mean to discount mainframe computing and virtualized workstations, those will have their place as well, but there are types of folks – myself included – that will need the localized, on-demand power and processing capabilities of a personal workstation.&lt;/p&gt;  &lt;h3&gt;Cheap Things and Consumerism&lt;/h3&gt;  &lt;p&gt;This whole situation we’re in is partly a problem with the way we’ve taken everything in our culture to the extreme.&amp;#160; I won’t rant on this too much, but if a 21 year old office clerk &lt;em&gt;can&lt;/em&gt; service the debt of an SUV, she does.&amp;#160; If there’s a new computer out that is 8x the speed of your old one with 4x the memory, and it’s only $400, you tend to want to purchase it.&amp;#160; Bigger, better, faster, shiny-er.&amp;#160; That’s how we roll.&lt;/p&gt;  &lt;p&gt;So computers fall below $1000 and lots of people start to buy them.&amp;#160; Lots too many, actually.&amp;#160; Then reasonable PCs come in at $750 and you’re shopping with Grams so she can get pictures emailed to her of your new kids.&amp;#160; Then $500.&amp;#160; Now $400, monitor included.&amp;#160; Laptops at $379, netbooks running at $289.&amp;#160; Everyone getting &lt;em&gt;something.&lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;The Balance&lt;/h3&gt;  &lt;p&gt;We won’t ever see PCs abolished from planet Earth, but they will start to sell less and less.&amp;#160; Prices will even adjust to reflect demand, and we can expect to see PCs priced back up around $1000 (in today’s dollars, that is, not just due to inflation).&lt;/p&gt;  &lt;p&gt;This will happen because Grams doesn’t need a laptop to see pictures, she needs a digital picture frame.&amp;#160; Your dad doesn’t need a PC to surf the web, just a small touch tablet.&lt;/p&gt;  &lt;p&gt;Desktops will not go away, and their end is not nigh, but I suspect they have peaked in popularity.&amp;#160; They will morph, take new shapes, miniaturize and maybe even become a remote device to our desktop (which has only inputs and a display of some kind).&lt;/p&gt;  &lt;p&gt;For anyone who actually &lt;em&gt;uses computers&lt;/em&gt;, they will be here for a long time to come.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2059630316384975623?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2059630316384975623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/too-many-computers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2059630316384975623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2059630316384975623'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/too-many-computers.html' title='Too Many Computers'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-4489928002672460957</id><published>2010-08-04T10:20:00.001-05:00</published><updated>2010-08-04T10:20:51.634-05:00</updated><title type='text'>2 Media Families are Expected</title><content type='html'>&lt;p&gt;I’ve just got a couple of 1TB drives (WD Caviar Blacks…woohoo!) as my new boot stripe and I’m getting prepared to start builing my new workstation.&lt;/p&gt;  &lt;p&gt;I stage many of my spike solutions on this machine, so I need to backup my web sites and databases that are used to show these snippets of functionality off and allow users to play-test them.&amp;#160; There are usually 3-4 of these active at any given time.&lt;/p&gt;  &lt;p&gt;Through SSMS I tried to backup one of the databases and got the 2 Media Families error:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#525252"&gt;The media loaded on &amp;quot;c:\path\database.bak&amp;quot; is formatted to support 1 media families, but 2 media families are expected according to the backup device specification.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I’ve run into this before, so I had a good inkling that there was a bad backup set.&amp;#160; This isn’t good news if you’re in a production environment, but it’s not so bad in my case.&lt;/p&gt;  &lt;p&gt;While it’s not “fixing” the issue, you can get around this error by performing the following steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Remove the existing/offending backup locations from the list.&amp;#160; You can do this in the backup task window or by generating a backup script and removing the &lt;font size="1" face="cou"&gt;&lt;strong&gt;DISK=&amp;quot;your_bad_path&amp;quot;&lt;/strong&gt;&lt;/font&gt; from the command.&lt;/li&gt;    &lt;li&gt;Specify a new backup filename in a pre-existing folder.&amp;#160; If the folder doesn’t exist you’ll get an OS3 error with no text, but it just means you’re trying to write to a directory that doesn’t exist.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The NOFORMAT, NOINIT, NOREWIND texts come from tape backup origins and the documentation is not really clear on how they affect system drives.&amp;#160; For example, the MSDN documentation suggests that using FORMAT will render the media set useless.&amp;#160; So what does that do to my C:\ drive?&amp;#160; FORMAT will rewrite the headers for instances where there are different media family counts (whereas INIT will not).&lt;/p&gt;  &lt;p&gt;So, I maybe don’t want to use FORMAT?&amp;#160; I don’t have a striped backup set of tapes, so I don’t think this matters.&lt;/p&gt;  &lt;p&gt;At any rate, I don’t need whatever corrupt backup file was on my disk, so I changed my destination, removed the bad file from the backup list and carried on.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-4489928002672460957?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/4489928002672460957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/08/2-media-families-are-expected.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4489928002672460957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4489928002672460957'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/08/2-media-families-are-expected.html' title='2 Media Families are Expected'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-514208673773937080</id><published>2010-07-28T10:13:00.001-05:00</published><updated>2010-08-04T10:22:35.726-05:00</updated><title type='text'>Visual Studio Wish List - IntelliThings</title><content type='html'>&lt;p&gt;As I continue my daily use of Visual Studio 2010 I find more and more treasures in the IDE.&amp;#160; For instance, did you know that CDN-hosted JavaScript files with corresponding VSDOC files give you IntelliSense? &lt;/p&gt;  &lt;p&gt;But I’ve been thinking about some things I’d like to see, as well as a few things I’d like fixed.&lt;/p&gt;  &lt;h3&gt;Intellisense Doesn’t Work Inside Script Blocks&lt;/h3&gt;  &lt;p&gt;To be clear on this one, if you are editing inside a script block and try to escape to a server-side tag you will not get CLR object IntelliSense.&lt;/p&gt;  &lt;p&gt;For example, I don’t get IntelliSense here:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VisualStudioWishListIntellithings_8F73/image_thumb.png" width="258" height="21" /&gt; &lt;/p&gt;  &lt;p&gt;or here:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VisualStudioWishListIntellithings_8F73/image_thumb_3.png" width="245" height="53" /&gt; &lt;/p&gt;  &lt;p&gt;This one is likely a challenge, though, because now the IDE has to sort out if you are wanting JavaScript IntelliSense or if you want it for the CLR types.&amp;#160; Still, would be nice to have.&lt;/p&gt;  &lt;h3&gt;Let’s just get IntelliFix in there already, mmmkay?&lt;/h3&gt;  &lt;p&gt;When there are simple or even semi-complex errors that are common enough that a robot should be able to fix them…let the robot fix them.&lt;/p&gt;  &lt;p&gt;Consider a missing semi-colon:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VisualStudioWishListIntellithings_8F73/image_4.png" width="309" height="129" /&gt; &lt;/p&gt;  &lt;p&gt;I would like to have an actionable interface here.&amp;#160; When I hover over the error, double-clicking should (and does) take me to the line.&amp;#160; Double-clicking again should fix it.&amp;#160; Voila, IntelliFix!&lt;/p&gt;  &lt;p&gt;How about other scenarios?&amp;#160; A method that doesn’t return the expected type?&amp;#160; IntelliFix inserts a NotImplementedException for you (bypassing the compiler error).&amp;#160; Member has the wrong level of access for use?&amp;#160; Widen the scope to internal (or public, whatever satisfies the error).&amp;#160; Missing a using statement?&amp;#160; IntelliFix it.&lt;/p&gt;  &lt;h3&gt;How about IntelliTagTips?&lt;/h3&gt;  &lt;p&gt;Okay, I totally ‘shopped this one wrong (pay no mind to the types of brackets or the misspelled &lt;font color="#8080ff" face="System"&gt;function&lt;/font&gt;) but the idea is what I’m after.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VisualStudioWishListIntellithings_8F73/image_thumb_4.png" width="282" height="89" /&gt; &lt;/p&gt;  &lt;p&gt;Here’s the concept.&amp;#160; If I pause, cursor (and eyes) blinking, at some point in a bunch of brackets, a little tool tip should fade in to show me where I’m at.&lt;/p&gt;  &lt;p&gt;I don’t think it should do this for just one (you could use IntelliFix for that!), but two or more would be handy.&amp;#160; It would be a lot easier than trying to go back and count braces and brackets.&lt;/p&gt;  &lt;p&gt;Normally I’m pretty good about keeping track as I write and nest code, so this might be a little annoying if it pops up too aggressively.&amp;#160; It would come in most handy when I’m: a) interrupted, b) tired, and c) fixing someone else’s code.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Yeah, the Names Suck…&lt;/h3&gt;  &lt;p&gt;…but I think these ideas stand up fairly well and Microsoft has teams of folks in marketing.&amp;#160; Therefore, I have added them to my wish list for Visual Studio versions of the future and hope to see IntelliThings there down the road.&lt;/p&gt;  &lt;p&gt;Now, don’t mind me, I have to go geek out over IntelliTrace for a while…&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-514208673773937080?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/514208673773937080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/visual-studio-wish-list-intellithings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/514208673773937080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/514208673773937080'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/visual-studio-wish-list-intellithings.html' title='Visual Studio Wish List - IntelliThings'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3142209178464648307</id><published>2010-07-28T08:57:00.001-05:00</published><updated>2010-07-28T08:59:59.897-05:00</updated><title type='text'>Dear Microsoft: Give Us Zune</title><content type='html'>&lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/DearMicrosoftGiveUsZune_7DBD/image_thumb.png" width="153" height="273" /&gt; North of the border we’ve gotten the shaft: Microsoft hasn’t released the Zune HD, nor the Zune pass service to Canada.&amp;#160; The implications of the licensing issues, by the way, extend to the Xbox 360 where we Canucks have not been able to access the content library our brothers in America have been entitled to.&lt;/p&gt;  &lt;p&gt;And now our motherland – home of our Queen – is getting Zune pass too.&amp;#160; But, here in Canada, nada.&lt;/p&gt;  &lt;p&gt;Heck, I even won a contest on CodeProject, the prize for which was a Zune HD, and they had to send me prize money instead because they &lt;em&gt;couldn’t ship the device to Canada&lt;/em&gt;!&lt;/p&gt;  &lt;h3&gt;I want to make this clear&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;Not everyone in Canada is an Apple fanboi&lt;/strong&gt;.&amp;#160; Seriously.&lt;/p&gt;  &lt;p&gt;We have three media players in my house.&amp;#160; Two iThings and a Creative Labs MuVo.&amp;#160; I actually prefer the MuVo.&amp;#160; Sorry, &lt;strong&gt;five&lt;/strong&gt; media players, because we have a laptop and a desktop PC.&amp;#160; Oops, make that &lt;strong&gt;&lt;em&gt;six&lt;/em&gt;&lt;/strong&gt;, because we have an Xbox 360.&lt;/p&gt;  &lt;p&gt;I want to have media that can play on all these devices.&amp;#160; &lt;em&gt;Seemlessly&lt;/em&gt;.&amp;#160; I don’t want to have to burn CDs, rip them and then re-title all the tracks I have.&lt;/p&gt;  &lt;p&gt;I buy my music.&amp;#160; All of it.&amp;#160; I pay for my movies.&amp;#160; We even rent them on the Xbox 360.&amp;#160; I have a Gold Xbox Live membership.&amp;#160; I want my content on demand, I want a library that can grow and change as my preference does.&amp;#160; I want to be able to listen to the music I want to listen to on the devices I want to listen to them on.&lt;/p&gt;  &lt;p&gt;I want to listen to it on a Zune HD.&lt;/p&gt;  &lt;p&gt;If the Zune subscription service was available in Canada I would be the first in line to sign up (Microsoft readers: you can contact me directly for my credit card number).&amp;#160; I would even organize an iPod burning party and offer a free service to uninstall the pathetic version of iTunes that Apple has crapped onto the plates of PC users for all my friends and family.&lt;/p&gt;  &lt;h3&gt;Everyone is doing it&lt;/h3&gt;  &lt;p&gt;Netflix has announced that it is bringing its service to Canada.&amp;#160; I, for one, hope this is a resounding success story for them and a solid earning opportunity.&amp;#160; Why?&amp;#160; Because I want Canada to lose the stigma of being a bunch of media pirates.&lt;/p&gt;  &lt;p&gt;If there are successes with Netflix, hopefully this will open the door for Microsoft.&amp;#160; While that would be great, I wish they didn’t need to wait.&lt;/p&gt;  &lt;h3&gt;We will pay our dues&lt;/h3&gt;  &lt;p&gt;I &lt;strong&gt;&lt;em&gt;promise&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;We believe in artists.&amp;#160; We enjoy the content.&amp;#160; Heck, we have a whole media company producing television and radio programming that is run by taxpayers just to prove it!&lt;/p&gt;  &lt;p&gt;Because we believe and we enjoy we will also compensate.&amp;#160; Just give us a chance.&amp;#160; And a change!&lt;/p&gt;  &lt;h3&gt;Start with me!&lt;/h3&gt;  &lt;p&gt;So, Microsoft folks, I am offering my help and assistance.&amp;#160; I will show all my friends.&amp;#160; I will help my family’s iPods go ‘missing’ and encourage them to replace them with Zune HDs.&amp;#160; &lt;/p&gt;  &lt;p&gt;I will stand in front of the Apple kiosk in Walmart and show everyone who is stopping by for an iPod how cool the freekin’ Zune HD is.&amp;#160; I will send emails out to old class mates and post about it on Facebook.&amp;#160; I will Tweet about the awesomeness of the player.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Just send me one&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Heck, send me five and I’ll find homes for them…all in different markets…and I will help get the word out that there is more than one game in town.&lt;/p&gt;  &lt;p&gt;I was &lt;em&gt;this close&lt;/em&gt; to having one before getting the carpet pulled out from under me.&amp;#160; So I ask, one more time, please make them available north of 49.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3142209178464648307?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3142209178464648307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/dear-microsoft-give-us-zune.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3142209178464648307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3142209178464648307'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/dear-microsoft-give-us-zune.html' title='Dear Microsoft: Give Us Zune'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-366375215114759167</id><published>2010-07-19T14:25:00.001-05:00</published><updated>2010-07-19T14:34:04.331-05:00</updated><title type='text'>Installing Windows Server 2008 R2 on VMWare ESX Server 4.0.0</title><content type='html'>&lt;p&gt;I’m not sure why this is, why this works, or if you’ll run into it, but I had some troubles with installing Win Server 2K8 R2 on our ESX server.&lt;/p&gt;  &lt;p&gt;We have an ISO that is stored on our data store.&amp;#160; We typically select this in the Device Type selection to install an OS.&amp;#160; I selected the Windows Server 2008 R2 (multi-edition) ISO that I have and started the VM.&amp;#160; I got the language selection screen, clicked on ‘Install Now’ and then the fun ensued:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/InstallingWindowsServer2008R2onVMWareE.0_CAA9/image.png" width="420" height="185" /&gt; &lt;/p&gt;  &lt;p&gt;A requried CD/DVD drive device driver is missing. If you have a driver floppy disk, CD, DVD or USB flash drive, please insert it now.&lt;/p&gt;  &lt;p&gt;Note: If the Windows installation media is in the CD/DVD driver, you can safely remove it for this step.&lt;/p&gt;  &lt;p&gt;What?&amp;#160; Floppy disks?&amp;#160; Those are &lt;em&gt;&lt;strong&gt;so&lt;/strong&gt;&lt;/em&gt; 1998 (the year before I stopped using floppies.&amp;#160; I digress…).&lt;/p&gt;  &lt;p&gt;So, to get past this, I tried to burn a DVD of the ISO to use that for the installation.&amp;#160; In Summary –&amp;gt; Edit Settings I set the Device Type of the DVD drive to “Host Device”.&amp;#160; I rebooted the VM and ended up back in the same spot as above.&lt;/p&gt;  &lt;p&gt;With the above screen still displaying, I returned to the settings page for the DVD and switched it back to the Datastore ISO image.&amp;#160; Et, voila! When I switched back to the console of the VM I was past the driver error!&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/InstallingWindowsServer2008R2onVMWareE.0_CAA9/image_3.png" width="384" height="293" /&gt; &lt;/p&gt;  &lt;p&gt;I initially went down the route of trying to find a driver for VMWare’s DVD drive in Win 2K8, but this 8 minute fix seems to work better.&amp;#160; 7.5 minutes to burn the ISO, and 30 seconds to reboot and switch the selection.&lt;/p&gt;  &lt;p&gt;A few acceptances of license agreements later, and blamo!&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/InstallingWindowsServer2008R2onVMWareE.0_CAA9/image_4.png" width="420" height="114" /&gt; &lt;/p&gt;  &lt;p&gt;Good luck with yours.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-366375215114759167?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/366375215114759167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/installing-windows-server-2008-r2-on.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/366375215114759167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/366375215114759167'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/installing-windows-server-2008-r2-on.html' title='Installing Windows Server 2008 R2 on VMWare ESX Server 4.0.0'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8071412259483850688</id><published>2010-07-19T10:50:00.001-05:00</published><updated>2010-07-19T10:50:40.221-05:00</updated><title type='text'>Apple and MSFT Share the Lead…erm…Switch Places</title><content type='html'>&lt;p&gt;I just hit Google Finance where the market cap of stocks I follow are listed.&amp;#160; I was surprised to see the following:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/AppleandMSFTSharetheLeadermSwitchPlaces_983A/image.png" width="318" height="57" /&gt; &lt;/p&gt;  &lt;p&gt;Apple has seemed to have slid through the bad press around the iPhone 4, the free bumper announcements and the privacy slips.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="1"&gt;UPDATE&lt;/font&gt;&lt;/strong&gt; I just hit refresh and saw the following:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/AppleandMSFTSharetheLeadermSwitchPlaces_983A/image_3.png" width="317" height="62" /&gt; &lt;/p&gt;  &lt;p&gt;Looks like Microsoft has taken the lead.&amp;#160; Should be an interesting couple of months while Apple tries to bleach their reputation back to stainless and Microsoft tries to play catch-up with the release of Windows Phone 7.&lt;/p&gt;  &lt;p&gt;It’s probably no surprise that in the phone game I’m rooting for WP7 ;o)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8071412259483850688?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8071412259483850688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/apple-and-msft-share-leadermswitch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8071412259483850688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8071412259483850688'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/07/apple-and-msft-share-leadermswitch.html' title='Apple and MSFT Share the Lead…erm…Switch Places'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-4710171719681092170</id><published>2010-06-22T14:26:00.001-05:00</published><updated>2010-06-22T14:26:49.546-05:00</updated><title type='text'>My Development History</title><content type='html'>&lt;p&gt;Based on an interesting post with a &lt;a href="http://www.webdesignerdepot.com/2009/05/30-artistic-and-creative-r%C3%A9sum%C3%A9s/" target="_blank"&gt;link to styled résumés&lt;/a&gt; I got to wondering what my development history would look like if I plotted it out.&lt;/p&gt;  &lt;p&gt;I pulled out my résumé and dumped my language experience into Excel.&amp;#160; While I have exposure to many technologies (Crystal Reports, ActiveReports, PHP, third party SDKs, IIS, Apache, Exchange, Squirrel, DNS), platforms (Windows, Mac, flavours of Linux), databases (Oracle, MySql) and Languages (Java, c++, Delphi) I found that it was most clear if I charted the top two languages at any time.&lt;/p&gt;  &lt;p&gt;Excel 2010 quickly whipped up a series of charts for me.&amp;#160; I ‘capped them quickly and spent a couple of minutes styling it up in PhotoShop. It’s crude because I only spent about 20 minutes on it.&lt;/p&gt;  &lt;p&gt;I tried to reflect that most languages built up as a primary, but in late 2005 I switched projects, started using C# and haven’t touched VB.NET much at all ever since (the exception being maintenance).&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/MyDevelopmentHistory_CAE7/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/MyDevelopmentHistory_CAE7/image_thumb.png" width="565" height="168" /&gt;&lt;/a&gt;&amp;#160;&lt;em&gt;(click chart to see a larger version)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;As an overlay representing my time in SQL Server I’ve added a black shaded bar.&amp;#160; My responsibilities in SQL Server admin, stored proc development and the link have continued to grow and advance in complexity since 2000.&amp;#160; Today, however, where I spend a lot of time in SQL development is in the import/export scripts as we transition from the legacy system.&lt;/p&gt;  &lt;p&gt;Below the timeline I added the language that I had been using the second most often.&amp;#160; After doing this it occurred to me that C# has graduated to my longest running language and will be, by next year, my longest running &lt;em&gt;primary&lt;/em&gt; language as well.&amp;#160; Not counting T-SQL, of course.&lt;/p&gt;  &lt;p&gt;At some point I would love to add to the chart my primary development environment as well.&amp;#160; …but that would take a bit of time and my break is over ;o).&lt;/p&gt;  &lt;p&gt;What is not reflected on the chart is that prior to 1997 my primary development was non-MS based as I used Turbo Pascal and Delphi.&amp;#160; Loved the DOS, baby.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-4710171719681092170?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/4710171719681092170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/my-development-history.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4710171719681092170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4710171719681092170'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/my-development-history.html' title='My Development History'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8714937167839215441</id><published>2010-06-21T19:41:00.000-05:00</published><updated>2010-06-22T15:46:15.738-05:00</updated><title type='text'>Visual Studio 2010 – My Thank-You Gift</title><content type='html'>&lt;p&gt;I was pleased to get a package in the mail today with a token of appreciation from Microsoft.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VisualStudio2010MyThankYouGift_DD86/image.png" width="288" height="293" /&gt; &lt;/p&gt;  &lt;p&gt;It is a glass paperweight that came in a small cardboard box with the Visual Studio styling.&amp;#160; Even the box was pretty cool.&amp;#160; I like boxes. ;o)&lt;/p&gt;  &lt;p&gt;It reads:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Microsoft Visual Studio 2010&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Thank you for the lasting contribution you have made to Microsoft Visual Studio.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;S. Somasegar&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I participated in several pre-release builds, submitted defect reports, helped run diagnostic analysis for performance-related issues and gave feedback on various Microsoftie blogs.&amp;#160; And, you might say that I weighed in a little on this blog, too.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8714937167839215441?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8714937167839215441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/visual-studio-2010-my-thank-you-gift.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8714937167839215441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8714937167839215441'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/visual-studio-2010-my-thank-you-gift.html' title='Visual Studio 2010 – My Thank-You Gift'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2242438782545564378</id><published>2010-06-17T11:12:00.001-05:00</published><updated>2010-06-18T09:31:48.921-05:00</updated><title type='text'>Cannot Start Outlook. Cannot open the Outlook Window (Office 2010)</title><content type='html'>&lt;p&gt;After fighting through the un-installation of the Technical Preview of Office 2010 and it’s related components I was unable to open Outlook.&amp;#160; I only get this far, then it errors out:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image.png" width="443" height="198" /&gt; &lt;/p&gt;  &lt;p&gt;The first problem I actually ran into was that I couldn’t install Office 2010.&amp;#160; This was because I had a botched un-install that left several little bits of Office lying around.&amp;#160; I couldn’t remove Visio 14 and had to run Windows Installer Clean Up to get it off the system.&amp;#160; Send a Smile was also busted.&amp;#160; After cleaning off those bits and getting the suite finally installed, I was getting the following message when I tried to run Outlook 2010:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Cannot Start Outlook. Cannot open the Outlook Window.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I am running Office 2010 Professional Plus x64 on Windows 7 x64.&lt;/p&gt;  &lt;p&gt;I ran through a number of steps to try to resolve the problem, including the following:&lt;/p&gt;  &lt;ol&gt;   &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_3.png" width="202" height="169" /&gt;&lt;/p&gt;    &lt;li&gt;I used the recommended approach where you Start –&amp;gt; Run –&amp;gt; outlook.exe /resetnavpane to try to fix some settings issues. This seems to work for a lot of folks. &lt;/li&gt;    &lt;li&gt;I checked the location of my PST files in Control Panel –&amp;gt; Mail to make sure that Outlook was looking in the right spot, i.e., my old PST file.&amp;#160; It was. &lt;/li&gt;    &lt;li&gt;I tried to correct a corrupt PST/OST file using ScanPST.exe (included with Office).&amp;#160; This has worked for folks, and I was very optimistic that it would work for me too as it corrected over 5,000 errors, but it did not. &lt;/li&gt;    &lt;li&gt;I then tried removing the old profile from my system, and recreating it, which left me with an unknown error (0x80070057) and unable to connect to Exchange altogether.&lt;a href="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_thumb.png" width="390" height="273" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;So, now, we’re back to uninstalling Office 2010 and every scrap bit we can find of it.&amp;#160; I’m going to pull down Office 2010 32bit and see if that helps re-establish my sanity. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_5.png" width="420" height="127" /&gt; &lt;/p&gt;  &lt;ol&gt;&lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;UPDATE:&lt;/u&gt;&lt;/strong&gt; The 32bit version faired no better.&amp;#160; I’m going to uninstall and start removing SDKs and WinMo features/sync just in case something’s tripped with Office Connectivity.&amp;#160; I’ve removed the sync from my mobile device and unplugged my phone.&amp;#160; I’ve also un-installed any apps that at any point in time may have run at the same time as Office.&amp;#160; I don’t know why I did that, but I’m getting desperate. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;UPDATE 2:&lt;/u&gt;&lt;/strong&gt; I’ve uninstalled the 32bit and will now try the 64 again. I’m going to see if I can prove Einstein’s definition of insanity.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;UPDATE 3:&lt;/u&gt;&lt;/strong&gt; This is getting looney.&amp;#160; I’ve started this episode of debauchery by mutilating my registry and stripping out any folder in any kind of ‘data’ or ‘program files’ sort of directory.&amp;#160; Gonzo.&amp;#160; 64bit uninstalled again and registry cleaned.&amp;#160; Folders nuked.&amp;#160; Profile zapped.&amp;#160; Here we go again…this time I will accept the defaults on the install and let it install the things I’ll never use (like Access).&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_6.png" width="383" height="293" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;UPDATE 4:&lt;/strong&gt;&lt;/u&gt; Now the install is failing, saying that I don’t have permission to modify keys in the registry.&amp;#160; Per &lt;a href="http://www.addictivetips.com/windows-tips/fix-office-2010-install-error-1402-setup-cannot-open-registry-key/" target="_blank"&gt;instructions here&lt;/a&gt;, I’m off to do something to hundreds of thousands of registry entries…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE 5:&lt;/strong&gt; The nonsense continues. I am now hunting for registry keys by hand to try and grant myself permissions.&amp;#160; I have booted my computer in ‘clean boot’ mode so nothing else is running in the background, but I don’t think that was every the problem&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE 6&lt;/strong&gt; &lt;em&gt;Next day&lt;/em&gt;: There are (so far) 10 keys and their subkeys that I have found that do not have any owners (and therefore the permissions are null).&amp;#160; I have to find each of the keys, one-by-one, after I get an error message from the installer as above.&amp;#160; The installer give me only one key at a time, then I have to go hunt for the offender.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_7.png" width="330" height="139" /&gt; &lt;/p&gt;  &lt;p&gt;Then, drill into the permissions and owners for each of the parent and child keys.&amp;#160; As I have to wait for the registry key to error out from the Office 2010 installer, it can take up to 5 minutes before I know there’s an error, then another minute or two to assign the local administrators group full access and ownership.&lt;/p&gt;  &lt;p&gt;As I write this, number nine just came up (but at least the installer made it to 60% this time)…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE 7:&lt;/strong&gt; Another key, but we’re getting close to the 2/3 mark now…&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_8.png" width="345" height="237" /&gt; &lt;/p&gt;  &lt;p&gt;As a backup plan I’m pulling down a copy of DOS 6.22 and Word 1.0 from MSDN Subscriber Benefits.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE #&lt;/strong&gt;You’ve &lt;strong&gt;GOT &lt;/strong&gt;to be Joking: &lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_9.png" width="355" height="232" /&gt; &lt;/p&gt;  &lt;p&gt;So close…and yet, not so close.&amp;#160; I could almost taste PowerPoint…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE 9&lt;/strong&gt;:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_10.png" width="420" height="260" /&gt; &lt;/p&gt;  &lt;p&gt;Finally!!!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE 10&lt;/strong&gt;:&lt;/p&gt;  &lt;p&gt;….aaaaaaand we’re back where we started.&amp;#160; *sigh* &lt;/p&gt;  &lt;p&gt;It looks like everything else seems to be working (Excel, PowerPoint, Word) but I’m getting the “Cannot open the Outlook window.” message again.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_11.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/Can.CannotopentheOutlookWindowOffice2010_9D44/image_thumb_3.png" width="400" height="149" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I’ll be in this weekend to format this beast and start over.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2242438782545564378?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2242438782545564378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/cannot-start-outlook-cannot-open.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2242438782545564378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2242438782545564378'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/cannot-start-outlook-cannot-open.html' title='Cannot Start Outlook. Cannot open the Outlook Window (Office 2010)'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2439458451976781783</id><published>2010-06-07T13:18:00.002-05:00</published><updated>2010-06-10T19:21:11.786-05:00</updated><title type='text'>Bing Maps Get Its Cool On</title><content type='html'>&lt;p&gt;The new thing in maps is here.  It’s not perfect, but it’s still a great start and, I believe, a bit of innovation on the part of the world’s most criticized software company.&lt;/p&gt;  &lt;h3&gt;Destination Maps&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/BingMapsGetItsCoolOn_BAFF/image.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/BingMapsGetItsCoolOn_BAFF/image_thumb.png" width="345" height="293" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;A short wizard walks you through a simple process where you select a location (via Bing Maps search), identify a region of the map and then select a style to present the map.&lt;/p&gt;  &lt;p&gt;The result is a very clever, “accurate-enough” map of the selected area with an artistic representation of the major routes and landmarks.&lt;/p&gt;  &lt;p&gt;For instance, you can select “sketch” or “treasure map” styling in the last step.&lt;/p&gt;  &lt;p&gt;The whole process reduces an otherwise hard-to-read and at times confusing view of a city or area into a simple-to-navigate approximation of the same.  &lt;/p&gt;  &lt;h3&gt;Shortcomings&lt;/h3&gt;  &lt;p&gt;There are two major things that would prevent me from using the tool for something like planning an event:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Users who are not technically savvy cannot share the map easily.  While there is a share button, it only generates a link to a file that’s uploaded.  I would prefer to see Twitter/Facebook integration or similar.  Planning an event on Facebook and using this as the map would be awesome. &lt;/li&gt;    &lt;li&gt;There is not enough detail in the generated view to use the service for something like event planning.  The maps could help you get to a part of the city, but they can’t get you around a neighbourhood.  This may be by design as there appears to be quite a bit of computational work involved in determining and simplifying the maps.  This limitation could help them control processing costs and keep the tool usable. &lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;What I’d Like to See&lt;/h3&gt;  &lt;p&gt;Firstly, I think there needs to be controls for levels of detail.  In my hometown we mark everything by the two major bridges and the river.  These don’t even appear on the map.  In fact, in a town of 40,000 people, we all appear to live on one of three streets.  &lt;/p&gt;  &lt;p&gt;Perhaps this could be resolved by adding either smarts to determine the level of zoom of a selection or a slider that controls the level of detail.  Maybe even separate sliders for landmarks and street details would be a good idea.  I think it’s perfectly fine to have the current setting as a default, but I want to be able to help my friends get to a dinner party in a confusing end of town.&lt;/p&gt;  &lt;p&gt;Secondly, I’d like to get a route marked out.  I want to show everyone at the wedding how to get to the reception afterwards!  By allowing me to mark out start and end points – even selecting from pre-determined markers – combined with a slightly better level of detail this next-step in online mapping would be…well, it would be fun to plan events!&lt;/p&gt;  &lt;p&gt;Well, fun that is if you’re into event planning. ;o)&lt;/p&gt;  &lt;p&gt;Lastly, some performance improvements would be nice as for wider selections it does take a bit of time.  Again, I could see myself using this more as an ‘end-of-destination’ tool: my friends know how to get to the city, not the neighbourhood.&lt;/p&gt;  &lt;h3&gt;Research Makes Cool Things&lt;/h3&gt;  &lt;p&gt;This is one of the coolest v1.0 features in online mapping I’ve seen in a long time.  I got just about as giddy using this as I did the first time I got Google Maps running.&lt;/p&gt;  &lt;p&gt;I hope they take this to the next level; definitely a home run, but three runners short of a grand slam.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2439458451976781783?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2439458451976781783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/bing-maps-get-its-cool-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2439458451976781783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2439458451976781783'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/bing-maps-get-its-cool-on.html' title='Bing Maps Get Its Cool On'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-5014674187059230303</id><published>2010-06-03T14:57:00.002-05:00</published><updated>2010-06-19T16:00:44.125-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDRF'/><category scheme='http://www.blogger.com/atom/ns#' term='Juvenile Diabetes'/><title type='text'>A “Super” Month</title><content type='html'>&lt;p&gt;Hello, blog readers!&lt;/p&gt;  &lt;p&gt;As some of you know my oldest son lives with Type 1 Diabetes.  Here is a video my boys and I made to help raise funds for researching a cure:&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:1ab39737-8d6b-4f3d-bad6-8ed3f63abf95" class="wlWriterEditableSmartContent"&gt;&lt;div id="bffe44c7-9b06-4601-a42f-84e30d7afb83" style="margin: 0px; padding: 0px; display: inline;"&gt;&lt;div&gt;&lt;object width="489" height="408"&gt;&lt;param name="movie" value="http://www.youtube.com/v/iEiSPgYC4qQ&amp;amp;hl=en"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/iEiSPgYC4qQ&amp;amp;hl=en" type="application/x-shockwave-flash" width="489" height="408"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;The video is called "Superhero." and is about the brother of a kid who lives with Juvenile Diabetes.&lt;/p&gt;&lt;p&gt;To donate, please follow this link:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://jdrfca.donordrive.com/index.cfm?fuseaction=donorDrive.participant&amp;amp;eventID=811&amp;amp;participantID=44743" target="_blank"&gt;DonorDrive web site&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-5014674187059230303?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/5014674187059230303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/super-month.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5014674187059230303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5014674187059230303'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/06/super-month.html' title='A “Super” Month'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-7074997207983190678</id><published>2010-05-19T09:32:00.001-05:00</published><updated>2010-05-19T09:32:15.559-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Applications'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Application Whitelisting as Malware Defence</title><content type='html'>&lt;p&gt;I just finished reading an article on TechRepulic’s IT &lt;a href="http://blogs.techrepublic.com.com/security/?p=3666" target="_blank"&gt;Security Blog&lt;/a&gt; which echoes my long-standing recommendation to maintain a “whitelist” for approved applications. &lt;/p&gt;  &lt;p&gt;Michal Kassner, the author of the article, explains briefly the benifits that whitelisting could bring.&amp;#160; I want to talk a little more about an actual implementation.&lt;/p&gt;  &lt;h3&gt;The difference between approaches&lt;/h3&gt;  &lt;p&gt;Blacklisting and whitelisting are common in many IT scenarios. We use it for mail servers, server-to-server communication and even internet traffic in some proxy server implementations.&lt;/p&gt;  &lt;p&gt;Blacklisting is definitely the more relaxed version of the two: either you or third-party you trust maintains a list of domains, hosts or addresses that are not trusted.&amp;#160; This list is usually tied to software of some kind that prevents users from accessing or receiving data or messages from entries on the list.&lt;/p&gt;  &lt;p&gt;Whitelisting leans towards paranoia.&amp;#160; I’m not saying it’s necessarily bad, but it can certainly be restrictive.&amp;#160; Using the same approach of tying the list to software to protect users, only addresses on the list are allowed to be accessed or permitted into a system.&lt;/p&gt;  &lt;p&gt;Depending on the level of security required there can be a mix of the two working together to protect users.&lt;/p&gt;  &lt;h3&gt;When to use which&lt;/h3&gt;  &lt;p&gt;We can’t just switch everything over to whitelists and expect the internet to hum along all tickity-boo (without problems).&amp;#160; Imagine your friend registers his own custom domain and sends you an email (from that domain) to check out his new site (on that domain).&amp;#160; First of all, you wouldn’t get the email.&amp;#160; Secondly, you couldn’t access the site.&lt;/p&gt;  &lt;p&gt;So, generally speaking, we should use blacklists where we need wide unannounced access to resources that may be abused.&amp;#160; When and only if they are, the switch is thrown and the address is locked out.&lt;/p&gt;  &lt;p&gt;Some examples of where using a blacklist can help a user without hindering their experience:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Email servers pumping out spam&lt;/li&gt;    &lt;li&gt;Web servers serving malicious content&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And, some examples of where you want ‘whitelist’ behaviour implemented for better security:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Servers that only expect connections from certain IP addresses&lt;/li&gt;    &lt;li&gt;Configuration for your remote desktop&lt;/li&gt;    &lt;li&gt;Secure VPN access points (when the access points are fixed, such as office-to-office)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Personally, here’s a few other ways that I use these kinds of lists:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;RDP connections on my servers whitelist a central IP for access and by default block/ignore other connection attempts. These servers are on private IP addresses.&amp;#160; The central IP has external RDP sessions routed in on a specific port and the router is configured for only a handful of IP addresses.&lt;/li&gt;    &lt;li&gt;My children have whitelist-only access to the internet.&amp;#160; At age 3 they each got an account on the computer.&amp;#160; My wife and I approve only websites that we preview (lego.com for example).&amp;#160; We have google.com on there as well, which allows them to search, but if they want to access a search result they need our approval.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;How applications fit in the mix&lt;/h3&gt;  &lt;p&gt;I think it’s important to recognize that we can’t anticipate every need of users in the IT space.&amp;#160; The job descriptions of people who use computers has grown so diverse that you are equally likely to find a chef who uses a computer every day as you are a computer programmer.&lt;/p&gt;  &lt;p&gt;So can you rely solely on the work of a handful of people to approve applications?&amp;#160; What if one evaluator thinks that an application is malicious because of how it tracks your usage, whereas another finds it useful because it alters the behaviour of the application?&lt;/p&gt;  &lt;p&gt;Who comes up with the criteria for whitelisting?&amp;#160; Who approves applications?&amp;#160; Who blacklists them?&lt;/p&gt;  &lt;p&gt;Does the issue need to be a dichotomy?&lt;/p&gt;  &lt;p&gt;Some of the above questions, to me, suggest that there should be “greylists” as well.&amp;#160; Using heuristics to evaluate software, as submitted by developers, greylists would allow applications to have a level of trust associated with them.&amp;#160; These apps could be sandboxed to protect users, and OS-level alerts could monitor these applications for excessive or abusive behaviours.&lt;/p&gt;  &lt;h3&gt;A case for whitelisting applications&lt;/h3&gt;  &lt;p&gt;I have worked with a good number of people who see a screen saver they like, or backgrounds, or icons, or mouse pointers and more recently email graphics and templates, and download and install these…treasures.&amp;#160; I have also seen an entire network compromised in an afternoon with zero-day malware hidden in a toolbar install.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Corporate networks should be configured to prevent the unregulated installation of software.&lt;/strong&gt; Even as a software developer who likes to download and try out apps all the time, I try to only do so in a sandbox (virtual machine) unless I trust the application provider.&lt;/p&gt;  &lt;p&gt;Corporate machines do not need anything installed on them except the software that enables an employee to do their job.&amp;#160; Mechanics don’t get waterslides near their workstations, likewise, we don’t need users installing Sudoku Extreme.&lt;/p&gt;  &lt;p&gt;For home users it’s a little more difficult to lock down computers and I don’t feel as though they should be.&amp;#160; I would, however, like to see the implementation of whitelist providers, coupled with a local service that I can maintain.&amp;#160; This service should allow me to say “these users accounts can install these applications that are suitable for kids”.&amp;#160; If it’s not on the list I can add it to the list (as an administrator on my machine).&amp;#160; I could equally say, “these users can use these whitelists, and these users can use these greylists”.&lt;/p&gt;  &lt;p&gt;Take it even further, now, and implement a system whereby the operating system alerts me when I’m launching a greylisted application whose signature has changed (suggesting the possibility of malware).&amp;#160; Give me the option to restrict file or network access to greylisted applications, or limit their access based on user type.&lt;/p&gt;  &lt;p&gt;In a corporate scenario, you could allow management-approved applications on the workstations, and greylisted apps on virtual machines (where users have them).&lt;/p&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h3&gt;Making it work for users&lt;/h3&gt;  &lt;p&gt;Ultimately what we’re doing now is broken.&amp;#160; Chasing malware that can move around the globe in hours is nearly a lost cause.&amp;#160; We haven’t seen any big outbreaks lately – I credit smarter users and more responsible operating system behaviour – there could be one coming.&lt;/p&gt;  &lt;p&gt;The implementation must not break anything we’re already able to do, and yet provide more security than we currently have.&lt;/p&gt;  &lt;p&gt;That’s a tall order.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-7074997207983190678?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/7074997207983190678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/05/application-whitelisting-as-malware.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7074997207983190678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7074997207983190678'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/05/application-whitelisting-as-malware.html' title='Application Whitelisting as Malware Defence'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-5539570116695455791</id><published>2010-05-18T19:21:00.000-05:00</published><updated>2010-05-19T09:34:03.132-05:00</updated><title type='text'>Blog FTP Troubles</title><content type='html'>&lt;p&gt;I’m working through an issue with publishing images right now and hope to be back online to continue my jQuery series in the next few days…&lt;/p&gt;  &lt;p&gt;Thanks for the continued questions and comments as I work through all kinds of scenarios with ASP.NET MVC 2 and jQuery.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-5539570116695455791?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/5539570116695455791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/05/blog-ftp-troubles.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5539570116695455791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5539570116695455791'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/05/blog-ftp-troubles.html' title='Blog FTP Troubles'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8859505862442413289</id><published>2010-05-04T15:13:00.001-05:00</published><updated>2010-05-04T15:17:00.013-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Series'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeProject'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery UI'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>ASP.NET MVC and jQuery Part 4 – Advanced Model Binding</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="color: #0000a0"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;This is the fourth post in a &lt;/span&gt;&lt;a href="http://theycallmemrjames.blogspot.com/p/aspnet-mvc-and-jquery.html"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;series&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt; about jQuery and ASP.NET MVC 2 in Visual Studio 2010.&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_thumb.png" width="273" height="182" /&gt;&lt;/a&gt; In my last post I covered the simple scenario of a Person object getting POSTed to an MVC controller using jQuery.&amp;#160; In this article, I’m going to look at three other, more complex examples of real-world model binding and where jQuery might fit in the mix.&lt;/p&gt;  &lt;p&gt;The model binding scenarios I’ll cover are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Sorting a list with jQuery UI support and submitting IDs to the controller for processing.&lt;/li&gt;    &lt;li&gt;Using jQuery to augment the user experience on a list of checkboxes (supporting check all/none) and allowing MVC to handle the elegance on it’s own.&lt;/li&gt;    &lt;li&gt;Give users the ability to build a list of items on a complex object, then submit that object to an MVC controller for processing.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The entire working solution is available for download at the end of the file.&lt;/p&gt;  &lt;h3&gt;Preface&lt;/h3&gt;  &lt;p&gt;In the first two examples here I have lists of data that are statically programmed into the page.&amp;#160; From my earlier posts in the series you can see how easy it is to generate partial views that would drive the UI elements from a database or other backend.&amp;#160; For brevity, I’m leaving those elements out of this example.&lt;/p&gt;  &lt;h3&gt;Sortable Lists&lt;/h3&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_3.png" width="274" height="293" /&gt;The jQuery UI library provides the &lt;strong&gt;sortable()&lt;/strong&gt; function which transforms the children of a selected element in the DOM to draggable, orderable items for the user to manipulate.&lt;/p&gt;  &lt;p&gt;The &lt;strong&gt;sortable()&lt;/strong&gt; extension also provides a mechanism for us to capture the order of the list via the &lt;strong&gt;toArray&lt;/strong&gt; method.&lt;/p&gt;  &lt;p&gt;Using the &lt;strong&gt;jQuery.ajax()&lt;/strong&gt; method, we submit the results of the users’ efforts via post to a controller action.&amp;#160; For the purpose of this post, I’m not going to do any processing in the controller, but you can set breakpoints to see the data getting hydrated into the models.&lt;/p&gt;  &lt;p&gt;Let’s start by setting up the controller action, which accepts a list of ints as a parameter to capture the order of the IDs.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_4.png" width="411" height="97" /&gt; &lt;/p&gt;  &lt;p&gt;Yes. It’s that simple.&amp;#160; Now, you’d likely want to do some processing, perhaps even save the order to a database, but this is all we need to catch the data &lt;strong&gt;jQuery.ajax()&lt;/strong&gt; will throw at us.&lt;/p&gt;  &lt;p&gt;The juicy bits in jQuery are as follows:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_5.png" width="573" height="122" /&gt; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; In order to make the results of the array compatible with the binding mechanism in ASP.NET MVC (as at MVC 2.0) we need to use the ‘traditional’ setting in &lt;strong&gt;$.ajax()&lt;/strong&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;There are a couple of interesting things to note here:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;jQuery.ajax()&lt;/strong&gt; by default makes requests to the current URL via get.&amp;#160; My controller action that accepts the &lt;strong&gt;List&amp;lt;int&amp;gt;&lt;/strong&gt; is the same name as the basic view.&amp;#160; I change the type here to POST and the proper controller action is called.&lt;/li&gt;    &lt;li&gt;The ‘toArray’ returns an array of the selected element IDs.&lt;/li&gt;    &lt;li&gt;My unordered list contains list items with IDs that represent the unique items.&amp;#160; In this case, they are integers stored as strings (by nature of HTML).&lt;/li&gt;    &lt;li&gt;The name of the list of IDs is passed in as the same name as the parameter in the controller action.&lt;/li&gt;    &lt;li&gt;When submitted to the controller, the MVC framework finds the appropriate method, looks at the expected parameter type and sees the array sent by the client.&amp;#160; It then uses reflection and parsing (and maybe some voodoo) to coerce the values into the expected parameter type.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_6.png" width="515" height="172" /&gt; &lt;/p&gt;  &lt;p&gt;We can then use the list of IDs as required in the comfort of c#.&lt;/p&gt;  &lt;p&gt;One of the interesting things that you can do, as the &lt;strong&gt;List&amp;lt;int&amp;gt;&lt;/strong&gt; parameter is an IEnumerable, is that you can use LINQ to Objects on these guys without any effort.&amp;#160; Thanks MVC Framework!&lt;/p&gt;  &lt;h3&gt;Submitting Checkboxes&lt;/h3&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_7.png" width="319" height="293" /&gt; How do you submit a list of the selected checkboxes back to an ASP.NET MVC controller action?&amp;#160; It’s all too simple.&amp;#160; In fact, the only reason I mention it here is to highlight some of the simplicity we inherit when we use the MVC Framework.&lt;/p&gt;  &lt;p&gt;I actually laughed out loud when I figured this one out.&amp;#160; It’s that good (or, I’m that easily impressed).&lt;/p&gt;  &lt;p&gt;For jQuery on this example, I’m only really going to use it to augment the user experience by providing a couple of buttons to check all or check none of the options.&lt;/p&gt;  &lt;p&gt;We’ll use a standard HTML form and allow the user to select the items in a list they feel are appropriate.&amp;#160; The form will be submitted via POST to our controller action (named the same as the ActionResult for the original View) and our parameter will be automatically populated for us.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_8.png" width="627" height="185" /&gt; &lt;/p&gt;  &lt;p&gt;Some things to point out at this junction:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The values on the checkboxes here are the same strings that are displayed in the labels.&lt;/li&gt;    &lt;li&gt;I have given all the checkboxes the same name. When submitted, MVC sees these as some kind of enumerable thing and will then try to bind based on that.&lt;/li&gt;    &lt;li&gt;Optimus Prime is not a Jedi.&lt;/li&gt;    &lt;li&gt;This the name used for the checkboxes is the same name as the parameter in the controller action.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Packing a Complex Model&lt;/h3&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_9.png" width="282" height="293" /&gt; What about if you have a complex type with properties that can’t be expressed with simple HTML form fields? What if there are enumerable types as properties on the object?&amp;#160; &lt;/p&gt;  &lt;p&gt;Man, am I glad you asked! The ASP.NET MVC Framework is pretty smart about taking items off the client Request and building up your objects for you in the hydration process.&lt;/p&gt;  &lt;p&gt;Here is my Suitcase class, with a &lt;strong&gt;List&amp;lt;string&amp;gt;&lt;/strong&gt; that will contain all of the things that someone wants to take along on their vacation.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_thumb_3.png" width="334" height="142" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So how do we get those items into the object?&amp;#160; The first step is to allow users to create them.&amp;#160; We do this with a simple textbox and a button, rigged up to some jQuery script as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_11.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_thumb_4.png" width="493" height="112" /&gt;&lt;/a&gt;When the user enters an item and clicks ‘Add to suitcase’ (or hits enter) we grab a reference to the textbox.&amp;#160; Next, we use &lt;strong&gt;jQuery.append()&lt;/strong&gt; to create a new LI element with the contents of the textbox.&amp;#160; Finally, we clear out the value and return focus to the input field.&lt;/p&gt;  &lt;p&gt;When the user is finished loaded up their bags, we need to create a data map that will be submitted.&amp;#160; To simplify the process a little, we’ll first get that list of clothes together.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_thumb_5.png" width="301" height="91" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;We first create an empty array.&amp;#160; Next we use &lt;strong&gt;jQuery.each()&lt;/strong&gt; to loop through all the returned elements – the list of LI elements that the user has created – and add the text of those LIs to the array.&lt;/p&gt;  &lt;p&gt;Next, we POST the data back to the server:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_13.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_thumb_6.png" width="259" height="185" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Here are some observations:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;We’re POSTing and using the traditional setting so that the enumerated items are compatible with the current versions of jQuery and MVC.&lt;/li&gt;    &lt;li&gt;The names of the properties in the Suitcase class are the names of the values we use in the data map submitted by &lt;strong&gt;jQuery.ajax()&lt;/strong&gt;.&lt;/li&gt;    &lt;li&gt;As in the first example, &lt;strong&gt;jQuery.ajax()&lt;/strong&gt; is posting to the default URL, which is the same URL as the view in this case.&amp;#160; In the controller we differentiate the action with the HttpPost attribute and, of course, the Suitcase parameter.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;When the data is submitted we see this in the controller action breakpoint:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_14.png" width="536" height="136" /&gt; &lt;/p&gt;  &lt;p&gt;And the contents of the Suitcase.Clothes property:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart4AdvancedModelBin_D5E8/image_15.png" width="478" height="195" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Wrapping Up&lt;/h3&gt;  &lt;p&gt;There you have it: the basics of advanced…stuff.&amp;#160; &lt;/p&gt;  &lt;p&gt;From here you should be able to work out most scenarios when building up objects in jQuery, submitting them to the controller and making a jazzier UI come together with jQuery UI while still using MVC in the backend.&lt;/p&gt;  &lt;p&gt;Some things I’ve learned along the way:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Remember to watch the names of your variables in data maps! They have to match the parameters (or member properties) of the controller action.&lt;/li&gt;    &lt;li&gt;If you’re having trouble getting things to submit and you’re not seeing any errors, try attaching FireBug in FireFox to the browsing session and see what’s happening to your requests/responses.&lt;/li&gt;    &lt;li&gt;Make sure that you’re sending the values of the jQuery selections, and not the objects themselves if you’re having trouble binding.&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Don’t send: $(“#my-textbox”)&lt;/li&gt;      &lt;li&gt;Send: $(“#my-textbox”).val()&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;h3&gt;Resources&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;The complete solution for all three scenarios (&lt;a href="http://bandofgeeks.net/blogimages/code/moremodelbinding.zip" target="_blank"&gt;download VS2010 solution&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;The rest of &lt;a href="http://theycallmemrjames.blogspot.com/p/aspnet-mvc-and-jquery.html" target="_blank"&gt;this series&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;jQuery’s &lt;a href="http://www.jquery.com" target="_blank"&gt;Website&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;jQuery UI’s &lt;a href="http://www.jqueryui.com" target="_blank"&gt;Website&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8859505862442413289?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8859505862442413289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/05/aspnet-mvc-and-jquery-part-4-advanced.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8859505862442413289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8859505862442413289'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/05/aspnet-mvc-and-jquery-part-4-advanced.html' title='ASP.NET MVC and jQuery Part 4 – Advanced Model Binding'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-5118788292465933346</id><published>2010-04-27T16:19:00.001-05:00</published><updated>2010-04-27T16:19:43.120-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='Linq to Objects'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Resolving LINQ Error: Missing Query Pattern Implementation</title><content type='html'>&lt;p&gt;There are a couple of errors that I have come up in working with LINQ and LINQ to SQL that have common roots.&amp;#160; There are a couple of easy fixes when you run into the following error:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#454545"&gt;&lt;em&gt;Could not find an implementation of the query pattern for source type &amp;lt;SomeType&amp;gt;.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You will also receive some further information about the error, usually along the lines of one of the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;'Where' not found.&lt;/li&gt;    &lt;li&gt;'Select' not found.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Fix 1: LINQ Using Missing&lt;/h3&gt;  &lt;p&gt;This one is easy: just make sure you have the following using statement in your class file:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ResolvingLINQErrors_E53F/image.png" width="133" height="17" /&gt; &lt;/p&gt;  &lt;h3&gt;Fix 2: Got Members?&lt;/h3&gt;  &lt;p&gt;Use the correct member of the object you are performing a query on, and make sure you’re not intending to use a property of mehod of that type.&lt;/p&gt;  &lt;p&gt;For Example, where _dc is a DataContext object for LINQ to SQL, I have absent-mindedly forgotten the table reference in the query:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ResolvingLINQErrors_E53F/image_3.png" width="397" height="73" /&gt; &lt;/p&gt;  &lt;p&gt;The above should be written as follows to avoid the query pattern implementation error:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ResolvingLINQErrors_E53F/image_4.png" width="404" height="69" /&gt; &lt;/p&gt;  &lt;p&gt;That one can be a little more tricky because – especially if you’re coding late – the compiler error doesn’t really lead you to a ‘I missed a property reference’ with that error.&lt;/p&gt;  &lt;h3&gt;Fix 3: Wrong Type&lt;/h3&gt;  &lt;p&gt;Make sure you are trying to query an object that works with LINQ.&amp;#160; Specifically, LINQ to objects will need to have an implementation of the IEnumerable interface in the object that it is trying to query.&lt;/p&gt;  &lt;p&gt;If you run into something that is called GetNameList, but it returns a delimited string instead of (the expected) List&amp;lt;string&amp;gt;, you can still query it after you take a simple step and do the split:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ResolvingLINQErrors_E53F/image_5.png" width="426" height="57" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;…and those are the most common ways to solve issues around the missing implementation of the query pattern for ‘x’ problem.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-5118788292465933346?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/5118788292465933346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/resolving-linq-errors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5118788292465933346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5118788292465933346'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/resolving-linq-errors.html' title='Resolving LINQ Error: Missing Query Pattern Implementation'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-7744923830942708023</id><published>2010-04-23T11:58:00.002-05:00</published><updated>2010-04-23T13:36:29.989-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Series'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeProject'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>ASP.NET MVC and jQuery Part 3 – Model Binding</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="color:#0000a0;"&gt;&lt;span  class="Apple-style-span" style="font-size:small;"&gt;This is the third post in a &lt;/span&gt;&lt;a href="http://theycallmemrjames.blogspot.com/p/aspnet-mvc-and-jquery.html"&gt;&lt;span  class="Apple-style-span" style="font-size:small;"&gt;series&lt;/span&gt;&lt;/a&gt;&lt;span  class="Apple-style-span" style="font-size:small;"&gt; about jQuery and ASP.NET MVC 2 in Visual Studio 2010.&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;/p&gt;  &lt;p&gt;100% of the developers I have talked to this morning are enjoying jQuery and how it makes ASP.NET MVC sites a treat to work on.  Of course, the sample size was one (1) developer, and he’s writing this post. Just sayin’.&lt;/p&gt;  &lt;p&gt;In this article I’m going to cover some of the model binding scenarios that work seamlessly with these two technologies, starting off with some background and a sample, then progressing to more complex concepts.&lt;/p&gt;  &lt;h3&gt;Model Binding Basics&lt;/h3&gt;  &lt;p&gt;Model binding occurs in the processing of a request in the MVC framework, after routing and the creation of the controller.  After the controller comes out of the factory, reflection kicks in to match up the request from the routing engine (as a result of some client action) with any parameters in the HTTP request.&lt;/p&gt;  &lt;p&gt;Said another way: form values and querystring parameters get automatically turned into .NET objects in the MVC framework. Cool.&lt;/p&gt;  &lt;p&gt;To provide a simple overview of how model binding works, we’re going to set up a quick demonstration.  Start up the IDE and create an ASP.NET MVC 2 Web Application.  Delete the Index file (we’re going to create our own later).  Here’s the steps we’re going to follow:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create a new model called Person (and build our project)&lt;/li&gt;    &lt;li&gt;Update our Controller to setup an “empty” person for our view&lt;/li&gt;    &lt;li&gt;Create a strongly-typed view to create a person&lt;/li&gt;    &lt;li&gt;Create an action method on our Home Controller to capture the ‘create’&lt;/li&gt;    &lt;li&gt;Let the MVC framework do the rest&lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;p&gt;We’re not actually going to persist anything here, this is just a show-and-tell.&lt;/p&gt;  &lt;h4&gt;The simple parts&lt;/h4&gt;  &lt;p&gt;Navigate to your Models folder and right-click to Add –&amp;gt; Class called Person.  Complete the class out as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_thumb.png" width="333" height="121" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;We need to build our project here (SHIFT + CTRL + b) for the IDE to be able to see our class in later steps.  The type-awareness from reflection requires that our type exist in an assembly.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Pop over to Controllers –&amp;gt; HomeController and delete the ViewData assignment.  We’re going to create a new Person here and return it with the view.  Our action looks very simply like so:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_thumb_3.png" width="261" height="88" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_4.png" width="277" height="273" /&gt; Right-click anywhere in the method and select Add View… from the context menu. We are adding a view named Index, setting it to be a strongly-typed view and setting the view content to Create.  This will allow code generation to output the basics of the form we’re going to use.&lt;/p&gt;  &lt;p&gt;Note that here, or anytime you try to add a view, that if your model hasn’t been updated by building your project your types won’t appear in the View Data Class drop-down.  You can cancel, build, and re-open the dialog if that is the case.&lt;/p&gt;  &lt;p&gt;The page that is generated is super handy as a starting point.  Even if it doesn’t save me much time (after all the changes and deleting I do) for some reason it just makes me feel better that the computer had to do some work too.  &lt;/p&gt;  &lt;p&gt;Let’s clean it up a bit.  Remove the validation controls, delete the DIV with the ‘back to list’ link in it and change the H2 to something more interesting.&lt;/p&gt;  &lt;p&gt;Because I’m not going to be posting back to my Index action method, I need to also update the using statement to have to correct calls created for submitting the form:&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Lucida Console;"&gt;Html.BeginForm("&lt;span style="color:#ff0000;"&gt;CreatePerson&lt;/span&gt;", "&lt;span style="color:#ff0000;"&gt;Home&lt;/span&gt;")&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Finally, let’s add a bit of code with the corresponding method, CreatePerson,  and a breakpoint in our Home controller:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_5.png" width="590" height="89" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The above doesn’t actually do anything (and won’t go anywhere past the breakpoint), but if you pause where I suggest and evaluate the Person object or the name that was assigned the string, you’ll see the values populated.&lt;/p&gt;  &lt;h4&gt;How did the Model Binding Work?&lt;/h4&gt;  &lt;p&gt;There are actually a ton of in-depth explanations out there, but here is the summary of what we’ve done and what the MVC framework does to support model binding:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;We have a class with public properties&lt;/li&gt;    &lt;li&gt;The template engine created a page for us with the HTML helper TextBoxFor&lt;/li&gt;    &lt;li&gt;TextBoxFor uses the name of the public properties to generate a form input with the same name&lt;/li&gt;    &lt;li&gt;The template creates a form to host those controls, which we directed to our controller and action&lt;/li&gt;    &lt;li&gt;When written to the browser, the form action is set to “/Home/CreatePerson” using the POST verb&lt;/li&gt;    &lt;li&gt;The MVC framework routes the form submission to the Home controller, then uses reflection to find the CreatePerson method&lt;/li&gt;    &lt;li&gt;Because the method accepts a Person object as a parameter, the MVC framework evaluates the HTTP request (querystring parameters, form values) and then hydrates an object for us&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Now, Let’s Make it Interesting&lt;/h3&gt;  &lt;p&gt;So far, this has just been a demonstration of simple model binding in the MVC framework.  Let’s get jQuery involved.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Change the controller action to a partial view result&lt;/li&gt;    &lt;li&gt;Create a partial view that reveals the created person&lt;/li&gt;    &lt;li&gt;Add jQuery and jQuery UI to the Site.Master file&lt;/li&gt;    &lt;li&gt;Remove the using statement from the Index page&lt;/li&gt;    &lt;li&gt;Modify the input so it’s easier to select in jQuery&lt;/li&gt;    &lt;li&gt;Add a DIV to store the results of the create&lt;/li&gt;    &lt;li&gt;Add a calendar selector for the birthdate&lt;/li&gt;    &lt;li&gt;Submit the form via jQuery when the user clicks the button &lt;/li&gt;    &lt;li&gt;Clear the form when the partial view result comes back, and display the result&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Let’s start by changing the method to only accept POSTs and simply returning the Person object we were passed in to the PartialView.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_thumb_4.png" width="392" height="90" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_7.png" width="275" height="273" /&gt; Right-click anywhere on the method and select Add View… from the context menu.&lt;/p&gt;  &lt;p&gt;This time we’ll create the view as a partial, it will be strongly-typed to Person again, but we’ll set the View Content to Details.&lt;/p&gt;  &lt;p&gt;The tooling support for the MVC Framework in Visual Studio 2010 will then create the ASCX (server control) for us with all the fields displayed.&lt;/p&gt;  &lt;p&gt;Delete the P tag at the end of the generated control with the ActionLinks in it, leaving only the control tag at the top and the FIELDSET control.&lt;/p&gt;  &lt;p&gt;Next, pop into Views –&amp;gt; Shared –&amp;gt; Site.Master and add jQuery to the HEAD of the master page.  Let’s also add jQuery UI at this time to open the doors to some other augmentations.  For full functionality you’ll need the CSS and the images folder in your project as well, and the CSS linked in the HEAD of the master page.&lt;/p&gt;  &lt;p&gt;In Index.aspx, remove the using statement so that the form is no longer generated.  This is easy if you use Visual Studio 2010’s collapsible regions (you can collapse the FIELDSET tag to see the whole using construct).&lt;/p&gt;  &lt;p&gt;Add an ID with a value of “create-person-button” to the submit button at the bottom of Index.aspx.  Lastly, before we get scripting, add a DIV to display the partial view when the person is ‘created’.  These last two bits should look like the following:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_8.png" width="490" height="92" /&gt; &lt;/p&gt;  &lt;h4&gt;On to the script&lt;/h4&gt;  &lt;p&gt;jQuery gives us a way to easily make AJAX requests via POSTing to the server. We pass in a map of data that the server is expecting. The result can be passed to a function that evaluates the results.&lt;/p&gt;  &lt;p&gt;With the inputs setup the way they are and our placeholder…uh…holding a place, we’re all set to execute our POST. &lt;/p&gt;  &lt;p&gt;We’ll write a helper function that will process the results of the POST operation and, of course, a jQuery ‘document ready’ event handler to setup the calendar and trap the submit button click.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_9.png" width="623" height="522" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Most of the code should be easy enough to follow along.  The one interesting bit is that the data map need not be constructed with proper case.  That is, if your fieldname is FirstName you can use FiRsTnAmE as the name in the data map and that is okay.&lt;/p&gt;  &lt;p&gt;Run the app and enjoy!&lt;/p&gt;  &lt;p&gt;The jQuery UI datepicker in action:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_thumb_5.png" width="337" height="273" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The form cleared after submit and the results of the POST displayed:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_11.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_thumb_6.png" width="344" height="388" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Some Caveats&lt;/h3&gt;  &lt;p&gt;At this point we don’t have any validation in place, we’re not saving to a database of any kind and we’re hooped if there’s a server-side error.&lt;/p&gt;  &lt;p&gt;Unfortunately the jQuery POST doesn’t play nicely with unhandled exceptions that are thrown on the server.  $.post is shorthand for a sub-set of the functionality (with some presets) of $.ajax, and only maps a handler for the success event (not error events).&lt;/p&gt;  &lt;p&gt;To see this in, well, inaction change your CreatePerson action to the following:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart3ModelBinding_8F23/image_thumb_7.png" width="384" height="97" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This will instruct the MVC framework to pass the person object through to a view named “foo”, which doesn’t exist.  If you run the form at this point, and submit, you’ll see no errors (unless you attach a debugger, like FireBug, to the script).&lt;/p&gt;  &lt;h3&gt;More to Come&lt;/h3&gt;  &lt;p&gt;In my next article I’m going to look at more complex data scenarios, like selections from a list and posting arrays back to the controller.  I’ll also integrate some other goodies, like jQuery UI’s autocomplete, to help users pick a color.&lt;/p&gt;  &lt;h3&gt;Resources&lt;/h3&gt;  &lt;p&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Download &lt;a title="SuggestContent.zip" href="http://www.bandofgeeks.net/blogimages/code/ModelBinding.zip" target="_blank"&gt;the project&lt;/a&gt; created in this post &lt;/li&gt;    &lt;li&gt;View the &lt;a href="http://theycallmemrjames.blogspot.com/p/aspnet-mvc-and-jquery.html" target="_blank"&gt;rest of the series&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;jQuery’s &lt;a href="http://www.jquery.com/" target="_blank"&gt;web site&lt;/a&gt; &lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Information on &lt;a href="http://api.jquery.com/jQuery.post/" target="_blank"&gt;$.post&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Download &lt;a href="http://www.jqueryui.com/" target="_blank"&gt;jQuery UI&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-7744923830942708023?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/7744923830942708023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-and-jquery-part-3-model.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7744923830942708023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7744923830942708023'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-and-jquery-part-3-model.html' title='ASP.NET MVC and jQuery Part 3 – Model Binding'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3502181892351670741</id><published>2010-04-21T14:20:00.000-05:00</published><updated>2010-05-17T14:28:44.076-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><title type='text'>VS2010 Box Selection Trick – Copy and Paste-ery</title><content type='html'>&lt;p&gt;Here’s a quick tip showing off one of the cool features of box selection in Visual Studio 2010.&lt;/p&gt;  &lt;p&gt;This one deals with copy-and-paste.&lt;/p&gt;  &lt;h4&gt;A simple scenario&lt;/h4&gt;  &lt;p&gt;Perhaps you are trying to preload some data into a StringBuilder for testing something out.&amp;#160; &lt;/p&gt;  &lt;p&gt;As a simple example, let's assume you have a text document with a list of 20 names that you want added to a &lt;code&gt;StringBuilder&lt;/code&gt;.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/VS2010BoxSelectionTrickCopyandPasteery_CB35/image.png" width="115" height="348" /&gt;In the method where you wish to build the list, type &lt;code&gt;sb.AppendLine(&amp;quot;&amp;quot;);&lt;/code&gt; where &lt;code&gt;sb&lt;/code&gt; is the name of your&lt;code&gt;StringBuilder&lt;/code&gt; object.&lt;/li&gt;    &lt;li&gt;Quickly copy &amp;amp; paste this line 20 times to set up a receiving area for the names.&lt;/li&gt;    &lt;li&gt;Open the text file of names in Visual Studio 2010.&amp;#160; This is important because you want to leverage the smarts of the IDE when you copying the text.&lt;/li&gt;    &lt;li&gt;Rather than line-selecting the names, box select them with the mouse while holding the ALT key (it's okay if you capture whitespace when the names are longer than others).&lt;/li&gt;    &lt;li&gt;Copy the selection to the clipboard.&lt;/li&gt;    &lt;li&gt;Return to your method. Vertically box-select the space between the quotes, again by using the mouse to select while holding the ALT key. You get a thin line for a selection that is zero characters wide.&lt;/li&gt;    &lt;li&gt;Paste your selection.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Here’s an example of the result:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VS2010BoxSelectionTrickCopyandPasteery_CB35/image_3.png" width="318" height="124" /&gt; &lt;/p&gt;  &lt;p&gt;Cheers!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3502181892351670741?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3502181892351670741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/vs2010-box-selection-trick-copy-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3502181892351670741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3502181892351670741'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/vs2010-box-selection-trick-copy-and.html' title='VS2010 Box Selection Trick – Copy and Paste-ery'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-955220215110592588</id><published>2010-04-16T08:23:00.001-05:00</published><updated>2010-04-16T08:23:04.392-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Not so Serious'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><title type='text'>They Must Be Listening!</title><content type='html'>&lt;p&gt;I &lt;a href="http://theycallmemrjames.blogspot.com/2010/03/another-it-would-be-cool-if-post.html" target="_blank"&gt;recently posted&lt;/a&gt; on how obscure I thought it was to be putting files on the Windows 7 jump list for Visual Studio 2010.&amp;#160; After all, no one works on ‘files’, we work on Solutions, or at least Projects.&lt;/p&gt;  &lt;p&gt;I actually counted the files I worked on yesterday: 44.&amp;#160; That would be one big (meaningless) jump list!&lt;/p&gt;  &lt;h3&gt;Jumping Reloaded&lt;/h3&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/TheyMustBeListening_75A6/image.png" width="225" height="248" /&gt;Thankfully, Microsoft heard my pleas.&amp;#160; &lt;/p&gt;  &lt;p&gt;Now, I can’t take &lt;em&gt;all&lt;/em&gt; the credit – I was not the one who coded the changes – but I can at least take &lt;em&gt;most&lt;/em&gt; of the credit.&amp;#160; I’m &lt;em&gt;sure&lt;/em&gt; no one else in the world mentioned this!&lt;/p&gt;  &lt;p&gt;I had to use my artistic abilities, &lt;a href="http://theycallmemrjames.blogspot.com/2010/03/another-it-would-be-cool-if-post.html" target="_blank"&gt;once again&lt;/a&gt;, to make it clear how I felt about the way jump lists were implemented in the release version of Visual Studio 2010.&lt;/p&gt;  &lt;p&gt;I will make signed copies available of both the “Bad” and “Good” artwork for a minimum contribution of $400 USD via PayPal.&lt;/p&gt;  &lt;p&gt;;o) &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-955220215110592588?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/955220215110592588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/they-must-be-listening.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/955220215110592588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/955220215110592588'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/they-must-be-listening.html' title='They Must Be Listening!'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8543731382208818812</id><published>2010-04-15T13:58:00.005-05:00</published><updated>2010-04-20T08:29:01.171-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Series'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeProject'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>ASP.NET MVC and jQuery Part 2 – Suggesting Content</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="color:#0000a0;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;This is the second post in a &lt;/span&gt;&lt;a href="http://theycallmemrjames.blogspot.com/p/aspnet-mvc-and-jquery.html"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;series&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; about jQuery and ASP.NET MVC 2 in Visual Studio 2010.&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Two perpetually frustrating tasks I have dealt with are scratching out a UI to collect data and having to work with that data client-side.  Thankfully, a marriage of jQuery and ASP.NET MVC make this much more appealing and helps us to achieve, very quickly, a usable interface.&lt;/p&gt;  &lt;h3&gt;Suggesting Content from User Text&lt;/h3&gt;  &lt;p&gt;If you’ve used forums or user communities such as MSDN or StackOverflow where you can pose questions to peers, you’ve likely noticed that as you type your question related content begins to appear.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image.png" width="420" height="151" /&gt; &lt;/p&gt;  &lt;p&gt;Here, we’ll replicate that behaviour and show how easy it is to make it work using jQuery and ASP.NET MVC.  Because I will use some contrived data to make this work I will also include a solution download at the end of the article.&lt;/p&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h3&gt;The Basic Steps&lt;/h3&gt;  &lt;p&gt;If you have a good grasp on things and just want to give it a try, here’s what you need to do:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create an ASP.NET MVC 2 Web Application&lt;/li&gt;    &lt;li&gt;Add jQuery to your Site.Master page&lt;/li&gt;    &lt;li&gt;Establish your model for the results of the search&lt;/li&gt;    &lt;li&gt;Create a repository to return a set of results&lt;/li&gt;    &lt;li&gt;Create a controller action to return the list of results in a partial view&lt;/li&gt;    &lt;li&gt;Create the required partial view&lt;/li&gt;    &lt;li&gt;Create the entry form that lets users ask questions&lt;/li&gt;    &lt;li&gt;Write script to take the form input and send it to the appropriate controller action, updating a DOM element with the results of the call&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;The Walkthrough&lt;/h3&gt;  &lt;p&gt;Setting up a project and getting jQuery was highlighted in the &lt;a href="http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-and-jquery-part-1-getting.html" target="_blank"&gt;first article&lt;/a&gt; in this &lt;a href="http://theycallmemrjames.blogspot.com/p/aspnet-mvc-and-jquery.html" target="_blank"&gt;series&lt;/a&gt;.  Create the project and get it set up for jQuery before you get going.&lt;/p&gt;  &lt;h4&gt;Creating a Model&lt;/h4&gt;  &lt;p&gt;Under normal circumstances you’d be working from a database that stores the related content you wish to display.  Your model&lt;/p&gt;  &lt;p&gt;Right-click on the Models folder in the Solution Explorer and click &lt;strong&gt;Add –&amp;gt;  Class&lt;/strong&gt;.  Name the class &lt;strong&gt;Question&lt;/strong&gt; and click &lt;strong&gt;Add&lt;/strong&gt;.  We’re going to add some properties to the class.  This is really easy with auto-implemented properties in c# and the &lt;strong&gt;prop&lt;/strong&gt; snippet.  Type prop inside the class and you’ll see the following:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_3.png" width="420" height="114" /&gt; &lt;/p&gt;  &lt;p&gt;Hit &lt;strong&gt;tab&lt;/strong&gt; and Visual Studio will generate the code you need and give you some assistance in filling in the key bits.  You’ll notice the hightlighted text.  You can use &lt;strong&gt;tab&lt;/strong&gt; to cycle through the highlighted sections, which will select the text for you, and you can just over-type your values.  Press &lt;strong&gt;enter&lt;/strong&gt; to exit the snippet.&lt;/p&gt;  &lt;p&gt;Add the following properties to the class:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;int UpVotes&lt;/li&gt;    &lt;li&gt;string Title&lt;/li&gt;    &lt;li&gt;string Tags&lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Building the Repository&lt;/h4&gt;  &lt;p&gt;Right-click on the &lt;strong&gt;Models&lt;/strong&gt; folder and add another class called &lt;strong&gt;QuestionRepository&lt;/strong&gt;.  We are going to fake a database here and create a property called &lt;strong&gt;Questions&lt;/strong&gt;.  Make the property private and of type IEnumerable&amp;lt;Question&amp;gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb.png" width="379" height="24" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When the class is created we want &lt;strong&gt;Questions&lt;/strong&gt; to be filled with some data to emulate something like a DataContext you would see if you were using LINQ to SQL.  Create a constructor and populate a List&amp;lt;Question&amp;gt; with several questions.  This is easy if you use the parameterless constructors of c#.  I even just write a blank one, then copy-and-paste it out:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_5.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb_3.png" width="479" height="73" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Fill in the blanks!  For my sample (and in the download) I have added about 10 questions and assigned the list of questions to the class’ private Questions property.  I also assigned the UpVotes to a random number between 0-20 so that I could sort off of it and get different results.&lt;/p&gt;  &lt;p&gt;Next, add an internal function called FindMatchedQuestions with the following signature:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb_4.png" width="511" height="21" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The algorithm for deducing the related questions is not the subject of this article. Though I’ve included some basic logic to make it work in the download, here’s all you need to get going for now:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_7.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb_5.png" width="467" height="36" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;With that inside our ‘find’ function, we’ll always get some random results.  Use the downloadable project for search-relevant results.&lt;/p&gt;  &lt;p&gt;At this point, let’s build our project (&lt;strong&gt;Shift + CTRL + b&lt;/strong&gt;) to get our models compiled and help out our tooling.  If you do not compile, some steps will not be as smooth as I suggest; MVC tooling uses reflection to find types in namespaces, types that don’t exist without an initial compilation&lt;/p&gt;  &lt;h4&gt;To the Controller&lt;/h4&gt;  &lt;p&gt;Navigate to &lt;strong&gt;Controllers –&amp;gt; HomeController.cs&lt;/strong&gt; and open it up.  Add a new public PartialViewResult to the class called FindRelated that accepts a string parameter.  Add the following code to the method, which calls the repository to get some data (the model) and returns a PartialViewResult with said model.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb_6.png" width="446" height="105" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Visual Studio 2010 contains some great helpers for the MVCers of the world.  While the library is heavily tested, (mostly) strongly-typed, robust and extensive, it also allows us to rely on convention to afford us great convenience in code and in tool support.  &lt;/p&gt;  &lt;p&gt;The first convenience I used here is part of the framework; by passing my model into the PartialView() that I’m returning, the framework looks for a View that matches the name of my action (FindRelated) and passes the model to it.  The executed result is what is returned to the browser (after the framework is done with it).&lt;/p&gt;  &lt;p&gt;The second convenience I’m demonstrating comes from the tooling support and the IDE’s awareness of the MVC conventions.  On to our View…&lt;/p&gt;  &lt;h4&gt;Building the Partial View&lt;/h4&gt;  &lt;p&gt;I’m not going for style points, here, so I’m going to use what we get for free.  Let’s use that convention-aware tooling and create our partial view by right-clicking on the &lt;strong&gt;Home&lt;/strong&gt; folder in &lt;strong&gt;Views&lt;/strong&gt;, then selecting &lt;strong&gt;Add view…&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You’ll see the following:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_9.png" width="296" height="293" /&gt; &lt;/p&gt;  &lt;p&gt;This is okay, but there’s an even better way to do this.  Cancel the wizard and go back to your &lt;strong&gt;HomeController&lt;/strong&gt; source file.  Right-click anywhere inside the the FindRelated function and click &lt;strong&gt;Add View…&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Now, you’ll see the already-named, convention-following parameters for creating your view.  We’re going to set the wizard to create a partial view that is strongly-typed with the &lt;strong&gt;Question&lt;/strong&gt; class.  We’ll also set the View content to &lt;strong&gt;List&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_10.png" width="297" height="293" /&gt; &lt;/p&gt;  &lt;p&gt;The template outputs a table for us, which is acceptable, but it won’t look great for our purposes.  For now, let’s just clean up a little bit by:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Removing the &lt;strong&gt;first row&lt;/strong&gt; which contains the headers&lt;/li&gt;    &lt;li&gt;Removing the &lt;strong&gt;first column&lt;/strong&gt; in the &lt;strong&gt;foreach&lt;/strong&gt; with the ActionLinks&lt;/li&gt;    &lt;li&gt;Removing the &lt;strong&gt;column&lt;/strong&gt; that contains the output for &lt;strong&gt;item.Tags&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;Removing the &lt;strong&gt;P tag&lt;/strong&gt; at the end of the View with the Create link&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you kill the whitespace in the document you are left with a very short Partial View:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_11.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb_7.png" width="264" height="130" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;To finish off the view, add an H3 tag for a title and set the contents to &lt;strong&gt;Related Questions&lt;/strong&gt;.&lt;/p&gt;  &lt;h3&gt;A Quick Test&lt;/h3&gt;  &lt;p&gt;At this point, we’re basically ready to rig up our functionality. If you want to see the results of your work so far, we can just make a request to the controller’s PartialViewResult action and see the list of related content.  Press F5 to run the project, then enter the following in your browser (remember to replace your port number!):&lt;/p&gt;  &lt;p&gt;&lt;a title="http://localhost:2771/home/findrelated?searchText=foo" href="http://localhost:PORT/Home/FindRelated?searchText=foo"&gt;http://localhost:PORT/&lt;strong&gt;Home/FindRelated?searchText=foo&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Looking at the URL we can observe the following interesting things:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Home is the name of our controller&lt;/li&gt;    &lt;li&gt;FindRelated in the name of our action&lt;/li&gt;    &lt;li&gt;searchText is the name of the parameter in our action&lt;/li&gt;    &lt;li&gt;The view that is rendered sits in a folder called &lt;strong&gt;Home&lt;/strong&gt; which is the first place the framework looks when resolving views for a controller called &lt;strong&gt;HomeController&lt;/strong&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Through convention and the routing support in MVC 2 and ASP.NET we are able to see our results.  If you examine the HTML source you’ll notice there are no HTML, HEAD or BODY tags; they aren’t rendered from partial views.&lt;/p&gt;  &lt;p&gt;Here’s the results of my test view:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_12.png" width="416" height="152" /&gt; &lt;/p&gt;  &lt;p&gt;Again, not pretty, but it will do!&lt;/p&gt;  &lt;h3&gt;Involving the User and Adding Script&lt;/h3&gt;  &lt;p&gt;The default template for an MVC 2 project includes &lt;strong&gt;Index.aspx&lt;/strong&gt;.  Open it to edit from the &lt;strong&gt;Views –&amp;gt; Home&lt;/strong&gt; folder in Solution Explorer.&lt;/p&gt;  &lt;p&gt;Delete the &lt;strong&gt;H2&lt;/strong&gt; tag and the &lt;strong&gt;P&lt;/strong&gt; tag that were so kindly added to the home page for you.&lt;/p&gt;  &lt;p&gt;Add two &lt;strong&gt;DIV&lt;/strong&gt;s. One will host the user input control and the other will be the container for our results, so we’ll ID them appropriately.  Specifying an ID allows us to work directly with the controls with a simple jQuery selector.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_13.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb_8.png" width="295" height="40" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Expand the user search container to include brief instructions and a text input.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_14.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb_9.png" width="458" height="60" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Finally, add your SCRIPT tag so we can insert some JavaScript. First, lets add our function that can update the contents of our results placeholder:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_15.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb_10.png" width="296" height="107" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Next, let’s add a jQuery handler that is executed when the document is fully loaded.  In here, we’ll bind the ‘blur’ event of the text input to a the &lt;strong&gt;SubmitQuery&lt;/strong&gt; function we just wrote:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_16.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_thumb_11.png" width="331" height="88" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;That should be it!  Now, just like when you tab out of the question asking box on StackOverflow, your query will be submitted and a list of related questions can come back!  Run the app with F5 to see the results.  Enter some text and tab out of the text box to see the list load.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_17.png" width="420" height="281" /&gt; &lt;/p&gt;  &lt;h3&gt;Wrapping Up&lt;/h3&gt;  &lt;p&gt;Obviously this is not a complete feature-for-feature exhibit of a related-question section on a site, but it’s a good start.  In the download I have improved the search results (somewhat) and styled the results to look a little more like SO’s.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart2SuggestingConten_9FC6/image_18.png" width="461" height="379" /&gt; &lt;/p&gt;  &lt;p&gt;You can also extend your model to include an ID, or use a model from a database.  With an ID, you could then create a controller action that loads a question, given an ID, and outputs a view that is strongly-typed to render a complete question.&lt;/p&gt;  &lt;p&gt;Good luck!&lt;/p&gt;  &lt;h3&gt;Resources&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;Download &lt;a title="SuggestContent.zip" href="http://www.bandofgeeks.net/blogimages/code/SuggestContent.zip" target="_blank"&gt;the project&lt;/a&gt; created in this post&lt;/li&gt;    &lt;li&gt;View the &lt;a href="http://theycallmemrjames.blogspot.com/p/aspnet-mvc-and-jquery.html" target="_blank"&gt;rest of the series&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;jQuery’s &lt;a href="http://www.jquery.com/" target="_blank"&gt;web site&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8543731382208818812?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8543731382208818812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-and-jquery-part-2-suggesting.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8543731382208818812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8543731382208818812'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-and-jquery-part-2-suggesting.html' title='ASP.NET MVC and jQuery Part 2 – Suggesting Content'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-4579670000233278698</id><published>2010-04-14T09:54:00.006-05:00</published><updated>2010-05-03T15:05:50.984-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Series'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeProject'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>ASP.NET MVC and jQuery Part 1 – Getting Started</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="color: #0000a0"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;This is the first post in a &lt;/span&gt;&lt;a href="http://theycallmemrjames.blogspot.com/p/aspnet-mvc-and-jquery.html"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;series&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt; about jQuery and ASP.NET MVC 2 in Visual Studio 2010.&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you’ve had web development experience with ASP.NET and JavaScript it is highly likely that you’ve heard of or are maybe even interested in the new partnership of these two technologies.&lt;/p&gt;  &lt;p&gt;Getting started isn’t terribly difficult, so I’m not going to over-complicate this post. A couple of things to clear up, then we’ll jump to the meat.&lt;/p&gt;  &lt;h3&gt;What is the ASP.NET MVC Framework?&lt;/h3&gt;  &lt;p&gt;Model-View-Controller, abbreviated as MVC, is a design pattern (a concept) that helps us organize our code in such a way that we can keep clear separation between our data, our behaviours &amp;amp; business rules and our user interface. Those parts, respectively are referred to as the model, the controller and the view.&lt;/p&gt;  &lt;p&gt;The MVC Framework for ASP.NET MVC gives us tools support, conventions and a base set of classes to enable use of this pattern, rather than the default Page-Controller pattern that is used in ASP.NET.&lt;/p&gt;  &lt;h3&gt;What is jQuery?&lt;/h3&gt;  &lt;p&gt;There is a reference to every element in an HTML document and JavaScript has access to them. With JavaScript, you can manipulate the DOM and write scripts to animate parts of your web page, make AJAX requests or perform validation.&lt;/p&gt;  &lt;p&gt;Once you’ve written that code, you then need to keep a repository for it (you don’t want to write it again). When you want a new feature you might need to make breaking changes. You will have performance issues and browser compatibility problems, perhaps even platform-related issues.&lt;/p&gt;  &lt;p&gt;jQuery is a library of JavaScript code where the kinds of things you want to do are already done. It is cross-browser compatible, has many pre-built components and has better performance with every release.&lt;/p&gt;  &lt;p&gt;Think of jQuery as a way of “doing something” to “a group of things,” even if it is a group of one. You almost always begin by finding “the things” and then performing an action on them. “The things” are elements of the DOM like links, DIV tags, images, form elements, forms or the document root itself.&lt;/p&gt;  &lt;h3&gt;The Basic Steps&lt;/h3&gt;  &lt;p&gt;For you impatient types out there (like me):&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create an ASP.NET MVC 2 Web Application &lt;/li&gt;    &lt;li&gt;Add the jQuery reference to the Site.Master to enable jQuery on all pages &lt;/li&gt;    &lt;li&gt;Use the if(false) technique to enable IntelliSense on partial views &lt;/li&gt;    &lt;li&gt;Use script references to enable IntelliSense on stand-alone JavaScript files &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;The Meaty Version&lt;/h3&gt;  &lt;p&gt;Start Visual Studio 2010 and create a new project. Navigate to the &lt;strong&gt;Web&lt;/strong&gt; category and select &lt;strong&gt;ASP.NET MVC 2 Web Application&lt;/strong&gt;. Name your project (I used Spike.jQueryMvc) and press &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart1GettingStarted_8B2F/image.png" width="420" height="133" /&gt; &lt;/p&gt;  &lt;p&gt;Visual Studio will ask you to create a Unit Test Project. Just say no for now (I’ll cover tests in a later post). Finish the wizard and you’ll have your MVC project created.&lt;/p&gt;  &lt;p&gt;Open up the &lt;strong&gt;Site.Master&lt;/strong&gt; file which you will find in &lt;strong&gt;Views –&amp;gt; Shared&lt;/strong&gt; in the &lt;strong&gt;Solution Explorer&lt;/strong&gt;. Expand the &lt;strong&gt;Scripts&lt;/strong&gt; folder as well so that you can see the default scripts. &lt;/p&gt;  &lt;p&gt;In the HEAD tag of your Site.Master, drag the jQuery ‘min’ file and, below it, the jQuery ‘vsdoc’ file. Wrap your vsdoc file with an &lt;strong&gt;if(false)&lt;/strong&gt; statement. The vsdoc will never be written to the browser (because false is never true) but Visual Studio will pick up the file and enable IntelliSense with this trick.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart1GettingStarted_8B2F/image_3.png" width="548" height="195" /&gt; &lt;/p&gt;  &lt;p&gt;We’re all set to use jQuery and Visual Studio 2010’s awesome IntelliSense.&lt;/p&gt;  &lt;p&gt;Now, navigate to the &lt;strong&gt;Index.aspx&lt;/strong&gt; page in &lt;strong&gt;Views –&amp;gt; Home&lt;/strong&gt; and open it up. After the closing P tag, add the following code:&lt;/p&gt;  &lt;pre style="background: #f6f8ff; color: #000020"&gt;&lt;span style="color: #0057a6"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #200080; font-weight: bold"&gt;script language=&amp;quot;&lt;/span&gt;&lt;span style="color: #1060b6"&gt;javascript&lt;/span&gt;&lt;span style="color: #200080; font-weight: bold"&gt;&amp;quot; type=&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span style="color: #0057a6"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;$&lt;span style="color: #308080"&gt;(&lt;/span&gt;&lt;span style="color: #200080; font-weight: bold"&gt;function&lt;/span&gt; &lt;span style="color: #308080"&gt;(&lt;/span&gt;&lt;span style="color: #308080"&gt;)&lt;/span&gt; &lt;span style="color: #406080"&gt;{&lt;/span&gt;&lt;br /&gt;   $&lt;span style="color: #308080"&gt;(&lt;/span&gt;&lt;span style="color: #1060b6"&gt;&amp;quot;p&amp;quot;&lt;/span&gt;&lt;span style="color: #308080"&gt;)&lt;/span&gt;&lt;span style="color: #308080"&gt;.&lt;/span&gt;click&lt;span style="color: #308080"&gt;(&lt;/span&gt;&lt;span style="color: #200080; font-weight: bold"&gt;function&lt;/span&gt; &lt;span style="color: #308080"&gt;(&lt;/span&gt;&lt;span style="color: #308080"&gt;)&lt;/span&gt; &lt;span style="color: #406080"&gt;{&lt;/span&gt;&lt;br /&gt;       $&lt;span style="color: #308080"&gt;(&lt;/span&gt;&lt;span style="color: #200080; font-weight: bold"&gt;this&lt;/span&gt;&lt;span style="color: #308080"&gt;)&lt;/span&gt;&lt;span style="color: #308080"&gt;.&lt;/span&gt;slideUp&lt;span style="color: #308080"&gt;(&lt;/span&gt;&lt;span style="color: #308080"&gt;)&lt;/span&gt;&lt;span style="color: #406080"&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: #406080"&gt;}&lt;/span&gt;&lt;span style="color: #308080"&gt;)&lt;/span&gt;&lt;span style="color: #406080"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #406080"&gt;}&lt;/span&gt;&lt;span style="color: #308080"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0057a6"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #200080; font-weight: bold"&gt;script&lt;/span&gt;&lt;span style="color: #0057a6"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You’ll notice as you’re typing that Visual Studio is popping up help text for your jQuery functions.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCandjQueryPart1GettingStarted_8B2F/image_4.png" width="420" height="139" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Press F5 to run the app. You will be prompted to modify the Web.Config file; accept this.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The browser will open and you’ll be staring at a slightly-modified default MVC page. Click on the text “To learn more about ASP.NET MVC” and see your jQuery in action.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;FTW? How did that work?&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here’s the basics:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;A SCRIPT tag was added to the document &lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;We used a jQuery shortcut to wait for the document and run a function when it was completely loaded &lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;When loaded, we found all the P elements in the DOM and created an event handler to respond to user clicks. This is done with an anonymous function &lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Inside our click event handler, we used another jQuery shortcut $&lt;span style="color: #308080"&gt;(&lt;/span&gt;&lt;span style="color: #200080; font-weight: bold"&gt;this&lt;/span&gt;&lt;span style="color: #308080"&gt;)&lt;/span&gt; to select the P element that the user clicked on, and we told it to use the slideUp animation &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The first shortcut is basically an event handler – in this case an anonymous function – that gets executed when the document is loaded. You should use this on every page because jQuery can’t find elements that haven’t yet been added to the DOM.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: #f6f8ff; color: #000020"&gt;$(function () {&lt;br /&gt;&lt;br /&gt;})&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Inside this function – again, that gets executed after the DOM is loaded – we use a jQuery &lt;strong&gt;selector&lt;/strong&gt; to find all the P elements in the document and attach a click handler to them.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: #f6f8ff; color: #000020"&gt;$(&amp;quot;p&amp;quot;).click(...);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The selector can work with any element, ID or class. For IDs and classes you use the CSS-style sytax (# and . respectively), so for a input of type text with an ID of “first-name” you could find it with jQuery like so:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: #f6f8ff; color: #000020"&gt;$(&amp;quot;#first-name&amp;quot;)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;All that’s left is the anonymous function we used as an event handler.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: #f6f8ff; color: #000020"&gt;function () {&lt;br /&gt;$(this).slideUp();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;We call the slideUp animation for the clicked element and let jQuery do it’s business.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Feedback&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I have started this series to help a friend who is learning about web development. I found that by writing these tips out that I was gaining a better understanding of the underlaying technologies myself. I hope it can serve as a reference to others out there as well.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That said, if there’s something you’d like to point out, a question you have or a topic you’d like me to cover, please let me know and I will do my best to respond.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-4579670000233278698?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/4579670000233278698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-and-jquery-part-1-getting.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4579670000233278698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4579670000233278698'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-and-jquery-part-1-getting.html' title='ASP.NET MVC and jQuery Part 1 – Getting Started'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-284970005732235760</id><published>2010-04-13T17:32:00.002-05:00</published><updated>2010-04-16T08:02:21.746-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Templates'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Update the ASP.NET MVC 2 Template for jQuery 1.4.2</title><content type='html'>&lt;p&gt;Visual Studio 2010 ships with jQuery 1.4.1 out-of-the-box.  This works great, fixes some issues and works fine with jQuery UI but it does not have all the performance improvements and tweaks of 1.4.2 including the delegates and support for hover() with live().&lt;/p&gt;  &lt;p&gt;1.4.2 is nearly &lt;strong&gt;&lt;em&gt;twice&lt;/em&gt;&lt;/strong&gt; as fast as 1.4.1 on similar tasks.&lt;/p&gt;  &lt;h4&gt;“I Am Speed.”&lt;/h4&gt;  &lt;p&gt;You can take advantage of Visual Studio’s Export Template feature from the File menu to do update the template very quickly.  The steps would be as follows:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create a new project using the template that you want to update (like, ASP.NET MVC 2 Empty Web Application).&lt;/li&gt;    &lt;li&gt;Make any changes that you like, including updating the jQuery references, or perhaps baking jQuery into a Site.Master file that you add.&lt;/li&gt;    &lt;li&gt;Create an icon that you would like to use for your template (optional).&lt;/li&gt;    &lt;li&gt;Grab a screen shot that represents your changes or maybe a picture of your mom or something that you can use to identify your project in Visual Studio (optional, especially the Mom pic).&lt;/li&gt;    &lt;li&gt;Click File –&amp;gt; Export Template and fill in the name, description and optionally the graphic files that you wish to use.&lt;/li&gt;    &lt;li&gt;Make sure the auto-import checkbox is ticked, then run the export.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The next time you create a new project your exported template will be in the list to choose.&lt;/p&gt;  &lt;h4&gt;Or, if you want Job Security…&lt;/h4&gt;  &lt;p&gt;If you want to learn more about what’s going on behind the scenes, why not try doing it manually?  It takes a lot longer and you can mess it up, but it’s also good to learn what’s going on when you run through a wizard.&lt;/p&gt;  &lt;p&gt;I don’t want to have you bork your templates, so let’s find and make a copy of the existing template used.  Mine was located here:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\Web\1033&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;…and was titled &lt;strong&gt;EmptyMvcWebApplicationProjectTemplatev2.0.cs.zip&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Copy the template and paste it into: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;My Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Unzip the package to a directory of the same name as the ZIP, then delete the ZIP file.  I also renamed my extracted folder to EmptyMvcRefresh.&lt;/p&gt;  &lt;h4&gt;Make Some Changes&lt;/h4&gt;  &lt;p&gt;Next, go grab the latest version of jQuery.  You can include any other custom scripts and frameworks that you want at this point.  jQuery 1.4.2 is current at the time of this post, but there is no VSDOC for it yet.&lt;/p&gt;  &lt;p&gt;Navigate into the scripts directory in the extracted files and paste in the updated jQuery source.  I also grabbed the minified version (which I use in production) and deleted the 1.4.1 files.&lt;/p&gt;  &lt;p&gt;Next, we need to hand-edit the project file.  Open up EmptyMvcApplication.csproj and find the jQuery references and update them accordingly:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;Content Include="Scripts\jquery-1.4.2.js" /&amp;gt;   &lt;br /&gt;&amp;lt;Content Include="Scripts\jquery-1.4.2.min.js" /&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Do the same sort of thing in the EmptyMvcWebApplicationProjectTemplate.cs.vstemplate file, also in the root of the extracted directory:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;ProjectItem ReplaceParameters="true" TargetFileName="jquery-1.4.2.js"&amp;gt;jquery-1.4.2.js&amp;lt;/ProjectItem&amp;gt;   &lt;br /&gt;&amp;lt;ProjectItem ReplaceParameters="true" TargetFileName="jquery-1.4.2.min.js"&amp;gt;jquery-1.4.2.min.js&amp;lt;/ProjectItem&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We also have a bit of housekeeping to do in the vstemplate file.  Here is what my updated TemplateData section looks like:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;TemplateData&amp;gt;   &lt;br /&gt; &amp;lt;Name&amp;gt;Empty MVC 2 Refresh&amp;lt;/Name&amp;gt;    &lt;br /&gt; &amp;lt;Description&amp;gt;Updated with the latest jQuery&amp;lt;/Description&amp;gt;    &lt;br /&gt; &amp;lt;ProjectType&amp;gt;CSharp&amp;lt;/ProjectType&amp;gt;    &lt;br /&gt; &amp;lt;ProjectSubType&amp;gt;Web&amp;lt;/ProjectSubType&amp;gt;    &lt;br /&gt; &amp;lt;SortOrder&amp;gt;51&amp;lt;/SortOrder&amp;gt;    &lt;br /&gt; &amp;lt;CreateNewFolder&amp;gt;true&amp;lt;/CreateNewFolder&amp;gt;    &lt;br /&gt; &amp;lt;DefaultName&amp;gt;MvcApplication&amp;lt;/DefaultName&amp;gt;    &lt;br /&gt; &amp;lt;ProvideDefaultName&amp;gt;true&amp;lt;/ProvideDefaultName&amp;gt;    &lt;br /&gt; &amp;lt;LocationField&amp;gt;Enabled&amp;lt;/LocationField&amp;gt;    &lt;br /&gt;&amp;lt;PromptForSaveOnCreation&amp;gt;true&amp;lt;/PromptForSaveOnCreation&amp;gt;    &lt;br /&gt;&amp;lt;EnableLocationBrowseButton&amp;gt;true&amp;lt;/EnableLocationBrowseButton&amp;gt;    &lt;br /&gt; &amp;lt;RequiredFrameworkVersion&amp;gt;3.5&amp;lt;/RequiredFrameworkVersion&amp;gt;    &lt;br /&gt;&amp;lt;/TemplateData&amp;gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;h4&gt;What did we just do?&lt;/h4&gt;  &lt;p&gt;The vstemplate template is responsible for ensuring the correct files get copied into the new project when it is created.  We update that file to get the correct scripts into the project.  We also changed the title and description and removed the references to the MS-proper name and description so that our project would properly display.&lt;/p&gt;  &lt;p&gt;The project file is what we see as an item in the solution that is created when we use our template to create a new MVC application. We need it to point to files that will properly exist for them to be available in the IDE.&lt;/p&gt;  &lt;h4&gt;Final Step: Compression&lt;/h4&gt;  &lt;p&gt;All that’s left to do is add all the files to a zip folder (right-click –&amp;gt; send to –&amp;gt; Compressed Folder).  Make sure you compress the &lt;em&gt;files&lt;/em&gt; and not the &lt;em&gt;directory&lt;/em&gt; as the files need to be in the root of the compressed folder for Visual Studio to pick them up.  &lt;/p&gt;  &lt;p&gt;You can leave the uncompressed folder around to make changes more easily in the future (like, when the next version of jQuery is released).&lt;/p&gt;  &lt;p&gt;Make sure you shut down any copies of Visual Studio 2010 and when you re-open them the updated template will be available for you to select:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/UpdatetheASP.NETMVC2TemplateforjQuery1.2_C4B1/image.png" width="421" height="111" /&gt; &lt;/p&gt;  &lt;p&gt;And the updated scripts will be present in your project:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/UpdatetheASP.NETMVC2TemplateforjQuery1.2_C4B1/image_3.png" width="280" height="219" /&gt; &lt;/p&gt;  &lt;p&gt;Though we don’t have an updated VSDOC file (yet) for 1.4.2 we can still use the 1.4.1 documentation file and have full IntelliSense support for everything other than delegates.&lt;/p&gt;  &lt;h4&gt;To be Quick, or Not to be Quick?&lt;/h4&gt;  &lt;p&gt;While the IDE provides a great mechanism for updating the template from right &lt;em&gt;within the IDE&lt;/em&gt;, it is still possible to do the work by hand.&lt;/p&gt;  &lt;p&gt;I just can’t think of why you’d want to…and to be honest I don’t know that I would…but…it was a good exercise in learning a little more about project templates and how they can be customized!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-284970005732235760?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/284970005732235760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/update-aspnet-mvc-2-template-for-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/284970005732235760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/284970005732235760'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/update-aspnet-mvc-2-template-for-jquery.html' title='Update the ASP.NET MVC 2 Template for jQuery 1.4.2'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-4119137451084743540</id><published>2010-04-13T13:21:00.002-05:00</published><updated>2010-04-16T08:02:36.503-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><title type='text'>ASP.NET MVC2 Project Updates</title><content type='html'>&lt;p&gt;I just fired up a default, empty MVC2 project in Visual Studio 2010 and the following previous gripes of mine have been addressed:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The assemblies section of the web.config has the correct references for Abstractions and Routing. These were missing in the RC but present in Beta 2. The RTM is clean (and I notice that the web.config is cleaner, too).&lt;/li&gt;    &lt;li&gt;A newer version of jQuery is included in the default Scripts folder (1.4.1) along with the corresponding VSDOC file.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I don’t know if it’s just because I also cleaned out all the beta/RC/LCTP bits, but after this refresh the IDE seems a little more snappy. &lt;/p&gt;  &lt;p&gt;All in all, I’m glad Microsoft took the extra time to address optimization concerns.  We all had plenty of time to contribute any comments or suggestions and they have clearly listened.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-4119137451084743540?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/4119137451084743540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc2-project-updates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4119137451084743540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4119137451084743540'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc2-project-updates.html' title='ASP.NET MVC2 Project Updates'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8538284503539508936</id><published>2010-04-13T08:55:00.001-05:00</published><updated>2010-04-16T08:02:46.860-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><title type='text'>A Clean Transition</title><content type='html'>&lt;p&gt;With the downloads complete for the IDE and VSTS – and priorities not on development today – I have made the full switch to Visual Studio 2010.  Having been a part of public and private releases over the last several months I had a laundry list of components that I first uninstalled to make sure the transition was as clean as possible.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#408080;"&gt;Interesting note&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;: if I had started the download of the IDE alone yesterday with the modem speed I had when I started coding it would have taken 2.46 years to download the ISO for Visual Studio.  Yesterday it took 58 minutes…and I don’t even have the fastest of connections!&lt;/p&gt;    &lt;p&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Tear-down List&lt;/h3&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ACleanTransition_A028/image.png" width="268" height="213" /&gt; &lt;/p&gt;  &lt;p&gt;By following a set order we can reduce the number of steps needed as most installers take their baggage with them. If you start by removing random apps you’re bound to see more start/stops and reboots. &lt;/p&gt;  &lt;p&gt;Below is the list of software that I removed from the system prior to doing the new install (in the order that I removed them):&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Visual Studio 2010 Ultimate RC      &lt;ul&gt;       &lt;li&gt;This removed 28 components from the system including MVC 2 tooling, Sync Framework components and VC runtimes &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Microsoft .NET Framework 4 Extended      &lt;ul&gt;       &lt;li&gt;Required a reboot &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Microsoft .NET Framework 4 Client Profile &lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Required a reboot &lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Visual Studio 2010 Tools for SQL Server Compact 3.5 SP2 ENU&lt;/li&gt;    &lt;li&gt;WCF RIA Services Preview for Visual Studio 2010&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;This was part of another installer which was no longer on my computer. I had to download the MSI for this package &lt;a href="http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=c224fdb4-edd0-493a-af1f-474c54a69db8&amp;amp;displayLang=en" target="_blank"&gt;here&lt;/a&gt; for the uninstall to work.&lt;/li&gt;      &lt;li&gt;After re-downloading the MSI from Microsoft the uninstall still failed as it required the .NET Framework 4.  Oops!  &lt;strong&gt;Do this before you remove the Framework Client Profile!&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;At this point I was ready to install, but still needed to remove the WCF RIA services at the end of the process as it targeted the RC.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ACleanTransition_A028/image_3.png" width="212" height="169" /&gt; &lt;/p&gt;  &lt;h3&gt;Installation &lt;/h3&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I had downloaded the ISO and I use &lt;a href="http://www.slysoft.com/en/virtual-clonedrive.html" target="_blank"&gt;Virtual CloneDrive&lt;/a&gt;. Installation, even with huge software packages, goes very fast.  It is a much quicker process because you don’t have to constantly wait for the DVD drive to spin up/down when it starts/finishes loading a chunk of data to your computer.&lt;/p&gt;  &lt;p&gt;There were some changes (as expected) from the RC to the RTM as the installer dropped 32 new components onto the machine.&lt;/p&gt;  &lt;p&gt;I was not able to discern from the custom installation options as to whether or not the Visual Studio 2010 Command Prompt was included if you didn’t install VC++ (&lt;a href="http://theycallmemrjames.blogspot.com/2010/01/visual-studio-2010-command-prompt.html" target="_blank"&gt;see my previous post&lt;/a&gt;) so I elected to do the full installation of all languages.&lt;/p&gt;  &lt;p&gt;The entire install took approximately 19 minutes and completed without error.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8538284503539508936?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8538284503539508936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/clean-transition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8538284503539508936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8538284503539508936'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/clean-transition.html' title='A Clean Transition'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-6742024373371417271</id><published>2010-04-08T14:36:00.002-05:00</published><updated>2010-04-19T10:20:33.811-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Animation'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='Popup'/><title type='text'>Creating a Basic Pop-out Panel with ASP.NET MVC and jQuery</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color: #408080"&gt;At the time of this posting I am using VS2010 RC.&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/CreatingaBasicPopoutPane.NETMVCandjQuery_CD1D/image.png" width="220" height="131" /&gt;There is a simple effect that adds a little jump to your site without having to be too in-your-face about it: a pop-out panel.&lt;/p&gt;  &lt;p&gt;Pop-out panels allow you to hide information or parts of your UI that do not&lt;/p&gt;  &lt;p&gt;There are three things that I wanted to achieve:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Have an animation that ‘slides’ the panel out &lt;/li&gt;    &lt;li&gt;Have a tab that is always visible and positioned statically on the page. When hovered over it begins the animation effect on the content panel &lt;/li&gt;    &lt;li&gt;Allow the panel to grow with the content. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/CreatingaBasicPopoutPane.NETMVCandjQuery_CD1D/image_3.png" width="211" height="136" /&gt;I am building the pop-out panel with jQuery and will enrich it with ASP.NET MVC.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Side note&lt;/strong&gt;: For this demo I used solid, easily recognizable colored DIVs so that it was easy to make out where things were landing. Because they are simply DIVs, you can use whatever you like for the design.&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h4&gt;The HTML Layout&lt;/h4&gt;  &lt;p&gt;The template for this concept is quite simple:&lt;/p&gt;  &lt;pre class="code"&gt;    &lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;div&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;theFrame&amp;quot;&amp;gt;&lt;br /&gt;       &amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;div &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;theContent&amp;quot;&amp;gt; &lt;/span&gt;...&lt;br /&gt;       &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;div &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;theHandle&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In the above screenies, the frame DIV is used to wrap the elements, the handle is the teal bar on the left hand side, and the content is the grey box with the links that is displayed when the teal bar is hovered over.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Teal is all the rage.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The CSS Setup&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The styles are almost as easy as the HTML markup.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellspacing="5" cellpadding="0" width="650"&gt;&lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td valign="top" width="207"&gt;&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;pre class="code"&gt;&lt;span style="color: maroon"&gt;#theFrame&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;   &lt;span style="color: red"&gt;width&lt;/span&gt;:&lt;span style="color: blue"&gt;225px&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;position&lt;/span&gt;:&lt;span style="color: blue"&gt;fixed&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;left&lt;/span&gt;:&lt;span style="color: blue"&gt;-200px&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;top&lt;/span&gt;:&lt;span style="color: blue"&gt;150px&lt;/span&gt;;   &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" width="210"&gt;&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;pre class="code"&gt;&lt;span style="color: maroon"&gt;#theContent&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;   &lt;span style="color: red"&gt;width&lt;/span&gt;:&lt;span style="color: blue"&gt;180px&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;position&lt;/span&gt;:&lt;span style="color: blue"&gt;relative&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;left&lt;/span&gt;:&lt;span style="color: blue"&gt;0px&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;top&lt;/span&gt;:&lt;span style="color: blue"&gt;0px&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;padding&lt;/span&gt;: &lt;span style="color: blue"&gt;10px&lt;/span&gt;;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" width="211"&gt;&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;pre class="code"&gt;&lt;span style="color: maroon"&gt;#theHandle&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;   &lt;span style="color: red"&gt;width&lt;/span&gt;:&lt;span style="color: blue"&gt;35px&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;position&lt;/span&gt;:&lt;span style="color: blue"&gt;absolute&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;left&lt;/span&gt;: &lt;span style="color: blue"&gt;200px&lt;/span&gt;;&lt;br /&gt;   &lt;span style="color: red"&gt;top&lt;/span&gt;:&lt;span style="color: blue"&gt;0px&lt;/span&gt;;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here, we’re simply setting up the width and position of the pop-out box. Notice that the handle is not sized for height, but it will display as the full size height of the content box by the time we’re through with it. ;o)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;jQuery for Animating the pop-out&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I’m going to stick with my ‘simple’ theme here. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;script &lt;/span&gt;&lt;span style="color: red"&gt;language&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;javascript&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;   &lt;/span&gt;$(func&lt;span style="color: blue"&gt;tion () &lt;/span&gt;{&lt;br /&gt;       $(&amp;quot;#theHan&lt;span style="color: maroon"&gt;dle&amp;quot;).height&lt;/span&gt;($(&amp;quot;#theFra&lt;span style="color: maroon"&gt;me&amp;quot;).height&lt;/span&gt;());&lt;br /&gt;&lt;br /&gt;       $(&amp;quot;#theFrame&amp;quot;)&lt;span style="color: maroon"&gt;.mouseenter&lt;/span&gt;(function () &lt;span style="color: blue"&gt;{&lt;br /&gt;           &lt;/span&gt;$(&amp;quot;#theFrame&amp;quot;).sto&lt;span style="color: maroon"&gt;p(true, tru&lt;/span&gt;e);&lt;br /&gt;           $(&amp;quot;#theFrame&amp;quot;).animate&lt;span style="color: maroon"&gt;({ &amp;quot;left&amp;quot;: &lt;/span&gt;&amp;quot;0px&amp;quot; }, &amp;quot;fa&lt;span style="color: maroon"&gt;st&amp;quot;);&lt;br /&gt;       &lt;/span&gt;})&lt;span style="color: maroon"&gt;;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;$(&amp;quot;#theFrame&amp;quot;).mouseleave(func&lt;span style="color: maroon"&gt;tion () {&lt;br /&gt;           &lt;/span&gt;$&lt;span style="color: blue"&gt;(&amp;quot;#theFr&lt;/span&gt;ame&amp;quot;).stop(true, true);&lt;br /&gt;           $(&amp;quot;#th&lt;span style="color: blue"&gt;eFra&lt;/span&gt;me&lt;span style="color: blue"&gt;&amp;quot;).a&lt;/span&gt;nimate({ &amp;quot;left&amp;quot;: &amp;quot;-200&lt;span style="color: maroon"&gt;px&amp;quot; }, &amp;quot;fas&lt;/span&gt;t&amp;quot;);&lt;br /&gt;       &lt;span style="color: maroon"&gt;});&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   }&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;script&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;There are really only two parts to this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Setting the size of the handle to match the rendered height of the content area. &lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Creating the event handlers for the hover effect to create the animated fly-out (mouseenter and mouseleave). &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I’m using jQuery’s &lt;span style="font-family: courier new"&gt;.stop(&lt;span style="color: blue"&gt;true&lt;/span&gt;, &lt;span style="color: blue"&gt;true&lt;/span&gt;)&lt;/span&gt; here; the first &lt;span style="color: blue"&gt;&lt;span style="font-family: courier new"&gt;true&lt;/span&gt; &lt;/span&gt;tells jQuery to clear out the animation queue, the second tells it to skip to the last entry added to the animation queue and play it out. This prevents the anonying cyclic animation that starts to happen if a user flies the mouse over the handle 15 times quickly. Comment out the .stop() if you want to see what I’m taking about.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Adding ASP.NET MVC to the mix&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Finally, I’m going to get it integrated into the ASP.NET MVC view engine. The idea here is straightforward: if you want to have the list of items dynamically generated, or customized per-user or such, you’ll want this thing to be easily rendered and self-contained.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To do this, I simply extracted the code required to output the pop-out control, including the jQuery script, into a partial view.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The content can then easily be generated or pulled from a database. You can use models/repositories for this and pull from LINQ to SQL or use entity framework to retrieve the content.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now I have a simple way to inject the pop-out into a page:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="background: yellow"&gt;&amp;lt;%&lt;/span&gt; Html.RenderPartial(&lt;span style="color: #a31515"&gt;&amp;quot;PopoutFrame&amp;quot;&lt;/span&gt;, contentData); &lt;span style="background: yellow"&gt;%&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Did I say ‘finally’?&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Actually, I do have one last thing to try out, and this idea has given me a simple way to get into plugin development in jQuery.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;There are a couple of other features that I’d like to implement:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Covert this to a UL/LI setup &lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Create a plugin that accepts either a UL element or a DIV and some JSON data (provided by a function/get/post) &lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Use the new jQuery UI position() methods and allow the pop-out to come from anywhere on the page &lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Switch to a non-overflowing frame to hide the contents when the widget is not in pop-out mode &lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Allow the contents to be loaded via AJAX when the pop-out is invoked (but load the contents before starting the animation) &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This was fairly simple to implement but I hope it gives someone a start if they are trying to achieve a similar effect.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-6742024373371417271?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/6742024373371417271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/creating-basic-pop-out-panel-with.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/6742024373371417271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/6742024373371417271'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/creating-basic-pop-out-panel-with.html' title='Creating a Basic Pop-out Panel with ASP.NET MVC and jQuery'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8727772106354232471</id><published>2010-04-07T16:35:00.002-05:00</published><updated>2010-04-16T08:03:49.113-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery datepicker with no Textbox</title><content type='html'>&lt;p&gt;I just finished a simple page that uses jQuery.datepicker() to create a calendar dropdown to select a date. The datepicker widget normally uses either a DIV or an INPUT of type TEXT.  I was happy to discover this isn’t a requirement.&lt;/p&gt;  &lt;p&gt;I was building a replacement calendar for our CSRs who frequently have to jump between weeks, days, customers and work orders in order to add comments as customers call in.&lt;/p&gt;  &lt;p&gt;I wanted an in-line calendar selection and decided on the jQuery datepicker as the UI of choice.  As always, I’m using ASP.NET MVC as the backend and view engine.&lt;/p&gt;  &lt;p&gt;The code is at the end of this post with a sample of the widget in action without a visible input textbox.&lt;/p&gt;  &lt;h3&gt;From how it was to how it is&lt;/h3&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/jQuerydatepickerwithnoTextbox_E90D/image.png" width="143" height="293" /&gt; The old interface was written over 8 years ago and served its purpose when the company had only a couple of installers.  Now, with about 10 full-time staff working on installations and service calls, the user story has changed significantly. &lt;/p&gt;  &lt;p&gt;Because the old calendar rendered the entire month at a time it got quite cumbersome to use towards the end of the month when you had to scroll to the bottom.  This was especially true because each appointment for each installer was ‘stacked’ inside the day on the calendar.  &lt;/p&gt;  &lt;p&gt;Though the installers are color-coded to make it easier to find them, with ten guys in the mix it was still a chore to work out where someone was at any given time in the day…and we have a coverage area of nearly 130,000 sq Km.&lt;/p&gt;  &lt;p&gt;In the colorful image to the right, you’ll see just over one week’s view of the calendar.  I needed 2400px of vertical resolution to capture that image. Most users here have 1600x900 monitors, so you can imagine in the forth week of the month what it’s like.  Imagine trying to scroll to the bottom of the calendar when you’re at the end of the month as many as 80 times a day!&lt;/p&gt;  &lt;p&gt;Anyways, I decided to move to a day-based view, defaulting to today’s date, but with tabs to display the whole week.  I also elected to add in-line comments that tie into the legacy system (so users don’t have to navigate 5-7 clicks away to add comments).&lt;/p&gt;  &lt;p&gt;Here’s a shot of the new interface:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQuerydatepickerwithnoTextbox_E90D/image_3.png" width="420" height="220" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The appointments are now only rendered for the current day by default.  Clicking on the tabs allows you to navigate to other days (or the week summary) and &amp;lt;&amp;lt; &amp;gt;&amp;gt; navigation arrows allow moving between weeks.  I’m using jQuery tabs for the interface here.&lt;/p&gt;  &lt;p&gt;The calendar icon is clicked to display the datepicker.&lt;/p&gt;  &lt;h3&gt;The Code&lt;/h3&gt;  &lt;p&gt;It’s quite easy to make this all jive without the textbox.  Simply alter your input to be of type hidden (mine’s also rendered as a link in a tab):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/jQuerydatepickerwithnoTextbox_E90D/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQuerydatepickerwithnoTextbox_E90D/image_thumb.png" width="545" height="15" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Next, we setup the datepicker by using a jQuery selector for the hidden input:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/jQuerydatepickerwithnoTextbox_E90D/image_5.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQuerydatepickerwithnoTextbox_E90D/image_thumb_3.png" width="490" height="159" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;There are only a couple of interesting things here:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;showOn, buttonImage and buttonImageOnly are used inside the datepicker() call options to render the icon without also injecting a button control&lt;/li&gt;    &lt;li&gt;onClose is used to pass the result to a controller action (I’ve used GET for this sample to keep things simple)&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Positioning&lt;/h3&gt;  &lt;p&gt;The only thing I’m not happy with at this point is the positioning of the dropdown calendar, as its top-left corner starts from the top-left of the icon.&lt;/p&gt;  &lt;p&gt;I suspect that the new positioning support in jQuery UI 1.8 will help to straighten some of that out. For now I’ll live with it.&lt;/p&gt;  &lt;h3&gt;Final thoughts&lt;/h3&gt;  &lt;p&gt;All told it’s very simple to use the datepicker with the textbox. I’m finding more and more ways to simplify the UI with jQuery and ASP.NET MVC.&lt;/p&gt;  &lt;p&gt;It’s certainly more fun to develop software when you feel like you’re running instead of crawling.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8727772106354232471?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8727772106354232471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/jquery-datepicker-with-no-textbox.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8727772106354232471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8727772106354232471'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/jquery-datepicker-with-no-textbox.html' title='jQuery datepicker with no Textbox'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-9203306363522421444</id><published>2010-04-05T09:30:00.002-05:00</published><updated>2010-04-16T08:04:22.545-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><title type='text'>ASP.NET MVC Controller Actions with Null Values and Missing Model Bindings</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="color:#808080;"&gt;&lt;em&gt;I am using VS2010 RC at the time of this post.&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I ran into a small issue with model binding in ASP.NET MVC. In my controller I had written an Add method for a custom type (one of &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCControllerActionswithNullValue_8588/image.png" width="254" height="161" /&gt;the types in my model).  My view had a form on it with all the appropriate fields, named and ID’d correctly.&lt;/p&gt;  &lt;p&gt; The problem was that my model values, after the method was invoked, was always null.&lt;/p&gt;  &lt;p&gt;To fast-forward a bit here, the reason seems to be that my parameter name was the same as a property on the type, which confused the MVC binding for some reason.  This post is an expanded example of how I got into the nullifying state.&lt;/p&gt;  &lt;h3&gt;A Simple Example&lt;/h3&gt;  &lt;p&gt;Basically, I had a simple object in my models that I wanted the user to be able to add. It only had a few properties.  Here’s an example of what it might look like:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ASP.NETMVCControllerActionswithNullValue_8588/image_3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCControllerActionswithNullValue_8588/image_thumb.png" width="332" height="124" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;It’s fairly straightforward.  My form looked similar to the following:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCControllerActionswithNullValue_8588/image_4.png" width="420" height="162" /&gt; &lt;/p&gt;  &lt;p&gt;…with all the fields in the model accounted for.  I have used this multiple times in the past and wasn’t expecting any kind of complication.&lt;/p&gt;  &lt;p&gt;My controller action accepted the type as a parameter (in this case it would be RecipeIngredient) and tried to persist the object; however, the parameter was always Null.&lt;/p&gt;  &lt;p&gt;Again, the ASP.NET MVC engine, though routing correctly, seemed to run into trouble when trying to bind the model.  Though all form values were submitted (Request.Form[“RecipeId”] and others had values), the parameter was never populated with the form values.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCControllerActionswithNullValue_8588/image_5.png" width="420" height="130" /&gt; &lt;/p&gt;  &lt;p&gt;Notice that the parameter is named “ingredient” and that Ingredient is a property in my RecipeIngredient class.  This is what cause the problem.&lt;/p&gt;  &lt;h3&gt;Now, Watch This&lt;/h3&gt;  &lt;p&gt;The fix for this was too simple: just rename the parameter on the controller action.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCControllerActionswithNullValue_8588/image_6.png" width="420" height="136" /&gt; &lt;/p&gt;  &lt;p&gt;All of a sudden, the model lights up.&lt;/p&gt;  &lt;p&gt;It took me a good 30 minutes to figure this out, so I hope it helps someone.  I had actually found a post where someone with a similar scenario believed it to be a problem with the using() syntax or the Ajax.BeginForm (which is what I was using), so I was chasing a red herring for a while.&lt;/p&gt;  &lt;p&gt;So, for me more than anyone, just remember: your model will not be properly bound in ASP.NET MVC controller actions if your parameter name is also a property in your model.  The correct action will be invoked, but you will always get Null.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-9203306363522421444?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/9203306363522421444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-controller-actions-with-null.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/9203306363522421444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/9203306363522421444'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/aspnet-mvc-controller-actions-with-null.html' title='ASP.NET MVC Controller Actions with Null Values and Missing Model Bindings'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3789713515896752585</id><published>2010-04-01T13:54:00.002-05:00</published><updated>2010-04-16T08:04:34.429-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='April Fool&apos;s'/><title type='text'>Unicorns and Rainbows – StackOverflow April Fool’s Joke</title><content type='html'>&lt;p&gt; &lt;/p&gt;  &lt;p&gt;Not bad, guys, not bad. &lt;/p&gt;  &lt;p&gt;I was taken aback a little today when I logged into StackOverflow and started surfing around.  I asked a question and noticed my profile image had changed. &lt;/p&gt;  &lt;p&gt;To a unicorn with rainbows.&lt;/p&gt;  &lt;p&gt;I ended up going on a bit of a hunt as I wanted to correct the image as quickly as possible.  I’m not really into rainbows and especially not unicorns.  &lt;/p&gt;  &lt;p&gt;I went to Gravatar and couldn’t remember my log in.  A password reset later, and, sure enough, my existing profile image was there.&lt;/p&gt;  &lt;p&gt;I headed back to StackOverflow and, remembering the date, started clicking on profiles.  Nice.  &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/UnicornsandRainbowsStackOverflowAprilFoo_C362/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/UnicornsandRainbowsStackOverflowAprilFoo_C362/image_thumb.png" width="128" height="127" /&gt;&lt;/a&gt; &lt;a href="http://www.bandofgeeks.net/blogimages/UnicornsandRainbowsStackOverflowAprilFoo_C362/image_3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/UnicornsandRainbowsStackOverflowAprilFoo_C362/image_thumb_3.png" width="124" height="119" /&gt;&lt;/a&gt; &lt;a href="http://www.bandofgeeks.net/blogimages/UnicornsandRainbowsStackOverflowAprilFoo_C362/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/UnicornsandRainbowsStackOverflowAprilFoo_C362/image_thumb_4.png" width="122" height="125" /&gt;&lt;/a&gt; &lt;a href="http://www.bandofgeeks.net/blogimages/UnicornsandRainbowsStackOverflowAprilFoo_C362/image_5.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/UnicornsandRainbowsStackOverflowAprilFoo_C362/image_thumb_5.png" width="130" height="128" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I &lt;em&gt;totally&lt;/em&gt; fell for the prank.  I actually thought there was some kind of copyright thing or something because I look so much like Brad Pitt and maybe they thought I was using one of his profile pictures…&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3789713515896752585?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3789713515896752585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/unicorns-and-rainbows-stackoverflow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3789713515896752585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3789713515896752585'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/04/unicorns-and-rainbows-stackoverflow.html' title='Unicorns and Rainbows – StackOverflow April Fool’s Joke'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-5083887219078806612</id><published>2010-03-31T15:19:00.002-05:00</published><updated>2010-04-16T08:05:01.355-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Autocomplete'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery UI'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery AutoComplete with ASP.NET MVC</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#808080;"&gt;At the time of this post, I am using Visual Studio 2010 Ultimate RC1.&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I recently &lt;a title="ASP.NET MVC AutoComplete Textbox" href="http://theycallmemrjames.blogspot.com/2010/03/aspnet-mvc-autocomplete-textbox.html" target="_blank"&gt;posted an entry&lt;/a&gt; on using a common jQuery plugin that added auto-complete functionality to a textbox.  The jQuery UI team has just added a component to the library that provided a more streamlined implementation, closer to the feel of other components and with similar syntax for initiation, events and methods.&lt;/p&gt;  &lt;p&gt;The widget actually appears to be authored by the same programmer, only with a much stricter focus on adhering to the jQuery style. &lt;/p&gt;  &lt;p&gt;This is a great move and the component has really upped the ante for this release as it’s moved to the core jQuery UI library.&lt;/p&gt;  &lt;p&gt;Scroll to near the end to get a point-form walk through. The very end of my post includes a project download.&lt;/p&gt;  &lt;h3&gt;Revamp or Rewrite?&lt;/h3&gt;  &lt;p&gt;There will be a few people who are locked into a particular build of a component, who inherit some code or are otherwise just interested in an older version for whatever reason.  There are also some important changes to get the new autocomplete to work, as well as some things we no longer need to do.  Some of those tricks may be relevant to other plugins, so I’m leaving my original post intact. &lt;/p&gt;  &lt;p&gt;My last post was also just a list of things you’d need to do differently from a separate walk-through, so I’m taking this opportunity to write a complete run.&lt;/p&gt;  &lt;h3&gt;Prerequisites&lt;/h3&gt;  &lt;p&gt;If you want to follow along with this post you’ll need the following goodies:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Visual Studio 2010 &lt;/li&gt;    &lt;li&gt;The &lt;a href="http://jqueryui.com/download" target="_blank"&gt;jQuery UI library&lt;/a&gt; downloaded with the jQuery library (and any theme you like) rolled in &lt;/li&gt;    &lt;li&gt;I usually also &lt;a href="http://docs.jquery.com/Downloading_jQuery" target="_blank"&gt;grab the latest VSDOC&lt;/a&gt; file so that I get intellisense in the IDE. &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Basic Setup Tasks&lt;/h3&gt;  &lt;p&gt;Finally. Some meat!  We’re going to do the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create an ASP.NET MVC project &lt;/li&gt;    &lt;li&gt;Configure the project (overcome a minor template bug) &lt;/li&gt;    &lt;li&gt;Add the JS and theme files to the project &lt;/li&gt;    &lt;li&gt;Create a master page and setup the includes needed &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Okay, let’s go.  Crack open Visual Studio and navigate to the new project dialog.  To filter the list of project types down, select ‘Web’ and then click on ASP.NET MVC 2 Empty Web Application.&lt;/p&gt;  &lt;p&gt;Because of &lt;a href="http://theycallmemrjames.blogspot.com/2010/02/routing-and-abstractions-assembly.html" target="_blank"&gt;an omission in the template&lt;/a&gt; for this project type you’ll need to add two lines in the web.config yourself.  This is the web.config located in the root of the project.  Make sure your assemblies section contains the lines &lt;a href="http://theycallmemrjames.blogspot.com/2010/02/routing-and-abstractions-assembly.html" target="_blank"&gt;located here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Next, we need to get jQuery up to speed (the autocomplete widget requires a newer library), and make our site aware of it.  In the Solution Explorer, open up the scripts folder and delete the three 1.3.2 files for jQuery.  &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image.png" width="420" height="190" /&gt; &lt;/p&gt;  &lt;p&gt;Drill into your jQuery UI theme download and get the files from the JS directory.  Add those to the script folder in your project. Add the VSDOC file as well, if you’re using it.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_3.png" width="234" height="149" /&gt;We also have to get the theme implemented (if you are so inclinded). Right-click on your project and add a new folder called Content.  Copy the themes directory from your jQuery download and paste it in the Content folder your just created.&lt;/p&gt;  &lt;p&gt;Now we’ll get our project started by adding a master page to the mix.  On your Views –&amp;gt; Shared project folder, right-click and add a new item.  Select MVC 2 View Master Page from the list and call it Site.Master because all the cool cats do.  In the head tag of the page add the scripts we need to light up the plugin.&lt;/p&gt;  &lt;p&gt; &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_4.png" width="545" height="100" /&gt; &lt;/p&gt;  &lt;p&gt;If you’re using a theme, you’ll also want to include the required style sheets to make everything appear correctly as I have above.  You can easily add the above references by dragging them from Solution Explorer to your head section.&lt;/p&gt;  &lt;h3&gt;A Simple Start&lt;/h3&gt;  &lt;p&gt;Let’s test at this point to make sure we’re setup correctly.  In this section we’re going to do the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Add a Home controller &lt;/li&gt;    &lt;li&gt;Add a default view (Index) to the project &lt;/li&gt;    &lt;li&gt;Create a div that will be styled to reflect a properly configured style sheet &lt;/li&gt;    &lt;li&gt;Add a small block of code to ensure jQuery is rigged up correctly &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Right-click on the Controllers project folder and select Add –&amp;gt; Controller.  I’ve used HomeController as the name as it’s the convention used by most.  &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_5.png" width="300" height="293" /&gt; A very simple class is created for you that represents the first controller.  At this point, right-click on the method name “Index” and select “Add View…” from the context menu.  The default options work for me (Index as the name, not a partial view, not strongly typed, use the master page I just created).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Side note&lt;/strong&gt;: because the default route is set up for us in Global.asax, our Home controller with the Index action method will be used for requests to the default document on our site.  &lt;/p&gt;  &lt;p&gt;To make sure our site is rigged with jQuery and the proper styling, add the following markup to the page:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-family:Lucida Console;font-size:78%;"&gt;&amp;lt;div id="test-panel" class="ui-state-default"&amp;gt;       &lt;br /&gt;     &lt;/span&gt;&lt;span style="font-family:Lucida Console;font-size:78%;"&gt;This panel will disappear on command.&amp;lt;/div&amp;gt; &lt;/span&gt;&lt;/p&gt;    &lt;p&gt;&lt;span style="font-family:Lucida Console;font-size:78%;"&gt;&amp;lt;script type="text/javascript" language="javascript"&amp;gt;       &lt;br /&gt;    $(function () {        &lt;br /&gt;        $('#test-panel').click(function(){        &lt;br /&gt;            $(this).slideUp();        &lt;br /&gt;        });        &lt;br /&gt;    });        &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We should be good to go for our test!  Run the app (F5).  You may be prompted to modify the web config…do that and watch the page come up.  Clicking on the div shows that jQuery is lit up and we’re good to go.  Your page should look similar to this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_6.png" width="420" height="93" /&gt; &lt;/p&gt;  &lt;p&gt;If clicking the panel doesn’t make it slide up or you do not have the shading on the div you should go back and make sure you’ve not missed any steps.&lt;/p&gt;  &lt;h3&gt;Lighting up Autocomplete&lt;/h3&gt;  &lt;p&gt;I want to demonstrate the basic functionality of the widget, but I also want to ensure that we’re following some of the practices commonly used in MVC projects.  Here’s where we’re going to start:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Clean up our index view &lt;/li&gt;    &lt;li&gt;Add a textbox to the view &lt;/li&gt;    &lt;li&gt;Add a model class and a corresponding repository that returns a fake set of data &lt;/li&gt;    &lt;li&gt;Create a PartialViewResult method that can be used to retrieve the data &lt;/li&gt;    &lt;li&gt;Add the script needed to call our controller’s action and populate the autocomplete box &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Start by quickly removing any of the test code we created, but leave the script block in place as we can reuse that.  All that should remain inside your content placeholder is the page title and said block.  Add an input with an ID of “name-list” to the page and you should be setup like so:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_7.png" width="412" height="173" /&gt; &lt;/p&gt;  &lt;p&gt;In your Solution Explorer, right-click on Models and add an new class called Person.  Add two properties, an int for the PersonId and a string for FullName.  This class took about 4 seconds to write as I used the prop code snippet (type “prop” then tab-tab). It’s not a terribly complicated class to begin with, but it’s a great shortcut!&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_8.png" width="329" height="105" /&gt; &lt;/p&gt;  &lt;p&gt;Add another class to the Model folder called PersonRepository.  Create an internal method in it of type List&amp;lt;Person&amp;gt; called FindPeople.  The method should accept a string for the search text and an int for the max number of rows to return.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_9.png" width="420" height="230" /&gt; &lt;/p&gt;  &lt;p&gt;This is just a simple method with a LINQ query to filter the list. We also cap the number of results with the Take() method.&lt;/p&gt;  &lt;p&gt;I have omitted some code above; what I have there is a whole bunch of random names added to the names list.  The code is in the project download and I got the random names from &lt;a href="http://www.opensourcecf.com/1/2009/05/10000-Random-Names-Database.cfm" target="_blank"&gt;this site&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;With our model and repository in place, we’ll next create the method to be called by the autocomplete plugin to get our list of results.  &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Side note:&lt;/strong&gt; We have to be aware that binding will occur to the parameters of the post automatically for us and that reflection is used to map the variables.  This is case sensitive and, at the current time, there is no tooling support to make sure we get this right.  Your request will just fail in transit and you won’t see anything in the browser.  If you’re experiencing this, I highly recommend downloaded FireFox and FireBug to capture and view the requests/responses at play.&lt;/p&gt;  &lt;p&gt;I find the following interesting points to mention of the following code:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;We are using an HttpPost to help prevent scripting attacks or data exposure from direct JSON queries &lt;/li&gt;    &lt;li&gt;We use a JsonResult as the return type on the method &lt;/li&gt;    &lt;li&gt;Json() is used to convert our List&amp;lt;Person&amp;gt; – the response type from the repository’s FindPeople method – to the proper JSON notation &lt;/li&gt;    &lt;li&gt;The default behaviour of Json() does not allow GET (but you can override this if required) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_10.png" width="459" height="150" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;And finally, we’re going to write a short burst of JavaScript to complete the mix.  At this point we’re only specifying the source but here are some observations:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;We use a function as the ‘source’ property to post data to our controller action &lt;/li&gt;    &lt;li&gt;The function uses an ajax call with the path to the action &lt;/li&gt;    &lt;li&gt;We specify that we’re using POST and that the data is formatted as JSON data &lt;/li&gt;    &lt;li&gt;We define a success method to map the data of the response back to an item array of our format      &lt;ul&gt;       &lt;li&gt;label and value properties are used by plugin &lt;/li&gt;        &lt;li&gt;we can store additional data in the result (for example, the id) for later use &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The contents of the script block should be as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_11.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_thumb.png" width="547" height="251" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;That’s it?&lt;/h3&gt;  &lt;p&gt;Yeup. That’s it.  Press F5 to run the application and you’ll be able to start auto-completing some things that you type.  &lt;/p&gt;  &lt;p&gt;Here’s an overview of the steps required, without the bits for the setup testing:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create the VS2010 ASP.NET MVC 2 empty project &lt;/li&gt;    &lt;li&gt;Correct web.config’s assembly references &lt;/li&gt;    &lt;li&gt;Add the appropriate jQuery and jQuery UI libraries to the project &lt;/li&gt;    &lt;li&gt;Create a master page and add the script and CSS references &lt;/li&gt;    &lt;li&gt;Create a Home controller with an Index action &lt;/li&gt;    &lt;li&gt;Implement a repository that accepts search criteria and returns model data &lt;/li&gt;    &lt;li&gt;Write a JsonResult method with an HttpPost attribute which accepts search parameters and calls the repository &lt;/li&gt;    &lt;li&gt;Use jQuery to rig-up a text input with the call to the controller action &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;But what if you want to do something interesting with the result of the user’s selection?&lt;/p&gt;  &lt;p&gt;Good question, and it’s what got me started on this whole thing.&lt;/p&gt;  &lt;h3&gt;The Fun Bits&lt;/h3&gt;  &lt;p&gt;If you are working with a data-driven site (and likely you are, if you’re in any modern web programming environment) you know that IDs are king.&lt;/p&gt;  &lt;p&gt;Luckily we are able to store as complex an object as required in the JSON result.  The PersonId from my Person model was stored in the UI element, just as was the display name.&lt;/p&gt;  &lt;p&gt;Here is the success function extracted to show the ID getting stored:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_12.png" width="499" height="99" /&gt; &lt;/p&gt;  &lt;p&gt;So, how do we get it out?  Autocomplete actually keeps track of the array for us and allows us to access the selected item when the select event fires.  We define a function for this event and pass it in as one of the options for Autocomplete with a couple of parameters.  We can then access any properties we attached to the array when we parsed it above:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/jQueryAutoCompletewithASP.NETMVC_A262/image_13.png" width="506" height="82" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Now, simply access the ui.item object and any of the properties you setup in the success parser will be available.  You can do much more interesting things than just alert(), obviously, but this demonstrates how easy it is to use the plugin with dynamic data where IDs are required.&lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;The addition of Autocomplete as a widget to jQuery UI is a welcome and surprisingly mature component.  You will find that with a few setup points and relatively painless coding you will be able to add AJAX-enabled autocomplete functionality to a textbox. It’s also clear that ASP.NET MVC is well suited to integrate with this type of behaviour.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://bandofgeeks.net/blogimages/code/autocomplete.zip" target="_blank"&gt;Download the project file here&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-5083887219078806612?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/5083887219078806612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/jquery-autocomplete-with-aspnet-mvc.html#comment-form' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5083887219078806612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/5083887219078806612'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/jquery-autocomplete-with-aspnet-mvc.html' title='jQuery AutoComplete with ASP.NET MVC'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-7970396659192215556</id><published>2010-03-23T11:56:00.002-05:00</published><updated>2010-04-16T08:05:40.761-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7 SDK'/><title type='text'>Windows Phone 7 Series Development – Allowing the User to Choose a Photo</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#808080;"&gt;I am using the WP7 SDK from March 2010 at the time of this post.&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’ve been working on the SDK the last few days and am really enjoying it. I’ve hit a few roadblock in the ‘tasks’ department and am hoping to find a workable solution soon.&lt;/p&gt;  &lt;p&gt;At this time, it does not appear that the emulator is ready for some types of application development and testing, specifically related to work in the Microsoft.Phone.Tasks namespace.&lt;/p&gt;  &lt;h3&gt;A little fun, first&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/WindowsPhone7SeriesDevelopmentAllowingth_A7AA/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/WindowsPhone7SeriesDevelopmentAllowingth_A7AA/image_thumb.png" width="160" height="293" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I think it would be hilarious if everyone downloaded the emulator for Windows Phone 7 Series and started hitting Apple’s site from IE.  &lt;/p&gt;  &lt;p&gt;I don’t think they’d care, but it would still be funny.&lt;/p&gt;  &lt;h3&gt;MSDN Struggles&lt;/h3&gt;  &lt;p&gt;So, we have a few things to work from if we want to get the user to pick a photo.  Say you’ve got an application that would allow them to send a photo to a friend or upload it to a service on the cloud.&lt;/p&gt;  &lt;p&gt;The first thing they’ll need to do, obviously, is to pick the photo they want to work with.  This actually looks like a trivial task.&lt;/p&gt;  &lt;p&gt;In the Microsoft.Phone.Tasks namespace we have a series of helpers that give the user a consistent “Windows Phone” look and feel from within our applications.  Here are some examples:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;BingMapsTask&lt;/li&gt;    &lt;li&gt;CameraCaptureTask&lt;/li&gt;    &lt;li&gt;EmailAddressChooserTask&lt;/li&gt;    &lt;li&gt;EmailComposeTask&lt;/li&gt;    &lt;li&gt;PhoneCallTask&lt;/li&gt;    &lt;li&gt;PhoneNumberChooserTask&lt;/li&gt;    &lt;li&gt;PhotoChooserTask&lt;/li&gt;    &lt;li&gt;SaveEmailAddressTask&lt;/li&gt;    &lt;li&gt;SavePhoneNumberAddressTask&lt;/li&gt;    &lt;li&gt;SearchTask&lt;/li&gt;    &lt;li&gt;SMSComposeTask&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We’re going to be able to offer a deep level of integration with the phone experience.  Unfortunately, we’re working in a bit of a void right now.  &lt;/p&gt;  &lt;p&gt;The documentation suggests that, when executed, these tasks will return there results on the Page’s OnChooserReturn event.  The signature is simply:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnChooserReturn(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; sender, &lt;span style="color:#808080;"&gt;EventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The single entry point concept here (all task results will come in on the same event handler) suggests that we’re going to want to use the Rx (Reactive) framework to sort out the details.&lt;/p&gt;  &lt;p&gt;But how do we get at our result?&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/WindowsPhone7SeriesDevelopmentAllowingth_A7AA/image_3.png" width="225" height="218" /&gt;MSDN lists a ChooserEventArgs object that gives us access to the result. This is a generic class, with the task-specific result type defining the result.  But how do we pull it?&lt;/p&gt;  &lt;p&gt;There are no examples at this point, so I can only assume we’re going to cast it from the EventArgs we get in OnChooserReturn.  We’ll use reflection to test (likely, this is where we’ll put Rx to work) then handle the result as appropriate.&lt;/p&gt;  &lt;p&gt;As you can see from the emulator screen shot, I can’t go any further to test, explore or prove this as cannot execute the Tasks listed above with the current tools.  Instead, we are presented with the following COMException:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The drive cannot locate a specific area or track on the disk.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The PhotoResult class (returned from the CameraCaptureTask and the PhotoChooserTask) will be the type I funnel in on when this functionality is lit up.&lt;/p&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h3&gt;The Good and the Bad&lt;/h3&gt;  &lt;p&gt;I’m loving this direction.  The Rx Framework is all about applications that live and respond to an environment and doing that asynchronously.  Funnelling the results of environment actions by the user through a single event on a page allow us to behave that way as well.&lt;/p&gt;  &lt;p&gt;Because we get access to the resultant object by overriding the event handler on the page, we will be able to have each page in our application respond differently – in context – when the event fires.  I think this is a fairly clean approach and hopefully encourage developers to design specific contexts for their applications.&lt;/p&gt;  &lt;p&gt;There are two negatives from my perspective right now:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Lack of code samples&lt;/strong&gt; – this one will work itself out.  As the community jumps on board we’ll see the samples popping up. I hope I can contribute in this area, too.  MSDN will also move towards a more complete state if Microsoft follows through on their commitment to developers in this space.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Lack of emulator support&lt;/strong&gt; – this will be a big pile of suck if it doesn’t get implemented.  I’m hopeful that there will be an integrated photo store, or a way to push photos to the device in such a way that the emulator sees them as user photos.  Also, emulated camera support would be great: let me specify a directory on the computer with photos in it, then choose a random one to return when I ‘take’ a photo in the emulator.&lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;Early Goods&lt;/h3&gt;  &lt;p&gt;As is always the case when you get in early, the bits are tasty but not filling.&lt;/p&gt;  &lt;p&gt;I highly encourage developers to get in on the scene here and push around the SDK. &lt;/p&gt;  &lt;p&gt;And PLEASE, if you find out how to get the tasks working in the short term (in the emulator) let me know!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-7970396659192215556?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/7970396659192215556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/windows-phone-7-series-development.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7970396659192215556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7970396659192215556'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/windows-phone-7-series-development.html' title='Windows Phone 7 Series Development – Allowing the User to Choose a Photo'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8185249696233928945</id><published>2010-03-19T10:06:00.001-05:00</published><updated>2010-03-31T15:24:47.007-05:00</updated><title type='text'>ASP.NET MVC AutoComplete Textbox with jQuery</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#808080"&gt;At the time of this post I am using Visual Studio 2010 RC.&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Please see an &lt;a href="http://theycallmemrjames.blogspot.com/2010/03/jquery-autocomplete-with-aspnet-mvc.html" target="_blank"&gt;updated post&lt;/a&gt; with a complete walkthrough that demonstrates the new jQuery UI Autocomplete released with jQuery UI 1.8+.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ASP.NETMVCAutoCompleteTextbox_8DE1/image.png" width="344" height="194" /&gt; I am writing an interface to help select communities that are in range of one of our broadcast towers.&amp;#160; The project is written in c# in Visual Studio 2010 and targeting the ASP.NET MVC framework.&amp;#160; I am using jQuery as an aid to this task.&lt;/p&gt;  &lt;p&gt;Users have hundreds of communities to choose from. They are pre-loaded into the database, as are the towers.&amp;#160; They have a list of towers in a spreadsheet and each tower has a list of communities that are in range.&lt;/p&gt;  &lt;p&gt;A checkbox or multiselect component would be too cumbersome and most of us could type faster, anyway.&amp;#160; The desired interface is an AutoComplete textbox that allows a user to enter a few keystrokes and quickly add communities to a tower.&lt;/p&gt;  &lt;h3&gt;Starting Point?&lt;/h3&gt;  &lt;p&gt;There are many examples out there that mash together various controls or frameworks, so this certainly isn’t clear. But the seemingly most-referenced project is &lt;a href="http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/" target="_blank"&gt;Jorn Zaefferer’s jQuery Autocomplete plugin&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;It hasn’t been touched in a couple of years and the documentation is a little rough, but the blog-o-sphere comes to the rescue here: &lt;a href="http://blogs.msdn.com/joecar/archive/2009/01/08/autocomplete-with-asp-net-mvc-and-jquery.aspx" target="_blank"&gt;Joe Cartano’s MVC Diaries&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Joe wrote an intro to this plugin using ASP.NET MVC, which is almost exactly what I needed.&amp;#160; Unfortunately, his post was from over a year ago and didn’t quite work.&amp;#160; Luckily, there is very little to do to bring it up to speed.&lt;/p&gt;  &lt;h3&gt;The Refresh&lt;/h3&gt;  &lt;p&gt;If you want to skip the verbiage, &lt;a href="http://www.bandofgeeks.net/blogimages/code/spike.autocomplete.zip" target="_blank"&gt;download the VS2010 project file here&lt;/a&gt;.&amp;#160; It is an empty MVC project with only the parts required to get it running.&lt;/p&gt;  &lt;p&gt;Here’s a summary of the changes that I made to Joe’s walk-through:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Updated jQuery to 1.3.2 &lt;/li&gt;    &lt;li&gt;Changed the delay to 400ms &lt;/li&gt;    &lt;li&gt;Changed the controller action to a JsonResult &lt;/li&gt;    &lt;li&gt;Added search capability to the action &lt;/li&gt;    &lt;li&gt;Modified the call to be a POST      &lt;ul&gt;       &lt;li&gt;The current release of MVC, by default, blocks GETs for Json results. Your choices are to switch to POST or use JsonRequestBehavior.AllowGet, otherwise you’ll get the following error: &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;li&gt;Because of switching to POST, I had to configure the AJAX calls for jQuery: $.ajaxSetup({ type: &amp;quot;POST&amp;quot; }); &lt;/li&gt;    &lt;li&gt;Added an ID to the row template so that I could retrieve it when selected (to support keys for database scenarios, like mine) &lt;/li&gt;    &lt;li&gt;Added a DIV on the page to display the selected ID in the result() method of the autocomplete. &lt;/li&gt;    &lt;li&gt;Removed the multi-tag support (don’t need it for my application) &lt;/li&gt;    &lt;li&gt;Implemented a fake repository so it would be trivial to move to a data scenario &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And there you have it. Again, you can &lt;a href="http://www.bandofgeeks.net/blogimages/code/spike.autocomplete.zip" target="_blank"&gt;download the VS2010 project file here&lt;/a&gt; if you would like to walk through this.&lt;/p&gt;  &lt;h5&gt;References:&lt;/h5&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://docs.jquery.com/Plugins/Autocomplete" target="_blank"&gt;jQuery Autocomplete&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/joecar/archive/2009/01/08/autocomplete-with-asp-net-mvc-and-jquery.aspx" target="_blank"&gt;MVC Diaries&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8185249696233928945?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8185249696233928945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/aspnet-mvc-autocomplete-textbox.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8185249696233928945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8185249696233928945'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/aspnet-mvc-autocomplete-textbox.html' title='ASP.NET MVC AutoComplete Textbox with jQuery'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-9220965619255357812</id><published>2010-03-19T08:07:00.002-05:00</published><updated>2010-04-16T08:05:56.670-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7 SDK'/><title type='text'>This is going to be a Great Ride</title><content type='html'>&lt;p&gt;Scott Guthrie has posted the “hello world” for building a Windows Phone 7 Series app using Visual Studio 2010 and Silverlight.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ThisisgoingtobeaGreatRide_71FF/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/ThisisgoingtobeaGreatRide_71FF/image_thumb.png" width="160" height="293" /&gt;&lt;/a&gt;About six months ago I did a pilot project on iPhone development and I must say it left me shaking my head.  The IDE was, well, non-existent compared the mature MS platform.&lt;/p&gt;  &lt;p&gt; Today, I wake to &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx" target="_blank"&gt;this blog post&lt;/a&gt; from Mr. Guthrie and I’m left shaking my head again: how will you be able to keep developers off of this platform?!&lt;/p&gt;  &lt;h3&gt;Simplicity and Complexity&lt;/h3&gt;  &lt;p&gt;If your mom passes away and a 15 year-old nephew says, ‘hey, it’s going to be okay,’ that’s simplicity &lt;em&gt;before&lt;/em&gt; complexity.  When it’s you’re great uncle, who’s lost his wife, his brother and outlived one of his children, that is simplicity &lt;em&gt;after&lt;/em&gt; complexity and it means something completely different.&lt;/p&gt;  &lt;p&gt;I think this is the story of development on smart phone platforms today.&lt;/p&gt;  &lt;p&gt;The Objective C platform feels like a 15 year pimply kid.  Microsoft’s message is quite different: “yeah, we get it.”  And it is going to mean all the world of difference in the development world.&lt;/p&gt;  &lt;p&gt;I can’t wait to get my hands on my upcoming Dell SX2210T to experience the full joys of this development story…&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-9220965619255357812?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/9220965619255357812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/this-is-going-to-be-great-ride.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/9220965619255357812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/9220965619255357812'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/this-is-going-to-be-great-ride.html' title='This is going to be a Great Ride'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-6060217529399508238</id><published>2010-03-17T15:17:00.001-05:00</published><updated>2010-03-17T15:17:14.368-05:00</updated><title type='text'>A Better Way to Shop for Apps</title><content type='html'>&lt;p&gt;&lt;em&gt;I am dual posting this to my blog and the WP7S Backstage, but expanding it here.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The more I think about it, I'm actually really liking the idea of a 3rd Party Hubs for Windows Phone.&amp;#160; I’m actually not sure if ‘Hub’ is the right term here, nor how you would organize it on the phone.&lt;/p&gt;  &lt;p&gt;Perhaps, these thoughts would best be thought of as an extension to the Marketplace Microsoft has planned.&lt;/p&gt;  &lt;p&gt;My take would be like this: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;A development company agrees to the terms and conditions (and periodic reviews) of the Microsoft policies for creating and distributing apps.&amp;#160; The company would be 'certified' by MS, but the certification could be revoked if the company isn't playing along.     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;That company gets it's own marketplace (or a view inside the marketplace).&amp;#160; It is the user's option to install it, not forced down every user's throat.&amp;#160; Perhaps, as part of the PC integration (or on the phone itself) you can select which marketplaces appear in your search results, etc.     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Through that marketplace users are able to a) purchase or trial apps, b) rate the apps AND the marketplace.     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;App developers will decide which marketplaces it wants to associate with (or marketplaces can court developers) and maintain their own quality standards (user approval, certification, etc.)     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;The community will decide which apps and marketplaces survive and succeed (and which ones tank).     &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The problem with iPhone and the App Store is that they have 100 very good apps, a 1000 decent apps and 100,000 pieces of turd.&lt;/p&gt;  &lt;p&gt;BUT, if you give me the option to shop at &amp;quot;Joe's Exotic Discount T-Shirts&amp;quot;, &amp;quot;Walmart&amp;quot; or &amp;quot;Banana Republic&amp;quot;, I know - going in - what to expect for quality.&lt;/p&gt;  &lt;p&gt;This would also add the ability to open up “adult” boutiques to those who so choose that path.&amp;#160; Likewise, as a parent (and someone who is not into that content) I could block 18+ markets from showing up in my searches.&lt;/p&gt;  &lt;p&gt;If a developer could prove their quality and align with a like-minded store, I think that would be fabulous.&lt;/p&gt;  &lt;p&gt;This means that Microsoft’s Marketplace would actually become a collection of boutiques and specialty stores, not a volume-driven box store.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-6060217529399508238?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/6060217529399508238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/better-way-to-shop-for-apps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/6060217529399508238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/6060217529399508238'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/better-way-to-shop-for-apps.html' title='A Better Way to Shop for Apps'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-529602556344339088</id><published>2010-03-17T11:41:00.002-05:00</published><updated>2010-04-16T08:10:11.501-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><title type='text'>Another “It would be cool if…” Post</title><content type='html'>&lt;p align="center"&gt;&lt;strong&gt;&lt;span style="color:#808080;"&gt;&lt;em&gt;At the time of this post I am using Visual Studio 2010 RC.&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I very seldom work with “files” in Visual Studio, so it doesn’t make sense to me to have files listed in the “Recent” jump list in Windows 7.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/AnotherItwouldbecoolifPost_A40D/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/AnotherItwouldbecoolifPost_A40D/image_thumb.png" width="224" height="293" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In fact, I so rarely work with individual files that, if I do need to work on one, I would likely have to hunt it down through Windows Explorer and thus be able to double-click it.&lt;/p&gt;  &lt;p&gt;I work on Solutions.  Projects.  Not so much files.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;So, it would be cool if Visual Studio 2010 would put the projects that I use most in the jump list and leave the files out.&lt;/p&gt;  &lt;h3&gt;Another “Me being fussy” Rant&lt;/h3&gt;  &lt;p&gt;There is a solution to this, I’m just being picky.&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 lets you pin your favourite/most used projects to the jump list on the Start Page inside the IDE.  I tend to turn this page off, however.  &lt;/p&gt;  &lt;p&gt;In the settings for Startup the IDE team actually gives us a pretty good way to do whatever the heck we want when VIsual Studio launches.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/AnotherItwouldbecoolifPost_A40D/image_3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/AnotherItwouldbecoolifPost_A40D/image_thumb_3.png" width="400" height="236" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;On top of half a dozen default options (including ones that let you get at recent projects and solutions easily) you can also create your own custom start-up page.&lt;/p&gt;  &lt;p&gt;Part of the Visual Studio Extensibility bits is a set of controls that make it easy to build your own page, which is coded in XAML.  The VSX team had &lt;a href="http://blogs.msdn.com/vsxteam/archive/2009/05/20/visual-studio-2010-beta-1-start-page-customization.aspx" target="_blank"&gt;a blog post&lt;/a&gt; on this back in Beta 1, but I haven’t found an updated reference.  What’s there is still mostly relevant, though you’ll find that some of the work in creating a start page (and a sample project) is already there for you.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-529602556344339088?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/529602556344339088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/another-it-would-be-cool-if-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/529602556344339088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/529602556344339088'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/another-it-would-be-cool-if-post.html' title='Another “It would be cool if…” Post'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-7576864143022362367</id><published>2010-03-09T16:20:00.002-06:00</published><updated>2010-04-16T08:06:26.450-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><title type='text'>Visual Studio 2010 Wishlist: Augmenting ASP.NET and the IDE</title><content type='html'>&lt;p align="center"&gt;&lt;span style="color:#6b6b6b;"&gt;&lt;strong&gt;&lt;em&gt;At the time of this post I am using Visual Studio 2010 RC.&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Today I am just putting down some ideas that I think are just little nice-to-haves, but from a user experience point of view are also a little frustrating because they (the VS team) are so close yet didn’t quite get it.&lt;/p&gt;  &lt;p&gt;I want to be clear: when I say “get it” I am referring to the very small portions of features specific to my rant today.  If you’re not using VS2010 – even in it’s RC release – and you’re a developer on the Microsoft stack you’re either crazy or suppressed by your employer.  I’ll assume you’re not crazy and send my apologies to your employer.  &lt;/p&gt;  &lt;p&gt;Visual Studio 2010 is the most significant release from the developer product group of folks in Redmond since the release of the original Visual Studio .NET environment. For which, by the way, I still have my t-shirt from the release event in Calgary.  ;o)&lt;/p&gt;  &lt;p&gt;I’ve posted some thoughts on VS2010 before, mostly &lt;a href="http://theycallmemrjames.blogspot.com/2009_12_01_archive.html" target="_blank"&gt;found here&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;MVC Awareness in ASPX Sources&lt;/h3&gt;  &lt;p&gt;Okay, so we’ve got this awesome new Swiss Army Knife toolkit and framework that allows us to feel like web ninjas: ASP.NET MVC.  Sure, the MVC bits have been kerplunking around for a couple of years, but there is a cycle that tools and patterns follow and we’re just getting to the height of the tool chain now.&lt;/p&gt;  &lt;p&gt;Why, though, when I set a form action to an MVC controller method do I get file not found errors?  &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/VisualStudio2010Wishlist_E597/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VisualStudio2010Wishlist_E597/image_thumb.png" width="420" height="111" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Here’s what we know: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;the text is being evaluated&lt;/li&gt;    &lt;li&gt;the engine supporting the code editor is aware of MVC libraries&lt;/li&gt;    &lt;li&gt;the page we’re working on is inherited from an MVC ViewPage&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So why do I see this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/VisualStudio2010Wishlist_E597/image_3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VisualStudio2010Wishlist_E597/image_thumb_3.png" width="325" height="73" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;…instead of, say, allowing me to right-click and go to the method?  All I’m saying is that if you’re evaluating a form action on an MVC page it’s likely that it’s going to an action on an MVC controller.  At least, it &lt;strong&gt;&lt;em&gt;could&lt;/em&gt;&lt;/strong&gt; be an action on a controller, so why not check for it? (…and let me go to the definition!).&lt;/p&gt;  &lt;p&gt;I know that we have Html.BeginForm and, yes, that does make the warning message go away, but that’s not strongly-typed either and, in most cases, I’m not sure there are benefits of using Html.BeginForm over the specified HTML.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Better “Intentional” Tab Arrangement&lt;/h3&gt;  &lt;p&gt;I love how the tabs and code editor (and designers, and database query results, etc.) have evolved in Visual Studio.  In a multi-monitor work environment it is uber-cool to be able to partition my work space the way I like to.&lt;/p&gt;  &lt;p&gt;Side bar: my new dream setup is 3x24” monitors vertical with the ATI Eyefinity hardware for development. I would also keep my “top” monitor setup for my “overhead” view of things (docs, email, pings, utils, etc). This would allow some insane productivity.  I digress.&lt;/p&gt;  &lt;p&gt;While I have &lt;a href="http://theycallmemrjames.blogspot.com/2009/10/visual-studio-2010-beta-2.html" target="_blank"&gt;applauded the IDE team&lt;/a&gt; for the close-tab-button integrated into the tab/name area already, the new tab behaviour is also one of my pet peeves.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/VisualStudio2010Wishlist_E597/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VisualStudio2010Wishlist_E597/image_thumb_4.png" width="420" height="57" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Some things I like about it:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The ‘x’ to allow me to close the tab without switching to it&lt;/li&gt;    &lt;li&gt;The ability to drag and partition my workspace into whatever arrangement I like&lt;/li&gt;    &lt;li&gt;The ability to rearrange tabs in one visual partition or to drag to other partitions&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Some things I don’t like:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Double-clicking breaks the tab out into a window…I don’t mind this per se, and imagine some like it, but I’d like to be able to turn this off&lt;/li&gt;    &lt;li&gt;Accidentally dragging the tab &lt;em&gt;slightly&lt;/em&gt; when trying to switch to it (even a pixel) will break out the tab into a window.  I would prefer a buffer of, say, 3-5 pixels so that the action was more intentional.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I tend to work with two or three partitions and I arrange them in the same way.  I am very intentional about this.  For example, in my three partition setup, I work with CSS and JavaScript in one work area, ASPX pages and controllers in the second and repositories and other model-related classes in a third.  &lt;/p&gt;  &lt;p&gt;That said, here is something I wish the IDE did:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;When I double-click a file in Solution Explorer, and I have multiple work areas open, I would like a way to say which area to send the file to.  There would be a number of ways to do this (and here are the first three that come to mind):&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;When CTRL is pressed and a file is double-clicked, put a “ghost” of the file on the cursor and let me click an area.&lt;/li&gt;      &lt;li&gt;When I hold CTRL and drag a file to an area, open the file there instead of creating a link or giving me an error&lt;/li&gt;      &lt;li&gt;When I right-click a file, give me a “Send To…” option and let me pick the area (even via simple overlay or something).&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;h3&gt;Cross-file Script Awareness&lt;/h3&gt;  &lt;p&gt;There is a cool trick you can use to make use of the VSDOC files that are available for various JavaScript libraries, such as jQuery. It goes something like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/VisualStudio2010Wishlist_E597/image_5.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/VisualStudio2010Wishlist_E597/image_thumb_5.png" width="547" height="38" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can also use this trick in your ASCX files which don’t pick up script references in your Site.Master.&lt;/p&gt;  &lt;p&gt;This is a good work-around. But it’s not a feature.&lt;/p&gt;  &lt;p&gt;I don’t know what the right answer is here as there are a lot of things to consider.  Should an ASCX always be aware of it’s context? Should it be written for a specific context? Should it ensure, itself, that scripts will be available to it? Or, in the context of an in-department or in-house application, can’t we assume it will be in the confines of it’s project?&lt;/p&gt;  &lt;p&gt;Maybe you could come up with a way to say, “Controls in this directory are aware of these scripts (or stylesheets, etc.)”.  Perhaps that would get through this one.&lt;/p&gt;  &lt;p&gt;Or, perhaps, this is just an area where the patterns, tools and languages don’t and won’t fit together nicely.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-7576864143022362367?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/7576864143022362367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/visual-studio-2010-wishlist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7576864143022362367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7576864143022362367'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/visual-studio-2010-wishlist.html' title='Visual Studio 2010 Wishlist: Augmenting ASP.NET and the IDE'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-1554609060878771897</id><published>2010-03-04T14:40:00.002-06:00</published><updated>2010-04-16T08:06:50.490-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linq to SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><title type='text'>Returning a LINQ to SQL Image from ASP.NET MVC</title><content type='html'>&lt;p&gt;I am working in VS2010 RC at the time of this posting.&lt;/p&gt;  &lt;p&gt;I am working with a set of images stored in an SQL database in my ASP.NET MVC project.  I would like to load the images asynchronously (and preferably effortlessly) and as “in-line” as possible from my pages.  I wanted to create a controller action that returned an image.&lt;/p&gt;  &lt;p&gt;Ideally, something that works into my page as simply as this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ReturningaLINQtoSQLImagefromASP.NETMVC_CDFA/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ReturningaLINQtoSQLImagefromASP.NETMVC_CDFA/image_thumb.png" width="420" height="53" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The HTML that would be rendered might be like this (or, I could write it out myself if I don’t want to use the Url helper above):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/ReturningaLINQtoSQLImagefromASP.NETMVC_CDFA/image_3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ReturningaLINQtoSQLImagefromASP.NETMVC_CDFA/image_thumb_3.png" width="252" height="51" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;My images were being returned from a LINQ to SQL method (a stored procedure that returned an Image field) and, so, were typed as System.Data.Linq.Binary &lt;/p&gt;  &lt;h3&gt;A Complicated Mess&lt;/h3&gt;  &lt;p&gt;I Binged around for a bit but was having trouble finding info that was relevant or entirely up-to-speed with the latest MVC bits.  I was frustrated because, without much explanation, people were reverting to complicated HTTP handlers, building System.Drawing.Bitmap objects and subclassing ActionResult (which felt a little weird).&lt;/p&gt;  &lt;p&gt;I came up with the following solution (which I wrote in my controller) by gleaning through a ton of different implementations:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;public &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;EmptyResult &lt;/span&gt;GetImage(&lt;span style="color:blue;"&gt;int &lt;/span&gt;id)&lt;br /&gt;{&lt;br /&gt;   &lt;span style="color:#2b91af;"&gt;Byte&lt;/span&gt;[] imageBytes = _repository.GetImage(id).ToArray();&lt;br /&gt;&lt;br /&gt;   Response.OutputStream.Write(imageBytes, 0, imageBytes.Length);&lt;br /&gt;   Response.ContentType = &lt;span style="color:#a31515;"&gt;"image/png"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;   &lt;span style="color:blue;"&gt;return new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;EmptyResult&lt;/span&gt;();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This afforded me the simple notational luxuries as listed above, but it felt a little wrong to be pumping out data to the response stream when I’m describing my method as an EmptyResult.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Easier Without Getting Harder&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I didn’t want to run into creating inherited types and the likes without a good reason.  This was as complicated as I wanted to get and I wanted to know if I should go further.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I posted a question to StackOverflow to that tune and got back a lead on a couple other candidates to work with.  A quick lookup on FileContentResult and I was off to the races:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/ReturningaLINQtoSQLImagefromASP.NETMVC_CDFA/image_4.png" width="421" height="117" /&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If you like (and to facilitate testing) you can also easily implement a subclass of FileContentResult and pre-set the image type; then all you’d be doing is returning a new PngResult(byteshere).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;To Be Fair…&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I don’t mean to condemn any of the earlier efforts.  In fact, some were pretty ingenious considering the state of MVC over a year ago.  &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The types that are available now in ASP.NET MVC make it very easy to return an image from a controller action, even if that image is a byte array or stored as a LINQ Binary type.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-1554609060878771897?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/1554609060878771897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/returning-linq-to-sql-image-from-aspnet.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1554609060878771897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/1554609060878771897'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/returning-linq-to-sql-image-from-aspnet.html' title='Returning a LINQ to SQL Image from ASP.NET MVC'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2331295449222446917</id><published>2010-03-01T10:40:00.002-06:00</published><updated>2010-04-16T08:07:14.971-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2010'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC'/><title type='text'>Use ContentPlaceHolder for Stylesheets on Sub Pages</title><content type='html'>&lt;p&gt;I highly suspected that the ContentPlaceHolder could be used in MasterPages for styles – we can use it for other things in the header, such as the page title – but had not actually tried it.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/UseContentPlaceHolderforStylesheetsonSub_934C/image.png" width="244" height="174" /&gt;As my project grew and individual stylesheets continued to increase in number, the head section of my MasterPage was growing.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;This was mostly an experiment of laziness…I had a good 20 pages created and it was working at the start, so I didn’t mind adding to the list of stylesheets in my Site.Master.  It got to a point where, pressed for time, I didn’t want to add another ContentPlaceHolder to the Site.Master for fear that I’d not be able to compile and was now looking at over 30 views that needed to be addressed.&lt;/p&gt;  &lt;p&gt;I seem to remember getting burned on MasterPages earlier in their life, where there were complications in trying to mix CSS into the header, and problems with the Title tag, etc.  I am almost certain that, previously, if you had a ContentPlaceHolder in your MasterPage that you were required to have the corresponding Content tag in your sub page or you’d get an error.  &lt;/p&gt;  &lt;p&gt;Thankfully, this is not the case…at least not in ASP.NET 4.0.&lt;/p&gt;  &lt;h3&gt;Error-Free Extension&lt;/h3&gt;  &lt;p&gt;Thankfully, this is a really easy one to try out.  I opened my Site.Master and added the following code to the &amp;lt;head&amp;gt; tag:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p style="font-family: sans serif"&gt;&lt;span style="font-family:Courier;font-size:78%;"&gt;&amp;lt;asp:ContentPlaceHolder ID="CssExtensions" runat="server"&amp;gt;&amp;lt;/asp:ContentPlaceHolder&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I compiled and ran the site, and sure enough, no errors.  I was able to hit the 30+ views in the application without any problem.&lt;/p&gt;  &lt;p&gt;Next, I moved into the view I was currently developing and added a Content control.  I created a new style sheet and added it to the CssExtensions Content area.  I then created and applied a style to an image that had not previously been styled.&lt;/p&gt;  &lt;p&gt;Running the application again, with no problem, I was pleased to see the style applied in the running site and the proper HTML written to the browser.&lt;/p&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h3&gt;Benefits of the Break-Up&lt;/h3&gt;  &lt;p&gt;I’ll be moving the list of a dozen or so CSS files to their respective sub pages to help reduce the hit taken by the user the first time they visit our site.&lt;/p&gt;  &lt;p&gt;Because our primary audience is rural market, specifically those without access to land-based high speed internet, we want to keep our pages small, especially on first load.&lt;/p&gt;  &lt;p&gt;Of course, once the user has the file cached there is virtually no perceived performance benefit, but even reducing the number of requests to the server (which caching doesn’t always prevent) might be an advantage for someone still on dial-up.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2331295449222446917?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2331295449222446917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/use-contentplaceholder-for-stylesheets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2331295449222446917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2331295449222446917'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/03/use-contentplaceholder-for-stylesheets.html' title='Use ContentPlaceHolder for Stylesheets on Sub Pages'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-8421083108124729064</id><published>2010-02-23T10:49:00.001-06:00</published><updated>2010-04-16T08:08:36.113-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>How Microsoft Will Win in the Mobile Phone Space</title><content type='html'>&lt;p&gt;It’s no joke.  Microsoft is finally in a place where they can and will compete hard with Apple’s iPhone and Google’s Android platform.  As possibly the first company to figure out what it means to compete in this space – and certainly the first with real dollars to back their game – Microsoft has a big chance to win with Series 7.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h3&gt;Lessons from Xbox&lt;/h3&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/HowMicrosoftWillWinintheMobilePhoneSpace_9811/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/HowMicrosoftWillWinintheMobilePhoneSpace_9811/image_thumb.png" width="158" height="103" /&gt;&lt;/a&gt; Microsoft came to the table with a gaming system in 2001 with some good juice. More than anything, they wanted to focus on making the developer story better than what was out there.  They faced criticism on the size of the console, on the noise, on the size of the controller (which I loved, btw), on pretty much everything…but slowly they won developers over.  &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/HowMicrosoftWillWinintheMobilePhoneSpace_9811/image_3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://www.bandofgeeks.net/blogimages/HowMicrosoftWillWinintheMobilePhoneSpace_9811/image_thumb_3.png" width="87" height="163" /&gt;&lt;/a&gt;By the  time the Xbox 360 hit the streets, developers were singing the praises of development on the platform while Sony executives were just waiting for “smarter” developers who actually understood their technology to come along.  In the first months of the Xbox 360 release, it became apparent that Microsoft was going to be the console that catered to the people who made games.&lt;/p&gt;  &lt;p&gt;Interestingly enough, it seems as though Sony’s going to abandon the technology of the PS3 on their next console because we developers just ain’ts gots the smarts.&lt;/p&gt;  &lt;p&gt;The biggest win was differentiation with the 360, not from other players, but from themselves.  They reinvented what a product could like coming out of Redmond and it paid off in droves.  It was rumoured that early designs were tested against focus groups without the branding, and almost no one was able to identify the manufacturer as Microsoft.&lt;/p&gt;  &lt;h3&gt;Lessons from Windows Mobile&lt;/h3&gt;  &lt;p&gt;You can can lead a horse to water, but you can’t make him drink.  Especially if the water is acid and no one in the world wants to ride the horse anyways.  And even more so because if you did want anyone to ride the horse, you had to make your own saddle and figure out a way to distribute the saddle on your own.  And don’t expect any revenue.&lt;/p&gt;  &lt;p&gt;RIP, Windows Mobile.&lt;/p&gt;  &lt;p&gt;The development story was crap.  Web service (cloud) integration was turd.  Some level of expectation for hardware was non-existent, and you were just short of a demi-god if you could figure out how to get your app found.  And unless you were a wizard-code-ninja working at HTC, good luck at making anything look good.&lt;/p&gt;  &lt;p&gt;While Apple was making millionaires out of fart-generator authors, there were very few success stories in the fragmented, challenged development story on the Windows Mobile platform.  Too many devices. Not enough support for developers.  Little to no ‘dogfooding’ of the devices and content. Limited interim builds.  Late and abandoned features and release dates.  Inconsistent programming libraries.&lt;/p&gt;  &lt;p&gt;And they’re leaving it all behind.  I hope.&lt;/p&gt;  &lt;h3&gt;Where the Winner Is&lt;/h3&gt; &lt;a href="http://www.bandofgeeks.net/blogimages/HowMicrosoftWillWinintheMobilePhoneSpace_9811/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/HowMicrosoftWillWinintheMobilePhoneSpace_9811/image_thumb_4.png" width="283" height="190" /&gt;&lt;/a&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I give it two years.  In two years Microsoft will be shipping as many units as Apple.  I am pretty confident in that number because of the lessons Microsoft should have learned from above.&lt;/p&gt;  &lt;p&gt;That sentiment is furthered because of how they came through with Windows 7.&lt;/p&gt;  &lt;p&gt;The argument is strengthened even more with the working prototype they put forward at Mobile World Congress.&lt;/p&gt;  &lt;p&gt;Hubs are the new pages and clean is the new UI.  Apps will be alive and the touch will be a productivity feature and user benefit rather than a scrolling gimmick.&lt;/p&gt;  &lt;p&gt;What most people don’t realize is how much work Microsoft has actually done in this space.  Apple didn’t invent the wheel here (I’m not say MS did, by the way). Tablets, touch screens, mobile devices…Microsoft has done so much wrong in this space for over a decade that they’ve learned everything you’re not supposed to do, and the very few, straight-forward things you need to do in order to compete.&lt;/p&gt;  &lt;p&gt;But where they will really shine is in supporting developers.&lt;/p&gt;  &lt;p&gt;By moving to XAML and enabling millions of developers already on the .NET platform to develop media-rich, touch-rich, dynamic applications from within the world’s number one IDE, Microsoft is set to roll a new story for what mobile applications can be (hint: not just fart generators).&lt;/p&gt;  &lt;p&gt;Oh yes, if you want to develop applications that will run on millions of phones with an incredible user experience, standardized hardware and an open development platform, &lt;strong&gt;there’s an app for that&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;It’s called Visual Studio 2010, and it will be the Achilles heel of the iPhone development story.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-8421083108124729064?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/8421083108124729064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/how-microsoft-will-win-in-mobile-phone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8421083108124729064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/8421083108124729064'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/how-microsoft-will-win-in-mobile-phone.html' title='How Microsoft Will Win in the Mobile Phone Space'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-4924066454884016522</id><published>2010-02-16T11:50:00.002-06:00</published><updated>2010-04-16T08:09:58.142-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Microsoft Just Seriously Kicked Apple in the Nads</title><content type='html'>&lt;p&gt;I am not joking.&lt;/p&gt;  &lt;p&gt;If you’ve used a Zune HD – not just mocked it because it’s from Microsoft and because you love your iPod and have never actually used a Zune HD but it must suck because it’s not from Apple (all hail Steve) – then you know that they (Microsoft’s Zune HD team) have seriously got a pulse for how things should look and feel and work.&lt;/p&gt;  &lt;p&gt;Well, that’s what they are bringing to Series 7, the new name and face of Windows Phone.  It is freeking nuts.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.bandofgeeks.net/blogimages/MicrosoftJustSeriouslyKickedAppleintheNa_A628/image.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/MicrosoftJustSeriouslyKickedAppleintheNa_A628/image_thumb.png" width="420" height="276" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The concept is a paradigm shift for anyone…well, anyone who uses a phone.  We’re talking multiple pages of any-direction scrolling that actually makes sense and gives you a complete sense of being awesome.&lt;/p&gt;  &lt;p&gt;Plus, it’s awesome.&lt;/p&gt;  &lt;p&gt;The user interface is arranged as a series of canvases that allow you to finger your way around them.  The canvas is bigger than the screen, and you just push it around to get where you’re going.&lt;/p&gt;  &lt;p&gt;It is elegant, modern and by all early signs it is also fast, responsive and built to compete.  Hard.&lt;/p&gt;  &lt;p&gt;Another way to think of the user interface is the Xbox Live dashboard, optimized for touch.  Heck, why stop there?  IT HAS XBOX LIVE BUILT THE FREEK IN.&lt;/p&gt;  &lt;p&gt;A good review of the upcoming game-changer is here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://gizmodo.com/5471805/windows-phone-7-series-everything-is-different-now?skyline=true&amp;amp;s=i"&gt;http://gizmodo.com/5471805/windows-phone-7-series-everything-is-different-now?skyline=true&amp;amp;s=i&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here’s a snip:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The result is a feat no phone has performed before: Making the iPhone's interface feel staid.&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-4924066454884016522?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/4924066454884016522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/microsoft-just-seriously-kicked-apple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4924066454884016522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/4924066454884016522'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/microsoft-just-seriously-kicked-apple.html' title='Microsoft Just Seriously Kicked Apple in the Nads'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-7667588903940886787</id><published>2010-02-10T16:32:00.003-06:00</published><updated>2010-02-10T16:39:12.224-06:00</updated><title type='text'>Routing and Abstractions Assembly References Missing in VS2010 ‘Empty’ MVC Project Template</title><content type='html'>&lt;div&gt;   &lt;br /&gt;    &lt;p&gt;You’ll run into this quickly if you try to do something similar to the following:&lt;/p&gt;    &lt;pre class="code"&gt;&lt;span style="background: yellow"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color: blue"&gt;= &lt;/span&gt;Html.ActionLink(&lt;span style="color: #a31515"&gt;&amp;quot;About&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;About&amp;quot;&lt;/span&gt;) &lt;span style="background: yellow"&gt;%&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;You’ll get an error message as such:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;blockquote&gt;&lt;br /&gt;    &lt;p&gt;&lt;font color="#535353"&gt;The type 'System.Web.Routing.RouteValueDictionary' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;  &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;I am running Visual Studio 2010 and have created a new, empty ASP.NET MVC project.&amp;#160; Using the standard template (with some basic controllers and view in place), this problem is not present.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;h3&gt;Mixed Messages&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;I have had previous installs of MVC through the betas and the LCTP in VS2010, so this error might be presenting itself because of that.&amp;#160; It says it’s looking for a version 3.5 when I’m working in 4.0, so there is a versioning thing going on here.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;Still, the compiler in the IDE has no problem spitting out the code and launching the development web server; it’s at only at execution time…erm…compilation time on the server? when the mis-match is detected (expecting something different to be pulled from GAC, perhaps?).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;h3&gt;The Fix&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;Thankfully, it’s easy to resolve.&amp;#160; Just tell the compiler what you really, really want.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;Great, now I have Posh Spice stuck in my head…&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;The project template that generates the web.config file in the root of the project is missing two assemblies in the compilation configuration section.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;Update your assemblies section as follows:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblies&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;assembly&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblies&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;The above should fix your troubles.&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-7667588903940886787?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/7667588903940886787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/routing-and-abstractions-assembly.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7667588903940886787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/7667588903940886787'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/routing-and-abstractions-assembly.html' title='Routing and Abstractions Assembly References Missing in VS2010 ‘Empty’ MVC Project Template'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2251644925143222617</id><published>2010-02-10T14:37:00.001-06:00</published><updated>2010-02-10T14:37:59.527-06:00</updated><title type='text'>UGSS Kit Has Arrived!</title><content type='html'>&lt;p&gt;And along with it, some juicy Windows 7 Ultimate copies for our user group attendees.&lt;/p&gt;  &lt;p&gt;Next meeting, which is about Win7 development, is on February 25th with more &lt;a href="http://www.bandofgeeks.net/Home/Meetings" target="_blank"&gt;details here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;We have some great sessions coming up, too, with Dr. Gerald Dueck sharing some of the research he’s been doing supported by the LINQ language extensions.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2251644925143222617?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2251644925143222617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/ugss-kit-has-arrived.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2251644925143222617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2251644925143222617'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/ugss-kit-has-arrived.html' title='UGSS Kit Has Arrived!'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3850186470303080421</id><published>2010-02-05T16:16:00.001-06:00</published><updated>2010-02-05T16:25:33.593-06:00</updated><title type='text'>Facebook Fail</title><content type='html'>&lt;p&gt;Not ‘epic’ by any account, but the site set to be the world’s highest traffic site by year’s end (and largest detriment to productivity) can have it’s own dose of the hiccups.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/FacebookFail_E4AE/image.png" width="420" height="205" /&gt; &lt;/p&gt;  &lt;p&gt;Shoot, and I wanted to know what everyone was doing tonight! &lt;/p&gt;  &lt;p&gt;Guess I’ll have to use that old-fangled telephone…&lt;/p&gt;  &lt;p&gt;---&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE…TURNS OUT &lt;/strong&gt;this was a push of their new home page.&amp;#160; I saw the bump as it happened…&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3850186470303080421?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3850186470303080421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/facebook-fail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3850186470303080421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3850186470303080421'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/facebook-fail.html' title='Facebook Fail'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-3464468188871394655</id><published>2010-02-03T14:19:00.001-06:00</published><updated>2010-02-03T14:21:17.596-06:00</updated><title type='text'>No Tanks, Please</title><content type='html'>&lt;p&gt;I got some input from a commenter on my suggestion that debugging skills are more important than the use of unit tests. He disagreed, suggesting that by using unit tests you can all but avoid the use of a debugger.&lt;/p&gt;  &lt;p&gt;This is the &lt;a href="http://theycallmemrjames.blogspot.com/2009/12/visual-studio-2010-debugging-tips.html" target="_blank"&gt;original post&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.bandofgeeks.net/blogimages/NoTanksPlease_C92E/image.png" width="322" height="204" /&gt; I gracefully accept that we might not come to agreement on this.&lt;/p&gt;  &lt;p&gt;Writing unit tests does not mean you have to have less sense about debugging.&amp;#160; In fact, what if the error is in your test? &lt;/p&gt;  &lt;p&gt;What about operations that are driven by meta-data created on-the-fly at run time that alter program flow and logic?&amp;#160; By third party inputs?&amp;#160; &lt;/p&gt;  &lt;p&gt;What if you use composition patterns and allow several layers of dynamic composition?&amp;#160; Would you write a test for every mutation?&amp;#160; Good job security, but not practical. &lt;/p&gt;  &lt;p&gt;What happens when a library you've been given to use isn't working per the documentation? &lt;/p&gt;  &lt;p&gt;What about when a library is being used for something or in a way that wasn't conceived in the original design? &lt;/p&gt;  &lt;p&gt;What if you have to maintain a code base that wasn’t developed with TDD in mind and is next-to-impossible to write unit tests for?&lt;/p&gt;  &lt;p&gt;While I do mocking and unit tests and am a staunch supporter of behaviour-based design and TDD, you cannot predict nor test for every pre-condition that might crop up.&amp;#160; Even if you're really good, and your write LOTS of tests you might miss some.&lt;/p&gt;  &lt;p&gt;And when that happens, you'd better know your head from your buttocks in your debugger! &lt;/p&gt;  &lt;p&gt;It is these conditions that may, in the future, warrant more complex tests that provide coverage for these types of scenarios.&lt;/p&gt;  &lt;p&gt;I would argue, however that there are times – especially in a smaller shop – when you need to pull out a Swiss Army knife and leave the combat tank at home.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-3464468188871394655?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/3464468188871394655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/no-tanks-please.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3464468188871394655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/3464468188871394655'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/no-tanks-please.html' title='No Tanks, Please'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-2076162570290167917</id><published>2010-02-01T16:13:00.001-06:00</published><updated>2010-02-01T16:13:33.406-06:00</updated><title type='text'>Cloning a Drive and Extending a Partition</title><content type='html'>&lt;p&gt;We had an old server that we use to monitor some types of network traffic.&amp;#160; The database was stored locally on a sole drive that was 80Gb in size.&lt;/p&gt;  &lt;p&gt;While this box is not critical and we can’t move it to our virtualized infrastructure, the drive was at 99.8% capacity and data read/writes were starting to fail.&lt;/p&gt;  &lt;p&gt;Our two goals were to increase drive space and add redundancy to the machine.&lt;/p&gt;  &lt;h4&gt;All this for $200&lt;/h4&gt;  &lt;p&gt;This will pretty much work on any Windows setup, and I’m sure there are parallel tools on other OS’s (a friend told me this was built into Mac OS with an external drive setup).&lt;/p&gt;  &lt;p&gt;There are two free tools you’ll need: Clonezilla and Partition Master.&lt;/p&gt;  &lt;p&gt;We purchased two 1Tb drives for the upgrade, each about $100.&lt;/p&gt;  &lt;p&gt;The steps we used to complete the upgrade are as follows:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;install the 1Tb drive, stick in the Clonezilla CD and reboot the server (make sure it boots to CD in the BIOS)&lt;/li&gt;    &lt;li&gt;use Clonezilla to move an image of the 80Gb drive to the 1Tb drive&lt;/li&gt;    &lt;li&gt;remove the 80Gb drive and reboot the machine&lt;/li&gt;    &lt;li&gt;in drive management, confirm that the extra space is available (that the OS sees the new drive space)&lt;/li&gt;    &lt;li&gt;run Partition Master in Windows and extend the partition to the entire disk&lt;/li&gt;    &lt;li&gt;shut down the machine&lt;/li&gt;    &lt;li&gt;install the second 1Tb drive&lt;/li&gt;    &lt;li&gt;reboot, then mirror the drives in drive management&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This was dead-simple, cost us about $200 and took about 20 minutes of work. The total project, counting wait times for cloning (2 hours), partition adjustments (40 mins) and mirroring (5 hours) was less than a day.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.bandofgeeks.net/blogimages/CloningaDriveandExtendingaPartition_E3E6/image.png" width="420" height="221" /&gt; &lt;/p&gt;  &lt;h3&gt;Downloads for this Exercise&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://clonezilla.org/" target="_blank"&gt;Clonezilla&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.partition-tool.com/" target="_blank"&gt;Partition Master&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6443816021567857696-2076162570290167917?l=theycallmemrjames.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://theycallmemrjames.blogspot.com/feeds/2076162570290167917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/cloning-drive-and-extending-partition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2076162570290167917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6443816021567857696/posts/default/2076162570290167917'/><link rel='alternate' type='text/html' href='http://theycallmemrjames.blogspot.com/2010/02/cloning-drive-and-extending-partition.html' title='Cloning a Drive and Extending a Partition'/><author><name>ChipOne</name><uri>http://www.blogger.com/profile/16709607564824798285</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6443816021567857696.post-202780404001589362</id><published>2010-01-25T18:21
