WebNet European Conference, Slides and Samples

I know that some time has passed since the conference, but I forgot to upload the slides and the samples of my session.

So, here are the slides (courtesy of Slideshare):

«Real Time» Web Applications with SignalR in ASP.NET from Alessandro Giorgetti
 
And this is the solution containing all the projects files, the dll packages to compile them and all the binaries and powershell scripts that I used to run the preconfigured demos (like a compiled version of Redis that runs on Windows to launch the backplane demos). The file is pretty big (over 10Mb), so it will take some time to download.
Sample Project: WebNetConf_SignalR.zip

Cya Next.

Related Content


The Web.Net European Conference: an amazing experience

A couple of days ago I had the pleasure to take part in the First Web.Net European Conference: lots of speakers from all around Europe, 4 different Tracks, 4 rooms always crowded by hungry Developers (I think from 7 different nationalities), and loads of information for us to take advantage of (what a shame that two of the sessions I would have liked to follow were scheduled at the same time of mine, I hope to see some videos A bocca aperta).

Ugo Lattanzi and Simone Chiaretta really did an impressive job organizing this conference and setting up the stage. It surely wasn’t easy to get in touch with everyone, find the sponsors and the rooms to host this event.

I have to admit that when Ugo get in touch with me ‘kindly’ asking (ok, ‘forcing’ maybe it’s the correct word) if I would have liked to host a session, I was a bit scared to not be able to do a good job due to my very tight schedule of these months (which also forced me to stop blogging for a while). But he insisted so much and promised that ‘bad things’ would happen to me in case of rejecting his offer, that I had no choice but to accept.

Looking at it now I really have to thank him twice: this conference was an amazing experience and gave me the change to meet old friends and make new ones, as I’ve also ‘twitted’: having the change to meet personally some of the guys you follow on twitter is priceless.

Seeing so many people really, really, really passionate for what they do to the point of sacrificing a Saturday to take an airplane, a train or whatever they used and move from all Europe to gather here in Italy is a thing that make me proud of being a “Dev”: it’s Saturday, you don’t get paid, you have to travel probably a lot, nonetheless you move your a## and head to the conference to learn new things and meet people like you.

Some Developers are really ‘one of a kind’, and all that were there Saturday, to me, are well suited into that category.

In the end of this ‘emotional’ post I would like to thank again all the Speakers (too many to mention them all, go check the agenda to see of how many names I’m talking about), the Audience and the Organization.

The slides and the samples of my talk: "Real Time" Web Applications with SignalR in ASP.NET, will be made available shortly on this blog or on the conference website.

Cya Next.

Related Content


WP7 - Test if your ViewModel is serializable

Writing WP7 applications (and the new Metro UI Apps in Windows 8) you will have to deal with concepts like ‘Tombstoning’ or ‘Suspension’; if you follow the MVVM pattern, there’s a very good chance that the status of your application page is represented by the ViewModel itself. So a quick and dirty way to handle those suspended states is to ‘persist’ the ViewModel (or the part of it that have actual meaning) to the application state or to a file storage and retrieve it at a later time when the application is reactivated.

if you put something that is not a primitive type inside the Application State or the Page State dictionaries, it will be serialized using the standard DataContractSerializer (on the subject of serialization and deserialization in WP7 you can read these previous posts of mine: WP7 Understanding Serialization and http://www.primordialcode.com/blog/post/wp7-datacontractserializer-bug).

A good way to avoid headaches when using this approach to handle tombstoning/suspension is the to test not only the behavior of your ViewModels, but also if your ViewModels are serializable; you can do this by using an helper class similar to this one:

public static class DataContractSerializerHelpers
{
    public static string ToXml(object obj)
    {
        return ToXml(obj, null);
    }

WP7 Unit Testing - getting started

Testing is important and it can save you lots of time, to successfully setup a WP7 Unit Test project I recommend you to first obtain the ‘NuGet Package Manager’ Visual Studio 2010 extension, it will make it a breeze to retrieve the latest version of libraries and packages and add a reference to them.

Here is a step by step guide on how to create your test project using the testing framework kindly provided to us by Jeff Wilcox:

  1. Open up Visual Studio and install NuGet if you do not have it: Tools –> Extension Manager, look for NuGet Package Manager in the Online Gallery.
  2. Create a new Windows Phone Application project, do not modify it right now.
  3. Use NuGet to get the latest version of the Unit Test framework for WP7, you can do it in two ways: 
        - for the ‘Tools’ menu chose ‘Library Package Manager’ and then ‘Manage NuGet Packages for Solution’
        - right click on the project you wish the package to be added to and select ‘Manage NuGet Packages’
  4. In the dialog that will open go to the Online section and look for ‘silverlight.unittest.wp7’
    NuGetSlUnitTestWP7
  5. click on ‘install’ to download and add the package to the selected project.
  6. it’s time to modify the test project following what’s written in the Test_Readme.txt file:
        - open up the MainPage.xaml and handle the ‘Loaded’ event
        - add the following line to the event to activate the test infrastructure: this.StartTestRunner();
  7. Done. Running the project you should see something like this:
    WP7ut1WP7ut2

You are now ready to write you own custom tests using a syntax and rules very similar the ones used by the MSTest suite that is already integrated in Visual Studio.

Related Content


Configure WebMatrix/IIS Express to work with WP7 on Windows 7

Long time is passed after my last ‘notable’ blog post, I was just too busy and lazy in the past months, lots of things happened and I couldn’t follow everything, but it’s not that I want to talk about, let’s talk about some more WP7 development.

Actually I am ‘playing’ with WP7, jQuery Mobile, WCF services and some various mobile stuff these days, honestly I was tired of having my WP7 device connected to the USB cable in order to be able to surf websites and use services that are hosted on my development machine. So I started to scouting around looking for a solution.

My goal is to be able to host websites and WCF services using WebMatrix ad IIS Express at first and a custom made WCF self hosting solution at a later time for my developing everyday life (and for demo purposes).

So here’s my current setup:

  • IIS Express/WebMatrix
  • Zune
  • WP7 + USB cable connected
  • a fantastic website hosted on IIS Express

Everything is working correctly here, I can browse the website from WP7 and test it, but I have to keep the cable connected, which is a no go if I want to make a demo of something to someone with a ‘floating’ device. I do not want to create new DNS entries, nor touch the network infrastructure nor do any other complicated IT or network related stuff, that’s not for me.

I want to be able to switch to this setup (both for testing and demo environment):

  • IIS Express/WebMatrix
  • WP7
  • still my fantastic website hosted on IIS Express

you see: no Zune, no cable, just me and my device (and Visual Studio of course). To obtain this we need to make IIS Express able to accept connections from the outside, you can do that following this guide:

http://blogs.iis.net/vaidyg/archive/2010/07/29/serving-external-traffic-with-webmatrix-beta.aspx

Here’s what I had to do in order to make things work:

  • Get your computer IP, mine was: 192.168.1.10.
  • Pickup a port you will use to host your service (using port 80 is bad idea on a development machine), I choose: 24778.
  • Configure HTTP.SYS (the component that is used to handle http requests) to accept external connection when running as standard user (you can bypass this if you launch WebMatrix and IIS Express with admin privileges, but that’s not good for security reasons), open a shell prompt with admin rights and type:

    netsh http add urlacl url=http://192.168.1.10:24778/ user=everyone
    

Windows 7 ATIKMPAG.SYS BSOD Solved (in my case)

After having updated the drivers for my graphic card to the latest version - Catalyst 10.12 as I write this post - taken directly from the ATI website, I started to experiment some Blue Screen Of Death (BSOD) at the startup of the OS.

More specifically it all was happening when the Catalyst CCC was about to be fully loaded.

The error message reported by the system was something like: “atikmpag.sys has stopped responding”, followed by the memory dump.

I tried some solutions found on the internet but nothing worked: I kept having the BSOD at the startup; I tried reinstalling the drivers but neither that has worked, I even tried some old versions of the drivers with no luck.

I was however able to startup the machine in recovery mode, so I started looking for some files left behind by the Uninstall manager: in my private profile directory I found a file that was storing all the drivers settings and customization that were made during the previous months. That file (called Profiles.xml) was not removed during the uninstall process, looking into that I’ve found some settings that turned to be the cause of my troubles with the new drivers.

To solve this issue just delete the “Profiles.xml” you can find in the user profile directory: ‘C:\Users\YOURUSERNAME\AppData\Local\ATI\ACE’; at the next restart this file will be recreated by the system with the default settings.

Maybe in the past I installed some gaming profile that caused some problems or tried some ‘experimental’ configuration to improve performances that was causing troubles, I don’t really know and, actually, I don’t really care Open-mouthed smile, but resetting it to the default values solved the problem for me avoiding a complete OS installation from scratch.