Is there a Django or Rails for the .Net Platform? - asp.net

Now before I dive too far into this this question, I am aware of nDjango and MonoRail; however, those project seem to be lacking.
What I'm wondering is if there is a solution out in the .Net world that has the following features out of a single box like Rails has in Ruby or Django has for Python. I know tools that do pieces but am curious if there's 1 unified solution out there.
Database Versioning/Migrations
ORM or similar code gen
MVC-based
Pre-generated administrative screens
View generation
Theming / styling
(I'm sure I'm forgetting another cornerstone feature)
There's lots of options that cover one or more of these aspects but is there something in .Net that covers all of them?
Thanks

I have not yet found a solution as you have described, but as you know there are bits and pieces that could be used together to provide a stack that is close:
Database Versioning/Migrations - DotNetMigrations
ORM or similar code gen - Nhibernate, Entity Framework
MVC-based - native to ASP.NET MVC
Pre-generated administrative screens - PLINQO
view generation - available in Entity Framework or CodeSmith templates, PLINQO
Theming / styling - native to ASP.NET
This would provide a stack that is .NET and not another ecosystem sitting on top of a .NET substrate.

You can actually run Rails under the .NET DLR. This allows you to not only access the feature set Rails provides, but also everything else which is available in the .NET ecosystem.
I haven't found a one click installer which gives me everything on your list, but, as you say, I have found excellent solutions for each point on your list which integrate well.

I'm honestly not sure how close this gets you, but S#arp Architecture seems to be trying to cover a lot of this ground in a single package.

There is a django for .net, the name is django!
In the web there is a lot of post about django running with ironpython (a implementation of python for the "virtual machine" of C#, CLR, i think)

there is also ndjango - the django templating language written in f# for .net. you can use it with bistro or asp.net mvc (or whatever else that you plug it into)

Related

developing with ASP.NET using framewok

I have been working for 4 years as a PHP developer and I'm currently transferring to ASP.NET (Since I have 4 years of C# experience too, and selected PHP because of specific conditions - now I wish to use my C# knowledge and the .NET Framework is impressive).
When developing with PHP, I always use a framework - or something I've wrote myself (I'm working as a software architect...) or Zend Framework / Yii etc - the reasons is lack of classes, tools and OOP in PHP (such as MVC, ACL, Cache etc.)
When working with ASP.NET MVC 3, I see that combining the MVC framework and the general .NET framework I have many tools, and here is my point: when developing in ASP.NET, do you need to use any other framework than .NET? (just like in PHP I'm using Zend).
If so, there's any recommended frameworks?
Thanks! :)
In a .Net world, there are many options infront of you. see below popular vendors;
www.devexpress.com
www.telerik.com
www.comonentone.com
www.infragistics.com
But most of the time, asp.net is perfect itself. And when you are talking about mvc3. You can use another view engine instead of using Razor(the default one) such as spark. So, i mean that asp.net itself can be expended accroding to your needs.
And when you are working with mvc3, then you have best choice which entity framework. There is alot of support out there for this framework. So good luck in this.
Yes, there are other frameworks that you can choose to use alongside .NET MVC - but I myself haven't chosen to utilize them in any recent projects. Here are a few examples aside from what others have already pointed out:
http://www.springframework.net/
http://sparkviewengine.com/
That said, while I don't personally use frameworks like I mentioned above here in no particular order are a few tools that I have found that I have come to rely on while developing applications within ASP.net MVC:
Fluent Nhibernate - If you choose to use Nhibernate as your ORM
Ninject - Dependency Injector
AutoMapper - object - object mapper
ELMAH - error logging facility
lg4net - logging etc
Check out Telerik http://www.telerik.com/ They have some great tools like their RadGrids and specific imput textboxes that once you get used to will save a ton of time and add a lot more flexibility. Definitely worth a look.
No THE framework has everything you normally need. But the amount of tooling available is tremendous! We use asp.net 4.0 but we choose DevExpress controlls to get nice look and feel and functionality that would cost too much to build myself.
We worked with almost every component builder in the last 10 years but DevExpress is our favorite for one simple reason. Super fast support! And I agree with the above comment about Infragistics very disapointing support!
But again those vendors or other community frameworks are there too make our life even simpler. By itself THE framework can solve almost everything from THE core libraries.
Good luck switching to C# again my favorite language too!

Upgrade to ASP.NET 4 framework

Now that Visual Studio 2010 RC is released I was wondering if anyone knows what pros/cons there are to upgrading my existing ASP.NET applications to target the .NET 4 framework? (Apart from waiting until the Final release which should be even more stable)
If you are not going to rewrite some parts of the application to use new features in ASP.NET 4.0, I don't think there are many benefits. Unless they introduced performance optimizations for already existing functionality, but I don't think you would get those automatically without modifying code.
Otherwise there are plenty of goodies like URL Routing, SEO optimizations, ViewState performance, etc.
At least, you must check if your webserver have support for ASP.NET 4.0 application pools.
Pros: You will be ready when it is final
Cons: Be ready for quite a few issues, if you have the time.
Here is a list and overview of some of the issues people are encountering and some praises:
http://weblogs.asp.net/scottgu/archive/2010/02/08/vs-2010-net-4-release-candidate.aspx
And my favorite resource as it is impossible to give you a break down of Pros and Cons considering what may be a pro for me, may be a con for you and vice versa:
http://social.msdn.microsoft.com/Forums/en-US/category/VSPreRelease,netdevelopmentprerelease,visualstudioprerelease,vstsprerelease
http://blogs.msdn.com/architectsrule/archive/2010/02/19/10-4-episode-41-downloading-and-installing-the-visual-studio-2010-release-candidate.aspx
If you're going to be using C# for your development, then here is one big thing that the next version of the framework and C# will have; Dynamic Types:
From Scott Hanselman's blog:
C# 4 (not 4.0, the marketing folks say it's .NET 4, etc.) adds the dynamic keyword. I've explained this saying:
"There's no way for you or I to know the type of this now, compiler, so let's hope that the runtime figures it out."
The key point here, in bold, because it's significant is: having the type dynamic means “use my runtime type for binding”.
This is something quite different from the current version of C# and could have some pretty signifigant ways in which code is written. So hidden in all of the hoopla, the new framework does have some added value compared to the current frameworks.
Hope this helps some.
You have the go live license --> you can use all new asp features in production.
But you will have a few problems with VS.

Add ons in a compiled language

We are developing a CMS in ASP.NET. We love the idea of add-ons (like in Wordpress, where any developer can add a menu button or a widget) and would like to enable developers to do the same with our system.
However I think that the fact that C# is a compiled language is an obstacle in the way of add-ons.
Am I right? Or is there a way to create add-ons for a ASP.NET application?
The fact that C# is a compiled language isn't a problem at all. In fact the .NET framework should make it relatively easy to load other code (just as Java does, for the same reason). Look into the Managed Extensibility Framework, which is all about loading Add-Ons in managed code.
It's not an obstacle at all. MEF has already been mentioned, you could also use:
System.Addin
Mono.Addins
I'm not sure for ASP.NET specifically, but in the only compiled programming language I know (Objective-C/Cocoa), there's the concept of Bundles that can be loaded dynamically. I'm not sure how that works on the backend, but I'd guess that there is some similar system for C#/ASP.NET.
I don't know how it's done in Wordpress, but there should be many ways. You can allow developers to upload their assemblies with compiled code or you can allow them to upload code in C# or IronPython or anything that supported and compile it dynamically. Maybe you can use WebParts for your task.
Microsoft has created the Managed Extensibility Framework (MEF), specifically for this problem: providing .NET plugins for .NET applications. It is the framework that (future versions of) Visual Studio use for writing managed plugins.
However, please consider using a dynamic scripting language for this! Problems like this are exactly what they are specifically designed for. If you host the Dynamic Language Runtime in your application, it not only means that your users can extend the application in a scripting language, but even in any dynamic language (scripting or otherwise) for which a DLR implementation exists: Ruby, Python, Smalltalk, Scheme, JavaScript, PHP, you name it. Biggest disadvantage: the DLR hasn't been released yet.
In C#, you can create any assemblies, link them as DLL files and then do whatever you want.
The usual case would be to define some kind of Plugin Interface which must be implemented by all the plugins.
Then you can load all plugins from the filesystem (by iterating over the plugin DLLs), find the class inside which implements the interface, instantiate it and work with it.
If you want to provide plugins with unloadability and security, you could create an application domain and load the plugins to that, increasing complexity, but also increasing stability (a bad plugin won't crash your app).
Please ask more specifically if you want a specific answer :-)
It's not too difficult to put hooks in place. You have to define in advance where the add-on features will appear. For example: when drawing a menu you can use reflection to search other dlls (with specific names and locations) for a "BuildMenu" function. You'll be defining the API for this function signature. It may have to return a list of items to be added to the base menu items collection.

Moving towards Ruby on Rails from ASP.NET

I am ASP.NET developer from last 5 years and still loving it. There are lots of good voices in air about Ruby on Rails. I want to ask to community, Is there any worth trying to learn Ruby On Rails as a ASP.NET web developer on following point of view.
Scalability
Documentation
Community Support
Hosting Solutions
Deployment
ETC.
I'd take a gander as ASP.NET MVC. This way you can stick with the .NET Framework yet still get some of the things you probably want out of RoR.
ASP.NET MVC is very lightweight and easy to scale with some of the APIs it provides (SQL storage for sessions or even Microsoft Velocity).
ASP.NET MVC has lots of support from the community and thus has lots of documentation and feedback from the community and Microsoft itself.
Lots. Check out http://www.codeplex.com/ASPNET for more information.
Well, ASP.NET MVC is bin-deployable. So as long as your host supports ASP.NET 3.5 there's nothing else you need. They don't need to have ASP.NET MVC installed in any sort of way. So if you wanted to, you could easily use a shared host.
Deployment is very easy with ASP.NET MVC and with the changes coming to Visual Studio 2010 for easier deployment of web sites via "Packages." I currently maintain 2 ASP.NET MVC sites and find it with bin-deployment to be just the same as a regular ASP.NET WebForms site.
I'm now in your shoes, because I'm learning RoR after commercially developing in .NET for 5 years.
Here is my two cents:
Scalability: I believe that rails can scale quite well, there are numerous options available, such as mongrel clusters on linux.
This one is a bit worse than on .NET. But the community is very good and you'll never find yourself searching for a good way to go.
See above (it is excellent)
Hosting is not a problem: numerous hosting options available.
I find transition from development to test and then to production better thought of in Ror than in ASP.NET.
I fully agree with Chad's post.
I was half way through development of an app in rails and now i've done a complete 360 and have reconsidered after delving deep into ASP.NET MVC for my day job commitments.
I am now changing courses and looking into ASP.NET MVC for all my personal projects, I think both are honestly remarkably comparable now as I think MS has had a good hard look at Ruby on Rails' feature set and ensured they could match features very closely. After all, if you couple a project with LINQ 2 SQL / EF, ASP.NET MVC and potentially Dynamic Data (if you need that sort of thing), I really can't think of any compelling reasons to choose Rails over .NET, however I CAN choose reasons to select .NET over rails - after all hands down the rich debugging experience with VS.NET, rich intellisense and watcher/quickwatch support plus the ASP.NET MVC framework supports Html Action Helpers, Model Binders, support and encouragement for unit testing, and now with the inclusion of JQuery and JSON results, you're virtually unstoppable.
I suppose besides obviously hosting/licensing costs, Ruby language preference and other personal preferences such as it being open source etc, It's really your choice.
1) Scalability
Rails is just as scalable as any other web-application stack. The only difference is that your single server might get overloaded, and require splitting to 2 servers sooner than it would in .NET due to the slower performance of the ruby runtime. In practice this is not a problem.
2) Documentation
Microsoft do provide better documentation for the core libraries than Ruby or Rails, but the ruby/rails ones are still on the whole very good. I'd consider ruby/rails to be the winner here for the simple fact that you can always view the source for everything. No amount of documentation is a substitute for being able to actually see what's happening.
3) Community Support
I've been nothing but impressed by the community support around rails. I don't know what else to say there.
4) Hosting Solutions
Since phusion passenger got released, It seems to be easier these days to find rails hosting than it is to find ASP.net hosting. This is only going to sway more towards rails as time goes by for the simple fact that hosting companies do not have to pay royalties towards microsoft to deploy rails on linux servers.
5) Deployment ETC.
Capistrano (the most common deployment solution for rails) beats everything else hands down.
Well I dont know anything about the Scalability part, but personaly i started learning Ruby On Rails from ASP.NET a while ago. I really had a hard time finding some good documentation - the class documentation on Rails site was really poor in my eyes, and I had a simple question about what arguments you could put into an actionlink. But maybe it was just me who never found the right place. But personally i think that the ASP.NET documentation is better than rails - at least buy a book, i think thats a good way to go.
Number 3. Im pritty sure that there is very good Community Support for rails you just have to find the right forum or other media that suites your liking - maybe this what was I did wrong.
Number 4. There is alot of hosting solutions for Rails, but not as much as ASP.NET or PHP. I think you have to research this your self, and find out, if there is anything that suites your likeing.
Number 5. Ruby should be very easy to deploy, it has a notion of a development, test and production database. It uses migrations, so updates in the database schema is seamless - thats very cool. It is scripting, so it should be a matter of xcopy from the development computer to the production server.
The reason you should choose Ruby on Rails is if you like the MVC pattern. The MVC pattern is genius, and ruby is a great language when you learn it. Maybe take a dive into the ASP.NET MVC, and see what its like - then maybe move to Rails. Then you only have to learn a new language, and not a new arhitecture, framework and language at the same time.
Remmember this is from a ASP.NET Developer who sniffed to Rails, but gave up, doe to the lack of ability to find really good documentation, and there was always some strange errors, from the editor or Rails - but thats properbly a newbie thing :)
But if you have time, by all means learn it. Some developers say that we should learn one new language per year, and Ruby is a great candidate for that.

Can Standard .NET CMS systems be made to work with ASP.NET MVC

Has anyone successfully used a CMS developed for standard ASP.NET with ASP.NET MVC?
I currently use Immediacy CMS and it seems to be quite tightly coupled with standard ASP.NET, but I'd really like to start using ASP.NET MVC.
Are there any CMS systems out there directed at MVC?
How could I persuade my employer to move to ASP.NET MVC?
I suggest take a look to Kooboo (kooboo.com), a simple to use but powerful for developers. Well documented API and based upon ASP.NET MVC (of course ;-)
N2 CMS has an example site in ASP.NET MVC that I've been playing around with that works quite nicely - note that the code is now hosted on Google Code.
The problem you've got is that many CMS' already do a lot of "routing" in that the pages you are requesting/editing don't actually exist on disk, but are all in a data store of some kind, and there's an HttpHandler or ISAPI Filter sitting in front of ASP.NET to intercept the requests and work out what should be happening.
I have not personally seen any of the big name CMS systems out there upgraded yet to take advantage of many of the new things the .NET framework offers, let alone start working on the MVC framework.
As with all things, a cost-benefit analysis is the best way to convince your boss to do anything. If you can point how how moving towards the MVC framework is going to make some immediate positives (as well as many long term positives) that can outweigh the costs (in time, energy, and money) in the switchover, then you have succeeded.
ASP.NET and ASP.NET MVC are very different beasts in terms of how you develop applications on top of them. Technically, an ASP.NET MVC application is an ASP.NET application with some generic handler that invokes the core MVC framework.
The ASP.NET MVC framework is also relatively new (1.0 just released last MIX) and so it'll take a while before becoming mainstream.
How you can persuade your boss? Talk to him about the positive sides of ASP.NET MVC, and how it will improve his future business. There's plenty of material available to demonstrate that.
I do a lot of work using Immediacy (I used to work there) and I had thought about doing the same thing a couple of months ago. I think that the main issues would result from things like the plug-in handler, the idoc handler and (if your still using it) the ilink hander.
When you enable things like friendly URLS I think this would cause issues if you had similar named methods in your controller actions.
You may be able use some MVC in your project, I could see it working as an admin add-in but I couldn't see it being used to usefully in the main webroot.
I would think a CMS would have to be built using MVC in mind to get the most benefits from using the pattern, instead of trying to make it work in parallel with a pre-existing system API (limited as it is) and making more work for yourself.

Resources