Chris Stewart's ASP.NET Blog

My experiences with ASP.NET

  • My "Ah-Ha!" Moment With LINQ

    I'm currently working on a set of web services that will be consumed by iPhone and Android devices. Given how often the web services will be called in a relatively short period of time, the data access for the web services has proven to be a very important aspect of the project. In choosing the technology stack for implementation, I opted for LINQ to SQL as it was something I had dabbled with in the past and wanted to learn more about in a real environment. The query optimization happening behind the scenes was something that I had an appreciation for.

    Once I completed the implementation of the web services we noticed a performance bottleneck on one of the calls. LINQ to SQL was doing all it could to help us in this situation but the nature of the required response was simply too heavy on the database to expect any real performance from any query. We ended up being able to cache the data we were querying against which would help tremendously.

    What I was expecting was a large re-write of code to accommodate my new source of data. Instead, using LINQ, I was able to simply change the from statement in my LINQ query and get the results I needed. Essentially, when building the cache, I create a List collection for the objects I'll need to query against and subsequently return to the mobile device. The results of that general query are stored in cache. When I need to perform a query against that cached collection, I have a LINQ query, which I used previously to query the database tables, that now uses the cached collection as it's data source. Which is really a fancy way of saying the "from" statement in the LINQ query. There were no ugly nested loops with various comparison statements needed.

    Going from querying a database to querying a local in-memory collection was beyond trivial with LINQ. After getting it up and working, I fell back into my chair in amazement.

  • Book Review: ASP.NET MVC in Action

    I've had the pleasure of being able to review ASP.NET MVC in Action in it's early access form.  If you've not heard of this program, Manning has a program called MEAP (Manning Early Access Program) which allows you to purchase the book before it's published and gain access to it in PDF form as the author makes the chapters available.  In this case, I've been reading parts of the book nearly a year before it will be physically published in Sept 2009.  I highly recommend checking that out, as I've participated a number of times.  In fact, I purchased C# in Depth, 2nd edition over the weekend in MEAP.  I have access to the 1st edition via PDF, access to the 2nd edition in PDF, and will receive a hard copy when the 2nd edition is published.  An excellent way to receive books in my opinion.  Anyway, on to my review of ASP.NET MVC in Action.

  • "A Beginner’s Guide: ASP.NET 3.5" Is Here!

    Earlier this year I had the opportunity to be the technical editor for McGraw-Hill's <em>A Beginner's Guide: ASP.NET 3.5</em>.  After many months of waiting, the final copy hit my doorstep this morning!  It's great to see something you worked on in final printed form.  It was almost surreal to see my name and bio inside the front cover.

    The author, William B. Sanders, did an excellent job with the title and I can't wait to read through it again.  Of course, I highly recommend it for anyone that needs an introduction to ASP.NET 3.5.

    http://www.infibeam.com/Books/info/William-Sanders/ASP-Net-3-5-A-Beginner-s/007159194X.html

  • Book Review: Programming .NET 3.5 by O’Reilly

    I just finished reading a review copy of “Programming .NET 3.5” from O’Reilly. The book, published in August, is an overview of the latest .NET Framework revision. You’ll get an introduction to the topics that have been introduced along the way that include technology from .NET 2.0, .NET 3.0, and the latest version; .NET 3.5. Also included are libraries such as ASP.NET MVC and Silverlight.

  • Book Reviews Coming!

    It's been way too long since I've posted here.  Yes, I'm still around, and I'll be posting some topics very soon.  I've been lucky to receive some great books related to .NET and I'll be posting reviews of each of them shortly.

  • Technical Editor for .NET Books

    I've had the pleasure over the last few months to perform technical editing for McGraw-Hill on an upcoming ASP.NET 3.5 book aimed towards beginners. This has been my first experience being a part of the process of putting together a book. I really enjoyed doing this kind of work and working with the author in his efforts to bring forth a great book for beginners to learn about ASP.NET, specifically 3.5 material. You can find the pre-order page here on Amazon (http://www.amazon.com/ASP-NET-3-5-Beginners-William-Sanders/dp/007159194X).

    Today I was given the opportunity to act as the technical editor for another project for McGraw-Hill. I'm definitely looking forward to this book and working with the author. This book will likely publish at the end of this year. Of course I'll give more details once that date approaches.

    I'm very interested in continuing to perform technical editing for publishing companies. In the future, I'd really enjoy the opportunity to author my own book. Until then, I'll stick with the editing gigs. If you'd like to hire me as a technical editor, please contact me at cstewart913 [AT] gmail.com.

  • Book Review: LINQ Quickly

    I've been reading another book from Packt Publishing, called "LINQ Quickly".  Again, it's a pretty short book, coming in at 250 pages.  The author does a decent job at explaining the basis of LINQ and the various implementations, such as LINQ to SQL, and so on.  What would have been a welcome addition to this book is a more practical approach to the technology.  Perhaps by building a real application along the way.  There is an appendix for just that, but it's a disappointing 7 pages.  The book's subtitle mentions it being a practical guide but I didn't see that.

  • Dependency Injection was made for ASP.NET MVC

    It's not that you can't use dependency injection in any .NET application, because you can.  It's just that dependency injection fits so well in the ASP.NET MVC programming model.  While building up a simple example for how my new application would be architecturally designed, I found using dependency injection with Web Forms as troublesome as trying to fit a square peg into a round hole.  After some modifications and adjustments, I could get it to work, but it just didn't feel like a solid fit and certainly didn't make me any more productive.