Wednesday, December 31, 2008

I goofed off for a while today watching videos of things people are doing with Surface, the first public demo of the multi-touch screen developed by Jeff Han (father of CNN's Magic Screen) and more...

[A New DevLife Post]

Wednesday, December 31, 2008 7:15:21 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Thanks to Microsoft (including I.M., PopFly and XNA), my 15 year old nephew and I finally found a common bond over Christmas.

Read more...

 

[A New DevLife Post]

Wednesday, December 31, 2008 7:10:45 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, December 30, 2008

After a lot of head scratching, I was finally able to accidentally duplicate a mapping issue reported to me by a reader of the Rough Cuts version of my book, Programming Entity Framework. Then after a lot more head scratching, I was able to discover the pattern and workaround for this problem, which has also surfaced a number of times in the forums.

The issue is when creating associations where one of the ends is a 0..1 (zero or one) and one of the entities involved is derived from another entity. This screenshot demonstrates the scenario.

 

des_bug

 

The actual problem occurs when its time to map the association that has the 0..1 but the problem is behind the scenes and you would not know that it has occurred.

des_bug2

In the XML, the designer inserts a conditional mapping for the association:

<AssociationSetMapping Name="ActivityCustomer" TypeName="BAModel.ActivityCustomer" StoreEntitySet="Customers">
    <EndProperty Name="Activity">
      <ScalarProperty Name="ActivityID" ColumnName="PrimaryActivity" /></EndProperty>
    <EndProperty Name="Customer">
      <ScalarProperty Name="ContactID" ColumnName="ContactID" /></EndProperty>
    <Condition ColumnName="PrimaryActivity" IsNull="false" />
</AssociationSetMapping>

In my scenario, however the condition was not being inserted and the model would not validate. Instead I was getting the frustrating Error 3034 telling me that two columns were mapped to the same row. It was only frustrating because I had gone around in circles with the error and could not figure out what the problem was. I even looked at the XML, but the condition mapping in a valid model had not caught my eye as the obvious difference between the two.

I was creating the association and defining the Activity end as 0..1 : *, then doing the mappings.

I discovered that if I first created the association as 1:*, then created the mappings, the condition was being inserted properly.

So this 0..1 was on the derived type was confusing the designer.

My solution, therefore is to create the association as 1:*, do the mappings and then go back to teh association and change the Activity end to 0..1. This does the trick .

The bug has been verified and logged.

Tuesday, December 30, 2008 3:13:49 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, December 22, 2008

The Silverlight Toolkit folks at Microsoft are prioritizing their "Honey Do" list and one of the items on it is to be sure that more of their examples are in VB, not just C#. Of course, the toolkit should have originally had both C# and VB examples, but that's a different issue.

In order for that item to be high on their list, they need to see that there is a demand for it. So if you are a VB developer and would like to see the ToolKit include VB examples, go to their CodePlex site, sign in and vote for that item.

Here's a link for you:

http://www.codeplex.com/Silverlight/WorkItem/View.aspx?WorkItemId=1222

Monday, December 22, 2008 9:35:10 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [3]  | 

Vermont and Alaska are the only two states without AT&T service and therefore, no iPhones. That is about to change.

Read more here

 

A New DevLife post

Monday, December 22, 2008 5:45:15 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, December 21, 2008

Are you familiar with Community Megaphone? I ignored it when I was first told about it (sorry about that, Rachel!) because I thought "Uggh, yet another place I have to re-enter my user group meeting info." Boy, was that a short-sighted response. I'm now a fan. Read more...

 

[A New DevLife Post]

Sunday, December 21, 2008 2:50:10 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, December 19, 2008

On Tuesday I flew down to Washington D.C. to speak at the CapArea.NET User Group. It's such an easy group to get to since it means a 1/2 hour drive to the airport and a 1 hour and 15 minute direct flight. Top it off by being picked up by the Duthie Car Service which delivered me directly to the meeting and it's a very easy trip!

Every December, the CapArea group does a fund raiser with their raffles, selling the tickets for $2 each rather than just giving one to each person in the group. The charity was Teardrops to Rainbows which helps out kids (and their families) who are in the hospital for a long time battling cancer. They had 4 companies who had each committed to matching whatever was raised at the meeting. The meeting raised $600 which will equate to $3000 by the time the companies match that. Nice job, Scott and everyone.

jose and julieNaturally, I did a presentation on Entity Framework. I started with a few slides and then spent the rest of the time in Visual Studio which was fun. Lots of great questions.

I also got to finally meet Jose Luis Manners in person for the first time. Too bad that I said something that made him laugh at the moment the camera was clicked but I'm not sharing what that was.

I stayed (once again) with Andrew Duthie (who morphed from Andrew the Cab Driver to Andrew the Barista) and his family.  And because I was staying an extra day and night to speak at the NOVA Girl Geek Dinner, we all went into D.C. to the Natural History Museum at the Smithsonian on Wednesday. It's such fun to watch little kids eyes get VERY big when they see this stuff although poor Joseph (5 yrs old) was a little daunted by the sheer size of the dinosaurs in that exhibit.

That night I went to Falls Church to speak at the second meeting of NOVA Geek Girls run by SQL chick, Jessica Moss.

I love doing these for many reasons, but one of those reason is that the audience is technically diverse. It's not all Microsoft technology people. There were a bunch of gals from the Linux Chicks (I can't find a link). They were very cool young women with attitude and I totally dug talking to them.

The hour and 20 minutes went by quickly as we discussed all types of things around the them of being a chick in the world of IT.

I have to finish doing all of this Christmas/Holiday stuff (cards, etc) and will get my demos up on to my web site shortly.

Friday, December 19, 2008 1:37:22 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, December 16, 2008

Marco Poponi will be "the EF guy" at the DotNetUmbria meeting next Friday that covers different ORM options.

There will also be an Intro to ORMs, an nHibernate talk and a summary to help attendees compare and contrast ORMs.

So if you are near Umbria, Italy, check it out.

Tuesday, December 16, 2008 10:32:30 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

After 4 years without a real home, the Vermont Software Developer Alliance has recently opened an official office! This is big news.

The office, which has conference space, is in Colchester, Vermont.

Tomorrow's monthly VTSDA meeting will be the first to be held at the new offices and to honor this milestone, Governor Jim Douglas and Secretary of Commerce and Community Development, Kevin Dorn, will be the featured speakers.

Please join VTSDA, Governor Douglas, Secretary Dorn and the Vermont software business community in heralding in the new offices!

vtSDA Offices and Conference Space
245 South Park Drive
Suite 700
Colchester, Vermont 05446 USA
Map & Directions

Wednesday, December 17th, 2008

12:00pm - 2:00pm

James Douglas - Vermont GovernorThe Future of Software and
Technology in Vermont

James Douglas
Vermont Governor

Kevin Dorn
Secretary of Commerce and
Community Development

Come join Governor Douglas and Secretary Dorn as they mark the official opening of our new vtSDA offices.

More information is on the VTSDA website, but you can RSVP directly to meetings@vtsda.org.

To attend, please RSVP by
6:00pm Tuesday
December 16th, 2008

Click here to email your RSVP
If you'd like lunch, please
specify so in your RSVP.

I'm sorry to be missing this momentous occasion as I'll be in Washington D.C. for a .NET presentation at CapArea.NET tonight and then a presentation at the NOVA (Northern Virginia) Girl Geek Dinner tomorrow night.

Tuesday, December 16, 2008 10:09:58 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Monday, December 15, 2008

I've been writing a lot of C# code lately and its been fun. Why? Because it's new and different. But it's gotten me thinking more about the professed benefits of learning a new language every year. Read more here...

[A New DevLife Post]

Monday, December 15, 2008 2:33:27 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

I had a bit of fun in Quebec this week while trying to code on an English keyboard that was programmed for French Canadian keystrokes.  Read more...

[A New DevLife Post]

Monday, December 15, 2008 2:25:06 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

As long as I'm going to be in the D.C. area to speak at the CapArea.NET User Group on Tuesday, I'm going to stay an extra day and speak at the new NOVA Girl Geek Dinner (this will be their second event) on Wednesday. (Register here.) I'll be talking about "Defining the -ette in Geekette". Here's the cover slide of the presentation. :-) It's my favorite t-shirt from telerik, though my hair covers up their name and logo that is on the back of the shirt.

ettegeekette

Monday, December 15, 2008 8:02:06 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I'll be heading to the D.C. area on Tuesday to present an Intro to E.F.  at the CapArea.NET User Group on Tuesday. Meeting details are here. This is an INETA sponsored event. Thanks INETA! :-)

I've done a lot of presentations with this title though they have all been different and I'm constantly thinking about how best to give people a grasp of the breadth of E.F. in a short time. I mused about this in a blog post when I returned from presenting in Europe in October: Best approach for teaching first exposure to Entity Framework

So I'm going to try something new -- inspired by Dana Coffey's blog post about Chris Love's EF Presentation (linked to in the above blog post). My plan is to spend most of the session just building an app that lets me highlight various features of EF: building a model, looking at the metadata, doing a little customization, querying with LINQ to Entities, a great excuse for querying with Entity SQL, doing some generic programming, doing a bit of entity class customization and implementing some stored procedures. I'll probably do it with a WinForm app because building an n-Tier ASP.NET application with EF (which is what Chris did in his talk which was not an intro session) is too advanced for an intro session.

We'll see how this approach works rather than trying to have lots of slides about many features and then demonstrate them one at a time. What always ends up happening is that I spend way more time talking about a particular thing (generally that's the model itself) and not having enough time for everything else I had planned. And don't think that a full day solves this problem!  I could talk for a whole day JUST about the model or JUST about any one particular feature! That's why my book is so long. :-)

Monday, December 15, 2008 7:47:09 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [3]  | 
 Saturday, December 13, 2008

sorel Earlier this week I drove up to Sorel, Quebec (north of Montreal) to spend a few days doing some mentoring on Entity Framework with a consultant who has architected a nice implementation of EF in an enterprise application.

It was 55 F and pouring rain when I left my house. Sixty miles north at the border, the rain had turned to snow and the rest of the drive was on snow covered roads. Sorel had a foot of new snow so I was happy to have grabbed my Sorel pack boots and thrown them in my car before I left. I ended up wearing them quite a lot up there. Now I know why people assume that Sorel's come from Sorel, but in fact, they do not!

Saturday, December 13, 2008 4:11:36 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

While I was writing my book (Programming Entity Framework), I kept track of the page count in a spreadsheet. But I stopped counting a few months ago when the first draft of was nearly done. At that point, I still had to write the intro chapter (chapter 1) and the preface, add most of the C# code and the book still had to be copy edited and edited. Plus Danny Simmons was writing the introduction  which adds a few more pages.

I just got an email from my editor letting me know that the final book is going to be about 800 pages! And thankfully, this isn't a problem for O'Reilly so we don't have to start trimming anything. If you have been using Entity Framework you know there is a lot in there, a lot to learn and a lot to explain.

I'm a little bummed about the carbon footprint of an 800 page book, but I'm already finding it to be a useful resource for my own needs. I was working with a client this week and there were a number of times when I had to actually open up a chapter (lucky me, I have all of the word documents on my laptop ;-) ). I knew that I had solved the particular problem we were working on, but couldn't remember the exact details of how I did it or maybe I knew there was some code in there I could just copy and paste. I have also taken advantage of my querying chapters a number of times when I couldn't remember how to construct a particular Entity SQL expression. Hopefully this will be as good a resource for others as I am finding it is for myself! :-)

It's still targeted for a January 15th release.

Saturday, December 13, 2008 9:49:32 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [3]  | 
 Tuesday, December 09, 2008

John and I have provided a lot of support for each other while writing our books - comparing notes on everything how the writing process was going to how many pounds we were gaining over the course of our sedentary adventures. I've been heads down as of late getting through the copy edits on my book so haven't talked to him since DevConnections.

John's book, Data-Driven Services with Silverlight 2, is about half the length of mine so I was not surprised, and of course thrilled for him, when I read that his book is headed to the printer (buried in this post). That means we'll be able to get our hands on it soon and I know this is going to be a fantastic book.

Mine is still on target for mid-January.

Tuesday, December 09, 2008 8:29:52 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I read an article about how Apple has made it easy for developers to develop games for the iPhone and it bugged me becasue there was no mention of XNA Studio, so I wrote a blog post about this over on my DevSource blog.

 

[A New DevLife Post]

Tuesday, December 09, 2008 8:16:57 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Last week I uploaded the demos from the Mapping session (NET455) I taught at DevTeach on Thursday morning. Things were a blur following that!

I now have the demos from the afternoon session Object Services Deep Dive (NET466) on the web site as well as the demos from the full day workshop on Entity Framework that I did on Friday.

DevTeach attendees can log into the web site to access the downloads.

Those who attended my workshop will be happy to know that I uploaded only the ZIP file and not the entire folder that the zip file was a part of. I originally did that by accident and embarrassed someone who found my special photo from Las Vegas which was  part of my Silverlight InkPresenter session at DevConnections a few weeks earlier. Oops! A few opportunists may have been disappointed to learn that I had already blogged the photo and therefore they would not be able to blackmail me for free copies of my book to keep the picture off of the front page of the NY Post. ;-)

Tuesday, December 09, 2008 1:47:04 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Thursday, December 04, 2008

For attendees of my EF mapping session, I have uploaded the latest version of the PowerPoint (that's the verson I used this morning) and a zip file with the demos and database to the DevTeach site.

I had a bad fat-finger moment at the beginning of the session where I inadvertently typed a "]" into the app.config file when I was commenting out the first connection string.  Now that I found it, all of the code which lets you see the mappings being worked out in SQLProfiler work just as perfectly as they did before I screwed up the app.config file.

The zip file contains a sql server database file for SQL Server 2005. When I get home and in front of my red-gate tools or my SQL Server 2008, I will create a script fiel that will create the database with its data and add it into the site.

Thanks for coming!

Thursday, December 04, 2008 1:56:08 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  |