4

Answers like ASP.NET MVC or Entity Framework really aren't acceptable as they address just one aspect of the problem domain.

I'm looking for a framework ... a REAL framework that gives me the same features out of the box that Rails does. As such it should include at minimum:

  1. MVC for presentation
  2. ORM
  3. Ability to provide simple configuration for whatever environment (dev, QA, Production, etc...)
  4. Migration like functionality
  5. Ability to generate code in all layers (similar to scaffolding like behavior, etc...)
  6. Project template so as to create similar functionality as the "rails my_app" command.

Thanks.

wgpubs
  • 8,131
  • 15
  • 62
  • 109

6 Answers6

9

Yes, there's a Framework... it's called the .NET Framework.

  1. ASP.NET MVC
  2. Linq to SQL / Entity Framework
  3. .NET Configuration API (web.config)
  4. ??? (What is "migration-like functionality?")
  5. ASP.NET Dynamic Data
  6. Visual Studio Project Templates

What exactly is a "REAL" framework, beyond a set of components that interoperate to provide a comprehensive set of features? I submit that the current iteration of the .NET Framework already does exactly what you're looking for, out of the box.

Aaronaught
  • 120,909
  • 25
  • 266
  • 342
  • Rails migrations are essentially scripts that change one aspect of the database schema, like adding a table, or removing a column. Ideally, each migration encapsulates one small change, and has a method to roll it back. – zetetic Jun 04 '10 at 22:50
  • & fwiw, frankly I find that doing db generation w/ NHibernate or other ORMs to be much nicer for most of the work I do. I can just write my models as models and let the ORM figure out how to turn them into SQL for me. If I have a schema in the DB that doesn't turn out the way I want it to as a result of that, it's usually easier to go back and fix it after you're doing load testing, etc, and you have more accurate results & reasons to fix it; prevents early optimization. – Paul Jun 05 '10 at 20:14
  • 1
    You obviously haven't used Rails Aaronaught Having looked at both .NET Java Spring and Rails I can say that of the three Rails is by far the best framework by miles, especially if you are working in a small to medium size software development company. – eaglestorm Sep 02 '10 at 05:38
  • @ealgestorm: Geeve. Take your flamebait elsewhere. – Aaronaught Sep 02 '10 at 17:49
  • 1
    If my professional opinion based on experience is flamebait then you must be a microsoft zealot. – eaglestorm Sep 03 '10 at 00:14
  • 1
    @eagle so you can't disagree without being a zealot? Or does that make you a Rails zealot? –  Sep 05 '10 at 03:58
3

I think you want what Rob Conery did.

Take a look his blog post.

http://blog.wekeroad.com/2010/05/24/mvc-starter-2

Update: To answer in details,

  1. ASP.Net MVC (MVC for presentation)
  2. ORM (Subsonic)
  3. Environment (Yes. It has environments like Development, Production)
  4. Migration (Yes. Subsonic Simple Repository can sync database along with you model)
  5. (not sure about that)
  6. You can use most of the code from that starter Site.

FYI, Rob Conery was one of ASP.NET MVC Team and now also working in Rails Core Team.

Soe Moe
  • 3,428
  • 1
  • 23
  • 32
2

The closest thing that I've seen that has all of what you're asking for is S#harp Architecture. It really meets everything you said, from what I can tell.

That said, I think that as Soe Moe (+1 to you) pointed out, Rob's TekPub is closer in that it's got that lighter-weight 'feel' to it, it just doesn't have a project template yet (though that's something I tend to rectify when I get time).

All that said, I'd caution you about feature envy. One of the things I don't like about Rails is how locked in you are to their mode of thinking, which frankly isn't applicable to all projects. So, just food for thought.

Paul
  • 35,689
  • 11
  • 93
  • 122
1

Well, the short answer as I see it is "no". There's not one framework (that I know of). However, you can combine many frameworks to get most of this.

  • MVC
  • Castle ActiveRecord to get the ActiveRecord you're used to
  • no excellent option for configs (web.configs really aren't that great at letting you manage differences between Dev, QA and Production IMO). Probably roll your own. I bet you can find a solid yaml parser (after all, IronRuby must have one by now)
  • Migrations -- I bet there are some "migrations for .NET" solutions out there, but I haven't used one. None has become famous yet, but I don't know if it would.
  • For "scaffolding", you really should look at Dynamic Data. I've heard great things about it (no 1st hand experience though)
  • Project templates: Visual Studio has some very good features here. On top of that, Resharper has some excellent features. With those 2, you can create your own templates. You might type four letters, and see that instantly blow up into a for-loop, or a whole class that derives from a base class you've specified, or a whole lot more. Whole solutions can be templated so that a new project starts out with boilerplate and is ready to go.
Charlie Flowers
  • 17,338
  • 10
  • 71
  • 88
0

We've been using NetTiers as an ORM with great success for over a year now. That takes care of the middle tier and data layer. Other stuff, like logging and exception, comes from Microsoft Enterprise Library.

Mix that in with front-end templates generated by CodeSmith, and good Ajax component suite like DevExpress, and you're on your way.

Get everything automated with CruiseControl, and you have continuous integration and one-click deployments.

Kevin Raffay
  • 842
  • 5
  • 18
-1

Can you be a little bit more specific? Ruby on Rails runs on .NET, why do you want a Ruby-on-Rails-like framework but not Ruby on Rails?

EDIT: I don't quite understand the downvote. I believe that Ruby on Rails meets every single one of the OP's criteria perfectly:

Is there a Ruby on Rails framework like equivalent

Check: Ruby on Rails is definitely Ruby-on-Rails-like. In fact, of all the answers given so far, I would claim that Ruby on Rails is the most Ruby-on-Rails-like framework, much more so than the currently highest voted answer.

for .NET development?

Check: Ruby is a .NET language, Ruby on Rails runs on .NET, there is a Rack adatper for Internet Information Server, there is an ActiveRecord Adapter for SQL Server, Ruby on Rails is for all intents and purposes a 100% native .NET citizen.

Answers like ASP.NET MVC or Entity Framework really aren't acceptable as they address just one aspect of the problem domain.

Unfortunately, the question doesn't specify what "the problem domain" is, but it seems that the OP thinks that Ruby on Rails does address all aspects of the problem domain, so: Check.

I'm looking for a framework ... a REAL framework

Again, the question doesn't specify what a "real framework" is, but it seems that the OP thinks that Ruby on Rails is a real framework, so: Check.

that gives me the same features out of the box that Rails does.

Check: Ruby on Rails does give you the same features out of the box that Ruby on Rails does.

As such it should include at minimum:

MVC for presentation

Check: Ruby on Rails does provide MVC for presentation. It has ActiveRecord for the model layer, ActionView for the view layer and ActionController for the controller layer, although every single one of those can be swapped out for a different implementation if you don't like them.

ORM

Check: Ruby on Rails does come with an ORM called ActiceRecord, but if you don't like it, then you can swap it out for DataMapper, Sequel or really any ORM you want. Also, Ruby on Rails doesn't require a relational database at all, it works just as well with hierarchical databases, document databases, key-value databases and graph databases.

Ability to provide simple configuration for whatever environment (dev, QA, Production, etc...)

Check: Ruby on Rails comes with a couple of environments built in (development, test and production), but you can add your own and you can provide configuration for any one of them.

Migration like functionality

Check: ActiveRecord comes with a database migration framework.

Ability to generate code in all layers (similar to scaffolding like behavior, etc...)

Check: Ruby on Rails comes with the Rails Generator framework, which allows customizable generation of pretty much anything, and it comes with a whole bunch of predefined generators for models, controllers, views, migrations, tests, …

Project template so as to create similar functionality as the "rails my_app" command.

Check: Ruby on Rails comes with Rails Templates which allow you to create customizable project templates which can generate an entire skeleton project with a single command. It also comes with a predefined template which generates a project with ActiveRecord as the model, ActionController as the controller, ActionView as the view, ERb as the templating library, Prototype as the AJAX library and test/unit as the test framework.

Ruby on Rails meets every single one of the criteria in the question, and IMHO it meets them better than any other framework that has been suggested so far, including the currently highest voted answer.

Community
  • 1
  • 1
Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653
  • Ruby on Rails is not a .NET language. You can use IronRuby [on Rails] in .NET, but it's only implementing about 86% of the spec for a version of ruby a few versions back (1.8.6, IIRC). – Andy_Vulhop Jun 09 '10 at 18:59
  • @codemonkey4hire: Yes, it is true that Ruby on Rails is not a .NET language. I never claimed it was. In fact, that is a pretty boring statement, since Ruby on Rails is a Web Application Framework and not a language, and so, since Ruby on Rails is not a language, the statement that Ruby on Rails is not a .NET language is completely void of any useful information. Toyota is also not a .NET language, it's a car company. – Jörg W Mittag Jun 09 '10 at 19:47
  • quote:"Check: Ruby is a .NET language, Ruby on Rails runs on .NET, there is a Rack adatper for Internet Information Server, there is an ActiveRecord Adapter for SQL Server, Ruby on Rails is for all intents and purposes a 100% native .NET citizen." This is false. Ruby is not a .NET Language. It is it's own language and is older than .NET itself. IronRuby is an implementation of Ruby based on the specs for version 1.8.6, but it is incomplete and 1.8.6 is a few versions ago. – Andy_Vulhop Jun 09 '10 at 19:54