MVC, TDD, ORM, WCF, OMG LOL

by Jon Davis 23. April 2008 22:05

Rob Conery, creator of the SubSonic ORM and scaffolding framework for ASP.NET, has been transparently publishing, in video format, what he understands TDD (Test Driven Development or Test Driven Design) in his presentations on the the reworking of the ASP.NET Storefront Starter Kit based on the ASP.NET MVC toolkit.

Surprisingly, the series has little to nothing to do with the storefront project. It's more of .. what I just said, Rob's transparent discovery process of TDD and keeping his process in check. That said, I thought it was a rarity among webcasts, something very much worth watching. Rob, who was recently brought into the Microsoft fold, has a way of making Microsoft look and feel human like the rest of us, using common sense and even humbly making adjustments of mindset and worldview according to the wise words of industry professionals as they give feedback. (This is something Microsoft has been getting good at lately, stepping out from their big Redmond city sized box and learning from a bit the rest of the planet, which is why I still root for them despite my relentless criticisms.)

Rob's discovery process is actually a very, very good opportunity for the rest of us to learn from. Rob came in prepared, he presented well, and the content and message are very good. While it was mostly review for me, TDD brings about such a different mindset to software that I feel like I need as many such "reviews" as I can find so that I can get it ingrained and rooted in my mental patterns.

That said, I am still greener than I want to be at ASP.NET MVC. This is just an issue of experiece; we're using it at work but I haven't been given the opportunity to implement, the other fellows have. Same with SubSonic.

I'm a big fan of SubSonic. I like its approach to ORM and its scaffolding.

Lately, though, I've been touching a bit with one of the software industry's best kept secrets among rediculously handy ORM solutions, and that is EntitySpaces. Mike Griffin's work with ORM tools has been around longer than Rob Conery's, and I've admired his work with both MyGeneration (a free, open source, and in many ways much better alternative to CodeSmith) and EntitySpaces for a couple years now. EntitySpaces is still pioneering in the ORM space, they've had a super-sweet ORM query object model that has been around and in production for much longer than SubSonic's recent "super-query" tweaks, which are still in beta. Makes us all wonder ...


Rob Conery

Mike Griffin
ROFLMAO.

Aside from the additional fact that ES works cleanly and happily on the Mac and on Linux with Mono, and aside from the additional fact that SubSonic is less about ORM and more about "building web sites that build themselves" (not everyone is building ASP.NET web sites, some people are writing software and just need a focused ORM solution), one thing I'm noticing recently about ES that makes it stand out from a lot of the other solutions out there is that an investment in ES on the server side is a really smooth and effortless transition to the client when you throw WCF in the mix, if all the client needs is the data models. The WCF proxy support in MyGen+ES makes client/server integration over WCF a snap. Part of this magic is also in Visual Studio, when you right-click References and add a Service Reference, the proxy objects are brought over from WSDL or a WSDL equivalent proxy definition, and you can begin coding on a seemingly rich object model on the client right away.

For me when I was tinkering with ES over WCF, being still green to ES, this brought TDD (actually integration testing) back into the picture. I found myself taking what I learned from Rob Conery on TDD and designing my services by executing tests--specifically, integration tests, which isn't pure TDD but I trusted WCF. I kind of had to; I needed to invoke the interfaces so that I could step through the debugger and introspect the objects and see what was going on under the covers as I was invoking code over the wire. This isn't pure TDD by principle but it is "test driven design" in the sense that I was finding myself writing tests that simulate real-world behavior in order to design how I want the code to function.

TDD, meanwhile, has made me think a lot about what I wrote half a year or so ago about Design Top-Down, Implement Bottom-Up. I didn't get much feedback on that post, but I, too, was being transparent with what I thought was a good idea. My word choice in that pattern seems foreign at first to TDD principles, if not contradictory, but the more I think about it the more I think it is actually very much complimentary.

  • In TDD, the tests simulate, by way of invocation, the top-down design and verify the bottom-up implementations, and
  • The implementations are kept in check by these simulations of top-down usage.

So I think TDD is really the glue, or a type of glue, that makes Top-Down-Bottom-Up work. I think the only big differences in perspective here are physical; TDD's perspective is a "I poke at you first, before you yelp", or forwards, perpective, Top-Down-Bottom-Up assumes that encapsulation is a layer, and the priority in the design process, over the implementation. (Or something.) It's all pretty much the same thing. And actually, while TDD validates the Top-Down-Bottom-Up process, TDBU validates TDD, too, because done right it uses TDD to prove out the stability and rock-solid implementation of an end product.

I'm feeling now like haacking (pun intended, for those who know) together a SuperText blog engine using a mish-mash of funzy geek stuff I want to keep pushing myself with including ES, ASP.NET MVC, TDD, REST, WCF, VistaDB, Silverlight, Javascript/AJAX, and Internet Explorer. Just kidding, I won't use IE ...

... not that I haven't built a complete blogging solution before.

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading




 

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Jon Davis (aka "stimpy77") has been a programmer, developer, and consultant for web and Windows software solutions professionally since 1997, with experience ranging from OS and hardware support to DHTML programming to IIS/ASP web apps to Java network programming to Visual Basic applications to C# desktop apps.
 
Software in all forms is also his sole hobby, whether playing PC games or tinkering with programming them. "I was playing Defender on the Commodore 64," he reminisces, "when I decided at the age of 12 or so that I want to be a computer programmer when I grow up."

Jon was previously employed as a senior .NET developer at a very well-known Internet services company whom you're more likely than not to have directly done business with. However, this blog and all of jondavis.net have no affiliation with, and are not representative of, his former employer in any way.

Contact Me 


Tag cloud

Calendar

<<  August 2020  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

View posts in large calendar

RecentPosts