First project at new job complete!

23. June 2009

The first project I worked on at my new job was released today. The project required me to update some images, xml, C# code, and some Silverlight animations. It was based on code that was released a few months ago. The products just needed to be updated. It was a good start. The most interesting aspect was updating the code so that future product changes would be completely xml and image based changes. The application reads everything it needs from an xml file now and gets everything from the file system. So, it was great to get in and see how my boss codes and to put a little of my expertise in there too. Many more fun projects ahead! (go to http://www.microsoftintheknow.com to see the Silverlight product guide)

Silverlight

Blog on blog

3. May 2009

This site was written in (mostly) Silverlight 2. It still has some ASP.Net 2.0 features. It was mostly written using Silverlight 2, ASP.Net, WCF, and some LINQ here and there. There are some other interesting technologies running under the hood. But I have to keep some secrets. ;)

The toughest choices to make about the site were all about the content rendering. The decision about how to author and display blog entries took a long time. Because there are limitations with how text is displayed using Silverlight 2, and since I had a bunch of old posts stored as html, my choices were limited. The html could be converted to xaml. The html could be converted to pdf documents. The html could also even be rendered as XPS. There is a converter out there on MSDN for html to xaml and with some experimentation I found it wasn't what I wanted. The other converter projects were and probably still are in research phases. I looked at these options and tried a few out. For a while I was testing an xbap blog reader. The WPF flow document is sooo nice! But it isn't ported to Silverlight. :( Anyway, that would only work on PCs and I still had the problem of older stuff in html. It was the C# code to html converter that my blog uses which was the straw to break the camel's back. There was a whole open source project to do that and I didn't want to rewrite it for xaml. (Not enough time).

Ultimately, I decided to go with an html iframe hovering over Silverlight. The hardest part with that was placement in the browser. It was different between Firefox and IE, of course. The technique I came up with works well on most of the major browsers (still testing on others). Staying with html for content proved to be the right choice because I have an RSS page that also still depends on html content. I could also keep my authoring tools for html content. So that was nice. It meant using more ASP.Net in the site than I originally wanted. But they worked and I didn't need to spend time rewriting code. I imagine the New York Times reader project went through similar tough choices with content display and I suspect they are using iframes for the Mac based reader.

The best way then to describe this site is as a Silverlight 2/ASP.Net hybrid. I came up with a simple layout and color scheme for the site as I was going. Yep, it is red and blue! With the black font it seems to make the text easier to read. The really fun work was in the animations. If you refresh the page, you will see the banner animation. (At the time of this writing, there was a nice lens flare animation in the banner). That was a composition of several images made using GIMP. I did that yesterday and it took some time to implement since it was my first time using GIMP. That photo editing software had the best looking lens flare and free is a very good price. I may put other animations up later. The other animation that was fun was the right side date filter bar. I use a progammatic storyboard to change the width to zero to hide it and bring it back to the original width when needed. So, I got a couple of simple but nice animations in the site. I'm looking forward to making improvements.

There are a list of features that I'd like to get done. Comments, tags and tag clouds, interaction with Microsoft services in the cloud, Facebook integration, twitter integration, and SEO (search engine optimization). All that will take some time. I'm waiting for Silverlight 3 and RIA Services that should be coming out soon. The next version will be a complete rewrite. Other than cosmetics, I'll be switching gears to start developing using the beta tools for Silverlight 3. I hope to blog about my progress as interesting discoveries are made.

So, here is my Silverlight 2 Blog...like it? Oh ya, I still don't have a way for anyone to comment on blog entries. I'll put that in the next version. If you know me, you can always send comments to my email or Facebook. :)

Silverlight 2 Blog is Up!!!!

25. April 2009

Tonight, after many weeks of converting my ASP.Net blog site to Silverlight, I'm proud to say I'm finally done!!!  (with the first release)  This blog site was written from the ground up using Silverlight 2.  I'll blog more about my blog later....

 

Silverlight

code2plan Beta now available for download

7. January 2009
My good friend Jesse Johnston and his business partner Denis Morozov made their code2plan software available for download this week!  You can visit the web site for the project here: code2plan.com.  Get a copy if you are a developer or manager working with a team of developers.  The software comes in two flavors, as an add-in for Visual Studio 2008 Standard Edition or above and as a standalone application for Windows XP or later.  The software gives you Agile project management or Traditional project management tools.  Under the Agile setting a project can be managed with all of the basic tools you could want.  A story list, feature list, task list, and burn down report for starters.  It handles mutiple projects ith multiple developers and it has online and offline modes.  This is a great tool that is sorely needed in some dev shops in that it empowers developers and project managers to manage their projects with a nice integrated set of Agile tools.  Check it out!

Silverlight 2 Memory Leak Debugging

31. October 2008

Here is a list of Debugging tools for Windows 32 bit operating systems:

Download link for 32 bit installer: http://msdl.microsoft.com/download/symbols/debuggers/dbg_x86_6.9.3.113.msi

Debug Diagnostic Tool v1.1: http://www.microsoft.com/downloads/details.aspx?familyid=28BD5941-C458-46F1-B24D-F60151D875A3&displaylang=en Silverlight

Silverlight Developer Runtime: http://www.microsoft.com/silverlight/resources/tools.aspx

Walkthrough:

  1. Download and install from the above links
  2. Start your Silverlight 2 application – leave the application running (see step 11)
  3. Do something in your application that reproduces the memory leak issue.
  4. Run Debug Diagnostic Tool (from Programs menu)
  5. Go to the Processes tab to find the running Silverlight application process a. This should say iexplore.exe if the application is running in Internet Explorer
  6. Right click the process and choose “Create Full Userdump”
    a. This creates a dmp file that you will use later.
    b. The path is shown to you when it is completed in a message box (click ok to close the message box – does nothing)
  7. Run WinDbg from the Debugging Tools for Windows (x86) program group (from Programs menu)
  8. From the File menu, choose “Open Crash Dump” and select the .dmp file that was created earlier
  9. A window will open that says “Command” at the top
  10. There is a command arguments text box at the bottom. Type in the following commands and hit enter after each one:
    a. .sympath SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols
    b. .reload
    c. .load C:\Program Files\Microsoft Silverlight\2.0.31005.0\sos.dll 
       i. Note the path here. It points to a file installed with the Silverlight Developer Runtime and the path should correspond to the version installed
    d. !address -summary 
       i. this will give you an overview of the memory usage
    e. !eeheap -gc 
       i. to examine the size of the .NET GC heaps
    f. !dumpheap –stat 
       i. to dump out all .net objects in a statistical fashion
    g. !dumpheap –mt 
       i. replace with a value from the first column presented in above step, e.g. !dumpheap -mt 0x04e476b4
    h. !dumpobj 
       i. Replace with a value from the first column presented in the above step, e.g. !dumpobj 0x059911fc
  11. Repeat from step 3 using the same Silverlight application process. Open a new instance of WinDbg to open a new dmp file. The dmp files represent snapshots in time. So, in this case a memory leak should show increasing and not decreasing memory at each dump.

Silverlight

SQL 2008 Developer Laptop Install 2

10. October 2008

So there was one hitch in the get-along.  For whatever reason, the install I just posted about wouldn't allow my network account to login.  So, I had to add that account in the Security folder after logging into SQL Mgmt Studio as 'sa'.  Sheesh!  I did set Mixed Mode authentication on.  Anyhow, the good thing is that now I can use (local) and integrated security=true in my connection strings.

SQL 2008 Developer Laptop Install

10. October 2008

I get to work with SQL 2008!  So, the laptop I was given for work already had SQL 2005 Express installed as the default instance.  Why on Earth that was there, I don't know.  While there is probably a better way to change that during the SQL 2008 install, I opted to remove it completely.  So, with a lappy toppy clean of all SQL programs, I installed SQL 2008!  Awesome stuff.  Most of the install steps are intuitive.  The one thing I always like to do is install my SQL server as the default instance and turn on mixed mode authentication.  The other two things I ran accross during the install were the install wizard screen for setting a user account to the various SQL services, and setting the path for all the data folders.  This seemed like a new feature that the SQL 2005 installer didn't have.  Although I'm sure you could get in and change all the SQL 2005 services to run under specific user accounts if you wanted to.  I decided to look for guidance on th eweb and found the following step by step install for SQL 2008 RC0.  Which is still good in the full release.

http://sqlblog.com/blogs/andy_leonard/archive/2008/07/15/installing-sql-server-2008-rc0.aspx

So, under that guidance, I set up a new user account, put it in the Admin group, and setup a new Data folder at the root of C.  Then because I fear the unknown, I went ahead and set security on the folder to full control for the new user account and for the Network Authority/Local Service account.  What the heck, right?  I would not recommend that exact setup on a production server, of course.  The install wizard prompted for the Data folder path so I replaced the "Program Files/Microsoft SQL Server" part with "Data".  This is an install I can feel all warm and fuzzy about.  Now let's see if I hit any roadblocks later.  :)

Silverlight and WCF Error Handling Woes

8. October 2008

There is a limitation in using WCF with Silverlight when it comes to handing errors during method calls.  Receiving SOAP faults is not supported in Silverlight 2.
 
Silverlight "doesn't know what to do" with System.ServiceModel.FaultException. If it did, we could pass the exception object back and the client could work with a typed object.

The solution is to create our own object and pass it back. I've read about this being done as a serializable object with limited data, or as an out parameter in the WCF service methods, or even as a field of the custom type in a domain object.

Here are some links to that information:
http://www.atrevido.net/blog/CommentView,guid,ffa70c25-0c78-474b-8d60-10a693ffc407.aspx
http://silverlight.net/forums/t/18885.aspx
http://silverlight.net/forums/p/17944/60019.aspx#60019

Silverlight

Silverlight RC0 for Developers is Here!

26. September 2008

Taking control of Vista

29. August 2008

Today, a coworker was having problems with his Vista machine.  That got me started on a list of setting changes I've made to my installation that increased performance.  Albeit, some of these are risky in terms of security.  Here is a raw list of things you can do to speed up and free up disk on your Vista Business operating system (mileage may vary):

Turn off Windows Defender Service:
Administrative Tools/Services/Windows Defender service...right click, select Properties, change to Stop and set startup type to Disabled...will get a warning message when starting windows but is ok.

Turn off UAC - user account control:
Control Panel\User Accounts\Turn User Account Control on or off...turn it off .

Turn off System Restore:
Control Panel/System/click on SYstem protection...select the System Protection tab if it isn't already. uncheck any hard drives that you want to remove system restore points from. this will free up about 2GB of disk space.

Clear Problem Reports and Solutions:
Settings/Problem Reports and Solutions...click on Clear solution and problem history. the operating system will try to solve problems in the background if they exist in the list.

 

Code