Thanks to Guy Burstein for letting us know that there’s a new CTP out for SQL SErver 2008 that now works with VS2008. I’m assuming it will work with VS2005, too!
Danny Simmons on “Context Lifetimes — Dispose or Reuse?”
People are more willing to believe guidance from someone at Microsoft than someone outside of Microsoft, therefore I’m happy that Danny has written a blog post on a topic he has answered a few times in the forums and I have pointed to previously as “evidence” in my own blog posts.
This blog post addresses the question about how long to keep an objectcontext around. Danny reiterates what he has advised in the forums:
Standard cases:
Websites/Web services – shortest lifetime as possible. Create the context, do query/savechanges, kill the context
Client apps (winforms, wpf, console) – it’s okay to leave the context hanging around. IT was designed for that purpose and will make change tracking and updates to the db a lot easier.
Edge cases:
Huge amounts of data to deal with for updates? Handle them in batches. You might want t take a look at the experiments with updating that Alex James has been writing about (see below for links) for a different look at updates.
Client app with data that you would like to cache combined with data that changes: for example, a list of product categories that doesn’t change much as well as order data that changes frequently. I’ve seen the back and forth discussions of this scenario in the forums. Danny recommends using a single context and how to manage that data within that context.
Alex James blog post series:
MIX08 Sneak Preview: The MVC tools
Remember how I recommended subscribing to the WebDevTools blog only a few weeks ago? (grin) Well, it continues to pay off!
Vishal Joshi has written a blog post about the tools for building MVC that will be previewed at MIX. Usually these goodies are shown first at MIX and then in blog posts.
Tooling Features Overview of ASP.NET MVC Framework for MIX 2008 shows some of the improvements made to the tools for creating MVC apps and more handily creating unit tests for them.
Scott Guthrie and S. Somasegar move up the corporate ladder
Microsoft announced 14 high level promotions yesterday including those of ScottGu and Soma! read more
[A New DevLife post]
ADO.NET Data Services + PopFly
A while back, Pablo Castro had created a PopFly block from an Astoria service. It no longer seems to work, presumably because he created it with the preview bits, not the CTP bits.
I want to use a Popfly example in my upcoming DevConnections session Web Mashups with ADO.NET Data Services , so I decided to try to create one myself. It took a little hairpulling, but I’ve succeeded.
I created an ADO.NET DataService with an EDM as the source data. I used Northwind for my data model.
In order to create and test the block in Visual Studio 2008, I downloaded the Popfly Explorer plugin and built up a Northwind class that has a single exposed function of getCustomers.
SInce I’m just starting out with this, my popfly block merely returns some read-only data from the service. It’s not interactive (i.e. you can’t drill in to anything in the block) because that will require me needing to learn how to build a display block as well. So for the time being, it’s just spitting out an array of objects that contain only two properties: CompanyName and Details which is just some aggregated data about the customer orders.
I had some problems with the SDK and had to work around them.
1) There is a getXML function but it wasn’t returning anything. So I used the getText function instead then manually created an XML doc from the results.
var root = “http://www.thedatafarm.com/dataservices/northwind/awdataservice.svc/Customers?$expand=Orders”;
var result = environment.getText(root);
var doc=new ActiveXObject(“Msxml2.DOMDocument.3.0”);
doc.loadXML(result);
2) Popfly’s handling of javascript is not exactly the same as the results I was getting when testing in VS2008. Specifically with variable declarations. Declaring a variable and giving it a value in one line of code resulted in incorrect data when I ran the test in Popfly (even though it was perfectly fine during debugging in VS2008). THerefore I had to break up those code lines. It took me quite a lot of testing before I thought of this (I thought it had something to do with the use of toString and wasted some time going down that road).
var orderCount;orderCount=orders.length;var orderTotal;orderTotal = 0;I selected an existing block for displaying my data, the NewsReader, and wired it up to my block.

The last step was to define what will be displayed. There’s a simple view:

but that only gets me to the objects, not the properties. So I had to go into the “advanced” view and modify the script, by adding “.CompanyName” and “.Details” where the array was being called.
var result = newsReader.addNewsItem(data[“thedatafarmAstoriaNorthwind”][i].CompanyName,
“2/15/2008”, data[“thedatafarmAstoriaNorthwind”][i].Details,
“http://www.thedatafarm.com”); et voila!

So this was just a “can I even make it work?” test and now that I have gotten past it (and spent all of those extra hours dealing with the above mentioned anomalies, so you don’t have to now…hopefully the next iteration of this beta SDK will make things a little easier), I’ll continue exploring.
I have shared it and the name is “thedatafarmAstoriaNorthwind”. I tagged it as “Data” so it should be under there.
What ever happened to Project Jasper?
An ADO.NET team project called Jasper was announced and demo’d at last year’s MIX conference. I played with the available bits and wrote an article about it for O’Reilly: Build Dynamic Database Applications in .NET with Project Codename “Jasper”
Not much has been heard about Jasper since then, while the other incubator project that was announced at MIX has evolved into ADO.NET Data Services.
Jasper, in the meantime is stagnant and hasn’t even been updated so that it can be used in VS2008.
In the Jasper forum, someone finally just came out with it and asked: “Is Jasper Dead?”
Andy Conrad replies:
We have no news about Project Jasper because we really have nothing interesting to report.
The project team wants to port the code base/ functionality over to the DLR, hence we are waiting for that to mature before doing so. We are also thinking of doing a DLR based Astoria client with Jasper like functionality, but need to get Astoria V1 done.
As I have posted before, if folks want us to update the Jasper CTP for VS 2008 RTM or have any ideas of what direction we should go in, they should post to the newsgroup or send email.
So it sounds like there was not enough interest expressed in the project and therefore it is just shelved for now.
As Holger Froebe suggests in reply to Andy’s answer, if there was a VS2008 version for people to play with, more people would very likely be playing with it and help drive interest.
Dell’s Tablet PC next to Lenovo Thinkpad Tablet
Dell started selling their own TabletPC recently. Since it looks comparable to my Lenovo Thinkpad, I took a closer look the specs and compared them. And the results are….[read more]
[A New DevLife post]
From the forums – what’s in the near future for Entity Framework and tools
Some of the best info about Entity Framework is buried in the forums.
I wanted to surface a few important things.
1) From Danny Simmons on January 28th responding to a question about RTM, while Danny is forced to repeat yet again “first half of 2008” he drops some great info about another build to play with before then:
“What I can tell you, though, is that there will be another beta/ctp before the final release. Sadly I don’t have a firm date for that yet either. We’ll let you know just as soon as we can.”
2) From Noam Ben-Ami, who is the PM for the Tools, in response to a question about creating an EDM and then generating database objects from that:
“Despite our best efforts, this feature does not look like it will make the first release of the designer. We are working on this for a future release. In the meantime, we are looking for a way to release some sample code that will demonstrate this functionality and which you’ll be able to modify for your own needs/database platform.”
I mentioned the second point in my upcoming DotNetRocks interview, though I was having a hard time remembering which feature I had read this news about. My memory, it turns out, did serve me right although I was very hesitant for fear of misspeaking.
It would be great if this information were more readily available (poke poke), which is why I’m blogging it! 🙂
Just recorded DotNetRocks about Entity Framework
Earlier today I recorded a DotNetRocks show with Carl and Richard where I got to go on and on and on about Entity Framework for a whole hour (which flew by in what felt like 10 minutes). Richard’s heavy DBA background made for some really interesting questions.
One issue that really stands out is that a lot of dbas are aware of EF and LINQ to SQL and the fact that they do dynamic query generation. Many of them ,however, do not know that EF and LINQ to SQL can also be wired up to use stored procedures for DML and straight queries as well as views. Because of this, I have even been witness to SQL experts telling DBAs not to let their developers use EF or LINQ to SQL. Pablo Castro had a long talk with Greg Low who is a SQL guru (and MVP and RD and a reallllly nice guy and a very involved community leader that I originally met through INETA many years ago) and asked a lot of these questions on a recent podcast on SQL Down Under.
Clearly the message needs to be spread!
(Unlike the interesting and untrue LINQ to SQL rumor that was spreading this morning.)
The DotNetRocks show will “air” on Feb 26th.
Carl and I also talked about doing a series of EF “sessions” for dnrTV.
VTdotNET’s 6th Anniversary Meeting: Unit Testing, cake and some surprises
| Last night was Vermont.NET’s 6th Anniversary. Our first meeting was Feb 2002 with Russ Fustino starting us off to an unknown future. So now it’s been 6 years and we have had a meeting almost every single month in those 6 years. More importantly, we have built a great community of developers who have become old friends. We have a few thank you’s to distribute for last night’s meeting. First of course, thanks to Sarah Cameron, a VSTS expert who through her company, InCycleSoftware.com, works with clients to handle enormous deployments of and training on VSTS at companies with development teams in the thousands. Now that the Unit Testing feature from VSTS is in the Pro version of VS2008, she came to show us how it works. She is extremely knowledgeable and very impressive in handling the many challenging questions asked throughout the presentation. Sarah drove down from Montreal (a 3 hour drive) so after the meeting, she stayed overnight at our house and I got to spend a bunch of time with her. She wasn’t even daunted by the -7 fahrenheit temperature in the morning. It’s a heat wave compared to Montreal in January! Thanks, as always to VTC for letting us have our meetings there, even if they understandably have to charge us a nominal fee. Thanks to CONIX.com for sponsoring this meeting in a big way. They provided the pizza and soda and even the birthday cake. They also paid the room fee. Tom Cooley, a long time VTdotNET member and employee of CONIX went out of his way to not only order, pick up and deliver all of the goodies. but when we realized that we hadn’t co-ordinated on plates and cups, he went back to the pizza joint to pick them up. The sad part of the story is that unbeknownst to me, Tom was not feeling well, so after he dropped off everything, he went home. Isn’t that really sad? 🙁 Thanks also to Goodrich Corp (Vergennes Vermont location) whose long time attendee, Bret Griswold, arrived with a gift for the user group. He presented us with a check to cover the cost of our meeting space for a whole year! This is huge for us and means that I won’t have to go begging for a while to cover that. (We still manage not to have to charge dues.) So thanks to Goodrich. It’s a drop in the bucket for such a big company, but it means a lot to Vermont.NET. What’s a user group meeting without swag? Thanks to Infragistics and JetBrains for providing licenses to raffle off, to Codezone for some great swag and great MSPress books and to telerik for sending a small pile of my FAVORITE t-shirt in the world so that I could give one to Sarah and a few of the other gals who attended the meeting! Last time I had some of those shirts, they were snagged by many guys to give to their wives/girlfriends/daughters. And thanks to everyone who continues to be part of the Vermont.NET community. Every speaker who has come to our group from elsewhere has commented on what a friendly and fun group you all are. |


