Chris Stewart's ASP.NET Blog

My experiences with ASP.NET
I moved!
I'm going to be moving my blog here on ASP.NET subjects to: CompiledMonkey.com.  Please update your bookmarks!
Posted: Oct 06 2008, 03:07 PM by CompiledMonkey | with no comments
Filed under:
"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
Posted: Sep 24 2008, 07:31 PM by CompiledMonkey | with 2 comment(s)
Filed under:
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.

You can easily pick up this book and enjoy the introductions to technologies such as Windows Communication Foundation, Windows Workflow Foundation, Windows Presentation Foundation, ASP.NET MVC, and Silverlight. Each of these topics are presented in a way that will be familiar to .NET developers. New developers, without experience in .NET, will be able to take a lot away from this book. It certainly will do more for the developer who already has a .NET background, no matter how brief it is.

That said, if you only pick up the book for the introduction to each technology, you’ll be missing the best that this book has to offer. Unlike most technology books these days, this book explains the topics within the context of best practices and real world scenarios. For example, prior versions of ASP.NET did not promote decoupled architectures. In fact, it made it difficult to achieve them. With the technology available in .NET 3.5, modeling and implementing proper architectures is encouraged and facilitated by the framework. This book will show you how that works in .NET 3.5 and introduce you to the technologies at the same time.

I highly recommend this book. It will be on my desk for easy reference for my .NET projects in the future.

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.

At work, I've been primarily working in the J2EE world.  I've enjoyed most of it but man, I really miss .NET.  It sounds stupid but I really enjoy the experience of developing with Visual Studio and the .NET platform.

Stay tuned!

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.
iPhone SDK Development
I know it's unrelated to .NET but I'm a Mac person, so I've been really drawn in to the iPhone SDK. Am I the only one from the Microsoft developer community? I've even started up a blog and forum dedicated to the topic: http://www.iphonedevsdk.com
Posted: Apr 03 2008, 08:13 PM by CompiledMonkey | with 10 comment(s)
Filed under:
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.

If you want a brief overview of what's possible with LINQ and the various implementations, you'll probably find the same information for free across the web.  I was hoping for more of a real-world introduction.

Book Review: ASP.NET 3.5 Unleashed

I've been working my way through "ASP.NET 3.5 Unleashed" lately.  Although I'm not quite finished, since the book comes in just under 2000 pages, I do feel confident in writing a review.

The Unleashed series has a certain following behind it for being a fairly comprehensive guide to the technology the book examines.  This entry into the series is no exception.  This book goes into every detail of ASP.NET and ready digs into the new features of 3.5, as you may expect given the title.

I've enjoyed the way this book presents material.  It's not too detailed for the beginner but doesn't leave the experienced wanting too much more.  I would highly recommend this book to anyone looking for information on ASP.NET 3.5.  This book is something every ASP.NET book should aspire to be.

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.

I decided to give the ASP.NET MVC programming model a try and found the experience much smoother.  Not only did everything simply work easier, but you get a sense that the two were meant to be used together.  Using the Controller approach found in MVC, it's extremely easy to inject your dependencies using constructor injection.

Designing software while using dependency injection has changed my normal approach.  I've found myself creating an extra layer or two of abstractions.  The implementation of the classes I'm building is pretty simple and somewhat resembles the Facade pattern.  My classes essentially boil down to a small set of service classes that are injected into the Controllers as needed.  All of the services that are injected into the Controllers are done so by using interfaces for the service.  The concrete implementation of the service classes are actually composite classes.  They use the various repository classes (think subsystem) they need to offer up a set of common methods that define the service.  I guess it sounds more complicated than it really is, but the idea is that everything is loosely coupled to everything else.  Everything is interface driven, so supplying concrete implementations is the job of StructureMap, my dependency injection framework of choice.

I can't say that dependency injection is "the way to go" for every scenario.  In fact, my current application doesn't really need it except for maybe one instance.  However, what I do like about using dependency injection is the side effect I mentioned above.  Using it has me thinking about my n-tier architecture in a different way than before.  I've found useful instances of working in an interface driven environment.  I also enjoy the approach of creating services for the various subsystems in my framework.  It's certainly something you can do without dependency injection and ASP.NET MVC, but it's something I've found very useful in solving business problems while using those technologies.

kick it on DotNetKicks.com
StructureMap for Dependency Injection

I decided to go with StructureMap as the dependency injection framework for my next project.  I choose StructureMap for a number of reasons.

StructureMap has been around for quite some time.  Not that this makes it better than any other framework.  However, coupled with the fact that it's an active project, it's still a hot topic in the world of DI for .NET, and a lot of .NET developers use it in their applications, I feel pretty good about it's history and future.

StructureMap 2.0 does not require an XML configuration file.  In my opinion, the last thing we need as .NET developers is another XML configuration file.  That's what I dislike the most about Java.  You can't build a J2EE application without writing a mountain of XML configuration.

Probably less of a feature and more of a convenience to me, is that StructureMap has only one purpose and that's providing a dependency injection framework to .NET developers.  Spring.NET is nice and it does a ton of things.  That scattered focus left me feeling scattered after creating a sample project using Spring.NET.  I'm sure everyone has their own feeling towards this but for me, I felt less interested in Spring.NET after reading and reading about all of the various things that framework can do.  I just wanted DI and that can be done in Spring.NET rather easily and separate from everything else the framework provides.  It's just information overload while trying to learn the one specific thing I wanted to learn.

So there you have it.  I'm excited to get started on this project and dig deeper into StructureMap.  I'll certainly provide opinions and lessons learned throughout the process.

More Posts Next page »