Friday, January 09, 2009

taint

End of Day 2 with the ASP.NET MVC framework.

Taint Rails.

Taint regular ASP.NET.

Taint 1.0 yet - to be fair.

Taint a good developer working here either.

I'm probably being a little hard on myself here.  No, I'm not world-class developer by a long shot but I do pay attention to a few things.  It's an odd thing being caught between two worlds.  I consider myself a solid .NET developer and an OK Rails developer.  

I think the hard part is that when learning something genuinely new (e.g., Rails, .NET the first time 'round, Django) there's a certain expectation of difficulty - I mean, it's not like you've done this before.  But I think that working with ASP.NET MVC represents a certain crossover which doesn't bode well (at least for me) for a non-frustrating learning curve.

So it boils down to this: I know how to work in a .NET environment; I know how to work in a Rails environment.  ASP.NET is a [theoretical] merge of the two.  How could I not be successful?

Turns out, it's pretty easy.

The frustrating part emerged quickly.  For each (forgive the prose, I could break into a [vaguely] witty version of prose in code] but shall not) issue encountered, I could imagine how easily this could be done in one environment (Rails vs. ASP.NET) versus the other -but I'm not in the those environments.

The other part was an unintended side-effect of a rewriting a previously written application.   I'm experiencing an unfortunate non-acceptance of a learning curve (again).  I'm sure that all those now self-evident decisions that I made in my Rails app were not so self-evident at the time.  And probably hard won.  But because this is a .NET app, things should be easy.  I mean, all I have to do is implement the same feature in a language I'm, if anything, more comfortable in.  What could be easier?

And the other, other thing is that this is, above all, a beta version.  I think I picked up Rails at 1.0.  They (DHH et al) had already learned a number of things.  Perhaps not.  At the very least, they'd decided that things were OK enough to slap the 1.0 label against it.

The RC for ASP.NET MVC is coming up shortly (slated for sometime in January 2009) which means that a majority of the articles written are centered around various preview releases.  And because they're preview releases, there's no expectation nor promise of backwards compatibility.  So any number of articles/tips may (and typically do) include code samples based around features no longer in the codebase because, see, it taint 1.0 yet.

More to come.

Wednesday, January 07, 2009

the notion

Learning in a vacuum is always tough. Say you want to learn some new technology - in my case, the ASP.NET MVC framework. I could go through and just read and watch and probably learn a thing or two. I could build something made up, like a music collection, but the problem with those kind of learning vehicles is that because they're made up, you feel no particular desire to follow through with them to the bitter end. At any point, usually when things get too hard, you can:
  • Make it easier by not implementing feature "X" at all

  • Dumb down feature "X" to make it easier

  • Declare victory and move on
You can do these things because, after all, it's not a real project. It's not for a customer - even myself. Even when it's done, I don't plan on using it.

So the real trick is to build something practical, something you might even use.  Or in my case, rebuild something you use.

We have a system here at work I built using Rails to keep track of projects, requirements, etc.  The problem is that I work for the government and they're not always fans of open source, or all too often, anything new.  So my app sits on our dev environment (which is where it ought to be anyway), but I keep hearing how we're going to need a version of it that will sit on the government network.  And because the .NET framework (which is what we use here 99% of the time) already has a pass from the powers that be, perhaps a should just write a version for .NET?

Historically my answer has been, "I don't feel like it." I can get away with this answer because nobody has pushed on it and the Rails app works just fine on dev.  But it occurred to me the other day that the Rails app would be a perfect candidate for learning the ASP.NET MVC framework.

Practical?  Check.
Defined requirements?  Check.

Plus it is (or should be) a largely 1-1 translation.  Lots of lessons learned from building it the first time plus an interesting comparison on how the two frameworks stack (if you'll pardon the pun) up against one another.

So we'll see what happens.