Inspired by the old Hacker News conversation about this webiste, I'm wondering:

Could Ubuntu and Mono run an ASP.NET MVC website like Ask Ubuntu?

The technology is the focus here instead of the site. Could you replace IIS, ASP.NET, MVC, etc with free and open source technologies without having to completely redevelop the site?

Note from Oli: The meta-discussion (that is: will Ask Ubuntu migrate to Ubuntu+Mono?) has been moved to a separate question in the meta portion of the website

  • To the people flagging for closure, I think the technical side of this (ie "Could you run a ASP.NET MVC site on Mono?") has merit here as our remit does include development. I'm inclined to leave it open. – Oli Mar 26 '11 at 19:53
  • I voted to close because I think it would belong on Meta since it's about the site itself. – Jorge Castro Mar 26 '11 at 20:07
  • 2
    @Jorge, that's fair enough. I've rescued the technical element of this and the "will they migrate?" section can go to meta. – Oli Mar 26 '11 at 20:08
  • 1
    I endorse the modifications Oli has made to my question. Thanks. – Dan Burton Mar 26 '11 at 20:33

I don't have the codebase for Ask Ubuntu so I can't really say if there's anything particularly platform specific that would cause a blocker but in answer to can you migrate it, the answer is probably yes.

You have to keep in mind that the platform that ASP.NET websites sit on are more than a magical ASP.NET binary:

  • ASP.NET can largely be replaced by Mono. It's not always pretty and the performance isn't always great but it can be done.

  • ASP.NET MVC is the templating engine. It normally sits on top of ASP.NET but it can run on Mono with a few changes.

  • IIS could be removed fairly simply, allowing for custom handlers that SO have running on it, replacing it with Apache (et al).

  • The database is technically the biggest part of the whole. In simple cases, where you're using good code, sure. Rip out the database and replace it. Specifically for here, the cluster arrangement of MSSQL servers that runs the StackExchange sites could probably be ported to MySQL (or other) but it would probably need significant work as there's probably a fair portion of DB-specific code lurking around, either in the database itself or (less likely) in the site itself. Most code-based, database-specific data-faffing is a thing of the past thanks to LINQ, which Mono does support (for non-SQL Server databases too).

That's by no means a definitive list of what would be replaced but they're the major items.

Whether or not you'd want to... That's a tougher question. By the time you'd hunted through a few dozen issues, you're probably already at the point where you could have just reimplemented the system in something like Django. Of course that depends on the complexity of the system. It's as hard as a piece of string.

| improve this answer | |
  • +1 great info. I guess the answer to "can you port it" is always "yes, with enough effort", but you gave some great points here on the details of what might need to be changed. – Dan Burton Mar 26 '11 at 20:37
  • 1
    asp.net mvc was open sourced by microsoft (I know how un-evil of them) so the version in mono is the same code as the .net version. – trampster Mar 28 '11 at 6:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.