Showing posts with label orcas. Show all posts
Showing posts with label orcas. Show all posts
Monday, 19 November 2007
Thursday, 1 November 2007
18th / 19th of March in the UK
On MSDN Flash, Daniel Moth has indicated something big is happening on the 18th and 19th of March.
I am assuming it is some sort of marketing launch for Visual Studio 2008, since the US marketing launch is February.
I guess I need to block out those dates
I am assuming it is some sort of marketing launch for Visual Studio 2008, since the US marketing launch is February.
I guess I need to block out those dates
Thursday, 18 October 2007
ASP.NET rebuilding inapproriately
I have been aware of this awhile now, but it has only annoyed me enough today to blog about it.
If you are using Orcas Beta 2, ASP.NET Web Application Projects, if you modify the aspx file (not the code behind), it seems to be forcing recompile of the whole app. Aaaaargh.
I may have got some funny setting go on, but it is annoying
If you are using Orcas Beta 2, ASP.NET Web Application Projects, if you modify the aspx file (not the code behind), it seems to be forcing recompile of the whole app. Aaaaargh.
I may have got some funny setting go on, but it is annoying
Friday, 12 October 2007
Bug: Attaching to Debugger with asp.net development web server
I know i use a strange method of debugging but nonetheless it has always worked in Visual Studio 2005.
I start the asp.net development server via the command line and then attach to the debugger whilst working in asp.net.
This has always worked in Visual Studio 2005, but doesn't seem to work in Visual Studio 2008. I thought it might be something I have done on my machine (hence why i haven't blogged about it before), however Allister ran into the same issue yesterday.
I am not ruling out the fact that it might be something wrong with the solution or project files (haven't tried this against different projects), however it is a little annoying.
This has meant that i have been back to using the play button (i could instead use IIS and attach that way, but i don't want too).
Hopefully this will be fixed for the RTM.
I start the asp.net development server via the command line and then attach to the debugger whilst working in asp.net.
This has always worked in Visual Studio 2005, but doesn't seem to work in Visual Studio 2008. I thought it might be something I have done on my machine (hence why i haven't blogged about it before), however Allister ran into the same issue yesterday.
I am not ruling out the fact that it might be something wrong with the solution or project files (haven't tried this against different projects), however it is a little annoying.
This has meant that i have been back to using the play button (i could instead use IIS and attach that way, but i don't want too).
Hopefully this will be fixed for the RTM.
Tuesday, 25 September 2007
Last Night's Nugget in Birmingham
OK,
So i've just done my first ever nugget / speaking gig. My subject was Visual Studio 2008 (Orcas) for Web Developers targeting .NET Framework 2.0.
Thanks to Dave McMahon of NxtGenUG for letting me doing my first ever nugget up there. The guys at our sister region in Birmingham are brilliant, and I will certainly try and get up to their user group as much as possible (it is a trek though).
I was hugely over ambitious with topic, and subsequently ran out of time. Guy Smith-Ferrier was curious before the event on how i was going to cover such a topic in such a short time frame. I think the answer was naiveity, over optimism, and lack of experience. As we later discovered, really I could cover this as a main session rather than as a nugget. Thanks to Dave for humouring me, and let me stretch the time boundaries as long as possible.
Despite my timing problems, and the fact that i barged through the presentation trying to get as many features in as possible, i think it went pretty well. However feedback will reveal all.
A special thanks must go to Guy for being so supportive, and being a brilliant speaker. So I have taken some of advice on board, and I am now bashing on with trying to get more involved in the speaking community. I have taken some great tips from him, and i learned loads from last night, so onwards and upwards to my next speaking gig.
On that point I am offering 2 sessions on Silverlight for DDD6, so hopefully the community will vote for one of them, and I will get a chance to present at such a large event.
Anyways enough of the waffle:
Here are the slides and sample code for last night.
So i've just done my first ever nugget / speaking gig. My subject was Visual Studio 2008 (Orcas) for Web Developers targeting .NET Framework 2.0.
Thanks to Dave McMahon of NxtGenUG for letting me doing my first ever nugget up there. The guys at our sister region in Birmingham are brilliant, and I will certainly try and get up to their user group as much as possible (it is a trek though).
I was hugely over ambitious with topic, and subsequently ran out of time. Guy Smith-Ferrier was curious before the event on how i was going to cover such a topic in such a short time frame. I think the answer was naiveity, over optimism, and lack of experience. As we later discovered, really I could cover this as a main session rather than as a nugget. Thanks to Dave for humouring me, and let me stretch the time boundaries as long as possible.
Despite my timing problems, and the fact that i barged through the presentation trying to get as many features in as possible, i think it went pretty well. However feedback will reveal all.
A special thanks must go to Guy for being so supportive, and being a brilliant speaker. So I have taken some of advice on board, and I am now bashing on with trying to get more involved in the speaking community. I have taken some great tips from him, and i learned loads from last night, so onwards and upwards to my next speaking gig.
On that point I am offering 2 sessions on Silverlight for DDD6, so hopefully the community will vote for one of them, and I will get a chance to present at such a large event.
Anyways enough of the waffle:
Here are the slides and sample code for last night.
Monday, 24 September 2007
Interview with Scott Guthrie (covers Silverlight, MVC, Offline)
This is kind of interesting.
Its an interview done with Scott Guthrie. A lot of the info in the article, Scott talked about already at Mix, but its just nice to see it in one article.
The interview covers offline access (interesting he gave the same answers in the interview, as the answers he gave when i asked him a similar question at the cup of tea session).
It also covers MVC, Moonlight, Silverlight, asp.net etc.
Its an interview done with Scott Guthrie. A lot of the info in the article, Scott talked about already at Mix, but its just nice to see it in one article.
The interview covers offline access (interesting he gave the same answers in the interview, as the answers he gave when i asked him a similar question at the cup of tea session).
It also covers MVC, Moonlight, Silverlight, asp.net etc.
Tuesday, 4 September 2007
Starting Development Web Server from Command Line in Orcas Beta 2
This is a followup to my previous post
To start the Development Web Server in Orcas Beta 2 from a command line / batch file, you need to use this command:
"C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0\WebDev.WebServer.EXE" /port:8080 /path:"mywebsitepath"
To start the Development Web Server in Orcas Beta 2 from a command line / batch file, you need to use this command:
"C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0\WebDev.WebServer.EXE" /port:8080 /path:"mywebsitepath"
Visual Studio 2005 and Orcas co-existing, running Web Application Projects
Continuing my series of how to make Visual Studio 2005 and Visual Studio Orcas co-exist, and how Framework targeting works.
There is one further change required for web application projects:
Before conversion:
After conversion:
If you try this on a machine without VS.NET 2008 Beta 2 installed the project will fail to load because it cannot find the v9.0 path being referred to. The solution is to alter the converted line and replace it (using Notepad) with:
This way the correct version of the Web Application Projects targets will be loaded depending on the version of VS.NET you are using.
UPDATE:
This does however knacker MSBuild (arrrgh), so the best method is to modify this file in a custom task in TFS (which i guess I will create on monday)
Thanks goes to Tom Blackburn on this one
There is one further change required for web application projects:
Before conversion:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" />
After conversion:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
If you try this on a machine without VS.NET 2008 Beta 2 installed the project will fail to load because it cannot find the v9.0 path being referred to. The solution is to alter the converted line and replace it (using Notepad) with:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" Condition=" '$(Solutions.VSVersion)' == '8.0'" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" Condition=" '$(Solutions.VSVersion)' == '9.0'" />
This way the correct version of the Web Application Projects targets will be loaded depending on the version of VS.NET you are using.
UPDATE:
This does however knacker MSBuild (arrrgh), so the best method is to modify this file in a custom task in TFS (which i guess I will create on monday)
Thanks goes to Tom Blackburn on this one
Monday, 3 September 2007
Orcas Bug? Test View
I have find the quickest way of writing code these days, is to sort of follow Test Driven Development.
I am not anal about it, I just believe it is quicker for me to write code against a unit test, and debug the unit test, rather than the application. This strategy has saved me a ton of time.
Now that I am using Orcas in my commercial environment, annoyingly enough I am getting the following error when i attempt to debug a unit test:
"Failed to queue test run 'ch3@20070806PC01 2007-09-03 13:00:53': Unable to start program 'c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\vstesthost.exe'."
If i just run the test, it works fine, it is only when i attempt to debug it.
UPDATE
-------------
I've discovered what was causing the problem, I have a little batch file, which i haven't update which starts the WebDevServer (Cassini), but this is launched from .NET Framework 2.0.
I never run VS directly (in my work environment), I always attach to the debugger.
For somereason when i debug the unit test, it seems to clash with the WebDevServer, and it dies a horrible death.
I am not anal about it, I just believe it is quicker for me to write code against a unit test, and debug the unit test, rather than the application. This strategy has saved me a ton of time.
Now that I am using Orcas in my commercial environment, annoyingly enough I am getting the following error when i attempt to debug a unit test:
"Failed to queue test run 'ch3@20070806PC01 2007-09-03 13:00:53': Unable to start program 'c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\vstesthost.exe'."
If i just run the test, it works fine, it is only when i attempt to debug it.
UPDATE
-------------
I've discovered what was causing the problem, I have a little batch file, which i haven't update which starts the WebDevServer (Cassini), but this is launched from .NET Framework 2.0.
I never run VS directly (in my work environment), I always attach to the debugger.
For somereason when i debug the unit test, it seems to clash with the WebDevServer, and it dies a horrible death.
Friday, 31 August 2007
Visual Studio 2005, Visual Studio 2008 co-existing peacefully
If you want Visual Studio 2005, and Visual Studio 2008 to co-exist peacefully for the same projects, this might help you out.
I would recommend you minimize the impact of the conversion wizard by following this procedure.
1) Make a copy of your existing solution file (i.e. to have VS2005 and VS2008 version of the solution file, e.g. MySolution.sln and MySolutionOrcas.sln)
2) Open up the new solution, and choose not to convert any projects in the solution
This means you will be able to develop using Visual Studio 2008, and Target .NET Framework 2.0, but still be able to use Visual Studio 2005 (if required), or if other project members haven't moved across to Orcas yet.
Finally this method should also work with TFS meaning, you can develop with Orcas but your build server will know no better (I haven't tested this yet, but I'm pretty sure it will be OK as I have tested it with msbuild)
If you run into trouble you can do it manually:
For each project file in the solution change the first line from this:
to this:
The important part is the ToolsVersion="2.0", this will mean that VS2008 will not attempt to convert this project, and will target framework 2.0 for you :)
Finally once you have modified all the project files, you can open the new solution file (MySolutionOrcas.sln) in Visual Studio 2008 (Orcas Beta 2)
You can now allow Orcas to convert your solution (and it will not attempt to convert any of the other projects to Visual Studio 2008)
I would recommend you minimize the impact of the conversion wizard by following this procedure.
1) Make a copy of your existing solution file (i.e. to have VS2005 and VS2008 version of the solution file, e.g. MySolution.sln and MySolutionOrcas.sln)
2) Open up the new solution, and choose not to convert any projects in the solution
This means you will be able to develop using Visual Studio 2008, and Target .NET Framework 2.0, but still be able to use Visual Studio 2005 (if required), or if other project members haven't moved across to Orcas yet.
Finally this method should also work with TFS meaning, you can develop with Orcas but your build server will know no better (I haven't tested this yet, but I'm pretty sure it will be OK as I have tested it with msbuild)
If you run into trouble you can do it manually:
For each project file in the solution change the first line from this:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
to this:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="2.0">
The important part is the ToolsVersion="2.0", this will mean that VS2008 will not attempt to convert this project, and will target framework 2.0 for you :)
Finally once you have modified all the project files, you can open the new solution file (MySolutionOrcas.sln) in Visual Studio 2008 (Orcas Beta 2)
You can now allow Orcas to convert your solution (and it will not attempt to convert any of the other projects to Visual Studio 2008)
Tuesday, 28 August 2007
Orcas Framework Multi-Targeting
Within Visual Studio Orcas, the concept of framework targeting is introduced.
You can target any project or solution to any of the following versions of the .NET Framework.
.NET Framework 2.0
.NET Framework 3.0
.NET Framework 3.5
Visual Studio 2008 (Orcas) will always use MSBuild Toolset 3.5, which means that regardless of your targeted framework, and even though the code is compatible with .NET Framework 2.0, it will be generated using the latest C#, VB Compiler (not the compiler that shipped with 2.0).
This means that you can use features that produce IL compatible with .NET Framework 2.0 (e.g. Automatic Properties), but you can't use incompatible features (e.g. LINQ).
The code you deploy will be fully compatible, and will reference the dependant assemblies (system, system.data) that shipped with 2.0, but the IL will be produced by the latest compiler.
There is a word of caution here, if you use new language features you will not be able to continue to use Visual Studio 2005 (or existing TFS Build Server, MSBuild (for .NET 2.0)), you also cannot use Websites (not Web Applications), as this is compiled on the website.
If you are paranoid about beta code, then you should therefore develop in Orcas (ignoring new language features, and build in VS2005, or using the earlier version of MSBuild).
Visual Studio 2008 will also stop you from using the features of an earlier framework, until you retarget the framework (which you can do at anytime, (Right Click on Project, Select Properties, Application Tab, Target Framework)
). The support in the IDE is so good, that it will even hide web control specific to .NET Framework 3.5 (e.g. LINQDataSource and ListView).
There is only one gotcha to really be aware of, if you upgrade a solution to Visual Studio (2008), you will need to prat around with the solution to make it work again in Visual Studio 2005 (i.e. the version number in the solution file). This is a bit of a pain, but not the biggest deal in the world (since this is the only change).
You can target any project or solution to any of the following versions of the .NET Framework.
.NET Framework 2.0
.NET Framework 3.0
.NET Framework 3.5
Visual Studio 2008 (Orcas) will always use MSBuild Toolset 3.5, which means that regardless of your targeted framework, and even though the code is compatible with .NET Framework 2.0, it will be generated using the latest C#, VB Compiler (not the compiler that shipped with 2.0).
This means that you can use features that produce IL compatible with .NET Framework 2.0 (e.g. Automatic Properties), but you can't use incompatible features (e.g. LINQ).
The code you deploy will be fully compatible, and will reference the dependant assemblies (system, system.data) that shipped with 2.0, but the IL will be produced by the latest compiler.
There is a word of caution here, if you use new language features you will not be able to continue to use Visual Studio 2005 (or existing TFS Build Server, MSBuild (for .NET 2.0)), you also cannot use Websites (not Web Applications), as this is compiled on the website.
If you are paranoid about beta code, then you should therefore develop in Orcas (ignoring new language features, and build in VS2005, or using the earlier version of MSBuild).
Visual Studio 2008 will also stop you from using the features of an earlier framework, until you retarget the framework (which you can do at anytime, (Right Click on Project, Select Properties, Application Tab, Target Framework)
). The support in the IDE is so good, that it will even hide web control specific to .NET Framework 3.5 (e.g. LINQDataSource and ListView).
There is only one gotcha to really be aware of, if you upgrade a solution to Visual Studio (2008), you will need to prat around with the solution to make it work again in Visual Studio 2005 (i.e. the version number in the solution file). This is a bit of a pain, but not the biggest deal in the world (since this is the only change).
Tuesday, 21 August 2007
Friday, 17 August 2007
Javascript Intellisense Bug in Orcas Beta 2
I've been preparing for the nugget i am doing in Birmingham next month at NxtGenUg (I will follow up details on a later post).
I've been working on the ins and outs of intellisense for Javascript.
For some reason whenever i split code between files, intellisense doesn't seem to like it so much.
So for example if i have a person object function, and a test function in the same class, intellisense will work, and i can see the FirstName and Surname properties.
If however i move the Person class from my aspx file into a seperate .js textfile, intellisense breaks.
I've been working on the ins and outs of intellisense for Javascript.
For some reason whenever i split code between files, intellisense doesn't seem to like it so much.
So for example if i have a person object function, and a test function in the same class, intellisense will work, and i can see the FirstName and Surname properties.
<script type="text/javascript">
function Person(firstName, surname)
{
/// <summary>This is a person class</summary>
/// <param name="firstName" value="string">The first name of the person e.g. Johnny</param>
this.FirstName = firstName;
this.Surname = surname;
}
function Test()
{
var newPerson = new Person("fred", "jones");
}
</script>
If however i move the Person class from my aspx file into a seperate .js textfile, intellisense breaks.
<script type="text/javascript" src="Person.js"></script>
Cambridge User Group Launch (Evening of September 18th)
Oh yes!
I know have been a little quiet the past few days, and here is why:
We have just launched the Cambridge Region of NxtGenUG.
We have Mike Ormond doing a talk on Silverlight (full 60 minutes), and One of the Microsoft Researchy Guys (to be confirmed whom), doing a talk on F#, We also have Pizza, and We have Swag (free stuff).
It's going to be an amazing event, so please come along. You do need to register so we can plan for pizza and for the security guy at MS Research.
The group will be held at Microsoft Research in Cambridge (Thanks Guys).
After the launch event we will be holding one session every month, and we have some great sessions in the pipeline
Register Here (registration is free, come along and get free pizza):
I know have been a little quiet the past few days, and here is why:
We have just launched the Cambridge Region of NxtGenUG.
We have Mike Ormond doing a talk on Silverlight (full 60 minutes), and One of the Microsoft Researchy Guys (to be confirmed whom), doing a talk on F#, We also have Pizza, and We have Swag (free stuff).
It's going to be an amazing event, so please come along. You do need to register so we can plan for pizza and for the security guy at MS Research.
The group will be held at Microsoft Research in Cambridge (Thanks Guys).
After the launch event we will be holding one session every month, and we have some great sessions in the pipeline
Register Here (registration is free, come along and get free pizza):
Labels:
asp.net 2.0,
c#,
orcas,
Silverlight,
Silverlight 1.1,
Visual Studio 2008
Monday, 6 August 2007
Anonymous Types
I am going to be quite short in this article because I think Daniel Moth's article can explain anonymous types better than i can. However to be complete i will give a short explanation.
Anonymous Types as the name suggests allows you to create a strongly typed object without declaring the class in the first place (this does rely strongly on local variable type inference and Object Initalisers).
For example:
The cool thing about the example above is that mailingListSubscriber now has full intellisense within Visual Studio. At first I thought that was pretty amazing but if you think about what is happening behind the scenes it makes sense.
The anonymous type is not a latebound object, it is a strongly typed object which is autogenerated behind the scenes by the C# Compiler (open up ildasm and have a look for yourself). This means in reality there is no difference (to the CLR) between an anonymous type and a normal type.

Anonymous Types are restricted in the fact that they can only be used within the scope of a local method. This isn't a restriction imposed by the CLR (as i said the CLR doesn't care), but by the C# Compiler. This is a good restriction though, otherwise us developers would end up writing some unmaintainable crazy nonsense code. So thank you C# team for protecting us (from ourselves).
Is an autogenerated, local scoped, undeclared class useful? Damn straight it is, it is one of the many key features that makes LINQ work. I doubt you will ever use Anonymous Types outside of LINQ queries but boy are they useful there (You will notice anonymous types when using the select part of a LINQ query). Using Anonymous Types within LINQ allows you to focus on interacting with the data (in a safe and strongly typed manner) and forget about unneccasary object declarations, or worry about runtime issues with untyped objects.
I will no doubt discuss LINQ in more detail in one of my future blog posts.
Again thanks to Daniel Moth at Microsoft for keeping me straight as I voyage around the new features.
Anonymous Types as the name suggests allows you to create a strongly typed object without declaring the class in the first place (this does rely strongly on local variable type inference and Object Initalisers).
For example:
var mailingListSubscriber = new {emailAddress="a@a.com", spamMe=true};
The cool thing about the example above is that mailingListSubscriber now has full intellisense within Visual Studio. At first I thought that was pretty amazing but if you think about what is happening behind the scenes it makes sense.
The anonymous type is not a latebound object, it is a strongly typed object which is autogenerated behind the scenes by the C# Compiler (open up ildasm and have a look for yourself). This means in reality there is no difference (to the CLR) between an anonymous type and a normal type.

Anonymous Types are restricted in the fact that they can only be used within the scope of a local method. This isn't a restriction imposed by the CLR (as i said the CLR doesn't care), but by the C# Compiler. This is a good restriction though, otherwise us developers would end up writing some unmaintainable crazy nonsense code. So thank you C# team for protecting us (from ourselves).
Is an autogenerated, local scoped, undeclared class useful? Damn straight it is, it is one of the many key features that makes LINQ work. I doubt you will ever use Anonymous Types outside of LINQ queries but boy are they useful there (You will notice anonymous types when using the select part of a LINQ query). Using Anonymous Types within LINQ allows you to focus on interacting with the data (in a safe and strongly typed manner) and forget about unneccasary object declarations, or worry about runtime issues with untyped objects.
I will no doubt discuss LINQ in more detail in one of my future blog posts.
Again thanks to Daniel Moth at Microsoft for keeping me straight as I voyage around the new features.
Update to Intellisense Bug
Last week I blogged that Silverlight XAML Intellisense was broken when i used custom controls in Visual Studio 2008 (Orcas Beta 2).
Microsoft were very cool about it. Microsoft got back to me on the monday night (which was very fast), however i have been very slow to blog the results. Unfortunately I am neither as fast or as cool as Microsoft.
Essentially this is a known bug. And the reason is they used the Xml Editor rather than the Cider Editor (which they haven't had time to implement yet). This is very understandable as we are getting very very early previews of this stuff. Which means not all features are implemented. They will endeavour to fix it, but it is unlikely to be fixed until they do a release with the Cider Editor.
Thanks to Scott Guthrie, and Sam Spencer for being so quick.
Microsoft were very cool about it. Microsoft got back to me on the monday night (which was very fast), however i have been very slow to blog the results. Unfortunately I am neither as fast or as cool as Microsoft.
Essentially this is a known bug. And the reason is they used the Xml Editor rather than the Cider Editor (which they haven't had time to implement yet). This is very understandable as we are getting very very early previews of this stuff. Which means not all features are implemented. They will endeavour to fix it, but it is unlikely to be fixed until they do a release with the Cider Editor.
Thanks to Scott Guthrie, and Sam Spencer for being so quick.
Labels:
orcas,
Silverlight,
Silverlight 1.1,
Visual Studio 2008
Local Variable Type Inference
This is a great little feature which is now available in C# 3.0.
Local Variable Type Inference allows you declare a strong typed variable without specifying the type.
For Example:
At first I was a little sceptical about this feature. As any good programmer knows it is better and cleaner to know your types etc. From reading the code its not always obvious what the type of the variable is.
However this is nice in theory but in practise it is absolutely sweet, and saves you verbose local declarations.
There are some key points to note:
As I say although I initially had reservations about this feature, I find that when you are using enumarable types, or just instatiating an object with a large declaration (dictionaries etc), using the var keyword is more readable than double declarations.
Finally thanks to Daniel Moth for helping me out with my worst subject (whioh is giving things the correct name, Doh!)
Next post will be on Anonymous Types (and what they actually are)
Local Variable Type Inference allows you declare a strong typed variable without specifying the type.
For Example:
var myList = new List<string>{"Hello", "World"};
At first I was a little sceptical about this feature. As any good programmer knows it is better and cleaner to know your types etc. From reading the code its not always obvious what the type of the variable is.
However this is nice in theory but in practise it is absolutely sweet, and saves you verbose local declarations.
There are some key points to note:
- This is NOT equivalent to using a late bound object
- Local Variable Type Inference is equivalent to typing the full declaration yourself (the C# compiler will perform the subsitution for you).
- You must initialise with a value (e.g. var myString = "Hello";) so the compiler can infer the type. You cannot skip initalisation (e.g. var myString;) as this will produce a compiler error.
- You cannot switch types (i.e. initialise with a string, and then assign an integer, you must follow the same rules as fully declared types as they are equivalent)
- You can only use Local Variable Type Inference for a locally declared variable scoped within a method (as the name might suggest
As I say although I initially had reservations about this feature, I find that when you are using enumarable types, or just instatiating an object with a large declaration (dictionaries etc), using the var keyword is more readable than double declarations.
Finally thanks to Daniel Moth for helping me out with my worst subject (whioh is giving things the correct name, Doh!)
Next post will be on Anonymous Types (and what they actually are)
Silverlight and LINQ over Xml (XLinq)
I have been developing a very cool little app (which will be available in the next few weeks) and have been hit with a little snag.
Although I know that XLinq will be available in Silverlight, it currently is not available to use.
This left me with the dilemma of either using XmlReader to process the XmlDocument (this is the only supported method of parsing XML in Silverlight), or use a Web Service which returns the required objects and not use XML client side.
After much thought, I have decided it is better to download the XML and parse client side (and not go down the Web Service route). I can always rewrite the XML layer later on to use XLinq.
The reason i have decided to stick with my orginal plan of downloading the XML is to make effective use of caching, and to be able to give offline support.
I hope my thoughts on this might help you clarify your own thoughts when facing a similar problem.
Its a shame as the XLinq stuff is really neat, and I had a lot of fun playing with it last night. It really is a big improvement over using XmlReader or using the DOM (XmlDocument etc).
I will probably do a post about XLinq later on.
Although I know that XLinq will be available in Silverlight, it currently is not available to use.
This left me with the dilemma of either using XmlReader to process the XmlDocument (this is the only supported method of parsing XML in Silverlight), or use a Web Service which returns the required objects and not use XML client side.
After much thought, I have decided it is better to download the XML and parse client side (and not go down the Web Service route). I can always rewrite the XML layer later on to use XLinq.
The reason i have decided to stick with my orginal plan of downloading the XML is to make effective use of caching, and to be able to give offline support.
I hope my thoughts on this might help you clarify your own thoughts when facing a similar problem.
Its a shame as the XLinq stuff is really neat, and I had a lot of fun playing with it last night. It really is a big improvement over using XmlReader or using the DOM (XmlDocument etc).
I will probably do a post about XLinq later on.
Labels:
c# 3.0,
orcas,
Silverlight,
Silverlight 1.1,
Visual Studio 2008
Sunday, 29 July 2007
Rotating Video Picture Board
I have knocked up a sample of Rotating Video Picture Board in Silverlight 1.1 Alpha Refresh.
You can view a demo or download the source at http://www.chrishay.com/silverlight/rotatingvideopictureboard/
I have been a little lazy and not included a downloader, so you will probably want to hit F5 and refresh the page once the video has downloaded.
I will probably extend this in the future and turn it into a game of some sort.
You can view a demo or download the source at http://www.chrishay.com/silverlight/rotatingvideopictureboard/
I have been a little lazy and not included a downloader, so you will probably want to hit F5 and refresh the page once the video has downloaded.
I will probably extend this in the future and turn it into a game of some sort.
Labels:
orcas,
Silverlight,
Silverlight 1.1,
Visual Studio 2008
Friday, 27 July 2007
New Release of Silverlight for Orcas Beta 2
New Release of Silverlight for Orcas Beta 2 will be released today according to the supreme god of web (Mr Scott Guthrie).
Labels:
orcas,
Silverlight,
Silverlight 1.1,
Visual Studio 2008
Subscribe to:
Posts (Atom)