Wednesday, 26 September 2007

Feedback in from my nugget in Birmingham

Well the feedback is in, from the nugget I did in Birmingham on Monday night at NxtGenUG.http://www.nxtgenug.net/

All in all, I am pretty pleased with the feedback, so I guess it's time to get on and do more speaking.

Thanks again to everyone who was there on Monday, I really enjoyed it, and I'm glad you did too.

The feedback is below:
--------------

Really good, more time spent on this presentation would have been good.
(9) 25 Sep 2007 17:09

Very quick, intense review of some of the new features available in Orcas, could have done with more time for the quantity and quality of information.
(9) 25 Sep 2007 16:09

No Comment
(9) 25 Sep 2007 03:34

Great litle nugget. Wouldn't mind seeing an entire session dedicated to this.
(9) 25 Sep 2007 03:21

I'm a little biased on this one. However i would be crazy to mark myself down. You need to work on your timings more Mr Hay.
(9) 25 Sep 2007 04:56

No Comment
(8) 25 Sep 2007 05:36

No Comment
(8) 25 Sep 2007 04:50

Chris - how did you pack so much into so little time! A classic example of how to do a nugget!
(8) 24 Sep 2007 19:55

No Comment
(8) 25 Sep 2007 04:21

Good to just get a wistlestop tour on things that really matter to developers rather than the usual blurb!
(8) 25 Sep 2007 06:00

Great enthusiasm from Chris, the demos helped this nugget to be informative and the examples demonstrated each aspect clearly as well. Overall a good use of the short time we have for a nugget.
(8) 25 Sep 2007 12:51

Full of useful tips.
(7)

Tuesday, 25 September 2007

Iron Python in Silverlight

Michael Foord has got some great stuff on Silverlight with IronPython. You can see his Web IDE and other cool stuff at http://www.voidspace.org.uk/ironpython/silverlight/index.shtml

Michael did a very succesful talk at Mix earlier this month (which I didn't see unfortunately), but I heard a lot of good things about, and I believe he has a proposed session in at DDD in November (so hopefully i will make it this time).

I got a great comment on my blog from Michael,

"Hey, I didn't manage to find you at Mix - but I wanted to say thank you.I did a talk on IronPython and Silverlight at Mix, and a lot of your blog entries were inspiration for me.So thanks. :-)", which is kind of cool, if you look at the navigation bar it looks like the SKY EPG (which I am assuming he used the how to make a button tutorial) :)

I'm pleased that blog is proving useful to folks, and I promised to start writing more Silverlight soon, rather than just about community stuff (as I am the moment).

Anyways, I'm gonna take a couple of days off from technical blogging about Silverlight and resume service next week, I think.

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.

Monday, 24 September 2007

My Picture is on the Mix Backnetwork

I did my first ever .NET presentation a couple of weeks ago at Mix.

I hijacked the Micropresentations to do a short demo on the Silverlight Agenda application i created, and the Sky EPG reconstruction (I still need to post the source and samples for this).

I was just on the backnetwork and I recognised a piccy of myself doing the micropresentation (my mother would be very proud).

Anyways, that was my first ever speaking thing on .NET, and tonight is my first ever nugget / technical thingy (see previous post).

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.

NxtGenUG Birmingam Nugget tonight

I think I will be coming to the end of my blogging blackout, I have imposed over the past week.

Last week was a little crazy with a loads of stuff going on, hopefully things should calm down a little this week.

I am doing a nugget tonight in Birmingham at NxtGenUg, on Orcas Beta for Web Developers targeting 2.0..

I am pretty stoked about doing this as its my first speaking gig. Hey its only 15 minutes, but you have to start somewhere.

Although, I have had my talk prepared for a while now, I spent some of this weekend modifying it so I can keep it within the 15 minutes. I think the modifications i made should make the whole thing a little slicker. The good news is Maximum Code, Maximum Demos, Minimum Slides.

Anyways, I will post about it tomorrow, and include links to the slides and sample code.

Thursday, 20 September 2007

NxtGenUg Southampton

And the empire expands.....

NXTGENUG OPEN A NEW REGION IN SOUTHAMPTON!

Then there were 5! Two months, two new regions, first Cambridge now Southampton. Yes, The Next Generation User Group (NxtGenUG) is expanding (again) and this time they're heading South. The latest and warmest region of NxtGenUG is Southampton. The region is being organised and run by John McLoughlin and Rick Allen two local guys who have sourced a venue, projector, screen, pizza, swag and speakers all on their ownsome - all that a User Group needs or could ask for!

As ever when a new NxtGenUG region opens they insist on having a 'Launch' extravaganza, and this one is no different! The event will be held on 18th October 2007 at St Andrew's Hall, Southampton. The main speaker for the evening is top UK Community speaker Guy Smith-Ferrier speaking on Astoria and there will be a SQL Nugget from Dave 'Readyboost' McMahon. Pizza and Swag will be present also in abundance. All the details of the meeting are at http://www.nxtgenug.net/ViewEvent.aspx?EventID=85, and you can register for the event as always through the NxtGenUG website. Don't miss out on this event which kicks off at 6.30pm and finishes at 9.00pm, as there is only ONE launch meeting after all.

NxtGenUG are a User Group focused on current and future technologies and provide monthly meetings in Birmingham, Cambridge, Coventry, Oxford and Southampton. They love technology, chatting, pizza, swag, Halo 3 (well Richie Costall does) and having a laugh. If you're in one of their areas, get along to one of their meetings and get involved in the UK Community, its well worth it socially and professionally! Visit their website at http://www.nxtgenug.net

Cambridge Launch has been and gone

So we finally launched our first meeting of the new Cambridge region of NxtGenUG (.NET User Group).

It was a great night, both Mike Ormond (who was speaking on Silverlight), and Don Syme (speaking on F#) were superb.

We were a little worried about attendance (10 minutes before start there were 5 people, including ourselves), but we delayed the start until 6.45 and in the end we had 28 folk there.

I think it went very well, i know i enjoyed it (but I am biased), so we are now awaiting feedback to see how other folks enjoyed it.

This is pretty much the reason I have been blogging quiet for the past few days. And now i prepare for my nugget in Birmingham (so will be quiet for another few days).

Normal blogging will resume next week.

Wednesday, 12 September 2007

Distributed (Mesh) Computing with Silverlight

Following on from a bunch of previous posts mainly distributed computing in silverlight

Also the silverlight connected client without polling part 1 and part 2

I think its fair to explain that the source i posted up for part 2 is an example of Silverlight Distributed computing in action.

For example we could replace the for loop, and use some other client executable code, such Searching for Alien Life Forms, Performing Indexing for Google, Being a Google Autobot, the possibilities are endless.

I think I am going to explore this a little in the future, and try and post up some interesting utilities.

I will also clean up the server side code to be a little more real world, rather than play demo (please be aware it took me less than a hour to knock up that code last night).

Here is the source anyways

Silverlight Client Update without Polling part 2

Following up from my previous post which i posted at Mix UK.

Here is some of the specifics on how it works:

1) You should host your asmx file within the same web project you deploy your silverlight app on (to avoid cross domain issues)
2) remember to mark your class as [System.Web.Script.Services.ScriptService] so you can access it via json within silverlight

This is a sample of the web service code:



[WebMethod]
public bool PerformCalc()
{
//_startCalc = false;

while (!_startCalc)
{
System.Threading.Thread.Sleep(1000);
}

// Start the calc
return true;
}

[WebMethod]
public bool StartCalculation()
{
_count = 0;
_startCalc = true;
return true;
}


Essentially we have two web methods

1) One method Kicks off the calculation (i.e update the client)
2) The other method is called asynchronously, and essentially blocks until we kick off the calc.

This has the effect that the client will accept the update at anypoint without polling.

Here is the client code:



private void RegisterForCalc()
{
_request = new BrowserHttpWebRequest(new Uri(serviceUri));
//_request = new BrowserHttpWebRequest(new Uri("http://www.chrishay.com/Silverlight/Mesh/MeshService.asmx"));
IAsyncResult iar = _meshWS.BeginPerformCalc(new AsyncCallback(OnPerformCalc), _request);
}

public void OnPerformCalc(IAsyncResult iar)
{
_meshWS.EndPerformCalc(iar);
for (Int64 i = 0; i < 10000; i++ )
{
// do nothing
string blah = "blah" + i.ToString();
}
_meshWS.IncrementCount(10000);
tbCalcCount.Text = string.Format("Local Count: {0}, Total Count {1}", 10000, _meshWS.GetCount());
//RegisterForCalc();
}


Essentially this post shows that, we call the web service asynchronously, and then we perform some code client side, when we receive a repsonse from the web service.

Essentially you can use the code todo a lot of things you can't do just now (until sockets comes along)

For example:

Messenger
Stock Ticker
etc.

Silverlight: Updating a connected client without polling

I'm currently at Mix UK in London.

Yesterday at the Keynote at company called dot net solutions, demonstrated their Silverlight Scrumwall application, which was pretty cool.

The interesting part of the demo, was that they used asynchronous web services, and blocked the thread at the web service, in order to send updates to the client (without polling). In a world of sockets in Silverlight this sort of code is unnecessary but since we don't have socket support at the moment, it is a cool workaround.

They claimed to be the first to do it in Silverlight, so on that basis I will claim to be the second.

I can't give you an online demo as my server doesn't support 3.5 (2000) and targeting 1.0 is a hassle from vs2008, or if you want you can download the source.

I would suggest you point 3 browser windows on your own machine when you run the demo, click the "connect client" button for all 3 browsers, and then click the "Perform Calculation" button.

I will look into getting this hosted somewhere else.

Tuesday, 11 September 2007

Distributed Computing (Mesh Computing) with Silverlight

Somebody at the Developer panel at Mix Uk, mentioned Mesh computing with Silverlight, which is focused at the moment on Storage based computing.

This got me thinking that we could connect up enough browsers to perform lots of calcs (alien searchy thingies), and send the results back to a web service.

This is more of a mental note for me to mock something up at some point, to show my point.

Perhaps some complex calc, show timing for calculation.
Show the calc halve, when another browser connects.

Silverlight and Offline Storage

I've posted about Silverlight Offline before (see this article)

I had a chance to ask Scott Guthrie today at Mix UK 07 about offline storage.

There are a couple of points which very interesting, the reason MS say they don't support offline storage is due to the definition of what being offline means. The sticky points are "what should happen to the data when the browser is closed?", Silverlight will not autosave data by default. You will lose your data if the browser cache is cleared. This behaviour is ok to us as developers, but not necessarily to all consumers.

So we can use features such as isolated storage in Silverlight, we just need to be clear to our users what it means?

Good news MS plan to up the Isolated Storage limit from 1Mb to a higher number (and allow users to increase that limit).

Other good news Microsoft plan to allow cross url access to the isolated storage, i.e. at the moment www.roskakori.net/fred.xaml and www.roskakori.net/bob.xaml would use seperate storage areas

Silverlight Controls Timeline

At Mix UK today, and Scott Guthrie reckons that we will start to see a decent set of controls (stackpanel, textbox etc) for Silverlight 1.1, by the end of this year and a refresh every 4 weeks after.

The controls will be provided in a supporting toolkit (with source). V.Cool.

Wednesday, 5 September 2007

Silverlight 1.1 updated feature list

Scott Guthrie has updated the list of features they plan to support for 1.1.

"Silverlight 1.1 Update
Now that Silverlight 1.0 is out the door, my team is cranking hard on our Silverlight 1.1 release.

Silverlight 1.1 will include a cross-platform version of the .NET Framework, and will enable a rich .NET development experience in the browser. It will support a WPF programming model for UI - including support for an extensible control model, layout management, data-binding, control skinning, and a rich set of built-in controls. It will also include a subset of the full .NET Framework base class library you use today, including support for collections, generics, IO, threading, globalization, networking (including sockets, web-services and REST support), HTML DOM, XML, local storage, and LINQ.

You'll be able to use any .NET language to develop a Silverlight application (VB, C#, JavaScript, Python, Ruby, Pascal, and more). It is going to really open up a lot of new development opportunities."

None of this is really new information (he has posted it in snippets in other blogs), however it means we know where we are heading now.

Silverlight 1.0 Released and Silverlight for Linux Announced

Yay,

Silverlight 1.0 has now been release, this a major milestone. Well done Microsoft, and Scott Guthrie has now promised that his team are now focused on 1.1 (the most important release in my opinion). Read all about it at Scotts blog

They have also announced they will collaborate with the moonlight folks on Silverlight for Linux.

This truly will be a cross platform triumph, Silverlight really will be the way we do web in the future (and the future is pretty close)

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"

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:



<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

Not written any Silverlight in a few days

I think i might be getting withdrawal symptoms.

The company i am working for have just let me know they plan to send me and a few others to TechEd in November. Therefore i have decided to enter Speaker Idol. I think 3 minutes might be harder than 20 minutes.

I have my first speaking nugget in Birmingham at the end of this month, and we launch the Cambridge region of NxtGenUG .NET User Group this month.

I am at Mix (as a delegate), next week, and then I head off to Vienna for a few days holiday.

And I am in Reading tomorrow meeting some folks at Microsoft (and attending the MSDN Evening event).

Life is busy, not had time to write Silverlight, but I think i will now go and spend some quality time with my Daredevil comics.

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.