Friday, September 05, 2008

It took me a ridiculous amount of time to find this.

First of all, do not download the trial version that's readily available. It doesn't have the Service Pack in it. I figured that out after I did the 350 MB download, unzipped and installed, only to have the same old problems I had before SP0.

There are also a lot of broken links pointing to the pre-SAP takeover of Business Objects.

But I finally found it.

Start here:

https://www.sdn.sap.com/irj/sdn/businessobjects-downloads

Ignore the certificate request.

Click the link for Crystal Reports etc. Downloads

Fill out the form as shown

crdownload

Click Search and the file will appear.

If I had known I was going to waste all of that time today, I would have gone for that bike ride after all.

Friday, September 05, 2008 4:32:34 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, September 03, 2008

O'Reilly has us .NET authors going to the birds.

I've got a Seychelles Blue Pigeon.

You can pre-order the book on Amazon.com.

Here's a link to my book web site also: www.programmingentityframework.com.

 

John Papa's new cover has a bird as do the other Silverlight titles he displays in his blog post.

Wednesday, September 03, 2008 8:05:45 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

by way of Alex

 

Andrew Peters is joining the EF team. Funny to see all of the comments about the growing numbers of kiwis (is it PC for a non-kiwi to use that term?) at Microsoft. :-)

Wednesday, September 03, 2008 7:41:09 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Tuesday, September 02, 2008

I'm actually leaving my house and leaving my road and even leaving my state today. And I won't be doing it on my bicycle. I'm heading down to Springfield Mass to do an INETA sponsored presentation at the Western Mass .NET User Group hosted by MassMutual.

I've spoken at this group before when they were meeting at Atalasoft's very hip offices in a renovated mill with a cool history.I also remember having a long conversation with someone from Atalasoft about the challenges of annotating on the web. So it was no surprise to me to read a blog post by Lou Franco from Atalasoft who, upon seeing my recent MSDN Mag Silverlight Annotation article [Write On! Create Web Apps You Can Draw On with Silverlight 2] said that "It's one of the more compelling arguments I've seen for Silverlight."

And coincidentally, I was asked to do a presentation on Annotation in Silverlight 2.0 tonight. Funny how I assumed they would request an EF talk. ;-)

I have a demo app on my website if you're curious to see this technology in action.

And for some reason, my code download for the MSDN article is still not online on the MSDN site even though they got it before the article ever went online. Apparently, somebody has been on a nice long summer vacation.

If it's not up there in the next few days, I'll just put it on my own web site. It's a big download because it has embedded images.

Tuesday, September 02, 2008 8:50:39 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, September 01, 2008

I finally discovered OpenID when I wanted to leave a comment on a friend's blogspot blog. Google has recently adopted it. Read more about this open source service that lets you have one login identity which you can use on thousands of websites.

 

[A New Devlife Post]

Monday, September 01, 2008 1:00:57 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, August 31, 2008

Well, I never moved that sunflower that probably came from a seed in the nearby
bird feeder and it actually turned into the real thing! When it was really rainy there
were actually sunflowers sprouting in one of the bird feeder that you can see through
as it has plexiglass sides. It was pretty funny but I neglected to get a picture and now they're gone.

hanging sunflower

Here are some gratuitous pics of the front garden with the late afternoon sun washing out the house.

aug flowers 002 (Small)

aug flowers 003 (Small)

aug flowers 004 (Small)

Sunday, August 31, 2008 6:00:36 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Here's a little sidebar from my book that I think is pretty important.

Return Results, not Queries from the Business classes

While you can get away with binding a query when working directly in the code behind of an ASP.NET page, remember that the query’s job is to be executed and return results. Query execution requires an ObjectContext. If you returned the query itself from a business class, it will be detached from the context as soon as the business object is disposed (the business object, in turn, disposes the context) and you are very likely to get an exception when the query attempts to execute. If it is bound directly to a data binding control, that execution won't occur until the control is being rendered at which time the business object could be long gone. So in the business class, be sure to return results, not queries, and you wont' have to worry about how the methods are being used.

An additional benefit is that by executing the query and forcing the results to be iterated through (using foreach, First, ToList, etc), when the iteration is complete, the EntityConnection and its database connection are disposed. Therefore you won’t have to think twice about the database connection, which is an unmanaged resource.

efbookcover

Sunday, August 31, 2008 8:05:06 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, August 30, 2008

I'm safely tucked away in Vermont where we'll probably just get some good rainstorms as Gustav breaks up. But a lot of people who are at a very safe distance are still watching and worrying for everyone who is in its potential path. I cannot even imagine how terrifying it must be to be to anticipate this again after living through Katrina. While everyone is trying to get out of the way, I was happy to see this in the local paper this afternoon:

Eleven Vermont ambulances raced to the Gulf Coast on Saturday to ready for Hurricane Gustav, which has killed more than 80 people in the Caribbean and is due to make landfall early Tuesday morning along Louisiana’s coast.

We've got two spare bedrooms if any of you Gulf Coast geeks are looking to get FAR FAR away ...and we're dog friendly.

Saturday, August 30, 2008 7:06:57 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [4]  | 

For some background, check out a previous post called "Where's my Foreign Key?"

I came across a scenario where I have a foreign key for an entity in the form of an ID. And the scenario is in a web page. I need to turn that ID into an EntityReference, but I don't think that it's fair to ask the UI developer to know enough about EF that they should have to know how to create an EntityKey, much less know about EntityReferences.

Rather than force them to pass the ID up to the business layer, I finally gave in added foreign key support into the entities that I'm using in this web solution.

I've also gotten sick of having to write this code in many other places where I am creating relationships through EntityReferences. Especially when I make typos and then get this error at runtime.

Rather than futz around with a generic solution, I just manually created these keys in the partial classes for my entities.

As long as I was setting the EntityReference, I thought I would let the property provide the key on demand as well.

Here's an example from the Address class.

Public Property ContactID() As Integer
     Get
         If ContactReference.EntityKey.EntityKeyValues.Count > 0 Then
             Return CType(ContactReference.EntityKey.EntityKeyValues(0).Value, Integer)
         Else
             Return Nothing
         End If
     End Get
     Set(ByVal value As Integer)
         If value > 0 Then
             ContactReference.EntityKey = New EntityKey("myEntities.Contacts", "ContactID", value)
         End If
     End Set
 End Property
Saturday, August 30, 2008 2:20:25 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, August 29, 2008

Last Sunday's NY Times contained an article about multi-touch displays. "Turning Point for Touch Screens", which talks about iPhones, Dells' new Latitude and interviews the CEO of WACOM, who put the tablet in tabletpc.

But the only mention of Microsoft was when talking about the lack of software:

That could change if Microsoft delivers on multitouch technology that it has demonstrated and says will be in Windows 7, the next version of Windows, due in 2010. Such a move could galvanize software developers. Microsoft might also be able to spearhead a software standard that makes it easier for touch-enabled applications to work on the myriad kinds of touch technology.

Granted it's not a household item, but I was surprised that not one word was mentioned about Surface computing. This is multi-touch on a big scale with the benefits of WPF and oh so much more behind it. And it's a pretty nice prototype for laptops. Although it's more globally comprehended if I describe a Surface as a giant iPhone, I prefer to refer to iPhone as a mini-Surface. :-)

The Surface computing team already has an SDK - the beginnings of that software standard?  Here is the Surface team's blog if you are interested in the development side.

 

Screen_SnowBoard_00006 (Small)

Friday, August 29, 2008 7:14:24 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

If you create an Entity Key on the fly:

dim ekey=New EntityKey("NWentities.Customer","customerID",1234)

then add it to an object

cust.EntityKey=ekey

and then try to Attach the object to a context

cust.EntityKey=ekey

and you get this error message

The member with identity 'NWentities does not exist in the metadata collection.
Parameter name: identity

It's telling you that you have NWentities improperly cased. In my model, it's really NWEntities.

If you get this error message,

The required entry ''customerID' was not found in the provided input. This entry is required by the key fields defined on type 'NWModel.Customer'

then the issue is that the  property name is cased incorrectly.

You can only guess how long it took me to figure that out. Hopefully this will help someone doing a google search in the future.

Friday, August 29, 2008 11:14:33 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

This just popped into my inbox. IdeaBlade has released their EF version of DevForce.

DevForce EF is our latest product supporting Microsoft's LINQ and the Entity Framework.  It carries forward most of the features and all of our experience from DevForce Classic dating back to 2001. 

Why so special?

  • Full N-tier support for the Entity Framework (Entity Framework itself is only 2-tier)
  • LINQ for all your queries
  • High performance with client-side caching and asynchronous queries
  • Improved code generation and model management
  • Take the next step towards Silverlight - DevForce EF business objects are reusable in our upcoming Silverlight product

Sure sounds tempting!

Friday, August 29, 2008 6:48:59 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Thursday, August 28, 2008

Because my development machine crashed and burned last week, I had to build up a new box and decided to finally take the 64-bit plunge. Read more here: My first 64-bit computer

 

[A new DevLife post]

Thursday, August 28, 2008 10:14:11 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I just happened to discover this as I was setting up my new machine and grabbing Reflector off of the web.

It only happened a week ago.

There will still be a free community version but Red Gate will be able to put additional resources behind enhancing this tool that we can't live without.

You can read an with Lutz Roeder and Red Gate's James Moore in this Simple-Talk article, The Future of Reflector. (Simple-Talk is a Red Gate site.)

When asked if he will be involved, Lutz replies: "I will be using Reflector and I’m sure I will be emailing James every so often asking for new features.” LOL. I guess that means he will be a user like the rest of us. :-)

Thursday, August 28, 2008 9:19:40 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I finally did it. Late yesterday afternoon I had to get away from the computer so I hopped on my bike and headed south. I thought I would try, yet again, to see if I could get up the App Gap again. Having gotten past the first of two critical points last time, I knew exactly what to expect; so when it got extra hard, I knew that it would let up around the next bend. To make a long story short - I MADE IT! When I pushed past the place I gave up last time, I had my head down and was focused on staying upright (that gets hard when you are going 3 mph LOL) and the next time I looked up I was astonished to see that I was just a hundred feet from the parking spot.

Thanks Andrew (who I know will read this) for your advice. I kept my butt in the saddle the entire time until I saw the parking spot, then I got up and used the rest of it up (just because I could).

Plus I *did* suck down a ClifShot before I left; but since it took me 17 minutes just to get to the start of the climb, I think that was long gone by the time I got to the hard stuff.

What a great feeling. I was definitely drained and sat on a rock admiring the amazing view for about 15 minutes before heading down. It's scary and dangerous going down and I didn't want to do that when I was a little shaky and lightheaded. Which I was. Stupid me only bringing water rather than something like Gatorade to put some electrolytes back in my body.

I actually LOVE to go fast and when the road isn't windy with hairpin turns I go for it. It's one of the few times that my excess baggage is a benefit. (I discovered another benefit on a tour through the colorado rockies years ago during a bad rain storm. All of those skinny people were getting hypothermia but not me!) But I definitely brake most of the way down this road. A few weeks ago a bright young star in the cycling world who we are all SO proud of - Anders Newbury , crashed and broke his hip coming down. I kept thinking about that as I descended.

Anyway, now I know I can do it. Which means I can plan rides that go in that direction. Maybe next I'll try one of Andrew Knight's App Gap Ping Pong rides, since the other side is "easier". I remember when Andrew "discovered" that he likes to climb and was pretty amazing at it. Heh.

So I wouldn't say I dominated the mountain, but I did make it to the top...somehow.

Thursday, August 28, 2008 8:20:35 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Tuesday, August 26, 2008

topsearch

In the past 7 days "NHibernate 2.0" brought more traffic to my web site than any other. Oh the irony. ;-)

Tuesday, August 26, 2008 7:41:06 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 

faaI have always refused to take on any clients where an oversight or bug on my part might do something like bring down Wall Street or a region-wide power grid.

So with FAA's computer problems this afternoon bogging down traffic at 40 airports across the country, I am happy that nobody can come knocking on my door.

 

 

 

Tuesday, August 26, 2008 3:47:28 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Monday, August 25, 2008

Well it looks like somebody's been playing with my Silverlight Annotation sample that I put on my website . This is the application that is described in my MSDN article, Write On! Create Web Apps You Can Draw On with Silverlight 2. I just realized that the code download does not seem to be on the magazine website. I'm not sure why. The download is not just the samples displayed in the article but the complete application. I'll update this blog post when that gets corrected.

In the mean time I enjoyed seeing some of the clever annotations that have been drawn on the photos in my sample application. The drawings are stored in a database and called up when the image is selected from the listbox on the right. Each new annotation saved will overwrite the last so these beauties will eventually get lost and I wanted to save them.

annofuna

annofunb

annofunc

annofund

Monday, August 25, 2008 8:35:20 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Sunday, August 24, 2008

Last night I got to see a live Prairie Home Companion show. They were here a few years ago but I missed it and was so happy to have another opportunity. It has also been raining for about 2 straight months in Vermont (I am not exaggerating) and last night was the first warm, clear and STARRY night in a long time. So it was a perfect night for this. My friend Michaela and I were fortunate to have awesome seats because I bought them online the morning they went on sale (the minute they went on sale to be exact). The show will air on Sept 6th since they started at 8pm not 6 and couldn't do a live broadcast.

It was really fun to see the show in action - Fred Newman, Sue Scott, the amazing musicians in the All Star Shoe Band and of course the man himself. He referred often to how peaceful and beautiful Vermont is and talked so much about the train ride from NY to Vermont that I want to do it now. I've taken that train from NY to Rhinecliff and Poughkeepsie many times when I lived in NY State, but since I've been up here, I hadn't done the longer version.

The performance was at the fairgrounds in Essex Junction, near the train station and it was funny to hear the train whistling during the show as well as the screams of the people on the rides at the fair which just started last night.

They made lots of jokes about the alternative culture and invented the seedy "east Burlington" (people actually smoke cigarettes there! :-)) (which doesn't exist) for the Guy Noir skit. I've never seen video of Keillor doing his Lake Wobegon story telling. He does not use notes or a script. He's doing it from his head. And what amazed me was his ability to start a thread, go off on a tangent and quite a bit later, wind back to the original thread. I think that was especially noticeable to me because I do a lot of public presenting.

He does not stop performing. Even during the intermission he was leading the entire audience in song. Though when others are performing, he allows himself to fade into the background and let them be center stage.

I loved being able to watch Fred Newman at work doing his sound effects!

I can't believe I didn't bring my camera but it was a wonderful and memorable experience.

Sunday, August 24, 2008 9:20:11 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, August 22, 2008

Don't we always learn our lessons the hard way? My development machine was DOA this morning. I learned of a must-have accessory to keep around just in case on days like today and NO it is NOT a bottle of scotch! :-)

Read more...

[A New DevLife Post]

Friday, August 22, 2008 4:32:34 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  |