Friday, November 30, 2007

Thanks  (humongous thanks) to Chris Bowen for pulling off getting Vermont on the list for the installfest. It will be an "add-on" to the Roadshow day.

From his blog: (read the details carefully.. priority goes to registered attendees of the roadshow...)

Burlington (Williston), VT
December 6th, 4:15 to 6:00 PM
Vermont Technical College, 201 Lawrence Place, Room 401, Williston, VT
In partnership with the Vermont .NET User Group

Like Rochester, we're running this InstallFest in the same room as the Roadshow event that day.  Stay with us from 4:15 until 6:00 and enjoy some food, camaraderie, and gaming.

Priority for giveaways will be given to everyone who attends (not just registers for) the Burlington Roadshow event.  Remaining materials are available, while they last, to any walk-ins.

 

Partnering with area user groups, we're offering attendees a chance to install the release version Visual Studio 2008, enjoy some food, conversation, and gaming!  Since the packaged product hasn't been released yet, here's what will happen:

  • Bring your laptops (or heck, a desktop!) and your festive selves
  • Grab a DVD with the Visual Studio 2008 Pro Trial Edition bits
  • Install and be happy
  • Play some Halo 3 or Guitar Hero, munch on some food, chat with people
  • Go home and enjoy VS2008
  • ...wait...
  • When the packaged product ships, you'll get a copy of Visual Studio 2008 Professional in the mail!  (Which will *not* require a reinstall of the trial version.)

zune-8gb-thumb As an added incentive to get VS2008 installed that evening, we're giving away T-shirts and raffling off a new 8GB Zune among the people who get VS2008 on their machines!

"Free Sounds Good!  So, Where?  When?  How Do I Sign Up?"

You may notice that the events are generally on our MSDN Roadshow days (except for Waltham, where the Roadshow will be the following day.)  That's of course no coincidence, we'd like to take advantage of our passing through various areas in the northeast to run these special events. 

Each event has its own timing, registration, and logistics, detailed below.

As you can guess, we have limited quantities of giveaways (and "free" always draws a crowd) so we can't guarantee everyone will walk away with something.

 

Friday, November 30, 2007 1:56:16 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, November 29, 2007

I attended Zlatko Michailov's talk on Entity SQL today at DevTeach which was definitely interesting to me. In showing Entity SQL queries, Zlatko used a tool that he built as an experiment that evaluates Entity SQL queries (with some intellisense help as you type them!), displays the resulting provider level SQL and then displays the resulting data in grids (plural if there is related data in the result). It will be cool to see that tool evolve into something that we can use...keep your eyes on his blog just in case!

While I learned a ton, one of the very interesting (amazing actually) things that Zlatko shared with us about the upcoming Beta 3 of Entity Framework is that they had done some serious work on performance in the Object Services layer and that it is almost as fast in materializing objects as the Entity Client is at streaming results. He also said that they are closing in on SQLClient performance.

Thursday, November 29, 2007 1:32:09 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I learned today about Diego Vega who is another new hire on the Entity Framework team. Diego is responsible for Linq to Entities. As EF grows, there are more and more specialized people on the team. So now we have Zlatko who is the Entity SQL PM, Alex who owns the Entity Data Model and Diego will be focused on LINQ to Entities.

A funny post yesterday as Diego gets "revenge" on Zlatko who wrote a post on LINQ to Entities. Diego's revenge is to write a post about Entity SQL. And of course, we're the beneficiaries!

Thursday, November 29, 2007 1:26:50 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, November 28, 2007

I find that people really want to tell me what's wrong with Entity Framework. This is a good thing. It's how I learn. It's sometimes a little overwhelming, but since I feel like I'm just the messenger, I don't take any of it personally.

So go ahead.

Tell me why you don't like Entity Framework. Why you think people should stay away from it (I heard this advice was being given in a SQL Connections talk). Why you want to hit someone. Why it frightens you. Why you think it is a dba's nightmare. Bring it on.

But only do so with the understanding that I ask only because it will help me understand Entity Framework better. 

Wednesday, November 28, 2007 4:48:57 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
Wednesday, November 28, 2007 1:22:53 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, November 27, 2007

The Data Programmability team has an extensive post about current issues with connecting to SQL Server 2008 at design time and runtime via .NET 2.0.

If you are using the beta of SQL Server 2008, I recommend checking the blog post!

Tuesday, November 27, 2007 5:59:25 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, November 25, 2007

Over on CIO.com where CIOs go to get help with technology direction decisions for their companies, Esther Schindler takes a look at the Programming Language Popularity (non scientific) study which analyzed search terms for Yahoo and craigslist, book titles on Amazon.com, languages used in Freshmeat projects and more.

Language choice is a much different decision for CIOs than it is for developers, Esther says.

While she finds the results

"interesting—well, okay, they're fascinating if you're a software development and statistics geek like me, and for your sake I hope you aren't."

But she's not keen on their methodology ....  you can read her post here.

Sunday, November 25, 2007 7:55:20 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

*Update* It turns out that I completely misunderstood Zlatko Michailov's email reply to me when I was having trouble with this. I seem to have freaked out the team by writing this errant blog post. Sorry guys.

When using ObjectQuery, I was doing this:

Dim myAWEntities=New AdventureWorksEntities

dim myObjQuery=myAWEntities.CreateQuery(Of Customer)("SELECT VALUE cust from myAWEntities.Customer as cust ")

I was thinking in LINQ, using the variable of the instance I had created.

But if I use the entitySet name, it's fine.

"SELECT VALUE cust from AWEntities.Customer as cust " &

I am having a really hard time believing that I didn't try that since I was trying a lot of things, but it is now working and I'm still on Beta2.

I went around in circles with this one a few weeks ago (preparing for a session at DevConnections) and saw that someone had the same problem on the forums yesterday so thought I would blog it.

I have no idea if it will change going forward, but this is in E.F. Beta 2.

Entity SQL is the query language that you use when

1. querying through ObjectServices directly by creating an ObjectQuery as in

Dim MyObjQuery=MyObjectContext.CreateQuery(Of MyEntityClassType)(myEntitySQLQueryString).

or 2. querying through the Provider: EntityClient

Dim myCommand=New EntityCommand(myEntitySqlQueryString,myEntityConnection)
Dim myDataReader=myCommand.ExecuteReader(COmmandBehavior.SequentialAccess)

A simplistic EntitySQL query looks something like this:

"Select cust from Customer as cust" where Customer is referring to an EntityClass in my model.

The difference between using this with ObjectServices vs. EntityCLient is that in ObjectServices, you will have already identified the namespace that the CustomerClass lives in when you create the ObjectContext.

FOr example,

Dim myAWEntities=New AdventureWorksEntities

So when you create the ObjectQuery, it actually barfs, I mean throws an exception, if you tell it the namespace again. So you just want plain old Customers.

If my query read "Select cust from AdventureWorksEntities.Customer as cust"

The exception would be

Failed to resolve AdventureWorksEntities.Customer' in the current scope or context. Make sure referenced variables are in scope, required schemas are loaded and namespaces referenced correctly, near multipart identifier, line xxx, number xxx.

Now with EntityClient, there is no indication outside of the query string as to the namespace, so you NEED to tell it the namespace.

Unfortunately, it's not obvious because if you look at examples out on the web you'll see it both ways and it might take a while (as it did in my case) for the subtle difference to become clear.

Sunday, November 25, 2007 11:35:50 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Saturday, November 24, 2007

I sometimes feel like Gretel picking up tidbits on my way to the Gingerbread house when it comes to getting clues about what's coming in Beta3 of Entity Framework.

The next two I have found are:

From Alex James blog, Entity Framework is getting compiled queries similar to what's in LINQ to SQL. You can pre-compile query expressions, save them and even pass them around.

One thing that Alex mentions is that they are not tied to the ObjectContext (which is how you can pass them around) and therefore it must be the magic behind the next tidbit - which is that we'll be able to get at the TSQL generated from the query expressions more easily.as per Danny Simmons in this forum thread.

It is currently possible to see the TSQL in a convoluded way of digging into the EntityCommand that is explained in the answer to this forum post. WHen I saw that, I tried to write a debugger visualizer but discovered that because the EntityCommand is not serializable (nor the objectQuery, from which you can grab the EntityCOmmand) there was no way to get the commandtree over to a separate process where the debugger is hosted. Someone actually got around it with an enormous number of lines of code (see this forum thread) but I decided that I would just bide my time for a simpler way to appear in the bits.

We'll see in a few weeks what it looks like. 

Saturday, November 24, 2007 11:25:53 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, November 23, 2007

My parents have sent me another batch of photos (puppies at day 2) for their website. This one is especially gorgeous.

Friday, November 23, 2007 10:05:07 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

This will be DevTeach's first non-Montreal based conference. I've never been to Vancouver and am looking forward to seeing it.

As always prior to a multi-day trip, I have a little trepidation.

We're just getting beautiful snow and I want to ski. My parents (who live 5 hours away in the Binghamton NY area) just had a litter of 17 puppies and could sure use my help. And as always, it's hard to leave Tasha and Daisy who's days are quite numbered.

I also believe this is the first conference I've attended where summer clothes won't suffice. I hate having to pack a bag that I can't carry on, but it might make my life a little easier. But it's not cold enough for snow at least so I don't have to bring *that* much.

Here's the DevTeach website....www.devteach.com

Friday, November 23, 2007 1:06:48 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Possibly a record... my parents Newfoundland, Elsa, had 17 puppies on Thanskgiving day. My folks are breeders. They actually have 2 more littlers coming which when all added up could double this number. The pictures of the babies are already on their website . They are cute as cute can be. Newfie puppies weigh about 1 lb each when born and then they just grow and grow and grow!

Blue Heaven Newfoundlands

A little family tree:

The puppies' mother is Elsa and father is Solomon.

Elsa's father is Theo. Solomon's mother is Theo's sister, Celeste. (So they are cousins, not siblings...this is not scary in the dog world, like it would be in the human world!)

Theo and Celeste came from France, but their mother, Rudy, was a puppy bred by my parents and her father is Packard.

And Packard is the son of my Daisy!

So these puppies are Daisy's great, great, great grand-puppies! :-)

Daisy, by the way, will be 13 years old in January. But Tasha's not impressed, as she will be 14 in two weeks. 13 and 14 are both amazing ages for newfies.

Friday, November 23, 2007 12:12:06 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

I spent a part of Thanksgiving day updating my blog to 2.0 (written in ASP.NET 2.0). One of the reasons was that my host (ORCS Web) has been having big problems with my blog app (not like I have the kind of traffic that Scott Hanselman gets on his dasblog blog), but still there's enough and it was eating up server resources.

Rather than upgrading the existing site, I just created a whole new app in a temporary folder and then moved over all of the important pieces - content, images, configuration settings, etc. Once it was ready I had Pam at ORCS Web just change the folder names (not so easy on a running IIS website) and voila, blog now points to the new 2.0 blog.

Already I can tell a HUGE improvement in the speed of things (such as particular administrative tasks). Hopefully the server issues will now go away and they can move my website off of the server that problem sites are relegated to.

Just in time for ASP.NET 3.5! :-)

Friday, November 23, 2007 12:03:52 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, November 21, 2007

My parents breed Newfoundland dogs. This fall, 3 girls came into heat and they bred all three, just in case. Surprisingly, all three girls got pregnant and the latest x-rays counted a total of 26 puppies in their three big bellies.

You can see the girls, the fathers and lots of pictures of lots of gorgeous newfies on my parents' website here: Blue Heaven Newfoundlands.

My mom called tonight to say that she was with Elsa (who has at least 10) camped out at a hotel near the vet so that there will be no problems. Rather than take chances, my mom  let's the vet help (with all of the safety nets nearby) when there's lots of puppies coming. So probably tomorrow for Elsa and another few weeks for Celeste and Bumper. Very exciting!

Wednesday, November 21, 2007 11:23:38 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

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]  | 

With the current CTP of the ENtity Data Model Tools, there is no way to automatically update or refresh the EDM when a change is made to the data store.

One of the beauties of the EDM is that fixing up the EDM in these cases is not only easy, but it doesn't need to have any impact on your application, because you can leave the conceptual layer which you program against in tact.

Here's an example of a minor change (inspired by a question in the forums) in the database and what you need to do today (I keep saying that because I don't know what the next increments of the tools will bring) to fix up your model.

Scenario: DBA changed fname and lname columns in the Customer table to firstname and lastname.

In a non-EDM application this could be dealt with in a few places, depending on how your db and app are architected:

  • Modify any stored procs and views that spit out those fields so that they now know how to grab firstname and lastname but continue to surface them as fname and lname.
  • Modify the data layer of your application (and redeploy it) so that it now is aware of firstname and lastname. Modify your business layer so that it knows that the properties have to look for firstname and lastname.
  • If your app doesn't use these layers (hopefully that's a big "if"), then you need to make those changes even closer to the UI.

In an EDM here's how you would solve the problem.

  1. Change the column name in the storage schema.
  2. Change the column name in the mapping schema for the two mappings that link those fields.

Step by step

Open up the EDMX in the XML Editor. (Right click on EDMX in the solution explorer, choose open with, then XML Editor).

You can do all of this in the raw xml, which to me is easy. THe current designer does let you change the mappings. SO I will show how to do #1 in the raw xml then #2 using the designer.

 

Locate the node for the Storage Model. You can find that quickly by searching for it's comment "SSDL Content" or it's name "StorageModels".

IN there, locate the entity that represents the table with the change.

Edit the name of the entity.

Close the EDMX and re-open it in the designer.

Another part of what makes EDM so great is that when I first created this model, I didn't like "fname" and "lname" and changed them in my conceptual layer to FIrstName and LastName. At that point, they were properly mapped to the fname and lname columns and all was well.  This is what the mapping looked like before I started making the changes. YOu can see that my db column was called "fname" and my property in my conceptual layer was "FirstName".

Now that the dba decided to change the column names in the database as well, I just need to remap my FirstName and LastName properties to the newly named database columns.

Select the Customer Entity and then open the Entity Mapping Details. (If you don't see that page, right click on the model (in the white space) and select SHow Entity Mapping Details.)

The mapping details shows  you the columns from the storage entity first (e.g. the database table) and then on the right which property in your conceptual entity that column is mapped to.

You'll see that the columns fname and lname are gone from the mapping and it is now showing you the FirstName and LastName from the store schema, but they aren't mapped to any properties in your conceptual entity.

Just drop down the value/property list and it you will see all of the properties in the entity that this is mapped to.

That's it. And the impact with respect to deployment is that the new versions of the xml files that describe the schema need to be deployed to whatever tier the data layer that needs to know how to do the mappings. The client apps most likely just have the classes that were derived from the conceptual layer and since we didn't change that part, they don't need to know anything and can go on their merry way.

Friday, November 02, 2007 9:38:10 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, November 01, 2007

I've found that the best resource for learning about ENtity Framework is in the forums. Today I finally saw a public statement about something I"ve been waiting for for a long time.

Brian Dawson says:

We've been working on making the WCF experience, especially with relationships, a much better experience no matter which serialization scheme you choose. Binary serialization has been working already, but in the cases where we are doing other types of serialization, dealing with relationships was tricky and we purposely don't deal with deep serialization, at least in this release. What we did do was add the EntityKey as a serializational property on the relationship reference. This way, if you serialize Product, you'll get the EntityKey for Category. You can treat the CategoryReference.EntityKey  similar to a foreign key. Basically, this allows you to fetch entities with the key, and also do updates and deletes without having to rebuild all the dependant ends.  We are targeting Beta3 for some additional information in this specific area.

What he's talking about is this: when you do binary serliaziont of an object graph (i.e. and entity and anything that is attached to it) you get the whole thing, but if you do xml serialization, you only get the entity. That makes doing web services a nightmare. I have written a few posts about dealing with this using the current Beta 2 bits of Entity Framework. Here's the critical one : XML Serializing Entity Framework Entities With Their Children For SOA.

Another critical problem is that you lose all of your statemanagement. Here's a post I wrote about how to recreate state so tha tyou can do updates, etc. More on Disconnected Entity Framework

If you watch the forums you may have noticed that there have been a lot of people hammering on the team. On one thread about this topic which I would not let go, Danny SImmons finally responded:

This thread is getting way out of hand, and clearly we need to get some better guidance together on all of this (a few good blog posts at least).  

So, instead of writing blog posts and guidance (unless you count mine) they went to work on the bits! Happily they are going to make it a lot easier in Beta 3 enabling us to not only rebuild full graphs, but reconstituting the state.

Thursday, November 01, 2007 1:35:28 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

In the past month (plus a few days), I have flown across the country twice (one was an overnight trip to San Diego for an INETA talk, the other was for a few days for some training in Redmond at Microsoft) and driven to Boston twice (4 hours each way, once for COde Camp, and then again for REMIX) and Montreal once for a user group meeting.

STill ahead of me in the next month (plus a few days) are three more cross country trips. Las Vegas for DevConnections, Vancouver for DevTeach and then back to Seattle for another quickie trip.

(And before you ask, no, I am not interviewing. You should know me better than that by now. :-) I'm just trying to learn a thing or two and rack up those miles.)

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

A few days ago I got an email from the Sr. Editor of ComputerWorld who was interested to learn what had become of the group of Vermont software companies that had banded together a few years ago. He was referring to the Vermont Software Developer Alliance an organization who's board I have served on since it began over three years ago.

I passed him on to our new Executive Director, Patrick Martell and only days later, this story appeared in Computerworld. Cool!

Green thinking vs. great access: A tale of two high-tech contenders
Ambitious Vermont needs what Westchester County, N. Y., has: broadband

Thursday, November 01, 2007 11:21:11 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  |