Wednesday, July 25, 2007

verb: to manually aggregate selected blog posts

I actually used this in a sentence the other day. Egad!

Wednesday, July 25, 2007 5:40:08 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

In my peripheral vision yesterday, I noticed something trotting by my office window. Looking up I discovered that those long legs belonged to a deer. Then along came her babies. I was able to click this through the screen before they ran off. I immediately went out to my veggie garden (the direction they had come from) to make sure they hadn't just had a little feast! All was in tact, though I wouldn't have minded if they had eaten the mustard greens which have bolted and are even more bitter than normal.

Wednesday, July 25, 2007 11:59:34 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Astoria, one of the two data access projects announced at MIX07 now has it's own Program Manager, Mike Flasko, and it's own blog. Astoria is something to pay attention to.

And congrats to Mike on his very recent wedding bells! He's a lucky guy! :-)

Wednesday, July 25, 2007 11:19:28 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

Unfortunately, we'll have to reschedule Rob Daigneau's Aug. 13th presentation on WCF. We're both bummed, but we'll get him back in the fall, for sure!

However, we lucked out because we were able to get Richard Hale Shaw to "fill in". Richard is one of the top instructors in the country and lives in Boston, so he is going to come up to present to Vermont.NET for our August meeting.

As if that wasn't enough, telerik has generously offered to sponsor this meeting. They will be covering Richard's T&E as well as our pizza. Rumor has it that there is a big pile of telerik's famously fun t-shirts on their way to Vermont as well along with software licenses!

Thanks to telerik, to Richard and also to Rob (who *really* wants to come, it just didn't work out this month)!

Definitely get August 13th on your calendar.

Stay tuned to the VTdotNET website for more details as we waiting on a topic from Richard.

Wednesday, July 25, 2007 9:37:47 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, July 24, 2007

Funny that my last post was a week ago as I was on my way to Michigan. Perhaps the fact that I have been silent for a whole week is testimony to the fact that I was having too much fun to sit down and blog about it!

Both user groups got "the same" presentation: Overview of ADO.NET Entity Framework, but as Jeff McWherter, (who attended both talks and did a lot of driving to do so!) notes, it was very different from one night to the next.

The first night was at the Microsoft office in Southfield, outside of Detroit, at the GANG user group. This one wasn't an INETA sponsored event, but as long as I was so close for the next night's meeting, I just came in a day early to do it. There were a whole bunch of fun and friendly folks there and I got asked a lot of great questions. It was also great to see some familiar faces such as Patrick Steele and Josh Holmes (who was on the INETA speaker bureau until he swallowed the red pill and became a D.E.).

The next night I spoke at GLUG in Lansing Michigan. But first I was treated to some local flavor thanks to u.g. leader Joe Kunk who was a great tour guide. Lansing is the capital of Michigan and Joe works for the House and was able to give me a great tour of the incredible and recently renovated state capital building. THen I was treated to lunch at a classic lunch spot called "Kewpees" where I experienced their famous Olive Burger. It took a little encouragement from Joe before I ordered it, but it was pretty good! I found the website with the Kewpee history where I learned that Kewpees was a chain but there are only a few left. One was actually in Utica, NY, about an hour from where I grew up.

After lunch I got to go visit the always fun Betsy Weber at TechSmith. I was surprised that when I was on the phone with her in their parking lot and asked "which building are you in?" she said "all of them". That's four buildings though they are building a new (green, LEED Certified... yay) building so they can all be together again. It's a big and growing company! Betsy introduced me to the president, Bill "We will not share your e-mail address with anyone else, period" Hamilton and (man, I really need to learn to edit when I talk) somehow my past job history at Playboy and Penthouse came up. Luckily, he is a funny laid back guy (which is probably why the whole company seems to have a cool and relaxed atmosphere) so I hopefully didn't shock him too much (though I think I did try just a little. :-)) Not only did I get to see what's coming in Camtasia (key to me is that many existing features will be much simpler to discover and use), but I also got a tour of the cool Jing project that had just been released 2 days prior and already had over 11,000 downloads.

Next on my tour was a tour of Michigan State and I can tell you that the locals are PROUD of this university!

The meeting was held on campus and I was surprised that there were almost 50 people there. Unfortunately I had a strange problem with my VPC which was finally solved with a total reboot of my computer (which takes some time to get everything up and running again) but thankfully I was able to do what I came to do. While I was futzing with my computer, the group was introduced to two reps from webhost Verio (located in Florida) who had come up from Florida to meet the group as they were the first to sign up for free hosting for INETA user group members. I was pretty impressed that they came up for this reason!

After the meeting I had a blast at Bennigans with a bunch of folks from the group and the Verio guys then it was off to Ann Arbor for a mini-vacation and the art fair.

Thanks to everyone who contributed to this really great trip!

I will post my revised Powerpoint and demos shortly and will write a quick blog post with links to them.

Tuesday, July 24, 2007 1:23:14 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, July 16, 2007

I'll be in the Detroit area this week giving presentations on the ADO.NET ENtity Framework at GANG in Southfield (Wednesday night) and GLUG in Lansing (Thursday night). THe Lansing talk is sponsored by INETA. Read more here...

[A New DevLife Post]

Monday, July 16, 2007 9:06:19 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

From the VTRails user group:

Meeting - July 25th at 6:00pm - Pub and Brewery in Burlington Downtown

We picked Pub and Brewery for the meeting, for it’s friendly atmosphere, location and good tasting beer. The plan is to meet everybody in person and shake hands and see what topics are attracting most of the interest.

We are going to raffle Rails Cookbook we received from O’Reilly.

See everybody there!

Monday, July 16, 2007 9:24:43 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, July 15, 2007

USA Today held a contest between towns named Springfield all over the country to host the premiere of the Simpsons movie. Springfield, Vermont had not been included and brought it to the attention of the organizers so they got on the list. Springfield, VT, like the state, is a small town with a population of only 9000 and a movie theater with only 100 seats. The other 13 towns were much larger... some are cities.

But tiny Springfield, VT actually won the contest with the most votes -- over 15,000. There have been a lot of complaints, mostly among the 21,000 comments to the above USA Today online article. Even an Oregon congressman got in on it although apparently he was just joking around.  Springfield, OR was one of the entrants and most likely the true inspiration for the Simpson's town.

So how did Springfield win with so many more votes than their population?

Even though I have only lived in Vermont for 8 years and will never be considered a true Vermonter (5+ generations required :-)), I can tell you why.

In many ways, Vermont is one big home town. Phish is the "local band" to many. Ben & Jerry's is "our ice cream" and there are Vermonters who are known to carry a small supply of the "only true" Maple Syrup with them when they travel. Most people who live in Vermont take pride in anything that hails from anywhere in our state. Obviously this doesn't apply to everything. You'll find lots of people who are dead-set against Civil Unions, Howard Dean and many other things deemed as the evils of the flatlander infiltration.

But on a different level, this "state spirit" really exists. It was quickly apparent to me after I moved from New York to Vermont. In New York state, it was hard enough to keep up with the entire county that you lived in, much less what was going on elsewhere in the state. 

And while I have never been to Springfield VT and had to look on a map to see where it was, I eagerly voted for it because I was voting for Vermont.

That is likely how Springfield got over 15,000 votes. The local daily newspaper in Burlington (Vermont's biggest city and over 100 miles away) treated this as front page news. The t.v. stations all had stories about it. So people all over Vermont became aware of the competition and many, like me, were proud to put their vote behind our little town. Vermont's entire population is somewhere around 600,00. Springfield, IL came in second with a little under 15,000 votes. If the same 2.5% of the state of Illinois had voted for their Springfield, they would have had 325,000 votes. If 100% of the residents of Springfield, IL had voted, that would have been over 100,000 votes.

So I am confident that it was state pride that won Springfield, VT this big spotlight of hosting the premiere. I have no idea how they will handle the potential number of people coming into the town  for the event. This is probably why they weren't in the original list. But that will be another story and it will be headline news all over Vermont for days and days.

Sunday, July 15, 2007 11:08:10 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, July 14, 2007

I don't have a Mac, but while I was working on my Silverlight annotation tests, I had a few friends try them out on Safari on their Macs and they reported that it just didn't work at all.

Now that we have a Windows version, I finally did a few tests myself.

At first, I was being prompted to install (the already installed) Silverlight.

This post by Jeremy Boyd helped me elimitate that problem. When the page first appeared the spot where my embedded Silverlight goo should be was all white. But I saw in this post by Tim Heuer (Tim suggests another solution for the seemingly uninstalled Silverlight, but that one didn't work for me), that resizing the browser helped and indeed, it did. I was surprised to actually see my solution appear!

Then I started clicking on the images on the right. Nothing happened. But when I inadvertently resized the browser again, the images did appear.

I was actually able to do a little drawing on the screen (not the one above!) but it wasn't much fun. Draw a stroke. Resize. See the stroke I just drew. Etc.

So it's close, but not there yet. I don't think there's much I can do but wait for some change to this  beta version of Silverlight or some change to this beta version of Safari for Windows.

Saturday, July 14, 2007 8:25:53 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

One of the issues that held me up a for a while when I was working on my SilverInk Silverlight annotation app, was a difference between some color encoding between IE and Firefox. I was very lucky to discover a seemingly unrelated blog post that held the magic key to solve my problem. Read more here...

[A new DevLife post]

Saturday, July 14, 2007 8:06:34 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, July 13, 2007

A few months ago, ClickOnce broke on my Vista machine where I was doing development. I had the same problem on my Vista laptop which I use for travelling and presentations. The short story about the problem is that whenever I tried to install a clickonce app, Vista went into this never-ending loop of insisting that I install .NET Framework and WinFx Runtime Components. The detailed description of the problem is blogged here.

A few people posted comments saying they had the same problem. Yesterday another person left a similar comment which put me on the trail to try to get it solved again. Patrick Darragh, who was a previous owner of ClickOnce at Microsoft hooked me up with Scott Tucker who is now working with ClickOnce. After I packed up my project and some other files to send to Scott, I emailed some of the people who had left comments to see what their status was.

One of them, John Sinclair, emailed me back saying that he had figured out the problem! (I will refrain from entering about a hundred exclamation points there. :-))

It turned out that by using .NET's command line tool, MAGEUI to manually build manifests was the source of my problem. What I didn't realize, until John pointed it out, is that the first time you select a different program to run, Vista has the checkbox for "always use this" ON BY DEFAULT. That's bad bad bad. I thought defaults were supposed to be false  [Don Kiely has a better end for my sentence:] "safe and sensible".

 Then when trying to install ANY clickonce application, for example, the XAML Pad app in this post by Charles Petzold, would somehow trigger the .NET installer. It doesn't make perfect sense to me why trying to open up MAGEUI from Internet Explorer would fire off all of that nonsense, but that's what it did.

So the fix was to go into Vista's Default Programs settings (available from the start button, then into "Associate a file type or protocol with a program" and change the default app to "Application Deployment Support Library". Here is what it looked like before I fixed the problem

Oddly, while IE7 exhibited this problem, Firefox did not. However Firefox must still be using the default app lists because it doesn't have any information about what to do with .application files in it's settings:

 

Friday, July 13, 2007 8:34:17 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [3]  | 
 Thursday, July 12, 2007

Pepole are leaving messages in the drawings of my Silverlight tests. One was interesting and doesn't need to be repeated. :-)  Two other asked:

1) Are you going to post the source?

Not yet.

2) What business purpose?

This is part of the reason I am not posting the source yet. :-) Second, what business purpose is YouTube or Facebook?

 

Thursday, July 12, 2007 4:12:12 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Wednesday, July 11, 2007

I've been banging away with javascript and Silverlight for a while, trying to implement the next step of the idea I am aiming for with silverlight.  You can read about it here or just go right to the site and add some artwork of your own. As you can see from some of my tests, no talent is required! :-)

[A New DevLife Post]

Wednesday, July 11, 2007 7:57:10 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

INETA Noram's new board began this month. Thinking about INETA and about what a tiny percentage of .NET developers take advantage of their local user groups, I wrote a little elevator pitch over on my other blog...

[A New DevLife Post]

Wednesday, July 11, 2007 7:53:14 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, July 10, 2007

 The town of Springfield Vermont participated in a competition with 13 other Springfields around the country to host the premier of the Simpsons movie and won! Each town submitted a video to prove why they were the real Springfield for the Simpsons. The Springfield VT video was pretty professional and silly, of course. You can see the videos by going to the USA Today Contest page.

Tuesday, July 10, 2007 1:43:12 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, July 08, 2007

It rained for over 24 hours. Now things are clearing out. I looked out the window of my office to see this thick fog cloud that had settled in the valley that is the road between the hill I live on and the next hill over. Since the sun had already set, even though it looked amazing in real life, it was hard to capture so, you'll have to live with my usual crappy photographic skills.

Sunday, July 08, 2007 8:22:59 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I wanted to see some of the new Beta2 (in the June CTP bits) functionality of Entity Framework so I've been poking around. You can see a nice list of what to look for on Danny Simmons' blog.


One thing that was a huge source of frustration was the inability to support database constraints where a column was both a primary key and also a foreign key of another table. When using the EF Wizard to import database schemas, this would be part of a list of errors that were generated during the model creation and would result in a problem like this:

Notice that you can't get back to the ORDER that owns the Order_Detail.

With the new CTP, that problem goes away.

You can't traverse over Order_details because it is a  collection property, but you can get at properties like Count, etc...

Dim od = From o In NWEntities.Orders Where o.ShipCountry = "Spain" _
Select o.Customers.CompanyName, o.Order_Details.Count
    


Another thing, of course was the difficulty of working with existing views and stored procedures.

Here's a before and after of the wizard:

 

      

But the sproc and view support goes much deeper.

Unfortunately, I don't see the wizard carrying the views and stored procs all the way through. If you look at the SSDL, you will see that the views are described as any other table. The stored procs are <function> elements.

While I can't figure out how to surface the query function, there are also functions to let you use your own sprocs for insert, updates and deletes and tie them into EF's SaveChanges function. Shyam Pather wrote a post about this a while ago on the ADONET Team blog and now that stuff is in this version along with documentation examples.

Another SPROC goody is the ability to define your own stored procedures in your model without  needing it in the database. Check the DefiningQuery element that goes in the SSDL to achieve this.


Poking around in the CSDL, I see a few changes which tie back to the references.

A Key used to be an attribute of an Entity Type. Now it is an element.

Beta1:   <EntityType Name="Employees" Key="EmployeeID">

CTP:   <EntityType Name="Employees">
    <Key>
      <PropertyRef Name="EmployeeID" />
    </Key>


So that they could do this:

 <EntityType Name="Order_Details">
    <Key>
      <PropertyRef Name="OrderID" />
      <PropertyRef Name="ProductID" />
    </Key>

Which then enables us to do this:

  <Association Name="FK_Order_Details_Orders">
    <End Role="Orders" Type="Model.Orders" Multiplicity="1" />
    <End Role="Order_Details" Type="Model.Order_Details" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Orders">
        <PropertyRef Name="OrderID" />
      </Principal>
      <Dependent Role="Order_Details">
        <PropertyRef Name="OrderID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Order_Details_Products">
    <End Role="Products" Type="Model.Products" Multiplicity="1" />
    <End Role="Order_Details" Type="Model.Order_Details" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Products">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="Order_Details">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

Which is describing this from the database:


 Speaking of the database, there was mention of the fact that it's now easier to get at the underlying datastore. I haven't figured out how though, yet. I looked to see if you could now cast an EntityConnetion to a SqlConnection but that's not it. I'll keep an eye out for that. While I was looking though I noticed a bunch of new methods in the ObjectContext such as the pieces that go along with attaching and detaching such as "Addto" methods for each of the entities in the objectContext.


 The last thing I'll shove into this already long post is that Entity constructors are no longer auto-generated. This will make customization a lot easier (you can read about that in this post from Danny Simmons).

So where we had this in Beta 1:

  Partial Public Class Employees
        Inherits Global.System.Data.Objects.DataClasses.Entity
        '''<summary>
        '''Initialize a new Employees object.
        '''</summary>
        Public Sub New()
            MyBase.New
            'Call DoFinalConstruction if this is the most-derived type.
            If (CType(Me,Object).GetType Is GetType(Global.NorthwindModel.Employees)) Then
                Me.DoFinalConstruction
            End If
        End Sub
        '''<summary>
        '''Initialize a new Employees object.
        '''</summary>
        '''<param name="employeeID">Initial value of EmployeeID.</param>
        '''<param name="lastName">Initial value of LastName.</param>
        '''<param name="firstName">Initial value of FirstName.</param>
        Public Sub New(ByVal employeeID As Integer, ByVal lastName As String, ByVal firstName As String)
            MyBase.New
            Me.EmployeeID = employeeID

            Me.LastName = lastName

            Me.FirstName = firstName

            'Call DoFinalConstruction if this is the most-derived type.
            If (CType(Me,Object).GetType Is GetType(Global.NorthwindModel.Employees)) Then
                Me.DoFinalConstruction
            End If
        End Sub

Although the constructor is gone (along with the acrobatics that would require creating your own constructors) there is a new method for creating each entity:

     Public Shared Function CreateEmployees(ByVal employeeID As Integer, ByVal lastName As String, ByVal firstName As String) As Employees
            Dim employees As Employees = New Employees
            employees.EmployeeID = employeeID
            employees.LastName = lastName
            employees.FirstName = firstName
            Return employees
        End Function

Sunday, July 08, 2007 4:48:59 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, July 06, 2007

We've had weird weather all week. Constant forecasts of thunderstorms that never come and the air and sky is filled and ready to go for it constantly.It has made for some great sunsets. We saw an amazing one while at the Bob Dylan concert on July 1st thanks to a big cloud that was stuck on Mt. Mansfield.

There was another great one tonight that we saw from a friends house up on a hill.

I took this one from our front balcony earlier this week.

Friday, July 06, 2007 9:24:20 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I opened up the Amazon.com site today and was quite startled to see this:


But when I viewed the source, I saw that rather than just one DIV that embedded all of this functionality (which is what I would expect from a Silverlight object) , there was a ton of html and script pulling this off, including a reference to:

 new SWFObject("http://g-ec2.images-amazon.com/images/G/01/s9-ampaigns/MultiPackCarousel._V19505961_.swf

SWF spells Flash. Oh well.

Friday, July 06, 2007 3:48:14 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Finally, I get to share Entity Framework with my own user group (in Burlington, VT)! Yay.

When: Monday, July 9th, 6-8:30pm

Where: Champlain College, Hauke Building Room 005 (375 Maple Street, Burlington, VT)

More info at www.vtdotnet.org

Of course, I'm spending all of my time futzing with the new bits that just got released earlier this week.

Not only do I have a cool technology to show off but we've got awesome raffles from Infragistics (a license to NetAdvantage) and from Code Zone (a fingerprint reader, Vista Ultimate license, a book from MSPress (Visual C# 2005: The Language) and some more of the fun GEEK mugs.

rspv@vtodtnet.org for pizza ($5 for pizza & soda - no sponsor this month).

Thanks to the Software Engineering Department at Champlain College for sponsoring the cost of the room all summer.

 

Friday, July 06, 2007 1:33:59 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  |