Saturday, August 28, 2010

Creating a RSS Feed based Windows Theme Background Slideshow

The Sean Blog - Dynamic Desktop Wallpapers from RSS Feeds

“I was listening to Windows Weekly on my Zune this morning, and Paul’s Pick of the Week was the Bing Dynamic Theme, which dynamically displays new photos from Bing as your desktop background.   Awesome… this is just like Webshots back in the day! (Errr… I guess they are still around at http://www.webshots.com/.  We’ll use that information in a second.)

When downloading the theme, I noticed that it is only 1.86KB.  That’s a small file… it must be doing some magic behind the scenes to download the actual pictures.  That large RSS symbol in the thumbnail is a pretty big hint as to where they come from.  I downloaded the theme to my desktop, opened it in Notepad, and the structure is rather clear (and fully documented on MSDN here: Creating and Installing Theme Files.  The theme file basically says to keep the icons and sound effects as their defaults, and to download pictures from an RSS feed. 

So…  if you want to make your own theme with pictures off the Internet, just copy the following text, paste it into Notepad, and change the 3 highlighted areas (the Display Name is what shows up in the Theme control panel as the name for the theme.  The RSS feed at the bottom must have  the pictures as enclosure.

image…”

I’ve been playing with creating Windows 7 ThemePacks and saw the “RSSFeed” setting, but hadn’t seen anyone use it. Then just recently the Bing Dynamic Theme came out. That’s opened the gates to more RSS Feed based themes, provide Sean the drive to figure out how they work and got me off my butt to do the same.

The funny part is that there’s no UI to create a RSS Feed based theme, the Windows 7 UI will not let you enter in path to a given RSS feed. You HAVE to do it via editing an *.theme or downloading someone else's. Also the photo’s in the RSS feed have to be actual enclosures, not just image links. This is the part that made me initially stumble and where Sean showed me, via his post, that it’s no big deal. Heck with four characters you can turn any Flickr feed into one that supports enclosures! How cool is that!

Anyway, I’m working on a very cheese, not even close to ready to share, project that makes it easy to build ThemePacks (which is surprisingly kind of a pain, being the metadata is INI based and the container is a CAB… very 90’s lol ;) which last night I tweaked to add in RSS Theme based support.

I keep these “ThemePack Builder” (cleaver code name for my utility isn’t it?) ThemePacks up on SkyDrive and posted three new *_RSS_Theme.ThemePacks there. Two use the two links Sean provided (NASA and Webshots) and one that’s a Flickr stream of a trail that I walk every so often.

 

Related Past Post XRef:
[Proof of Concept] Windows 7 ThemePack Builder (with three test/sample themepacks for you)

Wednesday, August 25, 2010

Open Source? There’s an annual award for that… “Welcome to the 2010 Open Source Awards”

Packt Publishing - Welcome to the 2010 Open Source Awards

Nominations close September 17.

The Open Source Awards is an annual online event held by Packt Publishing to distinguish excellence among Open Source projects.

Now in its fifth year, the Award, formerly known as the Open Source Content Management System (CMS) Award, is designed to encourage, support, recognize and reward not only CMSes but a wider range of Open Source projects.

The Awards are split up into two main stages. Firstly, nominations will begin on August 9. This is your chance to put forward your favorite Open Source project in each category to go through to the final stage of voting. The top five projects with the most nominations in each category will go through to the final stage of voting. The nominations will end on September 17.

The five finalists in each category will be announced and voting will begin on September 27. Voting will close on November 5, with the winners announced the week commencing November 15.

You will also be pleased to hear that by nominating or voting for your favorite Open Source project, you will have chances to win a fantastic Amazon Kindle!  …

image…”

The guys at Packt Publishing (from whom I’ve done a couple book reviews and seem to be becoming quite a “name” in the tech book publishing space) have let me know that their annual Open Source award program is up, running and looking for YOU to nominate your favorite open source CMS, JavaScript Library, ECom, Most Promising, etc, project.

It’s simple and easy to nominate a project and in doing so you’re entered into a drawing for a Kindle. Not bad for a clicks and four text boxes… ;)

Tuesday, August 24, 2010

Think you can’t unit test ASP.Net? Here’s a tutorial for one way, using the power of Pex and Moles

Peli's Farm - Pex, Stubs, Moles, QuickGraph, MbUnit, Reflector Addins - New! Unit Testing Asp.NET Applications with Pex and Moles Tutorial

“We have added a new step-by-step tutorial to help testing Asp.NET applications with Pex and Moles. You will find as part of the installer or simply at …” [GD: Click through for the link]

From the PDF:

“…

This tutorial provides an introduction to writing isolated unit tests for Asp.NET applications by using:

  • Microsoft Moles 2010, which supports unit testing by providing isolation by way of detours and stubs. The Moles framework is provided with Microsoft Pex, or can be installed by itself as a Microsoft Visual Studio® 2010 add-in.
  • Microsoft Pex 2010, which automatically generates test suites with high code coverage. Microsoft Pex is a Visual Studio add-in for testing .NET Framework applications.

This tutorial is Technical Level 300. This tutorial assumes you are familiar with developing .NET applications and are building solutions with Asp.NET. To take best advantage of this tutorial, you should first:

Asp.NET Applications.
Asp.NET is a free web framework that enables great Web applications to be written on top of the .NET framework.

The Unit Testing Challenge.
The primary goal of unit testing is to take the smallest piece of testable software in your application, isolate it from the remainder of the code, and determine whether it behaves exactly as you expect. Unit testing has proven its value, because it often helps finding many defects in an early phase of the software development.

In order to execute unit tests early, you must isolate your production code from the environment. The most common approach to isolation is to write drivers to simulate a call into that code and create stubs to simulate the functionality of classes that the code uses. This can be tedious for developers and might cause unit testing to have a lower priority in your testing strategy.

It may be difficult to create unit tests for Asp.NET web applications because:

  • You cannot execute the intrinsic Asp.NET types, such as HttpContext, HttpRequest, HttpResponse, HttpRuntime, without being connected to a live IIS Server.
  • The intrinsic objects —including classes such as HttpContext and HttpRuntime—do not allow you to inject fake service implementations, because these classes are sealed types with non-public constructors.

Abstractions for intrinsic Asp.NET types.
Acknowledging the testability issue, Microsoft has provided a set of abstractions, such as HttpContextBase, HttpRequestBase, and so on…. These abstraction types allow you to author testable Asp.NET components. They are located in System.Web.Abstractions.dll for .NET 3.5 and in System.Web.dll in .NET 4.0. This document focuses on the untestable intrinsic Asp.NET types that are still widely used in the field and in legacy web applications.

Unit Testing for Asp.NET applications: Behaviors Powered by Pex and Moles.
This tutorial introduces you to processes and concepts for testing Asp.NET applications. The unit testing process uses:

  • Microsoft Moles—a testing framework that allows you to isolate .NET code by replacing any method with your own delegate, bypassing any hard-coded dependencies in the .NET code.
  • Behaviors for Asp.NET — a library that redirects Asp.NET API calls to an in-memory model of the actual Asp.NET functionality.
  • Microsoft Pex—an automated testing tool that exercises all the code paths in .NET code, identifies potential issues, and automatically generates a test suite that covers corner cases.

image…”

Interesting…

 

Related Past Post XRef:
Playing with Pex is just a web browser away at www.pexforfun.com

Pex 2010 (aka Pex 0.90.50303.0) now available on MSDN Subscribers Downloads
Pex license updated – You can now use it in commercial projects
Pex 0.5 Released - Your Parameterized Unit Test Buddy

“Getting Started with UML” DZone Refcard

DZone Refcardz - Getting Started with UML

“The Unified Modeling Language is a set of rules and notations for the specification of a software system, managed and created by the Object Management Group. This DZone Refcard outlines the key elements of UML to provide you with a useful reference when designing software.

…”

With VS2010 Ultimate’s UML support, I’m finding myself, “feeling the need to UML…” I mean, since I’ve already got it I might as well see how I can best use it, right?

Here’s a snap of the PDF.

image

 

Related Past Post XRef:
Nine UML’s from a Niner on Nine - Nine using UML with Visual Studio 2010 videos on Channel 9
“Practical UML™: A Hands-On Introduction for Developers” from the Embarcadero Developer Network

Tip on how to sync Visual Studio settings between machines

Bite my bytes - Syncing Visual Studio settings

“I finally took time and figure out how to keep Visual Studio settings in sync across different machines (work, laptop, home, virtual,…) as I really grew tired of importing color schemes and fixing mixed up shortcut keys. Bonus is, you get easy backup of your most important settings which you will love next time you reinstall your machine!

Actually this is really simple task. What you’ll need is some kind of syncing program, I currently run DropBox, but I believe Live Sync would also work. Same procedure works for Visual Studio 2008 and 2010. Might also work with previous version, but I don’t have them installed, so I can’t check.

First, export your settings into a file. I choose to sync only color and font setting and keyboard settings.

image…”

Quick, simple, easy and free, four of my favorite things. I’m not sure I would have thought to use the “team settings” to execute this, but in hindsight that makes sense (assuming you’re not already using that for, well, shared team settings… ;)

Expression Web 4 -> Windows Phone 7 Emulator Preview Add-in (beta)

Expression Gallery - Windows Phone 7 Emulator Preview

“Just finished V 0.5 (Beta) of the Expression Web Windows Mobile Phone emulator integration. Expression Web now has the ability to seamlessly preview created pages right on Mobile Internet Explorer within the emulator. With full interactivity you will be able to preview your web page and web site as it will appear on Windows Mobile 7 devices when they ship later this year. Read more about Windows Mobile 7 Phone here.

You will see the Windows Phone 7 emulator startup and preview your Expression Web page on Internet Explorer mobile. The first time launch is a bit slow, however concurrent preview requests reuse the emulator and are much faster. You'll see full layout, interactivity (navigation, image fidelity, everything that Internet Explorer offers on the device) as well as get a feel for what your customers will encounter when they visit your site when using a Windows Phone 7 device - before they ship.

image…”

I don’t do web-dev much, but I still thought this was kind of cool…

(via Don's Mobile Design Blog - Windows Phone 7 Emulator Add-in for Expression Web )

Sunday, August 22, 2010

CodePlex ClickOnce publishing from directly within Visual Studio

Visual Studio Gallery - CodePlex publishing plugin

“This extension adds a toolbar to VS, that is similar to the Web Deployment toolbar. It allows you to set up a profile (you input your CodePlex username/password and a few other fields). Once that is set up, and your project is correctly set up for ClickOnce publishes, you can simply publish using the toolbar, instead of going to your project's web page, and creating a release there.

You also have the ability to replace an existing release: that is, if a release with the specified name already exists, the extension can simply edit its description, etc. and upload the new publish zipfile.

screenshot…”

CodePlex - CodePlex Publishing Plugin

Project Description
This addin allows publishing your project directly from Visual Studio, this eliminating the unnecessary step of going to the CodePlex site to publish.

Currently allows publishing only ClickOnce releases to CodePlex, but I may be adding the ability to publish normal releases as well; will see how useful that option might be - after all, publishing ClickOnce releases is somewhat cumbersome, but normal releases are easy enough to do through the web interface.

The recommended for download release is a ClickOnce release, published using this plugin. You will download and install a sample application that shows the currently installed version of the plugin (N/A if you dont have it), and the available version. And gives you the ability to install the new version. Since it is a ClickOnce application, it will automatically ask you to update when you run in. A good test case/example, I think.

…”

I love developers. We can be the laziest bunch around, when we see something that’s a manual or slow operation and our first thought is, “I can automate that!”

This project is a perfect example of that. The current CodePlex ClickOnce publishing method is very manual and cumbersome. This Visual Studio plug makes it one click operation. Best of all the author has made the source available and also is eating his own dog food (i.e. using ClickOnce to publish his plugin installer).

 

Related Past Post XRef:
Holy ClickOnce Smoke! CodePlex now provides ClickOnce app hosting! Yes, you can now ClickOnce your CodePlex project on CodePlex servers!