5 ms·
How We Moved From Microsoft ASP.NET to Rails and NoSQL
Tekpub.com was originally written using ASP.NET MVC, Microsoft's newest framework - which the founders new really well. However they recently moved to Rails and NoSQL.
- borisk 16y agoGood stuff! The main reason they've chosen RoR is cost, but with Azure/.NET one can get a better price vs EC2/RoR. Mainly because .NET is highly optimized and takes a lot less hardware to serve the same amount of requests.
- SamAtt 16y agoAs an MS developer this really is devastating. Rob Conery is one of the names that any fan of ASP.NET MVC knew. He was involved in the project when he worked there (I'd call him the most high profile MS employee aside from Scott Guthrie). To have him come out and say he couldn't make a startup work with Microsoft technology really tells you all you need to know about that. I still need to use .Net at work but I think this combines with a bunch of other factors to push me away from Microsoft on anything else I do.
- robconery 16y agoIt has nothing to do with the technology - it's good stuff and we could have made it work fine. The issue is we want to stay small and not take on the associated cost. I can see how it might come off like I'm damning the platform - that was hardly my intention. Rails has had 3+ years of Open Source contribution to build out the platform and make it do amazing things - ASP.NET MVC will (hopefully) grow in some of the same ways - but there's a somewhat stunted element to the .NET OSS ecosystem. Hopefully that will change.
- jawngee 16y agoThat will never change because the surrounding ecosystem is expensive as shit. It's also very slow moving and wildly outdated.
- SamAtt 16y agoMy point really was only part technical though. To give an example you had to switch from Silverlight for a completely nontechnical reason. It wasn't even expense related. But you still had to switch and it still cost you time and money you wouldn't need to spend had you just gone with Flash in the first place. So the point to me is still "don't use Microsoft technology because you'll end up needing to switch"
- robconery 16y agoCan't argue with that. Outside the corporate walls money is king - it's a hard truth and one I was not about to pay for personally :).
- kenjackson 16y agoBut isn't that the case with virtually any technology? We've used C, C++, Java, C#, VB, ASP, ASP.NET, PHP, Flash, etc... We always look at the stack and make a business and technical decision about what to keep and what to toss.
- squidsoup 16y agoRob, I've always enjoyed reading your posts as I've personally been straddling the gap between the two worlds (MS and OSS) for a long time now. Primarily this is due to our local job market - there simply aren't any OSS jobs where I live, and Microsoft is very deeply embedded in the New Zealand marketplace. C# is a fine language, and ASP.Net MVC is a great framework, but I can't help but feel like the 'other kids' are ransacking the candy store while I'm out on the curb. In terms of testing frameworks and tools, the Ruby/Rails platform is lightyears ahead. I know there are attempts to bring some of the core concepts in RSpec and Cucumber to the .Net platform, but we're not there yet, and probably never will be. The goalposts are always shifting - the OSS platform can respond to change and new ideas much more quickly than the MS platform. We have an MVC framework for web development now, but it has taken 10 years (Java Struts was released roughly around the same time as Webforms iirc)! Testing is only one element of this - in the OSS world we're also seeing an explosion of asynchronous queuing/messaging frameworks, object/document datastores, serverside js and other innovations. I also share your frustration with the coupling of the framework releases to a new IDE. I use Vim for everything other than .Net development, and like the fact that the rug isn't going to be pulled out from under me every two years. As a Microsoft developer it is hard not to feel envious of the OSS community. The Alt.Net community if anything appears to be shrinking, and it is presumably because those developers have come to a similar conclusion as yourself - the cost simply does not justify what the MS platform can offer.
- euroclydon 16y agoBDD on .NET? Check out the S#arp Architecture, it's designed to be the RoR of the .NET world, and it has some nice BDD tools, plus scaffolding for IoC, Unit Tests, Services, and MVC. http://wiki.sharparchitecture.net http://wiki.sharparchitecture.net
- robconery 16y agoSharpArchitecture, while swell and neat, doesn't scratch the itch of "this stuff really isn't that hard". There's a metric s* ton of concepts and code in there that are more suitable for a military defense system, let alone a startup.
- jawngee 16y agoAs a long time former .NET consultant (been using it since Beta 1), once I went OSS, it was nigh impossible to return to Windows land. Right now I'm the CTO for a largish image licensing shop (think Getty, but more boutique/high end) that is entirely .NET (I inherited it). We are now in the process of moving it off Windows onto an OSS stack. It's a miserable experience. And an expensive one.
- pbz 16y agoCould you elaborate why it was a "miserable experience?" Was it because of the way it was written or the framework / stack itself?
- jawngee 16y agoA combination of a lot of things. For starters, the thing is architected poorly, so that does play a big factor in it. I know, I know, it's always the new guy inheriting an existing system that lays to claim that the inherited thing is a piece of garbage, but in this case it is undeniably true. And I can tell you, as someone who has been doing .NET consulting for the last 8+ years, it's not uncommon for MS based solutions to be architected this poorly, but I'll get to the reasoning behind that later. So yes, poor architecture, lazy design choices (the wrong kind of lazy) but what is most aggravating are two other factors: cost and maintenance. Of course the very first thing I did when I settled in as the new CTO was to figure out how the thing was maintained and how much the thing was costing us a day to run. At my former CTO gig, massify.com, one of my proudest achievements was getting the daily cost of running the site below the price of a pack of cigarettes. Now we are talking about a user generated video content site with not exactly insignificant amounts of traffic and some very healthy storage requirements. When we started out, it was running us around $300 to $400 a day, but by the time I left, it was about $8 bucks give or take. And during the three years I was there, the site never came down unless we took it down for some kind of database migration or similar updating. And all of this happens thanks to OSS software and the ease of use of unix. Now we are in a situation where we are paying for the server OS's, the SQL server instances and a variety of other utilities to keep things running. Not to mention the yearly MSDN subscriptions. That shit is expensive. But what is worse is that it's such a pain in the ass to update and work on. Remote Desktop is retarded, but I have no choice as command line maintenance is simply gag inducing. Something that would take me mere minutes in a linux command line takes me an hour or more clicking around like an idiot in remote desktop. Good luck remotely admin'ing a windows server taking a massive CPU load. Now when I was at Massify, I could maintain and monitor our whole fleet of servers from my phone - and on a couple of occasions even did so while sitting through the previews at a movie theater. Do that on MS? MMM ... no. But back to bad architecture and why it's endemic in the MS development world. ASP.NET. ASP.NET is such a convoluted, poorly conceived, poorly executed pile of shit. THIS IS COMING FROM SOMEONE THAT USED TO SING ITS PRAISES. And when ASP.NET is a cornerstone of .NET development, I don't think it's implausible to rationalize the rampant bad development practices of your typical MS developer back to it and other MS technologies similar to it (I'm looking at you Sharepoint). You see, MS is chock full of shitty architecture. And MS devs learn from MS. It's a cycle of shit that is constantly perpetuated by each release of some new MS technology. And I can tell you, I've seen it time and time again - working for companies like Pfizer, R/GA, some of the top 5 interactive ad agencies, etc. Finding a great MS developer is like finding a great PHP developer. They exist, but are such a minority as to be almost mythical. We used to joke that MCSD stood for Microsoft Certified Shitty Developer. Well, we always pitched it as a joke anyways, in case anyone ever overheard. So, now we are currently wiping the slate clean and moving the whole thing to an OSS stack. And so far, even in the rough beta stages, we've already demonstrated how superior that whole ecosystem is to where it was before. It's very satisfying to show our licensing agents our new shiny search system (using a heavily modified Solr) and watching their eyes light up as we do things with it that the old MS based search engine simply could never do. So that's my rant about that. MS is dying shit as far as I'm concerned, only used by people who are somehow locked into it, or are the bad kind of lazy and don't want to challenge themselves. I know that's not very objective, but it's the lessons I've learned. PS. When I was interviewing with the company, I literally had a 4 hour conversation with the outgoing CTO about the benefits of MVC. He couldn't see them and I couldn't explain it to him in a way he understood. He kept pointing at ASP.NET user controls and how great they were. Of course, several months later I find a page on the admin site that is roughly 26K lines of code in the codebehind with a nice spaghetti mixture of HTML and SQL and C# code. I nearly quit when I saw it.
- percept 16y agoA lot of developers and managers I work with don't seem to realize that what's best for Microsoft isn't necessarily what's best for another company. Instead they get stuck in a cycle of adopting whatever MS throws down the channel (this week it's Entity Framework, last week SOA concepts, etc.). Good MS developers should learn to take what's best from the open source world and apply whatever is most useful behind the corporate firewall.
- TomOfTTB 16y agoIn fairness (and as the person who made the decision that forces Sam above to use .Net technology) there are reasons to use Microsoft technology even when it isn’t the best fit. Let’s be honest about technology for a second: Things go wrong. No matter what solution you use things go wrong and for the most part non-technical management doesn’t understand that. When something goes wrong they want someone to blame. If you decide to go with something like Ruby on Rails you have to contend with the fact that management doesn’t understand open source (or trust it) and have never heard of 37Signals. So the blame falls to you for having gone with a small “experimental” company rather than a “trusted” one like Microsoft (and yes those words in quotes are actual quotes from my attempt at using such technology) Where as when something goes wrong with Microsoft technology it’s written of as inevitable (that’s where the saying “no one ever got fired for using Microsoft” came from) It’s a sad reality but sometimes you can’t pick the best technical solutions. Sometimes the extra time it takes to use proprietary Microsoft technology is worth the political capital you save by going with Microsoft. That fact doesn’t make me happy but it’s true.
- percept 16y agoDefinitely, and in fairness these are situations where there's a huge investment in MS technologies, with entire teams dedicated to supporting and maintaining the infrastructure. It isn't feasible to throw it all away without a serious commitment from the highest levels of the organization, and a multi-year, multi-million-dollar implementation plan to do so. But at the team and individual developer levels I think there's lots of room for good open source solutions, and this option isn't always considered because developers are looking to MS for the next big thing. I believe this is reflected in the certification programs too, because they don't focus as much on building a sound programming foundation as on making good Microsoft evangelists. From Microsoft's viewpoint, why not? But it's that divergence again from the company's perspective.
- kenjackson 16y agoI'm not a web dev per se, but I never heard of Rob Conery until now. I now ScottGu, Anders, Cutler, Brumme, Dussud, Crowley, Russinovich, Spiro, even Luca, but never Rob. Not to say he's not a big name, but to say he's the most high profile MS employee beside ScottGu seems absurd. Even in the dev tools space I think you have to give that to Anders.
- jmatt 16y agoI agree. I had only heard of Rob. And easily the top .NET employee is Anders by far.
- troygoode 16y agoRob is primarily well known by those interested in Asp.net MVC - which, given its roots as a RoR knock-off (I say that with love), tends to mean MS web devs with an interest in OSS will have heard of him. He is also well known from his SubSonic project - an OSS ActiveRecordish ORM. From your list of Technical Fellows it sounds like you're probably not a web dev, so you wouldn't have run into his stuff. An MS web dev these days would tend to list names like ScottGu, Haack, Hanselman, Conery, Walther, le Roy, Wilson, Verissimo, Lipton. In other news, Anders is totally the cat's pajamas.
- robgough 16y agoIn the exact same position. .net by day, anything else by night.
- archon 16y agoMy first question after reading the title was "Why?" From the article: "JA: All the problems we had (licensing, testing, deployments) could have been overcome. We could have used workarounds, written our own deployment framework, etc. What is comes down to is that we both really enjoy working with Rails and we enjoy the Rails community and the tools and libraries available. One of the best parts about running the show is that we get to do what makes us happy."
- awa 16y agoNope. FTA: RB: If the platform was holding up fine, what prompted the change of architecture? RC: Money.
- javery 16y agoRob (RC) and I (JA) tend to disagree on things all the time. For me it wasn't as much about the money as the pleasure of using Rails, and I know Rob also loves using Rails. The money was basically what made the decision easy, here were our choices: 1) Continue to use a platform that costs more and isn't as much fun. or 2) Use a platform we both love using and works out to be cheaper. Pretty simple decision really.
- wuputah 16y agoActually, from Rails, to ASP.NET MVC, to ASP.NET MVC again ("because it was getting too complicated"), then to Rails. I'd also be very hesitant to use MongoDB as a main datastore as it has no durability model - the 'D' in ACID. I hope they've at least changed the setting, or don't mind losing their last 60 seconds of writes when their EC2 instance goes down. http://www.mongodb.org/display/DOCS/Durability+and+Repair#DurabilityandRepair-ThoughtsonDurability http://www.mongodb.org/display/DOCS/Durability+and+Repair#Du... Note that Mongo compares itself to MyISAM, but that is infrequently used now because of its lack of durability amongst other things - no transaction support, etc (most apps use InnoDB).
- javery 16y agoWe actually use MySQL as a transaction log for things like orders/views to balance that out, MongoDB stores everything else though.
- riprock 16y agoI'm not an expert with the Microsoft stack, but aren't there ways to mitigate the costs? I've heard Mono supports (most of?) ASP.NET and you don't have to use SQL server either. What other costs are there specific to the Microsoft stack?
- deleted 16y ago[deleted]
- sciolistse 16y agoWhat he's getting at (I think) is that, you could work around that by using Mono on a linux server, Postgres, MonoDevelop, so on.. Though I wouldn't go down that route personally, so I agree with you.
- archon 16y agoDidn't mean to delete my earlier comment. Actually I'm glad he asked the question, because I wasn't aware .Net MVC could be made to work under Mono until I looked it up.
- pbz 16y agoI would've loved to see a rough breakdown of how they got the the "5 figures" cost...
- dnewcome 16y agoSQL Server licenses will get you there pretty quickly.
- euroclydon 16y agoDB Servers are irrelevant when you are talking ASP.NET, so long as you use NHibernate.
- 16y ago
- aymeric 16y agoI have learned Ruby on Rails and I am amazed that after three weeks with RoR I am more productive than after 10 years with .net I reported my own experience moving from Asp.net to Ruby on Rails in my blog a few days ago: "How an experienced developer multiplied his productivity tenfold" http://aymeric.gaurat.net/index.php/2010/how-an-experienced-aspnet-developer-multiplied-his-productivity-ten-fold/ http://aymeric.gaurat.net/index.php/2010/how-an-experienced-...
- misterbwong 16y agoDid you happen to try out other frameworks before deciding on RoR? I'm thinking about testing the waters outside of MS land and I'd like to know why you chose RoR versus, say, Django or even Struts.
- Artemidoros 16y agoI find it hard to imagine that there is any web framework still around that could be more screwed up than Struts. After having had some major exposure to the various members of the Struts family and Rails, I would say that the experience of using Struts 2 is slightly worse than using Rails while being flogged by an expert torturer. :-) If you want to test the world beyond MS I would recommend (apart from Rails or Django) looking into the Scala/Lift (my preferred toolset), Clojure/Compojure or JavaScript/Node.js combos (depending upon you language preferences). I would be careful with Rails, when you plan to do some heavy data processing and/or if you need your application processes to run for a long time without being restarted. For small, straightforward applications or prototyping the Ruby/Sinatra/MongoDB combo is also really really nice.
- dasil003 16y agoI would be careful with Rails, when you plan to do some heavy data processing and/or if you need your application processes to run for a long time without being restarted. Heavy data processing yes, but the long running process is bogus. The major memory leaks in Rails were patched up years ago. The tooling is a lot better today on the off chance that you do need to debug a memory leak, and the new breed of ruby runtimes such as Rubinius will keep memory in even tighter control.
- MikeW 16y agoI've got a small webapp targeting ASP.NET MVC 2.0 (built with Visual Studio 2010) running on Linux with Mono 2.6 and served with nginx (using the fastcgi interface to mono) so if you put the time in, it's possible to deploy on an open source stack. I saw a commenter talk about Linq-to-SQL and yes this is possible too. I use a PostgreSQL server and use Linq-to-SQL with it. It works but as expected, the documentation is poor. This is free to use, but from my experience some of the costs can be very frustrating time spent trying to figure out why things are not working as they should, or barrier to entry with poor documentation. As one commenter pointed out, mono behaves strangely when changing part of your codebase while it's running. Modifying a file can cause 500s or timeouts to be thrown. Killing and restarting the fastcgi process is needed. A major positive is the developers who work on these parts of mono are very responsive to issues and code is improving all the time.
- mhartl 16y agoIf you're an ASP.NET MVC programmer looking to learn Ruby on Rails, check out my book Ruby on Rails Tutorial at http://www.railstutorial.org/ http://www.railstutorial.org/ I don't know ASP.NET MVC at all, so I haven't tailored the presentation to Microsoft developers, and I'd be curious to hear if you find my approach accessible. You can leave me feedback at http://www.railstutorial.org/feedback http://www.railstutorial.org/feedback. N.B. Although NoSQL is outside the scope of an introductory tutorial, I'm hoping to do some follow-on articles on such specialized topics once the core tutorial is finished. (I'm currently writing the final chapter.)
- mark_l_watson 16y agoNice article! I really enjoy hearing about other people's experiences. I have nothing per se against Microsoft's hosting except for the expense. I believe that it is much more expensive than AppEngine or AWS. Question: the lock-in factor is likely not that big of an issue since apps could be run on Mono and a leased server, right? Really, software, writing and deploying web apps is a business and there are two large costs involved: labor costs for writing and maintaining software, and hardware+admin costs for deployment. The question is what is least expensive and fastest to deployment. For me, that is Ruby on Rails for the front end, and as needed, back end processing in Java, or Clojure, or Common Lisp - whatever makes sense for a project.