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