Visual Studio Integration With Entity Spaces 2009

by Jon Davis 12. October 2008 10:52

I've been getting more and more pessimistic lately about the value of generated code. While generated code has the huge advantage of outputting the cleanest and fastest code, I've started to really dislike the developer workflow aspect of opening up an external application that looks and feels completely different from Visual Studio and has absolutely no clue as to where the generated output is being used. For this reason, as much as I admired MyGeneration and CodeSmith (particularly the former since it was free and open source and more powerful, arguably, than the latter), I was never entirely comfortable as I adopted them into my workflow, always scared of the painful isolation of the code generation from my IDE workspace. The same is true of what I thought I saw of Llblgen, which has a very rich ORM toolset but it's still isolated.

Isn't the standalone nature of SQL Server Management Studio enough isolation for us??

I was slow on the uptake of interest in EntitySpaces 2009's promises to perform code generation inline with Visual Studio, but now that it's being discussed, and screenshots are displayed, I don't know, there's something about a screenshot that helps me imagine it in my workflow. And now I'm feeling all excited. Microsoft added the database servers view in Visual Studio for lightweight database management for a reason: they understand that developers often don't like to Alt-Tab out of their workflow, and by integrating it into the IDE they can introduce such things as project awareness and drag-and-drop features, etc. The EntitySpaces team apparently understands this, and they've gone in the same direction (although as far as I know, and as far as I care, drag-and-drop data binding is not an EntitySpaces feature, nor would I expect it to be).

But what I love about this new direction is that the management of data mapping is no longer XSD XML/CS (a la Microsoft ADO.NET integrated tooling), it's no longer nHibernate XML maps, it's no longer an external application, and it's not a tool that forces you to choose between a diagram and XML (LINQ-to-SQL). It's a built-in tool that appears to look and feel like the data servers / schema tree tool but emits user-configured, performance-optimized, easily adaptive POCO business objects that you can build around. Now I think I can comfortably include this in my workflow; my question is, when can I get my hands on this bad boy?

http://www.entityspaces.net/blog/2008/10/12/EntitySpaces+2009+Running+Under+Visual+Studio.aspx

(Neither Entity Spaces nor its owner Mike Griffin paid me nor requested for me to post this.)

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.


 

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

<<  November 2018  >>
MoTuWeThFrSaSu
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

View posts in large calendar