All posts by Julie

Lots of Entity Framework at DevConnections Nov 5-8, Las Vegas

In his “Microsoft’s Data Access Strategy” blog post, Mike Pizzo, who is an architect for the overall Data Programmability team at Microsoft says:

“The Entity Data Platform is a multi-release vision, with future versions of reporting tools, replication, data definition, security, etc. all being built around a common Entity Data Model. 

Within the .NET Framework, the ADO.NET Entity Framework is integral to this vision.”

The first release of the Entity Framework will arrive in the first half of next year. Many companies are looking at it right now as they consider their software’s architecture and how EF fits in. I know this because I have actually been working with some of them as a mentor.

You can get a big leg up for planning ahead and learning now on Entity Framework at DevConnections next month in Las Vegas.

As part of the special Data Access track (which features an all-star cast of data gurus: Bill Vaughn, Alex Homer, Dave Sussman, John Papa, Dino Esposito, Don Kiely, Kathleen Dollard, and me!) there will be seven Entity Framework sessions and additionally a 1/2 day workshop at the end of the conference which will provide guidance about when to use Entity Framework (and which of it’s 3 methods of querying) compared to when to use LINQ to SQL or just plain old ADO.NET. (Note that you need to sign up specificially for the workshop which costs an additional $199).

Danny Simmons, from the EF team, is not speaking but will be there for the sake of geeking out and has said on his blog:  If you are going, and would like to get together and chat about the EF, ADO.Net, OR/M in general, Domain Driven Design, Agile, or other geeky topics, then put a comment here or send me some email, and we’ll find a way to get together.

On “Microsoft Day”, the first day of the conference, there are three sessions related to Entity Framework by members of the team

  • VDM302: ADO.NET Entity Framework Designers
    Sanjay Nagamangalam
    The ADO.NET Entity Framework (EF) enables compelling Object-Relational Mapping scenarios. This session is focused on developer walkthroughs and demonstrates new designer capabilities in Visual Studio that enable developers to visually design their EF data access layer and map it to a relational database. We also discuss how EF tools and designers help enhance developer productivity while alleviating typical developer pain points during iterative development. It is recommended that you attend “Data Modeling and Application Development with the ADO.NET Entity Framework” before this session.
  • VDM304: Data Modeling and Application Development with the ADO.NET Entity Framework and LINQ over Entities
    Tim Scudder
    Object Relational Mapping technologies have long been used as the infrastructure for the Data Access Components within an application’s architecture. The introduction of the Entity Data Model will make available a first class data model with which application architects can define their domain model and build out their data access layer. With ADO.NET and the Entity Data Model, architects have a number of choices. They can work with Entities with the familiar DataReader and DbCommand abstractions (using the new EntityClient data provider) or they could use generated classes as persistent objects (with LINQ and Entity SQL-based API’s). This session shall discuss the different ways in which one can use ADO.NET and the Entity Data Model within one’s application architecture. The discussion shall include different deployment models and the role that the Entity Framework can play within them. In addition, this session will discuss LINQ over Entities. Most .NET database applications use ADO.NET to access and manipulate data, and most of them have a data-access layer built on top of ADO.NET to abstract out many of the details related to data-access that can get in the way of business logic. We’ll discuss how the system supports conceptual modeling and how great integration with LINQ (language-integrated query) brings new levels of productivity to the data-access development space.
  • VDM303: Project Astoria: Data Services for the Web
    Mike Flasko
    The new wave of Web applications are built on technologies such as AJAX and Microsoft Silverlight, which enable developers to build better, richer user experiences. These technologies bring a shift in how applications are organized, including a stronger separation of presentation from data. The goal of Microsoft code name “Astoria” is to enable applications to expose data as a data service that can be consumed by Web clients within a corporate network and across the Internet. The data service is reachable over HTTP, and URIs are used to identify the various pieces of information available through the service. Interactions with the data service happens in terms of HTTP verbs, such as GET, POST, PUT, and DELETE, and the data exchanged in those interactions is represented in simple formats, such as XML and JSON.

During the main conference, there are four sessions on Entity Framework and a number of the other Data Access sessions will touch on it as well.

  • VDA305: Implementing the Entity Framework
    John Papa
    You can use the Entity Framework to architect applications against a conceptual model that is mapped to the logic model. This session will explore the different XML files that map the objects to the database schema and show how to modify them when needed. I will explain how you can design an object model with the Entity Framework using both the Entity Data Model Wizard as well as by manually editing the XML files. I will demonstrate how to implement inheritance and how to merge multiple entities within a conceptual model as well as how to take advantage of features such as conditions in the mapping layer. This session will demonstrate how to interact with the conceptual model using EntityClient, Entity SQL, and LINQ to Entities to perform queries and make updates to a database.
  • VDA303: Unraveling the Entity Framework
    John Papa
    You can use the Entity Framework to architect applications against a conceptual model that is mapped to the logic model. The Entity Framework has many components including EntityClient, Entity SQL, Object Services, the Entity Data Model, and LINQ to Entities. This session will discuss the architecture of the Entity Framework and explain the roles of each of its different components. I will also demonstrate how to write queries using the different options as well as how to evaluate which options within Object Services to use or if to use the EntityClient provider directly.
  • VDA307: Real-World Entity Framework
    Julia Lerman
    After learning the basics of the Entity Framework, it’s time to see how to implement entities in more complex applications. The Entity Framework’s Object Services provide functionality for persisting objects as well as moving them across machine boundaries. Come to this session to learn patterns that can be used across tiers in Web applications, WCF services and clients, or smart client applications.
  • VDA308: ADO.NET Metadata and Code Generation
    Kathleen Dollard
    LINQ to SQL and Entity Frameworks include code generators. You’ll learn about this technology under the hood and the new metadata strategies these technologies use. This metadata is interesting because it represents some of the first mainstream standards for mapping metadata. If you’re currently using code generation, you’ll want to learn how to leverage these metadata sets to enhance your code generation. If you’re using or considering the ADO.NET technologies, you’ll want to assess your back up strategy if you later need to step outside the box and make a change to how these technologies work. If you elect to do your own code generation, you’ll see the benefits of folding in additional metadata that solve additional problems like automated name morphing. You’ll also see how to leverage patterns in your raw metadata to generate and possibly help maintain the mappings between your database and business objects. This session is technology agnostic and applicable to XSLT, CodeSmith and CodeDOM generation.

And the post-conference workshop

  • VPS201: ADO.NET 3.5 Data Access Guidance (9:00AM – 12:00PM)
    Add’l Fee $199.00

    Julia Lerman
    ADO.NET 3.5’s Entity Framework presents us with a slew of new options for accessing data which you will learn about during the DevConnections conference. This 1/2 day post-conference session will compare and contrast Object Services and Entity Client; Entity SQL, LINQ to Entities and LINQ to SQL providing guidance as to which methods are appropriate in particular scenarios. We will also examine this functionality with respect to both creating new solutions and plugging the Entity Framework into existing applications.

The Data Access track is part of both VSConnections & ASPConnections.

Vermont IT Job: .NET programmer – Telecommute FROM the Burlington VT area

Junior Software Engineer / Product Support

Telecommute/Virtual Team – Burlington, VT area

 

Excellent compensation package including 401k plan and insurance benefits.  CONIX Systems, Inc. designs, develops and maintains software that creates new workflow options and improves operational efficiency and customer service for major banks and service providers.

 

This virtual team (home-based) telecommute position will be responsible for supporting and maintaining solutions for Windows and Web-based environments using the Microsoft.NET Framework (C#), Visual C++ and SQL Server 2000/2005.  This individual will work with existing client support staff in handling customer support issues related to these technologies. The ideal candidate will also train the existing client support staff to increase their technical expertise. This is a prime opportunity for advancement within the com­pany.

 

Required skills/experience include:  Excellent communication skills, both written and verbal; knowledge of .NET (2.0 preferred), SQL Server 2000/2005; clear understanding of object oriented design and programming; associate’s degree in Computer Science or related field; access to a cable or DSL broadband ISP (no satellite); and resides in the Burlington, VT area (for periodic meetings).  CONIX supports its technical staff with a complete home office/development environment including furniture, computers, printers, phones and internet connectivity.  All engineers within CONIX telecommute from home-based offices with VPN access to corporate servers and mainframes.

 

Headquartered in Manchester, Vermont, CONIX offers an excellent compensation package and the opportunity to work in an environment where your contributions are recognized.  Please send resumes to JOBS@conix.com.

 

CONIX is an Equal Opportunity Employer.

Choosing LINQ to Entities vs Entity SQL vs. EntityClient

The title is a bit of a misnomer and not comparing apples to apples. To do it right would have been longer. The real comparison is

“Choosing LINQ to Entities vs. Entity SQL+Object Services vs. Entity SQL+EntityClient”

When doing an intro session on entity Framework last night for GUVSM in Montreal, even though it’s something like the 7th time I’ve done this session (and every single presentation has been totally unique from any of the others I have done –  shaped by the questions asked), I think I finally figured out how I want to express this option of which query method you want to use. Even within those three options, there are more variations happening because they return different payloads and this can additionally be affected by whether or not you do projections (e.g. select firstname, lastname, age  instead of just select the whole object).

1) For me, Linq to Entities will always be the first query method I go for. I’m getting more and more comfy with LINQ since I’ve been using it with objects, SQL, DataSets and XML. Having all of that intellisense support is dreamy. Whether I use operators (From c in context.Customers Where c.CompanyName=”Acme Builders” Select c) or method operators (context.Customers.Where(Function(c) c.CompanyName=”Acme Builders”) it just makes my life easy! I’ve been using LINQ to Entities almost exclusively unless I have a reason to go to the next level.

LINQ to Entities still depends on an ObjectContext (and therefore uses Object Services) so you get all of the goodies that go along with that such as ChangeTracking, etc.

LINQ to Entities returns objects.

2) The next level is using EntitySQL with Object Services. That would be:

objectcontext.CreateQuery(Of Customer)(“Select VALUE c from Customer as c WHERE c.CompanyName=’Acme Builders'”)

The main reason I would want to use this is because Entity SQL is a very robust query syntax and I can express queries that LINQ (which is strongly typed) may not enable me to write. I want to be clear about my use of the word “dynamic” since I just mean that I can build the strings. You can also use parameters and as in most cases, should be careful about where and when you use dynamic queries (“select value c from customer where c.CompanName=” & myvariable).

As an aside, I’ve discovered that writing custom operators in Astoria, while possible with LINQ to Entities, is better in teh long run if you write them with EntitySQL. That is a conclusion made using the prototype so this may change down the road.

This method can return objects or dbDataRecords, depending on the query.

3) The method I see myself using most infrequently is EntitySQL with EntityClient. EntityClient is a db provider, similar to SQLClient or OLEDBClient. You create connections (EntityConnections) and commands (EntityCommands), set the command’s string (an Entity SQL query) and execute as you would other clients. The big difference between this and the other Client Providers is that you are connecting to your entity data model, not to a database.

There are two reasons to use EntityClient.

The first is if you do not want to return objects, but just streamed data, because EntityClient always returns a dbDataReader. This also means it’s a great candidate for helping you use an Entity Data Model in existing applications.

The other scenario (which is currently theoretical in my mind and has not be tested yet) where I can see myself wanting entityClient is if I have a data layer that needs to implement the Provider Factory class so that I can select my provider at runtime.

I’m ignoring another possible reason which is that EntityClient provides a familiar way of accessing data because it feels similar to using the other client providers. But because you lose your objects and all of the benefits of the objectContext, I don’t think the benefit of “smaller learning curve” is a worthy trade-off.

“The proof is in the pudding,” as they say and we saw the pudding last night at the GUVSM presentation because I have already gotten out of the swing of composing Entity SQL queries, while I’m getting to be a champ with LINQ to Entities.

Introducing ADO.NET Entity Framework Article in CoDe Mag Nov/Dec

While this is not online yet, I do have the latest issue of CoDe Magazine in my hands which has (among some other great articles!) an intro article I have written on Entity Framework.

I originally wrote the article using VS2008 Beta1 and Entity Framework beta1, then (as it always seems to happen) the Beta 2 bits of EF were released after the article was finished and with only a few days before the “going to print” deadline. But I was able to rerun all of my tests, through and make sure the content, the code and the screenshots were current, though I wasn’t able to add in too much info about the new designer. You’ll understand when you see how lengthy the article is.

I also wrote the MVP corner for this issue and finally got a chance to write about something that’s been on my mind for a while – and I think it’s kinda funny. I was a little surprised they let me write this one! 🙂

Unit testing LINQ to SQL and Entity Framework

Even though I’m still a Unit Testing luddite, I’ve been looking around to see how people are getting LINQ to SQL and Entity Framework to work in their Unit Testing scenarios even though neither technology is really built to test against well.

First, I found this excellent post by Ian Cooper that explained not just unit testing, but what makes code apprpriate for unit testing. This was really enlightening for this newbie  (that is, moi) and gave me a much better understanding of why the TDD guys have been so frustrated wtih Entity Framework – although it is absolutely evolving in a way that will satisify them (more likely V2, then V1 though).

Ian also was able to find a way to do Unit Testing with LINQ to SQL.

Then I headed back over to Danny Simmons’ blog for this recent post on some key tweaks to make to the EDM (and codegen’ed classes (and now my brain knows enough to say “uh oh… codegen…that’s a problem for Unit Testing!”) work with Unit Testing.

Then I started playing with VS2008 to get a feel for how the tools enable me to do unit testing when have zero experience. I had give in and read through documentation (I know , how lame and lazy am I?) after I spent about 1/2 hour searching for a screencast or webcast on the topic. But I got some of the basics and figured out debugging, but still have some definite quandries! (Such as why do I get a failure when the expected value is 10 and the actual value is 11, but I get an inconclusive (rather than a pass) when the expected value is 10 and the actual value is 10?) I have a lot to learn! 🙂

I found Chris Buckett’s post on shoving EF into vS2008 Pro unit testing which helped a lot, mostly because he already understands unit testing and therefore understands what challenges he needs to solve when working with entity framework objects. The biggest issue about unit testing data access modules is that you don’t necessarily want to hit the database each time. to this point, Chris is trying to create a mock provider to emulate the database calls made by Entity Framework. Another issue is that you need classes that are instantiated without parameters. So while Danny tells us the simple trick for getting regular classes to fit into unit testing (in the above linked post), Chris is struggling with how to create an ObjectQuery return without instantiating an ObjectContext because the latter requires parameters. (Surely, I’ve gotten some bit of my interpretation wrong in a way that is making you TDD pro’s cringe, but I’m trying! :-))

I am happy to sit by the sidelines while he comes up with the model. (Subscribed)

Sad Soap Opera of the tiny town of my alma mater is on CNN.com’s home page today

I am a graduate of a college that I will love until the day I die, Well College. I went to Wells almost begrudgingly, with my heart set on studying film at a giant party school: Syracuse University. Being at a tiny 500 student school with no boys around seemed like hell for an 18 year old. During my first semester I begged my parents to let me transfer, but they made me promise to see the year out.

And I fell in love with Wells and spent my entire four years there, learning, learning who I was and not worrying about how I appear or sound to possible love-interests in my classes. It’s amazing to have all of that stripped away so that you can just keep your eye on the prize – getting a great education. I allude to this in my “Proud to be a Geekette” essay on OReillyNet’s Women in Tech series.

Wells is in a tiny little town in New York State on huge Cayuga Lake (one of the finger lakes) half way up the lake from Cornell (in Ithaca). Many former Wells students stayed in Aurora after graduating. Most continue to have strong ties in one way or another. Mine is through the incredible friendships that I have maintained with a number of women that I graduated with and are still the absolutely dearest friends in my life.

One former grad (from before my time) went on to create the American Doll company and in the 90’s sold it to Mattel for $700 million dollars. She decided to use a lot of her new-found fortune to help the college and to help the town. But it was soon apparent to many that her help came at a cost. She turned the town into a big doll house, which created a moral conundrum for so many and a rift through the residents of the town. I haven’t been back since my 5th reunion, but have been thinking that I’ll be there for the one coming in 2008. (my TWENTY-5th! Egad!). I wonder if I’ll mourn the old Fargo, where I spent probably more evenings over those 4 years than I would like to admit. Oh, the memories! 😉

While my suspicion is that there is a Wells alum working at CNN, it must be a slow news day because this is the headline story on CNN.com this morning. In reality, the article comes from the AP Newswire and was written by Helen O’Neill.

First Frost

Many of us in Northern Vermont have been living the fantasy of a never ending summer. I was still picking beans and tomatoes from my garden earlier this week. This morning when I woke up the thermomter registered 32.9 and said it had been down to 32.7 overnight. There was frost on the ground. I haven’t checked the garden. It certainly wasn’t a hard frost so we’ll see.

Now of course it is a glorious (though chilly) day with sunshine, blue skies and fall color and nearing 50 degrees. I’m thinking about a bike ride. I’ll have to see if my warm weather cycling clothes still fit.:-)

Get Ready for the MSDN Tour, Astoria and Entity Framework

The MSDN Events Tour for Q4 runs from Oct 16 – Dec 31 and hits 51 cities (including Burlington, VT!). One of the sessions is about Astoria* and it is called “A New Paradigm for Data Development with Web Based Data Services”.

Astoria sits on top of Entity Framework, and the session will also give a brief intro to Entity Framework, which thrills me to no end! I can only get to so many user groups to spread the love (which I’ll be doing next Monday, Oct 15th in Montreal by the way!).

If you are interested in preparing yourself better for Astoria by already having a clue about Entity Framework, you can look for my upcoming article in the Nov/Dec issue of CoDe Magazine called “Introducing Entity Framework”.

There are also a bunch of great resources you can keep an eye on:

My Data Access category on this blog

Roger Jennings blog

Mike Taulty’s blog

ADO.NET Team blog

And there are a number of team members writing about Entity Framework. I don’t even have a comprehensive list but I can highly recommend Danny Simmons blog.

For Astoria, check the Astoria team blog.

*my recent spate of astoria posts:

  • What the heck is Astoria?
  • QuickStart For Building An Astoria Data Service
  • More Fun With Astoria: Random Queries In The Browser
  • Astoria is sick (as in SLICK) when it comes to DML!
  • Trying to see what Astoria messages look like in the pipe
  • Custom Operations and Hiding EntitiesInAstoria