Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do I need to develop an Iron Python web app in Visual Studio 2010

I've got Visual Studio 2010. To develop a web app in Iron Python (i.e. to use a Ruby like language not C#) what downloads to I need? e.g. is the DLR already in VS2010, Iron Python itself

Once setup would I actually be still developing an ASP.net MVC web app but just using Ruby for the language, or is the model something different to this?

thanks

like image 483
Greg Avatar asked May 16 '10 04:05

Greg


3 Answers

You need to download

Python Extension for Visual Studio

Python Tools for Visual Studio

Then you can create an ironPython project. It's really easy.

and here are tools for ironPython

Python Tools

Good Luck!

like image 100
hgulyan Avatar answered Oct 20 '22 21:10

hgulyan


Out of the box, Visual Studio doesn't contain IronPython or IronRuby. You can add IronPython support using the tools from http://www.ironpython.net/ironpython/tools/; there is no equivalent for IronRuby yet.

Right now, there is no integration between IronPython and ASP.NET MVC. You can make it work, but it involves re-plumbing most of ASP.NET MVC. There is an IronRuby version available at http://github.com/jredville/ironrubymvc, but it's just a prototype (that said, it does work quite well).

Another option is to use an existing Python web framework (such as Django). However, every major Python web framework I've tried (and there's a lot of them) has had some issue with IronPython - those issues are getting rarer and rarer, but it also makes them much harder to track down. The low-hanging fruit for Python compatibility are long gone.

Rather than use a major framework, you could try to roll your own - there's a great tutorial that uses WebOb to create a web framework, and WebOb works well on IronPython. Part of the reason that there are so many Python web frameworks is that it's so easy to make a simple one.

If you stick to the pure-Python route, you'll probably want to use NWSGI to deploy your app. WSGI is the standard Python API for web apps, and NWSGI uses IronPython to implment the spec.

Finally, you can use the IronPython tools mentioned above to edit your code and use CPython to run it - you don't get debugger support, but most everything else should work just fine.

Also, IronRuby will run Rails just fine, but you don't get Visual Studio support.

like image 45
Jeff Hardy Avatar answered Oct 20 '22 20:10

Jeff Hardy


In addition to hgulyan's answer above, I would recommend everyone to vote for Microsoft to integrate Python in VS2010.

like image 1
Shimmy Weitzhandler Avatar answered Oct 20 '22 19:10

Shimmy Weitzhandler