Thursday, November 9th, 2006

Python in ASP.NET

Category: .NET, Editorial

Darryl Taft reported that “In a session at the DevConnections conference here, David Ebbo, an architect on Microsoft’s CLR (Common Language Runtime) dynamic language team, and Jeff King, a program manager in the Microsoft Developer Division, discussed how Microsoft has implemented IronPython on the company’s ASP.NET platform.”

In addition, Ebbo said his team has delivered a prototype of a “secret project” called Simplified Data Scenarios where developers can “easily build data-bound applications from scratch” starting only with a database.

The prototype enables users to customize applications declaratively using ASP.NET or programmatically using IronPython, Ebbo said.

Meanwhile, King said IronPython is “really just the first of a series of dynamic languages” Microsoft will support. “We’re looking at Ruby, PowerShell, JScript” and others, he said.

Ebbo said the Simplified Data Scenarios framework will work with other dynamic languages as well. “We’ll have it first on IronPython, but it will work with others,” he said.

It is great to see dynamic languages fitting into the top platforms: The JVM, the CLR, and the JavaScript VM. Tooling support is something that is needed for many of the dynamic platforms, so if vendors can help there, we will be in a good place.

Posted by Dion Almaer at 5:20 am
18 Comments

++++-
4.5 rating from 120 votes

18 Comments »

Comments feed TrackBack URI

Noooooooooooooo! Why can’t Microsoft just leave my OpenSource languages alone. It’s bad enough we have to iron out the kinks between JavaScript and JScript. ASP.NET sucks btw!

Comment by CJ — November 9, 2006

@CJ:
IronPython is done very well. Have you actually used it? It was started by the same guy who started Jython…I think. Correct if I’m wrong.

…and btw ASP.NET does not suck. ;)

Comment by Michael — November 9, 2006

ASP.Net is so bass-ackwards! It’s such a convoluted mess from trying to hide web development from the developers! Yes web development has many warts, but trying to force the web to behave like traditional windoze apps is not the answer.

I have personally worked on over a dozen enterprise-class web apps using ASP.Net (1.1 and 2.0) since version 1.1 came out, and not a single one was not riddled with work-arounds to try to overcome ASP.Net’s un-web-like limitations.

Some of these projects had MS MVP’s working on them, so this isn’t an issue about expertise. ASP.Net is FLAWED. And it does NOT accelerate web development. Atlas (or whatever its name of the day is) is equally convoluted.

But back to the issue (and off my podium): Python and JScript are just scripting languages. I can see how MS can rationalize this. But Ruby? Ruby? Isn’t Ruby (in its present incarnation) very Web-centric?

How on Earth can you make Ruby work with ASP.Net (very un-web-centric)????

CJ, you are absolutely right to be concerned. This is definitely a MS tactic to confuse would-be Open Source language converts.

Comment by John — November 9, 2006

FastCGI for IIS will support regular python, perl

Comment by PerS — November 9, 2006

I love it when spaghetti code lovers ridicule .net. “But, I LIKE it when all my markup and js and server code is in the same file, and I HATE clean architectures with good separation of concerns.”

You don’t like ASP.NET because you think everything works best with CRUD, you like server code the spits out HTML and script fragments, you like using lots of includes, you like re-creating wheels, you like re-implementing functionality that code be componentized, and you have no clue what an “enterprise-class” application really is.

Comment by Ryan Gahl — November 9, 2006

Actually Ruby is not web-centric at all. Perhaps you’re confusing it with Rails, and Rails does a good job of enforcing tiered separation between the presentation, logic and persistence layers.

From what I’ve seen of ASP.NET (my wife is a lead developer with the largest site using ASP.NET), it’s really quite good. Tiered architecture requires changing the way that you think, but it genuinely improves development times and maintainability.

Comment by don hosek — November 9, 2006

Personally I can’t wait for the Ruby CLR project to mature. Ruby is the most fun language to program in that I’ve come across (although C# is pretty slick too), the only thing bad about it is terrible documentation and a lack of extensive third party libraries. The .NET Framework solves all of that as it contains almost anything you can possibly need, its incredibly well documented, and it is very well tested.

As far as ASP.NET, I loved it when I started using it, but every time I hit a limit it really pisses me off. The main benefit to ASP.NET is its intranet integration and the large number of high quality commercial libraries you can easily drop in. Sure there are open source alternatives for languages like PHP, Ruby, and Python but for the most part they are lesser in quality and lack significant documentation (for the uncommon libraries I mean).

Comment by Andy Kant — November 9, 2006

Michael’s right, did you ever USE jython? The goal isn’t to “rewrite” python in the CLR, the point is to be able to USE python to write windows apps using the CLR and .NET. Just like Jython was using Python to write Java apps. I’ve used both IronPython and Jython and they are both excellent at what they do, let you write simple python code to do .NET and Java programming. There’s nothing wrong with it and you don’t have to jump off a bridge. Chill out.

Comment by Snootz — November 9, 2006

Ryan Gahl writes:

You don’t like ASP.NET because you think everything works best with CRUD, you like server code [that] spits out HTML and script fragments, you like using lots of includes, you like re-creating wheels, you like re-implementing functionality that [could] be componentized…

What you are describing is poor programming practices, regardless of technology. The difference is that ASP.Net forces your hand regardless of expertise: many, many times there simply is no ASP.Net method for what you need to accomplish.

Granted, ASP.Net 2.0 has lots of out-of-the-box functionality now (personalization, authentication, caching…), so re-inventing the wheel can now be taken off that list. But so can it for OS languages: there are millions of lines of quality code for any and every need you might have.

Thanks, Don, for clarifying for me that Ruby is not just Rails. Still, it’s obvious that MS decided to hide the web from web developers and make ASP.Net as similar to windows programming as possible in order to divert developers from the web while they ready WPF (windows Presentation Framework). Once Vista is shipped and moderately penetrated into the market, MS will use their might to crush the web as we know it.

Unless something drastic happens to prevent or seriously delay WPF, we’re all going to be programming for windows again. Every last one of us. No joke.

Comment by John — November 9, 2006

Thanks for correcting my typos. But don’t you think you are going just a bit overboard with all that conspiracy stuff? And what, exactly, can you not figure out how to do with ASP.NET? Perhaps I could help you figure it out. I’ve been on the platform since 99 (beta days). While I don’t like Atlas per se, I have rolled my own Ajax tools based on proto/scriptaculous, and I doubt you can suggest a web app I can’t make with asp.net. You just have know how to wield the tools, man… don’t knock em cuz you don’t get em, or whoever you were working with doesn’t.

Comment by Ryan Gahl — November 9, 2006

Hey Ryan, my bad about:

many times there simply is no ASP.Net method

I should have said “no straightforward way”. Of course anything is possible, you just sometimes have to work harder on many things (that were once simple web concepts) than with other frameworks that are more web-centric. Of course, one could argue that many things are easier, too.

This could be just the fact that I’ve been embedded in enterprise web applications work (which is very different from web site work!) since 1995. ASP.Net flies in the face of everything I know about the web. Maybe the web’s not the perfect platform. Like I said, it has many warts. But why, oh why, would you try to hide it’s beauty as well as it’s warts? Because JavaScript and HTML are difficult? No, they are not. (If JavaScript is so difficult, why is MS adding JScript to the list of CLR langauges?)

I feel we’ve gone way off topic here (my fault, mostly), but I would like to clarify that what I said is not conspiracy: it’s capitalism. Red-blooded American capitalism. MS has to serve its stockholders by averting any and all threats to profitability. The Web is (was?) one such threat.
.
MS is introducing all of these languages into .Net so that there are no roadblocks when they release WPF and WPF/E (aka WPF/Everywhere: WPF for non-Microsoft platforms). WPF/E is MS’s way to regain (keep?) control of the market and the industry.
.
They may state other reasons, but the first and foremost reason for doing anything in a corporation is to generate profit. Period. WPF is the cornerstone of MS’s plan to ward off internet-related threats to profitability. All internet-related projects at the company are in preparation for WPF Everywhere.
.
Supporting all important languages on the .Net platform is just one of the steps in the plan.
.
I, like many who frequent this site, believe that the Web is one of the most important paradigms in modern times. It has been a vehicle for unbridled creativity, communication, and prosperity. To let one corporation take control of it and mold it to fit its own purposes (preservation of market share) would be counter-productive and a tragedy, to say the least.
.
If you value the Web and what it means, the expansion of the .Net platform should concern you. No, it’s not a conspiracy, but change is happening. And MS’s plan is awesome — almost infallible.
I love the Web: what is is, what it is evolving into. I guess it’s frustrating to me when people, smart people, don’t see that this “olive branch” from MS is not what it appears to be. The best I can do is try to open some eyes.

Comment by John — November 10, 2006

For anyone that doesn’t want to read all of John’s last comment, let me summarize.

Microsoft: “I’m the Juggernaut, bitch!”

This isn’t the holocaust, ASP.NET isn’t the end of the world. If it was, more people would use it. Think outside the box a little and look at web technologies as the solutions they actually are rather than a world domination agenda.

ASP.NET: Great for (Windows-based) corporate intranets, portals, extensive libraries.
Ruby on Rails: Great for AJAX powered and ultra dynamic websites.
Java/JSP/Whatever: Great for enterprise applications that need to handle extremely heavy load (I hate Java though).
PHP: Great for almost everything.

I am personally developing multiple web applications right now, all in different languages. I’m developing one web app in ASP.NET due to a couple third party libraries I needed that weren’t available for the other platforms. I’m developing some personal web apps in PHP and RoR. I’m even developing web apps in pure JavaScript (which I don’t recommend, really strict constraints on that project).

Comment by Andy Kant — November 10, 2006

MS has excellent tools. The .Net CLR is great, the .Net class framework is great, C# is a superb language.

ASP.Net, for web application development, is a nightmare.

Microsoft is trying to make it easy for people who know how to write Windows apps to write web apps. That’s a laudable goal, but they’re trying to map the basic structure of Windows apps — event driven programs organized around handlers attached to UI controls — into an environment where the controls and the handlers are NOT ON THE SAME MACHINE.

That is stupid.

I’ve been working in ASP.Net 2.0 for a year. It still takes me an ungodly amount of time to do trivially simple things. ASP.Net breeds unnecessary complexity like poop breeds flies, because the fundamental model is unsound.

I haven’t done anything in ASP.Net that I couldn’t have done easier, faster, and often better in plain old dynamic HTML, Javascript, CSS, and HTTP. Nothing. I’m interested in getting my engineering group to move away from ASP.Net because it’s making us amazingly unproductive. It’s a huge time-waster.

Thanks

Comment by russell — December 2, 2006

COM is king, sorry you spent time and money on that, but it’s now .Net so hand over your cash. You reinvent the wheel everytime MS updates or creates products people. Have fun relearning how to use their software and rewritting your software when MS decides to change it again. If I could sell the books and software I bought over the years sitting in my garage – “the Microsoft Graveyard” – for what I paid for them originally I’d make more money than I could ever make over charging for a simple ASP.Net web-site.

Fact is, if Microsoft code was used in the beginning of the internet we would be paying Microsoft to use it on top of our connection charges and only those with money would be able to learn and develop for it, not those with innovative ideas like those who started the whole Ajax kick that makes the internet what it is.

I love Python regardless of what I code, web sites on IIS or system tools to meet the lack of good toolset in Windows servers and workstations. .Net does nothing but keep you stuck on Windows/IIS, which is why I would never deveop using Adobe Flex either! With Python I can move my code anywhere, reuse my classes for years, write applications on mulitple platforms, and move my web code anywhere with minor changes… Plus, I can write Python 100 times faster than any ASP.Net, C#, or even VB application.

Comment by mo — February 5, 2007

I have done many asp.net projects over the past 5 years and I must admit asp.net is backwards. It tries to hide the underlying architecture of the web but fails in it’s abstraction. Microsoft would to well by me if it dropped asp.net and developed a much more web architecture focus. They could use a few things from the ruby on rails architecture.

On that note I still prefer to program almost all of my apps in asp.net because the .net framework and c# rock! One just has to learn to work around asp.net.

Comment by billie — July 19, 2007

Post advertisement at http://fivq.com/ . There you can offer your services, find gigs (short term jobs) or long term jobs. It is good place who would like to work remotely. Also there you can promote your website, your services. Between its absolutely free to post.

Comment by Vytas — October 12, 2007

I have more than 4 years of full-time experience in ASP.NET and C#. I am very good at it and know it inside out… AND I have to agree with previous posts. It’s very sad to have spent so much of my time and effort and memory on something that in the end I feel is inherently flowed..
I realized this during the years, C# is great, .Net is great but ASP.NET is pure madness. There is NO reason to do what it does, my application run slower because I am using it. It took a while to deeply understand the contorted logic of Viewstate and in most projects is BETTER and FASTER, to disable it completely, and the same applies to MOST ready made tools and Asp.net security checkings etc. There is only 1 positive side of this… since ASP.NET is unnecessary complex and there are many amateur coders who think they can program cause they drop a gridview on a page, it’s good for me to know how to trick Asp.Net in being efficient.. and still most companies are stuck with it. But I need to learn more web friendly language/architecture in my spare time (sigh).. Python is my choice for now. (Negative side I can never work for clever companies like Google and most big ones as they KNEW there were better options and never used it…..)

Comment by durden81 — May 14, 2008

Leave a comment

You must be logged in to post a comment.