Tuesday, May 20, 2008

Linq for .NET 1.1 and 2.0??

Linq is a nice feature of .NET 3.5, but it means that to use it people need to upgrade to VS2008 and C# 3.0. That was the plan, and that is what I did. But people don't need to do this still. There are a couple of implementations of Linq that you can use on earlier versions of Visual Studio and .NET. This shows that Linq is an easy to use tool that people are enjoying using. Now, none of the other implementations are perfect, but it's a start.

.NET 2.0 Implementation

.NET 1.1 and 2.0 Implementation

Friday, May 16, 2008

Silverlight Streaming and Isolated Storage

Microsoft is really pushing to enhance their presence online with Silverlight. A service that they provide for people is part of the Live.com site. Microsoft Silverlight Streaming is a Silverlight app and media hosting site that Microsoft provides with 10G of online space. This is a free service from them.

With Silverlight 2.0 beta1, the app compiles into an .xap file that can be uploaded to the Streaming service I went over this in a previous post. To test this out I made a small sample of a TicTacToe game. I got lazy and made it use colors instead of graphics for each square. I also just had the computer pick a random empty square to make things simpler. One thing that I wanted to test out was the isolated storage so that you could keep track of your scores locally on the machine since this is a web-based app. It was pretty easy to setup IsolatedStorage to save this data using a stream writer. IsolatedStorage is very limted, but for this example I am only storing 3 ints, so I was not worried.

One interesting thing is that a Technical Evangelist from Microsoft (who will remain nameless) said that you could not store data locally using a Silverlight application. During his MSDN Roadshow, I pointed out that actually you could do that and he was abit surprised. Of course then he stated that Microsoft might just remove that ability plus it is very limited storage, so to be careful with it.



People always ask for source code for samples like this, so here is the source. Now, I know this little game is not that exciting, but it's Silverlight, with local storage, and using the Silverlight Streaming site, so that is what is cool.

Tuesday, May 13, 2008

The Woes of Playing the Beta Game

There is alot of beta software out there. Google release alot of web applications as beta for years, Silverlight 2.0 is beta, you can get beta (or earlier) copies of Window and more. One thing that people have to be aware of beta software is that it is not complete and you risk things by using them. Microsoft just released a beta 1 for SP1 for the new .NET 3.5 and Visual Studio. Microsoft is saying that this service pack fro .NET will help speed things up and make installers smaller to name a few things. The problem is that beta software could cause you problems if you use it.

It This article on The Register give a clue to the latest issues with people that play the beta software game. So having the beta version of Silverlight and the beta version of .NET 3.5 will make it so that you could have an error installing the SP1 beta or make it where you cannot do your Silverlight development. Scott Guthrie says that they will be putting out new Silverlight tools in the next few weeks to help with this.

I limit the amount of beta software that I use. I am playing around with Silverlight beta 2.0 and will not be putting the beta of the service pack on my machines. Keep reading this blog... (and Scott's) for more info on this issue.

Tuesday, May 6, 2008

Silverlight Gaming

Microsoft has a site that make creating Silverlight project mashups very easy. They just announced a new addition to Popfly that allows people to make game mashups. They have a bunch of templates that people can start with. The core of the games are Silverlight. You can even get to the XAML code and manually change things. Here is just a sample of what you can do with just the sample templates. I will be playing with this some more and converting a sample game that I have to use this, but for now, enjoy this sample.

Friday, May 2, 2008

Free C# Ebook

I found a link to a new book that Bruce Eckel is working on. It is not the entire book, but just a preview of it. It is covering C# 3.0 and somce Linq expressions. Let me know what you think about it. I might do a full review later.

http://www.mindviewinc.com/Books/CSharp/Index.php