views:

70

answers:

2

Hello, I am planning on writing a medium size web application that will be XML heavy. I will need to do heavy xml processing. When a user requests a webpage the program will fetch the XML from the database then it will process the XML then render the results to the browser. The XML is not big but i will need to make changes to the xml rules from time to time. My choices are asp.net mvc c# or python django. I need to know which one of these languages have the highest productivity in handling XML.

Also, if you have any other suggestions besides c# or python please voice them. Thanks

+4  A: 

I am not familiar with C# but I dare say that it can competently mangle XML. So can Python, especially if you use something like lxml. Given this, and not knowing more about your specific background, I'd say it boils down to choice of programming language. If you like Python, Django is probably the most popular web framework. If you find C# more fun I guess ASP.NET MVC will be the way to go.

I'd like to add a note about web hosting. If you are budget limited then you might find Python compatible (read *NIX) hosting cheaper compared to Windows. If budget is not such a big constraint then disregard this factor.

Some people might have reservations about IDE support for Python. I have found PyDev quite up to the task for Python. There are of course plenty of other IDEs.

Manoj Govindan
+1 for "competently mangle" -- and another good answer +1'd for being the originator of the phrase ;-)
Sean Vieira
@Sean: The credit is not entirely mine. I read about "mangling Unix" in one of Eric Raymond's web pages a long time ago. I merely added the adjective :)
Manoj Govindan
+3  A: 

I am not familiar with Python, but I dare say that it can competently mangle XML. So can .NET, especially if you use something like LINQ to XML. Given this, and not knowing more about your specific background, I'd say it boils down to choice of programming language. If you like C#, ASP.NET MVC will be the way to go. If you find Python more fun I guess Django is probably the most popular web framework.

On a more serious, less cut-and-paste note, LINQ to XML is the nicest XML API I've used. Once you've grokked it - including the conversion operators available, and how it interacts with LINQ to Objects - it's truly lovely.

Of course, the exact web framework you use is somewhat irrelevant to the XML processing - if your app is going to be doing lots of XML work, I'd certainly hope that most of the work would be done away from the UI layer anyway. Obviously it'll be somewhat easier if they're based on the same platform, but you could use IronPython for the UI and C# for the XML mangling, or vice versa.

Jon Skeet
+1 for "competently mangle"
Sean Vieira
@Sean: Manoj deserves the credit for that. I just did a cut/paste/edit on his text, to show the interchangability of answers :)
Jon Skeet
I came back here, glanced through the posts and saw Jon's photo below "my" answer. Was dumbfounded for a moment there :P :P
Manoj Govindan