Why ASP.Net?

2007 August 8
by mike

squarepeg.jpg

I’ve been questioning the use of ASP.Net for web apps ever since I started using Rails around a year ago. As I’ve become more proficient with Rails on some recent (sideline) projects, I can’t imagine using ASP.Net for any project that I want to get personally invested in. It just doesn’t make sense.

ASP.Net is a fine platform if you’re interested in a drag-and-drop RAD interface. You know, the type of programming that VB became famous for. But if you’re interested in being a better programmer (or using the hot tools that are part of that ALT.Net group), you need more than ASP.Net can supply out of the box.

Sure, you can warp and twist ASP.Net to be more hip with the latest trends and tools that have been ported over from Java. You can insert MVP and you can wire up all of your webform events to pass through to another layer and you can stop using all of the built-in tools like ObjectDataSource because they’re difficult to test. You can throw Dependency Injection everywhere and subclass everything (just in case) and essentially force the framework to be better in spite of itself.

But doesn’t it make more sense to simply switch to a framework that is a better fit for what you need?

Those of you that have given Rails a shot know exactly what I mean. Those of you that haven’t tried it out on anything significant probably think I’m an idiot. Or maybe you’re just hooked on the money.

At work, I’m fighting a losing battle to encourage Rails. We have a significant investment in ASP.Net talent, IP and codebases so it only makes sense to use Rails where appropriate. But I’m surprised at the level of objection that I’m facing towards using something like Rails even for fringe projects. To me, that’s a short-sighted business decision and has probably got me a little fired up about this topic.

Reading a Scott Bellware article doesn’t help either. I respect the opinions of Scott and a couple of the other CodeBetter guys so it makes me a bit more stubborn about Rails when I hear them talking about the same things.

Drop me a line and let me know if you think I’m an idiot. I look forward to any opportunity to change your mind. :)

[Post to Twitter]  [Post to Plurk]  [Post to Yahoo Buzz]  [Post to Delicious]  [Post to Digg]  [Post to Ping.fm]  [Post to Reddit]  [Post to StumbleUpon] 

18 Responses
  1. 2007 August 8

    Hi, What would be the best way to getting started with Rails? Now I really want to know what that’s all about? :)

    Ciao, JJ

  2. 2007 August 9
    mike permalink

    @jens – I jumped in the deep end and bought a mac when I was first starting. The Rails dev environment on a mac is just so much nicer.

    But assuming that you’re just testing the water, InstantRails is a great way to get set up. You just download it, unzip it and you’re up and running with Rails, MySQL, Mongrel and everything else that you need.

    Have you worked with web app development outside of ASP.Net? i.e. asp, php, coldfusion, jsp, etc. If you haven’t then you might have a hard time getting used to writing an app without viewstate. Drop me a line if you have any questions.

    Good luck!

  3. 2007 August 9
    mike permalink

    Oh yeah, another tip – buy Agile Web Development with Rails. And then read it from start to finish. Then build your first Rails app using that book as a reference. When you’re finished that (or at least starting to get bored with it) buy Rails Recipes. Then start another Rails app using that book as a reference. Then buy Programming Ruby and read it from start to finish. Then (you guessed it) build a third Rails app.

    This might take you 3-6 months depending on how driven you are and how much free time you have. At the end of it, you’ll have spent $150-$200 on books and you might have fallen in love with a new platform. At the very least, you’ll have opened your mind to alternate ways of building web apps and that will ultimately make you a better ASP.Net programmer.

    But I’m betting that you’ll hate going back to ASP.Net. :)

  4. 2007 August 9

    a) who supports this when things go wrong? (I’m not saying they would, but there is that level of security when you can “just call Microsoft” to try and resolve your issue).

    b) ability to find qualified people. You’ve already bemoaned in the past how your group has problems finding and keeping talented people…presumably it would be even harder to find qualified Rails people (and note by qualified I mean both ends of the spectrum…qualfied to do good work but not architecture astronauts either).

    I know that there’s the whole .NET dollars issue but presumably some people who are uber-passionate might be convinced to come work simply to get the experience w/ Rails and get paid a still relatively fair amount of compensation? It might be easier to sell if you could verify it would save a bunch of money in that regard. shrug

    I have more thoughts but they’re in the queue behind my response to your “How do I find good developers?” post that’s been sitting in my Google docs. =)

  5. 2007 August 9
    mike permalink

    @justice – thanks for the comments. I think that both of the issues you brought up can affect the adoption of Rails.

    Support is probably one of the issues, especially in a government town like this one where well-supported frameworks may be better received even if they’re less effective. Of course, the fact that ASP.Net is just another part of the multi-tool that is the .Net Framework probably helps to get it in with bigger organizations.

    Finding qualified people is definitely something that Rails seems to be suffering from across the continent. The Rails job boards abound with postings that seem to offer great environments with good pay.

    I know that you’ve experimented with Rails in the past. How has that gone? Are you still working with it?

  6. 2007 August 14

    Hey Mike!

    I still do some work with Rails, but it’s mostly pet projects and things like this. That being said, lately I’ve had to rebalance it a bit for return on investment: if some more investigation into some of the newer MS technologies allows me more flexibility for bidding on contracts, then that gets prioritized over Rails. That being said, there definitely don’t seem to be a lot of dedicated contracts explicitly for Rails, although at this point really I can probably push for whatever language stack I’d really want. That being said, measuring it pragmatically, I’m not sure Edmonton is particularly the place for it (Calgary with Thoughtworks, Vancouver with a couple of the more indy-flavoured shops, etc. etc.). It’s tough to say but there are times where I think I can understand the brain drain that goes on from this town when most of the major projects are the standard gov. ones.

  7. 2007 August 14
    mike permalink

    @justice – You’re right about Edmonton. It might not be the right place for Rails. Too many gov’t and corp jobs and not enough smaller shops.

  8. 2007 October 9

    I’ve been through cycles with this stuff. I started off with .NET as my first entry into the web development world, and I thought it was pretty cool. I enjoyed web development so much, in fact, I began to read more and more about it, and study “best practices,” if you will. Eventually, that led to me realizing that it’s nearly impossible to validate XHTML in .NET. And that was just the tip of the iceberg…

    I learned about Ruby/Rails and started playing with it. Admittedly, there was a learning curve for me (I was new to MVC), but it was easy to get something going. Now, I couldn’t imagine ever building an application (on my own time) outside of Rails.

    My boss realized this, too, and tried to make Rails fit for what we needed. It did, but he’s gone now, and I’m the only one (among a ton of .NET developers) who know Rails good enough to maintain the applications. And they’re scared that they won’t be able to upgrade them, and will eventually become scrapped. Unfortunately, it’s all back to .NET again… blah. I can’t stress how much I despise .NET, especially when compared to Ruby/Rails. I always think “if there were Ruby I’d have it done by now”.

    But I don’t think you’re crazy at all… Rails is awesome and I can’t imagine an environment when it wouldn’t fit the bill. I love it.

  9. 2007 October 30

    You could first try and switch to MonoRails which is a RoR clone in .NET.

    If I was ‘required’ to do .NET dev I would definitely be MUCH happier in MonoRails.

  10. 2007 October 31

    @adam – thanks for the note. I’ve been looking at MonoRails and all of the Castle stuff lately. While it’s definitely a step above the normal WebForms mentality, it still feels really clunky compared to RoR.

    Maybe I’m expecting too much but I don’t know if I’d call MonoRails a clone of RoR. It’s certainly inspired by RoR but the implementation misses a lot of the magic that RoR has. Part of that is because of the static types. Most of it is just because Ruby is a really powerful language.

    But while I’m stuck in the world of .Net I’ll certainly be looking at MonoRail or the new MS MVP pattern to save me from the evils of WebForms. :)

  11. 2007 December 11

    Hi, What would be the best way to getting started with Rails? Now I really want to know what that’s all about? Martinez, Regards.

  12. 2008 February 19
    Rafal permalink

    I wish more people, especially in the managerial positions, were more open and willing to try new technologies besides the ones being created by the big corporations. True, the dilemma of who will support this and that, etc., comes into consideration, but the vast amount of time that would be saved on testing, development, and so on, outweighs the possibility of even having to hire a consultant to make some changes, which with the right framework would be less expensive then .NET or Java for example.

    So Mike! All the power to you for trying to bring in a framework that is not only fun to develop in, but aimed for the web, and not trying to do everything… Oh and isn’t the development on a MacBook Pro just so much cooler?

  13. 2008 February 19

    @rafal,

    Thanks for the comment. I’d thrown out an “amen, brother” if I didn’t just think that you were trying to butter me up for an interview this week! :)

    There is, of course, a great reason for most companies not supporting a framework like Ruby on Rails – technological inertia.

    For example, I’m currently working at Focus, where the stamp of approval on all software and systems depends on if the software comes from Redmond or not. While this is frustrating to me as a Rails advocate, I can understand it. Why learn another platform when ASP.Net usually does the job? Why adopt another platform when you’ve already got a ton of code in ASP.Net? Why retrain your staff on another platform when they already know ASP.Net well?

    It all makes sense. I just need to find a small company that wants to break free from the corporate mold. And that’s a tough thing to do in a government town like Edmonton.

  14. 2008 February 19

    That being said, I don’t think the MS MVC is as terrible an alternative as you think. A relatively decent testing story, rapid application development with great levels of quality, ability to hook in wherever you like – sure I like Rails but it’s not the end of the world.

    Corps aren’t always against non-MS technologies (though I will say some are but that’s why it’s up to pilots to prove out some of the benefits). All three of Codivation’s current contracts have me at a decision-maker point for technology; in all cases if I can be convinced that the benefits outweigh the cons I go with it.

    In the end the burden of proof often ends up on the developer to show just how fast and high-quality alternative dev can be.

  15. 2008 February 19

    @Rafal:

    “the vast amount of time that would be saved on testing, development, and so on, outweighs the possibility of even having to hire a consultant to make some changes, which with the right framework would be less expensive then .NET or Java for example.”

    Having had some measure of experience with both Rails and (admittedly more) with the MS MVC, I would argue that Rails development may be cheaper in terms of rates but that it’s not necessarily cheaper for any other reason. Yes, it is a great framework but there are many great frameworks that save time and allow you to avoid “fighting the framework”.

  16. 2008 February 19

    @justice,

    I don’t think the ASP.Net MVC is a terrible alternative to RoR. It’s a step in the right direction. It’s a very, very small step but it’s still a step.

    I think that my ultimate frustration with the situation in Edmonton is that I’m trying to tackle an emotional argument with a logical one. Coding Ruby makes me happy; coding .Net makes me sad. Based on that, it’s an easy choice for me to choose Rails over ASP.Net! :)

    The easy solution here is to leave Edmonton. I know a guy that just moved to Toronto for a Rails gig that pays him the same rate he got paid in Alberta. Other than the moving to Toronto, that’s a sweet deal. It’s too bad that moving to Toronto sends my mortgage up rather than down.

  17. 2008 February 19
    Rafal permalink

    @Mike Hehe, butter you up for an interview? May sound like it but not really. You pick the right person you need to fill the position.

    Me as you, are trying to find a company that will adapt new technologies, and look outside of the “box”. Most companies think that just because something comes from a large reputable company, that it must be the best that is out there and they don’t want to hear otherwise. I call it the “I don’t know what I’m talking about but because it comes from company X it must be the best, so my decision and choice will be safe with the people upstairs” phenomenon.

    That is why i left the gov, and that is why I am looking for a smaller company that is looking to go into the unknown if you can call it that. Plus, the smaller and smarter companies, make their software development smarter and more beneficent, because they can take that risk.

    So Mike, if our paths cross or not, all the best of luck trying to implement RoR at Focus.

    @Justice I don’t think that Rails is just cheaper, but I found it actually not only simpler, but funner to develop in. Or maybe it is just that I get to finally work on a cool machine as is the MacBook Pro. But then again, I’m just starting with RoR, and don’t have as vast of an experience as some people out there, but, I like it, speeds up my work, a lot of things are built right from the ground up at such an early release, and that is why I will stick with it on side projects.

    But then again, we could argue that a Mercedes is better than a BMW, so sometimes, it all comes to preference in a way… It could lead to another one of those Windows vs MacOS wars….

  18. 2008 February 19

    @Rafal – trust me, no debate on MacOS vs. Windows! I love MacOS.

    @Mike – it may bring your mortgage up a bit but would it make you happier in the end? I’d argue that if you’d be much happier in your everyday work (which is 8 or more hours out of a day) you might find the mortgage situation a lot easier to deal with. And if people are getting Rails contracts at decent rates, it’s not like TO is totally unmanageable!

Comments are closed.