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]  | 
 Wednesday, July 04, 2007

By default, when querying entities, you need to explicitly use the Load method to get related data. This is often called "lazy loading" and ensure you only get what you ask for rather than having a query return ALL related data automatically. The new SPAN method forces an entity to include specifid children during a query so that you don't have to load after the fact. READ MORE

[A New DevLife Post]

 

Wednesday, July 04, 2007 11:18:49 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, July 03, 2007

Danny Simmons has a great list of changes to Entity Framework that have finally arrived in the latest CTP. These improvements are not insignificant and the list is filled with functionality that many of us have been really looking forward to. I' feel a little harnessed having to use VWD Express right now and haven't touched all of these things. But I was happy to see Views & Sprocs listed in the wizard and NOT to have the damn code gen message telling me that associations can't be created for a key that is both a foreign key and a primary key. That means Orders will be able to find their details again!

The default constructors are gone in the code gen class but it's hard to see since the code generated class is not exposed in the web site. I was able to find the compiler code version deep down inside of

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website2\5618daca\5d6fd1a4\Sources_App_Code\model.csdl.[guid-type number].cs.

That's just the toplevel stuff. I'm looking forward to digging down a little deeper to play with SPAN and well, just about everything on Danny's list.

Tuesday, July 03, 2007 9:46:53 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Note that the installation instructions for the June CTP of VWD (which the June CTP of Entity Framework installs on top of) have changed. See the ADO.NET Team blog for the updated version of the post.

Tuesday, July 03, 2007 9:17:06 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

This is my current internet speed:

yet while trying to install the June CTP of VWD Express on a Virtual PC (that has WIndows XP on it and needs .NET 3.5 as part of the install) my 3.38Mbps dowload speed is a bit slower - avg 3KB to 7KB (if I have all of my 0's in place, I think this is 500 to 1000 times slower). At 3.38Mbps, the 426MB file should take about 20 minutes. This is more like 20 days. Uggh.

Tuesday, July 03, 2007 10:19:55 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [3]  | 

Pragmatic Technologies in Burlington is looking to fill another developer position. "While we don't limit our search to .NET developers the ideal candidate will have experience with .NET, particularly ASP.NET."

Here is our posting: http://www.jobsinvt.com/seek/resultdetail.aspx?JOBNUM=211553

Tuesday, July 03, 2007 10:08:08 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, July 02, 2007

The ADONET Team today announced that the June CTP of Entity Framework is available. It is currently only available packaged with the June CTP of Visual Web Developer Express. Being a CTP release, they have just done enough to get something in our hands so we can see what they are working on.

A lot of what is in here is what I saw Brian Dawson using at DevConnections in March.

The ADONET team blog post lists the changes to look for and makes some important notes about the installation.

I'm off to download!

Monday, July 02, 2007 7:26:38 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, July 01, 2007

Last time I wanted to play with using videos as a source for Silverlight media, I found that Silverlight's "WMV only, thank you" limitation put the kibosh on my plans. YouTube and Yahoo are Flash and at the time Soapbox was password protected. Soapbox's latest beta removed the permissions requirement on June 1 so I finally found some time today to go digging around to see if I could now use those videos as a source for dynamic embedding in silverlight. I was a little bummed to see that the the videos are also flash. Here's what you get when you request embed script for a particular video:

<embed src="http://images.soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="432" height="364" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&v=30dd604f-e0f6-498e-a24c-e3b65c7d2452" ><embed><br /><a href="http://soapbox.msn.com/video.aspx?vid=30dd604f-e0f6-498e-a24c-e3b65c7d2452" target="_new" title="Microsoft® Silverlight">Video: Microsoft® Silverlight</a>

Flash flash flash

I tried pasting in the url anyway for the videos just in case, but of course, it doesn't work.

bah!

Soapbox is still a beta, and does have great features, so hopefully (presumably?) there will be more options in the future.

Sunday, July 01, 2007 4:00:40 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

My first MVP award was on July 1, 2003. I received an email this morning that I have been awarded an MVP (Developer Visual Basic) again. This is my 5th. I am always a little surprised since I never really know year to year what the criteria is. I just do what I do and if that makes Microsoft happy, I find out on July 1st.

I was smart this year to spend every last dollar of the past year's Microsoft bucks before the end of June. When I was down to $5, I found these cute little "beanie baby" type MSN butterflies for $2.50 each. They will be a fun thing to give to someone's kid. Not bad for a non-shopper like myself. My nephews got some pc games and Office 2007 Home & Student edition. I was able to get copies of Office for my sister as she expands her business. It's nice that I can share this benefit with my family, whom I steal time to go to conferences, run my user group, etc. Before the airlines got more strict with their carry-on rules, my husband's benefit was that I brought home a 6-pack of local brew in my backpack when I did INETA speaker trips to user groups around the country.

Sunday, July 01, 2007 12:50:29 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [7]  | 

Loren is a long time TabletPC guru and developer. He has also been very involved with teh UMPCs. So it was only natural that he wanted to check out an iPhone. He blogged while he stood in line and has written his first impressions, from testing out the touch screen in a bouncy car, how it looks in the sunlight, how the touchscreen works in general,  to wishing there was an open SDK that he could develop against.

Sunday, July 01, 2007 12:37:47 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
Sunday, July 01, 2007 11:53:58 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

As a follow up to my recent post about spending time with the teens attending the Summer Institute in Information Technology in Burlington, I've written about my visit over on my DevLife blog.

[A New DevLife Post]

Sunday, July 01, 2007 11:50:33 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, June 30, 2007

I saw this in my Microsoft downloads email yesterday:

Access 2007 Download: Access Developer Extensions

Access 2007 Developer Extensions make it easy to deploy and manage solutions built using Access.

Packing and sharing Access solutions has always been a pain in the rear. My recollection (it's been a while) was that there was no freely available runtime. So every end user had to have a full license to Access, even if they weren't doing any development.

So now the runtime will be free. It's not quite available yet but will be out soon.

Here's more from the Office Developer Center:


Introducing the Access 2007 Developer Extensions and Runtime

We are pleased to announce that the Access 2007 Developer Extensions and the Access 2007 Runtime are now available as FREE downloads.

Access 2007 Developer Extensions

  • Package Solution
    This is a wizard that will create a Windows Installer Package (MSI) to install your database, any supporting files, and optionally include the Access 2007 Runtime or prompt the user to download the Access 2007 Runtime.
  • Save As Template
    This allows creating database templates (ACCDTs) that can be featured in the Access 2007 Getting Started screen.
  • Source Code Control
    Integration with Microsoft Visual Source Safe or other source code control systems to allow check-in/check-out of queries, forms, reports, macros, modules, and data. You can also see the differences that have been made to your checked out objects.

Saturday, June 30, 2007 8:44:11 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

As Philip Elmer-Dewitt says on Business 2.0's website: "it may be the most impressive demonstration to date of Apple CEO Steve Jobs' legendary mastery of the art of media manipulation."

The hype has definitely works on me and this has a historical basis. I was stuck in an airport lounge late one night just when the Nano was released. I must have seen the same Nano ad 30 times that night and a few days later, I bought one (my very first iPod ever). But  for the iPhone I have a few things to protect me making the same mindless grab: 1) no iPhone's in Vermont (no AT&T) and 2) in the long run, I think I'm too cheap.

I have a simple phone and if/when I get another, it would be to get access to my email and also share my calendar from outlook. I don't download music or need to carry around my dogs pictures. My iPod (nano) mostly has podcasts (ala Wait Wait Don't Tell me, Fresh Air, DotNetRocks) on it and some old Bonnie Raitt, etc. albums. When I see the iPhone ad, I GOTTA HAVE IT, but then a minute later reality seeps back in and I remember I don't have much need for it.

There are plenty of people that will tell you the more technical reasons why you might not want in iPhone (yet) such as issues with the EDGE network if you are interested in it's web capabilities. Others worry about the fact that you can't replace the battery if you need to, can't expand memory, can't add SIMS, etc.

I bet that all of those people who lined up at the Apple stores around the country yesterday don't care. All that matters to many is that it's COOL and it's SHINY and it's made by Apple. 

Saturday, June 30, 2007 7:25:37 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Friday, June 29, 2007

Last year, there was lots of buzz about a possible iTablet, for example, ZDNet's Matthew Miller is piecing together some various things he'd been reading. I never really paid much attention to it but now the iPhone has been making me wonder  if the technology that has gone into the iPhone is headed for other things (and if I was paying more attention , that's probably been said in a thousand blogs, too). Certainly if you google "tablet pc" and apple there's gobs of speculation - mostly from last year because a patent had been filed at some point. The patent most likely was for the technology in the iPhone. But heck, I have a touch screen tablet pc (Lenovo Thinkpad X60) and yet I'm still drooling over the iPhone (no AT&T in Vermont and I want Mobile 6 anyway and someone also pointed out on a listserv today... that phone's now cost more than computers!).

I don't know how Apple would ever come close to what Microsoft has done with the Tablet PC platform though, especially with the hand writing recognition. If I recall correctly, there were over a million samples used to get the recognition algorithms. On my touch screen, I can actually write with my finger (just for fun, and it was Stephen Toub who gave me that idea) and the reco works with that even!

Of course there's always Surface which is just as droolyas an iPhone  - just can't put it in your pocket.

Friday, June 29, 2007 8:17:58 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  |