Thursday, April 24, 2008

If you're planning to attend the Patterns & Practices Quebec City Summit but haven't registered yet, do it right away!  I just heard from Joel Quimper that the Summit is almost sold out, less then a dozen seats are still available.

http://www.pnpsummit.com/queb2008.aspx

Thursday, April 24, 2008 12:05:18 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

I was trying to explain quickly what Code Access Security is to someone when I found this blog entry from Emmet Gray:
http://home.hot.rr.com/graye/Articles/CodeAccessSecurity.htm

In a nutshell, he explains why your code won't run if run from a network share and what are CAS, mscorcfg.msc and caspol.exe.  It's a great 5 minutes CAS primer.

Thursday, April 24, 2008 11:24:44 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

If you created reports using Visual Studio 2008 and Crystal Reports 2008 Basic (the one included with VS) and you want to deploy your app on a server, you'll also need to deploy the CR runtime.  Your first reaction might be to go to the Business Objects Website and download the CR 2008 runtime.

http://support.businessobjects.com/downloads/runtime.asp#08

Well, that's the wrong runtime.  That one is for the "full" version of CR 2008 (version 12).  The CR included with VS 2008 is the basic one (version 10.5).

So where do I get the basic (10.5) runtime?  It's right on your machine:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5

 

Thursday, April 24, 2008 10:14:27 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Wednesday, April 23, 2008

Ray Ozzie hinted it at his Mix08 keynote

The name: Live Mesh
https://www.mesh.com/Welcome/Welcome.aspx

What it is:
http://dev.live.com/blogs/devlive/archive/2008/04/22/279.aspx

Ray Ozzie introducing it on Channel 9:
http://channel9.msdn.com/ShowPost.aspx?PostID=399578

The architecture:
http://channel9.msdn.com/ShowPost.aspx?PostID=399577

Hands on demo on Channel 10:
http://www.on10.net/blogs/nic/Hands-on-with-Live-Mesh/

Must now read, watch, try and formulate an opinion  ;-)

Wednesday, April 23, 2008 6:09:06 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Tuesday, April 22, 2008

If you like TheRegion.com, home of the Microsoft Regional Directors, you'll love this Vista Gadget created by Adi Saric.

Download it here:
http://gallery.live.com/LiveItemDetail.aspx?li=d73ec145-95a0-4f62-b8a4-be0c8ac4f21e

 

Tuesday, April 22, 2008 7:12:36 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

While waiting for Enterprise Library 4, you might want to use Entlib 3.1 with Visual Studio 2008.  All the blocks will work but the VS integration will not.  Does that mean you're stuck editing the config file by hand?  Not at all, all you need is add a few registry entries by downloading a .REG file from CodePlex.

http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=entlibcontrib&ReleaseId=11669

The steps are:

  1. Install EntLib 3.1
  2. Run the .REG file
  3. From the VS command prompt, run devenv /setup

Voilà!

Tuesday, April 22, 2008 8:42:29 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Wednesday, April 16, 2008

With his own VS 2008 hockey puck and Hockey Canada jersey, ScottGu is now an official honorary Canadian!

Wednesday, April 16, 2008 3:43:34 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Monday, April 14, 2008

I finally made it to Seattle.  Why do I say finally?  Well, we were flying American Airlines, you know, the airline that grounded all its MD-80 last week and guess what?  6 MVPs from Montreal were flying on MD-80s Sunday morning flights!  So it's not until Saturday that we had a confirmation from AA that our flights were not cancelled.

Upon arrival, we were looking for a way to get to our downtown hotels when I noticed a couple of stretched limos.  I asked our much the ride was and it would have been the same price as riding a shuttle so guess what?  The Montreal MVPs arrived to their hotels in grand style:


Laurent Duveau, Dominic Sevigny and Etienne Tremblay


Me, Eric Moreau and Mario Cardinal

Monday, April 14, 2008 9:02:32 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Friday, April 11, 2008

I was trying to return a WCF custom FaultException and just couldn’t figure out how to read the custom info I was sending from the client when I found this blog entry from Jean-Paul Smit:
http://bloggingabout.net/blogs/jpsmit/archive/2007/03/21/wcf-fault-contracts.aspx

My comprehension of the whole process was OK, I was just missing one key element and the light came thru when I read this line:

  • in ex.Detail you can find your custom fault contract

Funny how a single line of text in a short blog entry can help you a lot sometimes  :-)

Friday, April 11, 2008 2:09:43 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Thursday, April 10, 2008

Some of the experts at the Launch 2008 Montreal Technical Readiness 2008: Bertrand, Laurent Duveau, Etienne Tremblay and Mario Cardinal.

Very very crowded!

BTW, I forgot to credit Jean-Luc David for the picture in my previous post.  Thanks JL!  Check his pictures here: http://www.flickr.com/photos/jldavid

 

Thursday, April 10, 2008 7:39:48 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Wednesday, April 09, 2008

Some of the experts at the Launch 2008 Montreal Technical Readiness 2008 ATE Booth:

Wednesday, April 09, 2008 7:19:30 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

Interesting numbers on Microsoft Certified Professionals Worldwide:
http://www.microsoft.com/learning/mcp/certified.mspx

 

Wednesday, April 09, 2008 7:13:52 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Sunday, April 06, 2008

In my previous post (LINQ to SQL in multi layered + service apps), I mentioned how LINQ to SQL can be used in WCF apps but how to you deal with concurrency checking?  One way is to use a Timestamp column in your tables.  This is a binary type so how will WCF deal with that?

LINQ to SQL maps the SQL Timestamp type to the System.Data.Linq.Binary type.  If you add a DataMember attribute to a System.Data.Linq.Binary field, it will work.  WCF will not choke on that.  So what does the client sees?  Something like this: Service1.Binary.

This whole thing may leads to a few problems:

  1. Binary stuff is not very interoperable
  2. Service1.Binary != System.Data.Linq.Binary

One solution is to convert the info from Binary to String.  Andrew Siemer posted a couple of extension methods that allow you to do just that.  Check it out:
http://geekswithblogs.net/AndrewSiemer/archive/2008/02/11/converting-a-system.data.linq.binary-or-timestamp-to-a-string-and-back.aspx

Simple and easy and you can convert the data right into your LINQ to SQL queries.

 

Sunday, April 06, 2008 8:00:48 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

In my previous post, one reader commented that the proposed LINQ query would be utterly slow so I did a quick unscientific showdown.

In the left corner: the query returning complex objects from anonymous types:
var q = from o in ctx.Orders
        where o.CustomerID == id
        select new { Detail = o.Order_Details, CustomerID = o.CustomerID, OrderDate = o.OrderDate, OrderID = o.OrderID, ShippedDate = o.ShippedDate, ShipCity = o.ShipCity };

In the right corner: the query returning complex objects from POCOs:
var q = from o in ctx.Orders
where o.CustomerID == id
select new TransportObjects.Northwind.Order {
Detail = o.Order_Details.Select(item => new  TransportObjects.Northwind.OrderDetail {
ProductID = item.ProductID 
}).ToArray(),
CustomerID = o.CustomerID, OrderDate = o.OrderDate, OrderID = o.OrderID, ShippedDate = o.ShippedDate, ShipCity = o.ShipCity};

The weapons: 50,000 orders each having 10 order details rows meaning 500,000 objects.

The result: it's a tie!

Yep, both queries returned the results in about 2 seconds using SQL Server Express 2005 locally (no layers, no WCF etc)

 

Sunday, April 06, 2008 7:41:59 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Friday, April 04, 2008
Friday, April 04, 2008 8:46:36 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Wednesday, April 02, 2008

In my previous post about using LINQ to SQL in multi layered apps, I mentioned that this query was not optimal because I would need to build the POCOs from the objects returned by LINQ.  This would mean that objects would be created twice. 

var q = from o in ctx.Orders
        where o.CustomerID == id
        select new { Detail = o.Order_Details, CustomerID = o.CustomerID, OrderDate = o.OrderDate, OrderID = o.OrderID, ShippedDate = o.ShippedDate, ShipCity = o.ShipCity };

Not ideal so I asked if anyone had an idea on how to do that.  Stefan Sedich suggested this query:

var q = from o in ctx.Orders
where o.CustomerID == id
select new TransportObjects.Northwind.Order {

Detail = o.Order_Details.Select(item => new  TransportObjects.Northwind.OrderDetail {
ProductID = item.ProductID 
}).ToArray(),

CustomerID = o.CustomerID,
OrderDate = o.OrderDate,
OrderID = o.OrderID,
ShippedDate = o.ShippedDate,
ShipCity = o.ShipCity};

Cool!  The query returns the Order complex object with the Detail property filled from orders Details.

Thanks a lot Stefan!

 

Wednesday, April 02, 2008 7:04:54 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Tuesday, April 01, 2008

Enterprise Library 4.0 March 2008 CTP was released yesterday.

http://www.codeplex.com/entlib

Tuesday, April 01, 2008 8:03:08 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

My good friend Mario Cardinal just got one article published on MSDN.  It's called The Hidden Roles of Software Architects.  Check it out:
http://msdn2.microsoft.com/en-us/library/cc431351.aspx

Tuesday, April 01, 2008 7:52:47 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

Team Suite Vnext will be FREE (but ad supported)

At Mix08 in Las Vegas, I had the chance (!) to be invited to a special meeting.  The invite was for only 12 people and it was to demonstrate a revolutionary new Visual Studio feature.  We gathered with Scott Guthrie in a private room at the Aquaknox restaurant at the Venetian hotel where we were treated with exquisite seafood that would have a bad taste later on.

So what is that revolutionary new Visual Studio feature?  Well, Microsoft plans to offer the next Visual Studio Version for free.  Yeah, Visual Studio Express is already free you might say but I’m talking about the Team Suite here!  Yep, Microsoft plans to offer the $10K product for free!!!  So watch the catch?  Isn’t that some good news?  Well, Microsoft has some large teams dedicated to the development tools and they need to generate revenues to pay for those salaries so the Visual Studio VNext will be free but add supported.  You might say that’s it’s a good deal because you get a $10K product for free by watching a few non obstructive ads well here the catch: the ads are obstructive.  How obstructive?  Check this out.
First of all, the advert system code name is called Barracuda.  It is already included in the August CTP of Visual Studio Team Suite code name Rosario.  You may have downloaded that version and found nothing special; this is because it is not activated by default.  To activate it, Microsoft has created something clever: you need to input a special set of buttons from an Xbox 360 game controller!

So you need to connect an Xbox 360 controller to an USB port (the wireless one will also work) on the machine running Rosario and you need to input the button sequence in this precise order:
At the same time: press the Left trigger + Right trigger + Left thumbstick UP + Right thumbstick DOWN
While the above are pressed, press the D-pad in this order: Up, Left, Up, Down, Up, Right
If you entered the correct sequence, the controller will vibrate and this dialog will pop-up inviting you to restart Visual Studio.

After restarting Visual Studio, create a class library project and take a look at the code.  Yep that’s an ad placed directly on top of your code and no way to turn it off!

Now shut down Visual Studio, unplug your network cable so you don’t have any Internet access and restart Visual Studio.  You’ll be prompted by this dialog:

Yes, an Internet connection will be required to use that free ad supported Visual Studio.  If you dismiss this dialog, Visual Studio just closes.  That’s it!  Impossible to use it on the train or at a client without being connected to their network.  How convenient!

Now the shocking part (yes there are more shocking news!): when the application is compiled and deployed, the add system doesn’t go away because it’s built in the .NET Framework 4.0. When your users will start your app, they will be presented with an ad!

Microsoft has not completed the Web start-up ad yet but the plan is to whenever a new session starts, the start-up ad will be presented in a DHTML window over your actual application in the browser.  Shocking?  Wait, there’s more!
The ad system is connected with ADO.NET so ads are inserted right into the data you’re displaying.  The plan is to have one ad being displayed at all time in grids. 

Oh BTW, your users will also have to be connected to the Internet or your app will simply not run!

I don’t know about you but that whole ad supported Visual Studio thing smells fishy.  I don’t like it at all and I’d rather pay for Visual Studio then get it for free and annoy my users.  Before posting this info, I contacted Scott Guthrie for voicing my concerns.  This is what he had to say:  April Fools!!!!

 

Tuesday, April 01, 2008 5:53:04 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  | 
Monday, March 31, 2008

The P&P group recently published a set of WCF security related guidance.  You'll find on this CodePlex site a series of articles and videos.

http://www.codeplex.com/WCFSecurity

Monday, March 31, 2008 9:00:11 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

Theme design by Jelle Druyts