Blog - Microsoft .NET, ASP.NET, AJAX and more

Behavior Driven Development (BDD) with Cucumber and ASP.NET MVC

by Damien White 6/10/2010 6:18:40 PM

cucumber_logo So as I’m sure you have guessed by my last bunch of posts, I’ve been hooked on Ruby and Rails development.  The more I use it, the more I love it.  I felt I was loving it a bit too much, so decided to divert my attention back to ASP.NET MVC for a while.  While developing with Rails, I was practicing BDD with Cucumber.   I felt that Cucumber scenarios (written Gherkin) were far more useful for the majority of my testing on a web application.  Sure unit tests are worthwhile for bits of code, but I’ve found that they don’t always make sense when testing a web application (like Steve Sanderson has mentioned).  Some may argue that these tests are brittle, but honestly, I feel it defines my application better and it definitely tests the actual interactions better.  I’m fully on board for unit tests for complex processes, but the majority of web work just isn’t that complex.

I’m not going to go fully into what BDD is here, but my goal was to use a similar process when developing ASP.NET MVC applications as I did in Rails.  With Rails, it’s simple, Rails, Cucumber, Pickle, ActiveRecord, Factory Girl, Webrat, etc. work perfectly together.   In the .NET world, there are options, but nothing that really fit together as nicely.  I started with just wanting to test my basic application (menus, breadcrumbs, etc) and didn’t venture into model work yet, so I figured it would be as simple and efficient as it is in Rails.  Not so much.  I tweeted about this exact thing a while ago.  More...

Shout it kick it on DotNetKicks.com Bookmark and Share

Book Review - Wrox Professional ASP.NET MVC 1.0

by Damien White 5/17/2009 12:01:58 PM

Professional ASP.NET MVC 1.0Working primarily on web applications, I’ve focused most of my time on ASP.NET Web Forms since the very early betas.  Web Forms were truly a great revolution in the web world.  Once I saw the functionality when it first came out (when I was using ::shudder::  “classic” ASP), I couldn’t wait to start using it.  I began right away with ASP+, as it was called back in 2000, abandoning Visual Interdev and ASP, yippee.  The release of Version 1.0 came out January 16, 2002, changing the way we work with the web.

Flash-forward 7 years (9 from the early betas), and the programming world has changed.  With things like TDD (Test Driven Development), AJAX, JSON, jQuery, etc, and the complexity of web applications growing, sometimes Web Forms would get in the way.  To be fair, the Web Form framework is very robust and tries to be helpful, but sometimes we developers like to shoot ourselves in the foot.  One example that I’m sure many of you have experienced is trying to interface with a server-rendered element on the page.  Performing something like a document.getElementById(‘UserName’) in JavaScript doesn’t exactly work as expected when the ID of your textbox is now something along the lines of “ctl00_mainContent_LoginCtrl_UserName,” does it?  On this particular topic, ASP.NET 4.0 has a solution for this problem, but that isn’t the focus of this post.  The Client Id problem, is just one example of the framework “getting in your way.”  This is one of the many reasons behind the advent of ASP.NET MVC.  Having just finished Professional ASP.NET MVC 1.0 from Wrox, I’m a convert. More...

Shout it kick it on DotNetKicks.com Bookmark and Share
Tags: , ,
Categories: .NET | ASP.NET | MVC | Review
Actions: E-mail | Permalink | Comments (5) | Comment RSSRSS comment feed

My Wrox Blox Books - Now on Amazon!

by Damien White 1/30/2009 10:00:23 AM

I just happen to be browsing Amazon today and noticed that my Wrox Blox books are available for purchase on Amazon.com.  Pretty cool stuff!  They were listed up there before, but weren't available directly through Amazon until now.  For a full description and the table of contents of each, just click on the Amazon links at the bottom of this post.  In addition, here are my previous announcements:

Both books are good guides for anyone using ASP.NET AJAX in either Visual Studio 2005 or 2008 using .NET 2.0 (with the AJAX Extensions) or .NET 3.5.

Shout it kick it on DotNetKicks.com Bookmark and Share

Microsoft Announces Visual Studio 2010 and .NET 4.0

by Damien White 9/30/2008 1:35:57 PM

Microsoft News Yesterday, Monday, September 29th, Microsoft announced the next version of Visual Studio and the .NET Framework.  For even more information on this, September 29th - October 3rd is Visual Studio Team System 2010 week on Channel 9.

Microsoft has been busy this week announcing exciting changes, and Visual Studio 2010 and .NET 4.0 is certainly at the top.  It's always very exciting when new versions of Visual Studio come out (or maybe that is just me). 

It's too early to tell everything that will be included in the final release.  However, one would assume that final versions of things like ASP.NET MVC and ASP.NET AJAX 4.0 will be included.  Personally, I would like to see the ASP.NET features to come earlier, especially ASP.NET AJAX.  We haven't had a new release for the ASP.NET AJAX since the 1.0 release.  ASP.NET AJAX found in .NET 3.5 is really just the ASP.NET AJAX 1.0 Extensions that were bundled as part of the release.  ASP.NET developers are starting to move more and more towards using things like jQuery.  This doesn't mean that most of us ASP.NET developers are giving up on ASP.NET AJAX just yet, but it doesn't seem to be a good sign for the future of ASP.NET AJAX.  I would hope and expect that we will see something similar as the ASP.NET AJAX 1.0 Extensions being released so that we can start using it before 2010.  More...

Shout it kick it on DotNetKicks.com Bookmark and Share

jQuery and Visual Studio

by Damien White 9/30/2008 8:15:04 AM

Cool Stuff! Microsoft has announced that they will be shipping jQuery with Visual Studio going forward.  For more information on this announcement, you can refer to Scott Guthrie's or Bertrand Le Roy's announcement.  It will be licensed under the MIT license (as it is now) and will not be altered from the original source.  The one feature that will be added is Visual Studio IntelliSense  which is an excellent feature to have "built-in" rather than having to "hack" it.  One thing to note is that this isn't a replacement for the Microsoft ASP.NET AJAX Library.  This is simply an addition which will compliment the existing ASP.NET AJAX Library and as you can see, everything plays nice together
More...

Shout it kick it on DotNetKicks.com Bookmark and Share