Archive

Archive for December, 2008

What you need to develop Silverlight for FREE

December 16th, 2008

#1 Visual Studio Express 2008 with SP1

www.microsoft.com/express/download/
You can download an ISO with all the express editions or just the Web Developer edition. The only one you need is Visual Studio Web Developer 2008 SP1.

If you don’t have SP1 for Visual Studio 2008, get it here:
www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E

#2 Silverlight Tools for Visual Studio 2008 SP1

Download the tools for developing applications of awesomeness here:
www.microsoft.com/downloads/details.aspx?FamilyId=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&displaylang=en.
If you want some offline documentation, you can download that here:
www.microsoft.com/downloads/details.aspx?FamilyID=bce7684a-507b-4fc6-bc99-6933cd690cab&displaylang=en.

Optional: Expression Blend 2 Trial

This isn’t a requirement but it will give you a good place to start if you’ve never played with XAML. Download it here:
www.microsoft.com/downloads/details.aspx?FamilyId=5FF08106-B9F4-43CD-ABAD-4CC9D9C208D7&displaylang=en
and don’t forget Blend SP1
www.microsoft.com/downloads/details.aspx?FamilyId=EB9B5C48-BA2B-4C39-A1C3-135C60BBBE66&displaylang=en
or Expression Studio 2 Trial here:
www.microsoft.com/downloads/details.aspx?FamilyId=7AE2720C-72BA-489B-ADBB-EE6F3C79066D&displaylang=en

Optional: Deep Zoom composer

Needed if you want to develop deep zoom applications:
www.microsoft.com/downloads/details.aspx?FamilyID=457B17B7-52BF-4BDA-87A3-FA8A4673F8BF&displaylang=en

Optional: Silverlight Toolkit from Codeplex

Nice set of components from the community for you to use or extend in your Sliverlight applications. Download it here:
www.codeplex.com/Silverlight/Release/ProjectReleases.aspx

Other Options

If you want to go hardcore, check out this article on developing Silverlight applications in Eclipse: www.eclipse4sl.org/download/.

If you use Blender, the free open source 3D content creation suite, you might want to check out this XAML exporter. Not that it will fully work for Silverlight (it’s really for WPF). But it’s still pretty cool: www.codeplex.com/xamlexporter

That’s it! Go forth and develop!

Don’t forget to check out silverlight.net for videos, blogs, and forums. More resources: http://www.microsoft.com/silverlight/resources/tools.aspx.

Silverlight , , , ,

Using LINQ to process RegEx matches

December 12th, 2008

Today I used LINQ to help implement a cleaner solution to a problem I was trying to solve. It’s really just some syntactic sugar and a chance to use a buzzword (LINQ).

My simple data class:

?Download download.txt
1
2
3
4
5
public class ReturnRecord
{
    public String FieldKey;
    public String FieldValue;
}

Basically, I needed to return an array with the key/value pairs found in a text document (of type ReturnRecord[]). RegEx was my obvious choice for parsing the text and finding the key value pairs. The keys and values will be decorated with #’s in the document.
Sample text:

?Download download.txt
1
String text = "Blah blah #key#value# blah blah.";

Here is my RegEx setup:

?Download download.txt
1
2
Regex regex = new Regex("#(.+?)#(.+?)#");
MatchCollection keyvalues = regex.Matches(text);

Now I can use a nifty LINQ query to create the array for me without having to write the usual for-loop plumbing. As you can see, LINQ creates the objects and initializes them for me in a single query.

?Download download.txt
1
2
3
4
5
6
7
8
9
List<returnrow> results;
if (keyvalues.Count > 0)
{
results = (from Match m in keyvalues
select new ReturnRow
   { FieldKey = m.Groups[1].Value, 
     FieldValue = m.Groups[2].Value }
     ).ToList();
}</returnrow>

All that’s left is to return

?Download download.txt
1
results.ToArray()

and I’m done. It’s that much less for me to maintain.

MSDN has some examples as well http://msdn.microsoft.com/en-us/library/bb882639.aspx or, check out this post http://schotime.net/index.php/2008/03/10/linq-and-regular-expressions/.

.NET , ,

Driving Silverlight adoption

December 6th, 2008

What will drive Silverlight to widespread adoption?

Content, content, and more content.

That’s it. People need a reason to install the Sliverlight plugin. Entertainment is a great motivator. Videos, games, and interactive content.

Flash is the most popular video player on the web. Interactive web games are primarily made in Flash. Silverlight needs to make some inroads into the web entertainment market.

Or, they could just cheat and include it on Windows Update and ship it with every product they make.

Silverlight