Wednesday, November 21, 2007

As Entity Framework gets deeper and deeper, the responsibility of building and managing what will become Microsoft's core for data access must get divvied up.

Alex James has recently moved from New Zealand to  join the team as Program Manager for MetaData in entity framework. That does sound narrow, but it's great that there's someone focused on that part of the puzzle, rather than the objects, LINQ to ENtities etc.

He's already written a bunch of posts about things I have been wanting to dig further into, so this is a win win situation as far as I'm concerened.

As his blog is new, it's easy enough to catch up by starting wtih the first post and read them all.

http://blogs.msdn.com/alexj/default.aspx

Wednesday, November 21, 2007 4:17:34 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
Wednesday, November 21, 2007 4:06:59 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 

Camey blogs that they are having a VS2008 install fest (with VS2008 being supplied by Microsoft) at the South Sound .NET User Group in December. I immediately emailed our D.E. asking if we can do that at VTdotNET, but unfortunately, he doesn't have enough licenses to go around (not his fault) so that leaves out our little teeny tiny itty bitty market. I know he tried to get more, so there's not much we can do. WHat a gift that would have been for our user group members!

But on a good note, we are getting a full day of the Bob & Chris Roadshow, where we will be tortured and tempted with all of the goodness of VS2008. (grin) SIgn up here! (It's Thursday, Dec 6, all day at Vermont Tech College in Williston.)

When the official launch happens in late February (and we'll aim for doing this at our March meeting) hopefully we'll get a bunch of licenses to give away as we did with the VS2005 launch a few years ago.

Wednesday, November 21, 2007 2:26:12 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I'm happy to announce that DevConnections will be hosting a Data Access track again in the Spring 2008 conference (Orlando April 23- 28).

The Data Access track in the recent Las Vegas edition of DevConnections was a great success. Thanks to a dedicated track, there was a Data Access talk happening during every timeslot during the conference. We had 4 Microsoft sessiosn on Microsoft day, nine during the two "3rd party speaker" days and a post-con session.

The room for this track (which had app. 300 seats) was packed for many sessions. The 4 introductory level Entity Framework sessions were practically standing room only and Dino Esposito's presentation "Typed DataSets, LINQ to SQL, LINQ to Entities: Data Design Patterns Do Matter" was flowing out of the doorway!

So we think it was a great idea and are doing it again in the spring.

Here's what we've got lined up (which will hit the website in the next week or so):

Pre-Conference workshop:I will be doing a full day pre-con session called "Entity Framework From 0 to 60" which will start with intro and eventually dig way down under the covers for doing advanced work with EF. Entity Framework is due to be released in the first half of next year so if it's not already out by the time the conference rolls around, it will be darned close, so it will be high time to get ready for this technology!

Day 1: Microsoft will be doing two intermediate/advanced Entity Framework talks, a talk on ADO.NET Data Services and Synchronization Services.

Day 2 & 3: We have a great line up of speakers again: Bill Vaughn, Kathleen Dollard, John Papa, Dino Esposito, Cathi Gero, Dave Sussman, DOn Kiely and myself. THe topics will range from Synchronization SErvices to Performance,  intro & intermediate sessions on Entitity Framework, deep dives into ENtity Framework and LINQ to SQL and more.

So when the snow starts melting, think spring and think DATA! See you in Orlando!

Wednesday, November 21, 2007 9:49:43 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, November 20, 2007

When opening a dbml file created in a pre-RTM version of Visual Studio 2008, you will probably see this error message:

Cannot load '[filepath].dbml': Error encountered, check Error List window for details.

Looking in the error list window, you might see the following errors:

Build failed due to validation errors in [filepath].dbml.  Open the file and resolve the issues in the Error List, then try rebuilding the project. 

and

There is no Unicode byte order mark. Cannot switch to Unicode.

Opening up the dbml file in the XML editor, the intellisense does not point out any validation errors.

 I couldn't see the problem.

Then I created a new LINQ to SQL file and looked at the xml,noticing that the encoding was:

<?xml version="1.0" encoding="utf-8"?>

while the old file had

<?xml version="1.0" encoding="utf-16"?>

So I modified the old file changing the encoding to utf-8 and voila, my project compiled and the file opened up in the designer.

Tuesday, November 20, 2007 7:29:07 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

Last week, I was fortunate to have dinner with Rick Chapman, author of In Search of Stupidity, who had come to Vermont to speak at the monthly meeting of the Vermont Software Developer's Alliance.

Rick is an software marketing guru who also author's the Softletter newsletter for software company business owners. He is also someone who does a lot of trend analysis.

During our dinner, the conversation shifted to e-books. Rick is sure that e-books, when the devices reach the right form factor and functional features, will replace books. I said,"No way. I love books. You'll have to take them from my cold dead hands." (Very creative of me, eh?)

He couldn't be convinced; but I know I love books. I know I love it when I get to add the latest read to my bookshelf. I love reading in bed and I love carrying a book with me when I travel. One argument of his was "aha - so how many books can you carry on a plane? Wouldn't an e-reader be better?" My reply was that it didn't matter because I can't read that fast anyway. One book will usually suffice for a plane trip.

I love the different fonts that are created for letter presses. I love the varying quality of the covers and the paper. I love the feel of the paper.

It's probably why I also always enjoy Charles Petzold's many posts about his books. Today he wrote about digital vs. paper books and wondered about wanting to re-read a book after a decade or two. If it's digital, what are the chances of the original technology/format that the books was delivered in still existing, or the device still even working. But if it's a book on his bookshelf, no problem. Just pull it out and read it. Maybe a little dusty, perhaps some yellowed-pages, but there for all time.

Tuesday, November 20, 2007 3:13:20 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [3]  | 
 Monday, November 19, 2007

Union Street Media, a leading Vermont web design and development company, is seeking to add a new PHP Programmer to our team. Since 1999, we have developed database-driven web sites focusing on visual appeal, usability, and search engine prominence. The company serves over 300 clients in three primary business areas: real estate, e-commerce, and content-driven sites. Union Street Media is a young, aggressive company requiring its employees to wear many hats.

The PHP Programmer will be responsible for the maintenance and development of our content management system which includes real estate tools and e-commerce. Experience developing and supporting PHP/MySQL content management systems is key. The work will entail building new features and improving existing ones, fixing bugs, and some project management. Sysadmin skills and/or experience with real estate web site development are pluses. The role requires timeliness in project delivery, attention to detail, and a high degree of professionalism. We’re looking for a hard working team player who enjoys working on the web. Those who don’t play well with others need not apply.

The position comes with a host of benefits including health insurance contribution, great work environment in a recently renovated office and access to ski vouchers.

Functions/Responsibilities:
• B.S. in Computer Science or related field
• 3+ years professional experience
• Thorough knowledge of PHP, MySQL, CVS, cron, curl, Posfix/Sendmail, shell scripting, basic Unix skills, javascript
• Develop new features for our PHP/MySQL CMS
• Support the real estate site and ecommerce modules
• Strong people skills and team mentality
• Work with all members of the USM team
• Assist tech support staff with bug fixes, diagnosing problems
• Keeping skill set up to date with current technologies

Compensation: Commensurate with experience.

Schedule: This full-time position in our Burlington, VT office is open immediately.

To Apply: Email resumé, cover letter & 3 references to jobs@unionstreetmedia.com . No phone calls please.

Union Street Media is an equal opportunity employer.

Monday, November 19, 2007 6:40:10 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Probably no need to mention that VS2008 RTM (Team Suite English) hit MSDN subscriber downloads this morning. But what about Entity Framework?

According to Danny Simmons in this forum post, we'll have new bits that align with VS2008 RTM in a few more weeks.

We're working hard to wrap up the last round of testing and bug fixes on the EF and the EF designer.  The plan is to release beta 3 of the EF/CTP 2 of the designer in a few weeks (think "early December").

One major thing to look forward to is a simplification of getting graphs across tiers and handling the state of objects and their navigation properties (e.g. children in a graph). More details in this blog post.

Not sure what will be in the Tools CTP2, but I know they are working on having the designer handle stored procs and updating an EDM if the store has changed.

Monday, November 19, 2007 1:38:20 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Thursday, November 15, 2007

It's been snowing for about 5 hours. The grass is still peeking through the wet & slimy white stuff, but the ground is throughly covered. And I"m sitting here at my computer wearing a brand new pair of back country ski boots trying to determine if they are keeper or not. I'd say winter is here.

Thursday, November 15, 2007 4:04:54 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Wednesday, November 14, 2007

There's something about a conference that inadvertantly makes me go dark.

I did 4 sessions and a workshop at DevConnections last week.

In the weeks leading up to to this, I was heads down finalizing my presentations. That includes mucking with the PowerPoint's and fine-tuning demos and stuffing as much into my brain about the various technologies as I can.

While I was at the conference I spent a lot of my time in my room continuing on this path. The speaker room is a bad place for me to work - too many people I want to talk to! :-)  I did get to attend a number of Entity Framework and Astoria sessions on Tuesday, but that's all that I saw in the entire show.

Because I had disparate topics (tablet pc, silverlight, entity framework and LINQ), I needed to really clear my head of the previous topic and wrap my head around the next one.

During this time I did check emails, but I didn't check my office voice mail, I didn't do any client work and I managed to write only one blog post. I even got to go out to dinner one night, but most of the rest were working in my room.

(I'm not complaining, by the way, just sharing what it's like...)

At the end of the week, I went to Colorado for a few days to hang out with my sister & brother in law. I checked email but again, no work, no blogging.

Not only did I not blog, but I wasn't reading blogs. I had missed the DevCOnnex keynotes and no idea that the VS2008 RTM date was finally announced, that live services came out of beta and more was going on.

I got home Monday afternoon, spent two hours at my house then got back in the car for the VTdotNET user group meeting (another blog I need to write). Since it was the birthday of our illustrious speaker, Russ Fustino, we went out and I got home at about 11:00pm.

Tuesday I finally got to do some client work for the first time in about 3 weeks! I have a huge list of things to do, but topping that list were a host of things one of my client's has been patiently waiting for.

It still amazes me the impact that conference speaking has on my routine. I am hoping to get my head above water by the end of this week. I also am bummed that I haven't had any exercise since before I headed to the conference. I had high hopes and brought my swimsuit, sneakers and other related clothes with me, but they never got touched!

So I have LOTS to blog about and so many people awaiting so many things from me. I will just be getting through it all one step at a time...

 

Wednesday, November 14, 2007 2:52:07 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, November 06, 2007

Mike Flasko presented on Astoria this afternoon as part of the Data Access track at DevConnections. Being the PM on the Astoria team, Mike's not stuck with the prototype bits like the rest of us slackers and was using production bits of what Astoria will really look like.

Here's a few new things:

1. No more code name. Bah - I always hate this part. I like Astoria.

The official name of the product is ADO.NET Data Services. Oh boring, but descriptive. Although when you see #5, you might wonder why "ADO.NET" is in the name.

2. No more POX (Plain old XML) and they didn't go with that Web3S format either. Data will be spit out as JSON or ATOM. ATOM is xml is formatted for blog posts so you'll see elements named feed and more.

3. AJAX Client. When working with the services from the client side usig ajax, there is an ajax client api. It was something like sys.data.services. I will ask Mike and fix that. :-) You can use this to easily point to the data service and do things like call an insert method to easily insert a json object.

4. You can incorporate mime types into your data and when the service is built, those will be pulled in and then (as a example) if you have data that is the binary of a gif and it has image mime type associated with it, then  the data will be served up as the image, not as the string of binary. This is easily demonstrated when using the uri directly in a browser. I haven't seen how this surfaces in a client app. But it's very sweet.

5. Build services against any class that exposes iQueryables. Entity Framework queries return iQueryables of entities. After some discussion of which way to go with this in the Astoria Team blog, they decided to leverage the iQueryable. So you can build a class that has a public method that returns your data as iQueryables, then you can build the service against that just as easily as you can build one against an EDM.

6. Last bu hardly least is. dah dah dah dah...

LINQ to ASTORIA.

Yes, Virginia. You can write a LINQ query that will get interpreted into the URI. Astoria already provides a means of generating classes for clients to use, so LINQ just works against these classes.

That's all I remember since I didn't have my computer or a scrap of paper with me in the session.

 

Tuesday, November 06, 2007 8:23:53 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, November 05, 2007
Monday, November 05, 2007 10:06:00 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I finally discovered the UpdateProgress control for an easy way of getting an animated gif to display at the proper times on a page using ASP.NET AJAX. REad more...

[A New DevLife Post]

Monday, November 05, 2007 9:55:47 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Over a week ago, I accidentally left a car window partially open overnight. The next day there was lots of evidence of a mouse in the car - shredded kleenex, mouse poop and more. I looked everywhere for the mouse but could not find him (her?) and figured it was gone. I didn't really go anywhere for about a week. On Friday night I rove to a neighbor's house wondering if it was possibly still in the car and was going to jump on my head while I was driving, but it didn't.

But on Sunday I looked in the car again and there was more shredded kleenex and poop. Rich and I spent an hour cleaning, vacuuming and inspecting every nook and cranny but found no mouse.

Rich decided there was only one way to get rid of the mouse if it was still hiding out in the car - a solution that I am not fond of at all, but let him take charge of the situation. So he put a mouse trip (oh boo hoo) with some peanut butter on the floor of the front seat. I'm more of a hava-heart trap kind of girl.

Poor little mousey.

This morning I unwillingly looked into the car when I took the dogs out. Seeing a tail and a butt was enough, I didn't want to see his poor little head or neck under the business end of the trap. Rich is going to go out and deal with it.

 

Monday, November 05, 2007 9:38:02 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Friday, November 02, 2007

I stole the little EF on Rails quip from Roger Jennings who asked on his blog "what the heck happened to Jasper?" (my words, not his)

Here's an overview article on Jasper that I wrote a few months ago.

Andy Conrad, who is a PM on that replied that it's still around and they have an internal revision of the original prototype, but that they need to see more interest in it before really making an investment in it. (Again, my words, not his.)

Check out Roger's post and Andy's comment. It's a shame that the best place to learn things like this is in the comments of 3rd party blogger posts, rather than directly in the team blogs, but iwth the rapid pace that everyone's moving at these days trying to get Orcas out the door, trying to get Entity Framework and Astoria wrapped up, I'll take what I can get!

So if you're interested, let them know. A good place is comments on Andy's blog or in the Jasper forums.

Friday, November 02, 2007 2:25:52 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Roger's post are so chock full of information, it's easy to miss things on the first read or two but they are alwasy worth returning to, especially as he updates them to keep them accurate.

In a recent post, he pointed to an "article" - 38 pages is quite long for an article - which is part of the WROX BLOX series that you can download for $3.99 Leveraging LINQ in ASP.NET 3.5 projects. Since I am doing a session next week at DevConnections on ASP.NET Databinding with LINQ, I think I'm going to grab this to help enforce or certainly add to what I already have in my head, my demos and my deck! The session is only 75 minutes long, so I guess I can't just stand up in front of the room and read it out loud.  (just kidding!)

Therefore, back to work!

You can find Roger's mention of it in this post, which itself is probably a good 38 pages as well.

Friday, November 02, 2007 12:48:54 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 

Someone asked a common question in the forums today about being able to update an EDM when the datastore has changed.

Noam Ben-Ami, who is on the team working on the tools, says this:

We are hard at work on this feature right now and hopefully we'll be able to get it into CTP2 of the designer.

Along with support for stored procedures, it is our highest priority.

So three things to get out of this:

  1. There will (or will probably be...) a CTP2 of the designer. That indicates to me they still have a lot of ideas that they want to implement and are still working out which is why that doesn't say "Beta".
  2. There is going to be one (or more?) ways to support db updates in the desiger. I am really curious if we'll be able to add just "drop" new tables in without actually updating.
  3. Designer support for sprocs is coming. Noam and I talked about this a while back and he described what I thought was a great idea for implementing this. I'm looking to see how that idea evolves.

In the meantime, I wrote a blog post this morning about how to apply db updates using the current version of the designer.

Friday, November 02, 2007 11:48:00 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

In a recent ADO.NET forum post, someone asked how to do read-only views of data. There were two responses - use a QueryView and use a Defining Query.

What's the difference?

A Query view is an Entity SQL Query that exists right in your mapping layer. It allows you to solve two problems. THe first is creating complex queries that you don't want your coders to have to worry about building. You can just build the query in the mapping layer, expose the resulting entity in the conceptual layer and the classes that the developers code & query against will just be there for them to use.

The second benefit is that you can use this to limit access to particular data from the database. For example, if you have a table which has GUIDs or hashed passwords in it, you may not want those to ever be surfaced in the application. You can "filter those out", by creating a QueryView. FWIW, you could also do this by just deleting the columns in the store layer definition.

The QueryVIew then queries against the storage schema, not directly against your database, and then the results are output to an entity in your conceptual layer. So in effect, it is a different way of mapping between your store layer and your conceptual layer.

The QueryView is part of the EntitySet mapping and looks like this:

  <EntitySetMapping Name="Categories">
      <QueryView>
        SELECT VALUE Microsoft.CDP.Samples.Northwind.Category(C.CategoryID, C.CategoryName, C.Description)
          FROM dbo.Categories as C
      </QueryView>
    </EntitySetMapping>

This simple query (note the syntax; it's an Entity SQL query) is replacing the mapping for Categories. It gets 3 columns from the Category entity in the store model (dbo) and maps the results to the conceptual entity, Category. Remember that I have created a read-only view, so you might not want to use this to just filter out columns if you still need to do updates and want to do them using the mappings (vs. using sprocs to do the updates).

You can also invent new queries and new entities to go along with them.

Defining Query

I love that MIke Pizzo refers to Defining Query as "the ultimate escape hatch".

Defining Queries are defined in the storage layer. They are really nothing more than database views - directly against the database. So you have a really complicated query that you can't describe with LINQ or with Entity SQL but you can describe it in TSQL, but and the dba is not around, unable or unwilling (for a variety fo very good reasons) to add a new view into the database for you, you can just create it in the storage layer. In fact, when you run the EDM Wizard against a database and it finds views, the wizard represents these views in the store layer as Defining Queries.

There are two parts to a Defining Query.

The query itself which is an EntitySet in the store model and an Entity in the store model that describes/defines the result set.

The rest of the model then treats the query as it would any other table. You have entities in your conceptual layer and they map to the entity that describes the result set of the Defining Query.

Here's what one looks like.

<EntitySet Name="custview" EntityType="AdventureWorksLTModel.Store.custview">
 
<
DefiningQuery>SELECT [custview].[CustomerID] AS [CustomerID],
  
[custview].[FirstName] AS [FirstName],
  
[custview].[LastName] AS [LastName],
  
[custview].[CompanyName] AS [CompanyName]
  
FROM [dbo].[custview] AS [custview]
 
</DefiningQuery>
</
EntitySet>

And the entity that you will map to

<EntityType Name="custview">
  <
Key>
   <
PropertyRef Name="CustomerID" />
   <
PropertyRef Name="FirstName" />
   <
PropertyRef Name="LastName" />
  </
Key>
  <
Property Name="CustomerID" Type="int" Nullable="false" StoreGeneratedPattern="identity" />
  <
Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
  <
Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
  <
Property Name="CompanyName" Type="nvarchar" MaxLength="128" />
</
EntityType>

As I said above, you can then have an entity in your conceptual layer that just maps to this entity and nobody will ever know the difference. Which beg the reminder that this is read-only!

Friday, November 02, 2007 11:00:40 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Damn damn damn!

I was writing a really technical post. I wanted to use the code formatter which pops up in a separate window. IE7 said - popup? Is that okay? I said yes. It REFRESHED THE PAGE and I lost all of that which I had written.

RUns away screaming....

 

Friday, November 02, 2007 10:49:53 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [7]  |