Featured, Silverlight »

[24 Aug 2010 | 1 Comments]

Today (second day after my vacation :-)), I’ve been looking for a solution to a rather nasty memory leak in a Silverlight application.  Typically, you can do this in two ways: by using WinDebug, or through Visual Studio’s Immediate Window.

 

I’m not going to go into the specifics of both – there are already blog posts about that, you can find a nice overview on how to debug Silverlight apps using WinDBG by Delay, another one by Ning Zhang here, and an overview of using it with the Visual Studio Immediate Window here.

 

However, I stumbled upon a problem that kept me amused frustrated for a couple of hours.  To be able to debug Silverlight apps this way, you need to load the sos coreclr extension.  Typically, in WinDBG, you’d do this as such:

 

!loadby sos coreclr

 

This gave me an “unable to load”-error.  No worries, maybe I had selected the wrong Internet Explorer process?  So I tried the other active processes, and tried loading it again.  Same problem.

 

Quick check to see if my symbol path was ok:

 

.sympath

 

didn’t make me any wiser – everything looked ok

 

Right.  So I tried debugging through Visual Studio’s Immediate Window (remember, if you’re trying this you need to enable the unmanaged code / native code debugger in your project properties), and loading the sos coreclr extension there.  Same problem.

 

You don’t even want to know what happened next.  I tried everything again, and again, and again with the exact path to sos.dll instead of through what was loaded in the iexplore.exe process.  And again in WinDebug.  And again in Visual Studio.  And again by having a look at the process with Process Explorer to see if I didn’t miss the correct process for the 70th time.  And again, in a different order.  Et cetera ad infinitum.

 

Nothing seemed to work.  So I tried some backtracking: what’s different since I last did this?  Well, I’ve now got a 64 bit processor, running Windows 7 – before I had a 32 bit processor running Windows XP.

 

So I checked if I had installed the 64 bit version of WinDebug.  Which I had.

 

And then I finally found the solution.  Although IE is 64 bit on my machine, Silverlight is not (simply doesn’t exist yet)!  So maybe I needed the 32 bit version of WinDebug?  I tried installing this (it can be found in the redistributables you get when installing the Windows SDK – which includes WinDebug) and … problem solved!  Magically, everything started to work as it should.

 

So, if anyone is looking to track down a Silverlight memory leak on a Windows 7 machine using WinDebug: remember to use the 32 bit version of WinDebug. 

 

Hope this saves some of you from a few frustrations! ;-)

General, Silverlight »

[15 Jul 2010 | 0 Comments]

My publisher is looking for new authors, so this might be the ideal time :-)  Have a look at the following:

 

Packt Publishing, the publisher of computer related books, plans to expand its range of Silverlight books and is currently inviting inquiries from people who fancy writing a Silverlight book. You do not need to have any writing experience to write for Packt. Anyone who loves Silverlight and fancies writing a book can get in touch with Packt at author@packtpub.com with his/her book ideas. Even if you don't have a book idea ad are just interested in writing a book, Packt is still keen to talk to you.


Read more details about this opportunity here: http://authors.packtpub.com/content/packt-invites-silverlight-experts-write-new-set-books

General, Silverlight »

[24 May 2010 | 0 Comments]

Gill Cleeren, with whom I wrote this book, posted a blog update with some reviews.  And I’m pleased to say: they’re good, very good even! :-)  Here are some excerpts:

 

Richard Costall’s review:

 

Microsoft Silverlight 4 Data and Services Cookbook is a great publication, and worthy of a place any Silverlight developers bookshelf. The formula of ‘recipes’ works well, with well explained, yet simple examples covering almost everything you’d ask when starting out building business applications in Silverlight. It highlights Silverlight 2 and Silverlight 3 functionality differences, yet is right up to date on Silverlight 4.

 

Damir Tomicic’s review:

 

Das Buch ist sehr praktisch geschrieben. Der Leser merkt sofort, dass Gill und Kevin die Ansätze selbst ausprobiert und für die Leser optimiert haben. Die gewählte Sprache ist einfach, die Beispiele auch für Anfänger geeignet. Ein guter Einstieg in das Thema.

 

Vikram Pendse’s review:

 

* * * * * (5 Stars)..Simple Amazing book !..Go and Grab your Copy Today !!! :)

 

I am thankful to Authors of this book for making available such a wonderful book to Silverlight Communities around the world and I also very much thankful to PACKT Publishing & staff,Geeta Sanganee of PACKT Publishing who given me encouragement to review this book and share review here on our blog with all of you.

So don’t waste your time here n there to get Silverlight 4 Book which talks about Data and Services,LOB etc., Just go ahead and grab a copy of this book Today !

 

Customer review on Amazon.com:

 

4/5 stars: All in all I recommend this book for anyone who wants an introduction to WCF and ASMX Services, REST and WCF Data Services, WCF RIA Services, the datagrid and dataform. This is a good book to start with

 

If you’re interested in my book, it can be bought at various places like the Packt Publishing site or Amazon.com.  If you find any other reviews, feel free to let us know!  Enjoy!

BESUG, Silverlight, WCF RIA Services, MVVM, Presentations and sessions »

[4 May 2010 | 0 Comments]

As mentioned in my previous post, my BESUG session on Model-View-ViewModel in Silverlight was recorded.  Well, today, it was posted at Channel 9!

 

For those of you who want to listen to my session, these are the links (att: in Dutch):

 

http://channel9.msdn.com/posts/adebruyn/Demystifying-MVVM--Part-1-Recording-BESUG-session/

http://channel9.msdn.com/posts/adebruyn/Demystifying-MVVM--Part-2-Recording-BESUG-session/

 

Have fun! :)

General, MVVM, Silverlight, WCF RIA Services »

[30 Apr 2010 | 0 Comments]

Thanks to everyone who attended my session on MVVM at BESUG yesterday (and thanks for the nice comments ;-))!  As promised, you can find the slidedeck and code here.

 

Included: Powerpoint slides, completed solution and DB Backup. 

 

What you need to run this: Visual Studio 2010 & Silverlight 4 (which includes WCF RIA Services).  For the database, you’ll need SQL Server 2008. 

 

    1. Restore the DB Backup
    2. Change the connection string in web.config
    3. Build, run & play with the code :-)

Hope to see you guys soon at some other event!  If you’ve got any questions on this, don’t hesitate to contact me.

 

Note: this session was also recorded and it scheduled to appear on Microsoft Chopsticks.  Once it’s been published, I’ll post the link.

Silverlight, WCF RIA Services, MVVM »

[22 Apr 2010 | 4 Comments]

As promised, here is the content from my Demystifying MVVM session @ Techdays Portugal.  For those who weren’t there, there’s a lot of stuff in this demo code:

 

  • MVVM base classes,
  • Connecting VM’s to V, using the Locator pattern
  • Connecting them using MEF
  • Unit Testing
  • MEF & Mocking
  • Command implementations (regular & generic), CommandTriggerAction
  • App wide messaging
  • Auto IsDirty support with WCF RIA Services
  • IDialogService implementation for showing Dialogs the MVVM way (same principle applies for your own navigation, states, animations, …)
  • … and some more stuff.

 

So: have a look at the code, and start MVVM-ing yourself in mintues! ;-)

Silverlight, General, Presentations and sessions »

[20 Apr 2010 | 0 Comments]

Just a quick reminder: Maarten Balliauw and I will be speaking at Techdays 2010 in Portugal this Thursday (that is, if our flight isn’t cancelled due to the ash cloud). 

 

We’ll be doing one session together: PHP + Silverlight, on how to get those two techs working together.  Maarten will be doing a session on PHP & his Azure SDK for it, Just another Wordpress blog, but more Cloudy , and I will be doing a session called Demystifying MVVM, on the Model-View-ViewModel pattern in Silverlight.

 

You will be able to find both the Powerpoint & demo code for my session on this blog soon after the sessions!

 

Feel free to say hi if you see me running around somewhere :-)