Contents tagged with .NET

  • Review of Excellent Book: Linq in Action

    "LINQ in Action", published by Manning, is by far the best book available on Linq, both for those new to Linq and those already following it.  The authors, Fabrice Marguerie, Steve Eichert, and Jim Wooley, have done a fabulous job of explaining Linq from the basics to the advanced.  They even made it enjoyable to read, which makes it one of the best .Net books ever!

    The authors' introductory chapter shows us right away that this book is different by presenting a perfect balance of the problem, the history, and the solution.  Linq is a huge subject, but the authors are up to it, and they quickly whet the readers appetite for all of Linq -- Objects, Sql, and Xml.  We then get a very thorough explanation of the new language enhancements that Linq relies on, but which the authors clearly show to have uses of their own.  The chapter on Linq's building blocks, covering sequences, query operators, query expressions, and expression trees, was especially instructive to me, even though I've followed Linq from the alpha days, so again I'm sure this book has something for everyone.  The book then covers Linq to Objects very thoroughly, including common scenarios and performance considerations that other books never consider.

    The book then progresses to three chapters on Linq to Sql, which are of course my favorite since I'm really into O/R Mapping.  The authors cover not just the basics to get beginners up to speed, but they also cover far more advanced content than I was expecting.  For instance, they discuss not just the designer to setup mappings, but also the SqlMetal tool, and manual mappings using either attributes or xml.  They also discuss the various concurrency options, the entity life cycle, inheritance, and more.  The authors then give us three chapters on Linq to Xml, which again have something for everyone -- I especially like the chapter on common scenarios.  The book finishes with a very thorough chapter on extending Linq, with a Linq to Amazon example, and a chapter that ties it all together with a real-world example that was gradually put together during the course of the entire book.

    The authors also provide additional support and material online, including a bonus chapter on Linq to Datasets.  There is also downloadable code in both C# and VB, although the book actually shows both languages in most cases, and always points out the differences when there are differences between them.

    Disclaimer:  I personally know Jim and have seen him present on Linq multiple times, Steve was a user of my WilsonORMapper, even contributing to it, and I've known Fabrice in the online world for quite some time too -- but I did very much enjoy and learn even more from their most excellent book on Linq.

  • Do .NET 2.0 SP1 Binaries Fail Without SP1?

    Do .net 2.0 service pack 1 compiled binaries fail when ran on machines without that service pack?  Developers automatically get force-fed .net 2.0 sp1 when we install VS 2008, which doesn't sound like it should be a big concern typically.  But what about the next time you compile an existing VS 2005 app and deploy on machines without sp1, which would of course be the case for most non-dev machines right now?  I believe I have found a case where this is indeed happening, at least that's the only explanation I can find so far, and it looks like there are a few others reporting things too -- but the details so far are sketchy at best.

    I've got an existing .net 2.0 app (written in C#) that calls a 3rd party web service that has always ran just fine.  I needed to make a couple of small updates to my app which did not change anything related to the calling of this web service at all.  Everything works flawlessly on my development pc, which has service pack 1 for .net 2.0, but fails when deployed on my qa server, which does not have service pack 1.  Here are the exception details:

  • Great News: Only One O/RM Shipping in Orcas

    I almost can't believe the great news that came from MS today.  That's right, the ADO.NET Entity Framework has been delayed !  I bet most of you think I'm being sarcastic, but I am serious.  I've got at least three reasons why this is good news to me.

    First, this gives Linq to Sql a better opportunity to thrive.  Linq to Sql is the "simpler" OR/M that's looking good enough for the vast majority of cases, while ADO.NET EF is far more complex -- and yet most gurus only wanted to talk about the EF.
     
    Next, since ADO.NET EF is so complicated, it absolutely must have a great designer ship concurrently, which was not the plan.  MS has apparently accepted this feedback since this is at least the publicly given rationale for the delay in shipping the EF.

    Finally, and this one may not pan out, but it is my own hope that ADO.NET EF is being re-aligned somewhat with Linq to Sql.  These two O/RMs are similar enough to share at least some code, and I believe that some of the MS guys have hinted at this too.

    So I'm happy that at first there will be one O/RM -- Linq to Sql.  The gurus may be disappointed, but the vast majority of MS devs will be new to O/RMs anyhow, and Linq to Sql will be good enough.  Very much like my simple WilsonORMapper has been so widely used.

  • Atlanta Cutting Edge .NET User Group Meeting

    The Atlanta Cutting Edge .NET User Group is meeting Monday, March 5, 2007, at 6:00pm in the Microsoft offices in Alpharetta.  Paul Lockwood will be talking about advanced production debugging and Eric Engler will be talking about the ASP.NET AJAX framework.  Eric promises it will be about much more than the UpdatePanel, which seems to be the extent of most such talks.

  • LINQ to SQL "Real" Example App Available

    The Atlanta Code Camp was today, so I finally got to give my LINQ and O/R Mapping talk that I've been preparing.

    I tried to have minimal slides so that I could do a deep dive into real code, but I still went a little too long.  The slides look great on my own PC, and in fact they're mostly some I stole straight from other LINQ presentions.  But the overhead I was using made the text nearly unreadable for some reason, which made me take longer on the slides.  It also made some of the standard VS color syntax unreadable, with the work-around being to select that code.  I small the same problem with another speaker in the same room, so I guess it was the projector, but very frustrating.

    In the end I still got to hopefully show a fair amount of LINQ to SQL, but I had really hoped to show more.  I also made sure I gave a glimpse at SqlMetal and LINQ to Entities, but both of those were meant to be just glimpses.  Finally, I briefly demoed my new "real" example application written with LINQ to SQL which is included in my download.  This example shows off my own POCO objects with an external XML Mapping file, instead of the ugly code gen with attributes.  Its also a "real" app that consumes the LINQ to SQL with WinForms grids, drop-down filtering, and create, update, and delete.

    Note that it assumes the May 2006 CTP, but I'll update it to the next one when it comes out, hopefully next month.  Its also nearly identical to my existing "real" example app downloads that I have for my own ORMapper and NHibernate.

  • Atlanta Code Camp 2007 Registration is Open

    Registration for Atlanta Code Camp 2007 on January 20th is now open.  Space is limited and fills up fast, so do NOT delay registering -- it's free.  Thanks to Jim Wooley for putting this together this year.

    I'll be presenting a session titled "Linq and O/R Mapping" that will be lots of real code and very little powerpoint.  If you've seen the standard Linq sessions already, or even if not, but you've been wanting more then this is for you.  I'm not going to waste any time on Linq to Objects or Xml, although those are cool in their right -- I will focus purely on Linq to Sql, and to a lesser extend Linq to Entities or Datasets.  Do you want to see a real application built using Linq to Sql?  That's what I plan to do, and I'll do it several ways so you can experience the possibilities.  For instance, should we use SqlMetal, the GUI Designer, or do our own thing with xml mappings instead of attributes?  What if you want to include some relationships, use some stored procs, and even some inheritance?  We shall cover all of those possibilities and more -- you will NOT be disappointed since this will not be just another slide deck or sample series based on what's already available.  In fact, I would actually challenge you to find any other "real" sample that includes all of these with xml mappings, but you won't find it since it doesn't exist.  I hope you get that I'm excited about this, as these technologies have definitely matured past my initial criticisms.  And even if you can't make it for some reason, I'll post at least some version of my sample app after the event is over for all to see.

  • VS 2005 Service Pack 1 Available -- Go Get It Now

    If you haven't heard it already, VS 2005 Service Pack 1 is out and can be downloaded here.  It contains over 2200 bug fixes according to Scott Guthrie, as well as making Web Application Projects standard once again.  Also according to Scott, the install time can vary significantly depending on what you have installed, and is especially very long if you have C++ installed.  My own experience was that it took about an hour to install on my system, although that actually involved what I can only describe as two 1/2 hour installs.  Yes, maybe it was a fluke due to something on my system, but it installed once and said it was done, and then kept going with another install, including the exact same couple of dialogs, before finally asking to reboot.  Maybe your experience will be different, but in the end I suppose what matters the most is that our VS 2005 experience will now be improved every day.