November 2008 Code Camps

September 29, 2008

I love the spring and fall because Code Camps abound.  Such a great time reconnecting with friends and meeting new ones.  Going to sessions, learning so much from super speakers.  SWAG!  Who doesn’t want a free programming book?

This year I’ll be a traveling man.  Doing the coast to coast, back to back weekend thing.

November 8-9 Silicon Valley Code Camp

This will be my first time attending the Silicon Valley Code Camp.  The director Peter Kellner graciously allowed me to submit two sessions for the Code Camp.  My understanding is that the schedule will be finalize about 3 weeks before the event.

http://www.siliconvalley-codecamp.com/

November 15 Raleigh Code Camp

This will be my third year speaking at the Raleigh Code Camp.  Looking forward to a fantastic time and learning a lot.

http://www.codecamp.org/

Sign Up

Signing up and attending Code Camps was one of the best decisions as a developer I’ve made to further and expand my career and skills.  I strongly recommend that you sign up and attend one of these or another Code Camp in your area.

All developers have skills and experiences that can be shared.  If you have never signed up to present a session, go for it!  Get a mentor to help you with the preparation and delivery.  You’ll do great and others will be glad you put in the time and effort.

Have a great day!

Just a grain of sand on the worlds beaches.


XAML Power Toys 3.0.0 Released – Code Name: Refactored

September 29, 2008

Version 3 of XAML Power Toys is a major refactoring of the code.  I have re-engineered the entire application to make it easily extendable and for me to integrate with other developer .dlls, including C# code.  Adding a new feature is now super simple compared to the original version.  When I wrote the original version, some of the concepts were new to me so I wrote each of them completely; this way I could learn the best way to get from point A to point Z and could compare methods side by side. 

Version 3 also uses the Ocean framework.  I have not included the source for Ocean yet, but will be doing so in the next month or so.  XAML Power Toys has taken over my life like Mole did, so Ocean has suffered a longer release date than I wanted.

Thanks to Pete O’Hanlon for his great work on MoXAMLPowerToys.  Pete and I have been learning from each others work (code under the hood).  I patterned my CommandBase object after his.  Thanks Pete!

Version 3 Highlights

  • Rewrote the Fields List.  Added several cool features.
  • Removed all WinForms and WinForms MessageBoxes.
  • Have all code but one function running in the same AppDomain.
  • All forms that create code use the Control Defaults now.
  • Refactored control generation into one control factory.
  • All add-in actions are now encapsulated in unique commands. 
  • Taking advantage of code reuse by referencing Ocean framework.
  • Added various ToolTips at Josh Smith’s recommendation.

Version 3.x (future version)

Silverlight support is my number one priority now.  Need to be able to reflect the Silverlight assemblies without locking them.  Need to get into this and hope to get this done later this week.

Installation

For Version 3, you must use Control Panel to uninstall Version 2.   Sorry about this, but Version 3 has different file names that will not get removed unless you use Control Panel. 

Version 3 of XAML Power Toys can be downloaded on the XAML Power Toys Home Page.  There is also a video on the new Fields List.

Closing

I really hope that developers embrace the power of code generation in the UI spaces.  XAML Power Toys is a very simple application that can save hardworking developers and teams a huge amount of time during the development and maintenance phases of their products. 

I truly hope that others will develop and share powerful UI tools that empower WPF and Silverlight developers and designers.

Have a great day.

Just a grain of sand on the worlds beaches.


My First Month at Microsoft – XAML Power Toys Update

September 25, 2008

I’ve been at Microsoft for just over a month now and love it more today than when I joined.  While I’m still getting my feet wet, I’m doing a specification for a feature, and a good bit of AdHoc testing for several feature teams, providing input at meetings and learning the ropes. 

The scale of what goes on here is enormous and complex.  Trust me, I really am a grain of sand here.  We had our company meeting last week, it was in a baseball stadium.  It was quite a site to see and participate in.

I have a great deal of personal and professional respect for everyone I’ve met and worked with here.

Two days ago I ate lunch with the First Lady of Data Binding, Bea Costa.  I’ve been a huge fan and follower of her in-depth teaching on WPF Data Binding.

Today I got to meet my former MVP Lead, Suzanna Moran.  Suzanna is the Microsoft Client App Dev MVP Lead, providing support and leadership for her MVP’s.  She is plugging me into some local developer groups here in the Seattle area.  So while I may not display the nice blue MVP icon anymore, I’m still an MVP at heart.

On Friday, 26 September, I’ll be meeting with VB’s First Lady, Beth Massi.  Beth has a fantastic blog featuring VB.NET across many Microsoft Technologies including WPF, Silverlight, LINQ and more.  She is a former MVP and continues to be very active in the developer community.  Beth is a great teacher/speaker and produces super tutorial videos that I highly recommend.

I’ve been getting to work at 7:00am and leave between 4:30pm – 6:00pm.  So there is the element of hard work to be sure, but the campus lifestyle is super and grows on you.

XAML Power Toys

Today I recorded a Channel 9 video with Adam Kinney on XAML Power Toys.  It will air sometime in the next few weeks.  A real blessing to share the power of this WPF and Silverlight Line of Business Application form and DataGrid creation tool.

I plan to work on XAML Power Toys all weekend, adding in VB.NET language editing features ( C# shortly after that ). 

I’ll also be doing some refactoring so that I can allow other developers to hook into XAML Power Toys and add commands and features without recompiling.  More about this later.  Initially Josh Smith and I will be ironing this out.

I will also be testing XAML Power Toys with Silverlight a good bit more to ensure I didn’t create any problems.  I will also provide support for the Silverlight DataGrid soon.

If you have suggestions for features, please post a comment.

Closing

I really hope that developers embrace the power of code generation in the UI spaces.  XAML Power Toys is a very simple application that can save hardworking developers and teams a huge amount of time during the development and maintenance phases of their products. 

I truly hope that others will develop and share powerful UI tools that empower WPF and Silverlight developers and designers.

Have a great day.

Just a grain of sand on the worlds beaches.


XAML Power Toys 2.0.8 Released New Features

September 22, 2008

Current Version 2.0.8, Last Update 21 September 2008 

I’ve been working hard on XAML Power Toys and have a new release for you.  I’ll update the XAML Power Toys home page soon with better documentation.  For now, just watch the two new movies below and you’ll be up and running in no time.

If you have not installed XAML Power Toys yet, you should (I’m begging you) to watch all the XAML Power Toys videos on the XAML Power Toys Home Page.  These videos especially the installation video are essential to you having a great experience with XAML Power Toys.

New Features

  • Create WPF DataGrid For Class
  • Create ListView For Class 
  • Create Business Form For Class (enhanced)
  • Set Defaults For Created Controls
  • Group Into Border Feature (enhanced)
  • About Box

Original Features

  • Create Business Form For Class
  • Create Business Form
  • Show Fields List For Class
  • Group Into
    • Border, StackPanel, WrapPanel, etc.
  • Remove Designer XAML
  • Remove All Margins
  • Edit Grid Column and Rows

XAML Power Toys Home Page

I have updated the XAML Power Toy Home Page with the latest source, installers, documentation and of course videos! 

Have a great day.

Just a grain of sand on the worlds beaches.


Troubleshooting FileNotFoundException When Loading a Secondary AppDomain

September 17, 2008

One requirement of the XAML Power Toys Visual Studio Add-In is that the code must load and reflect assembly types that are currently being edited in Visual Studio.  In order to prevent file locking problems of the reflected assemblies, developers must load the required assembly in a secondary AppDomain; do the required processing and unload the secondary AppDomain.

When I was developing XAML Power Toys, I was running into FileNotFoundExceptions when attempting to load the current or different assemblies into another AppDomain.  I couldn’t figure out why I was getting the exception.  So I searched around the Internet, found other developers asking the same question.  I then ran into a post describing the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\EnableLog

By adding a REG_DWORD registry key named EnableLog and setting the value to 1, the FusionLog property on the FileNotFoundException will be populated with the reason the assembly couldn’t be loaded.  This information is available at even on release builds of your program that is having this problem.

The following exceptions have a FusionLog property that will be populated when an assembly fails to load, the run-time throws the exception and the EnableLog key has a value of 1.

FusionLog Property Information

If you do not have the above FusionLog registry setting set to 1, you will get the following text added to the bottom of the exception ToString output.

Exception

To enable the populating of the FusionLog property set the below EnableLog registry key to 1.  If the EnableLog key has not yet been added, you’ll need to do this.

REGISTRY

After you have enabled the FusionLog property and you get a FileNotFoundException during assembly loading, the following text (similar text) can be read from the FusionLog property of the exception:

=== Pre-bind state information ===
LOG: User = MyComputerName\karl
LOG: DisplayName = TroublesootFileNotFoundException, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///c:/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///c:/TroublesootFileNotFoundException.DLL.
LOG: Attempting download of new URL file:///c:/TroublesootFileNotFoundException/TroublesootFileNotFoundException.DLL.
LOG: Attempting download of new URL file:///c:/TroublesootFileNotFoundException.EXE.
LOG: Attempting download of new URL file:///c:/TroublesootFileNotFoundException/TroublesootFileNotFoundException.EXE.

The above log information details the steps that the .NET run-time executes when attempting to load the requested assembly.  The above path, filename and search paths give you the necessary information to easily troubleshoot why an exception is being thrown.

What is very nice about this feature, is that you can get this same excellent debugging information from deployed release build applications.  Just ensure you capture the exception and log the information for analysis of the problem.

Demo Application

I have included a demo application that when launched, creates a secondary AppDomain, executes a method that returns a String that is displayed in the console.

Un-commenting the following line of code in the demo application will cause a FileNotFoundException to be thrown when the run-time attempts to load the assembly in the secondary AppDomain.

‘objAppSetup.ApplicationBase = “c:\temp”

You can then add the above registry key and see how this setting will benefit your troubleshooting of applications running in release build, not inside Visual Studio.

Download

After downloading the below package you must rename the extension from .DOC to .zip.  This is a requirement of WordPress.com.

Download TroubleShootingFileNotFoundException  (15 KB)

Video

The below video walks you through the demo application and setting up of the above required registry key.

The video links require Microsoft Silverlight 1.0.  If you do not have it, you will be prompted to install it when you click one of the links.  After the short installation is completed, close the browser window that you did the install in and re-click the video you want to watch.   You can also download it here. Windows XP or Vista required.

  Troubleshooting FileNotFoundException when loading secondary AppDomains

Have a great day.

Just a grain of sand on the worlds beaches.


XAML Power Toys v2 Released (finally) Code Name: Hawaii

September 16, 2008

I know it has been two weeks, but it is finally here.  Trust me, I’ve crawled through a hot desert and survived a tidal wave to get this code released.  Another way to say it, I ate from a table full of humble pies!  These multi AppDomain Add-In’s can present challenges in a number of areas including security.  I’ll write a full Code Project article on the source code and how it works over the next two weeks or so.

Goal

The primary goal of XAML Power Toys is to deliver tools that enable developers to quickly layout and maintain Line of Business Application forms.  You’ll notice that the below features are business form focused.  This does not limit the use of the software, I’m just providing the current target project type.

After Silverlight RTM is released, I’ll update this software to render XAML targeted for Silverlight also.

Features

  • Create Business Form For Class
  • Create Business Form
  • Show Fields List For Class
  • Group Into
    • Border, StackPanel, WrapPanel, etc.
  • Remove Designer XAML
  • Remove All Margins
  • Edit Grid Column and Rows

Videos

I’m begging every developer in the strongest possible terms, please view the below videos.  They will get you up and running and productive in a very short time.  These are all new videos updated on 16 Sept 2008.

Code Name:  Hawaii

There is a rumor going around that I went to Hawaii this past weekend, (13-14 September) just to purchase new Hawaiian shirts.  Yes, that rumor is true.  I had a great time, got a super price on the ticket and got the new shirts I needed.  Also worked on this code a good bit during the trip.

So in remembrance of shirt buying spree in Oahu, this code based is named; Hawaii.

Cider Designer Goodness

The other day I was speaking with Mark Boulter, a Program Manager and Technical Lead on the Cider Team about the Cider Designer and why it was programmed the way it is.  He explained to me that one of the primary goals was to give developers the ability to lay a WPF form out using x,y coordinate layout and then quickly convert that layout to a table or grid layout.  This conversation helped me to use the designer rather than fight it.

In the above XAML Power Toys Accessories video, I demonstrate using the Cider Designer to quickly lay a form out using control drag and drop and then use XAML Power Toys to convert the layout to a flow layout.  In the video, you’ll see just how easy and fast you can lay a form out using the Cider Designer.

Version 3

Please leave your feedback, both good and bad.

Josh Smith and I will be leading the work on this project and have already created a decent size list of new features and enhancements.

Thanks To

I want to thank Bea Costa for her outstanding drag and drop example code, Rob Zelt and Josh Smith for their help on this project.  It is always a rewarding pleasure to work with them.

I can see another, “Mole like” sprint looming on the horizon.  Ideas and great feedback, fueling the hard work to develop useful features for WPF and Silverlight developers.

XAML Power Toys Home Page

I have updated the XAML Power Toy Home Page with the latest source, installers, documentation and of course videos! 

Have a great day.

Just a grain of sand on the worlds beaches.


Follow

Get every new post delivered to your Inbox.

Join 167 other followers