views:

1582

answers:

8

Is Visual Studio written in .NET winforms? Or is winforms just too slow for a editor type application?

A: 

Based on my experience with the VS SDK, it looks as if it was built with C++/COM but I think that's just because the Visual Studio team decided to go with that (AND Windows Forms didn't exist as a release version when they were first developing the VS.NET IDE).

You can use Windows Forms for an editor type application. I think SharpDevelop is a WinForms app.

Mark Cidade
+1  A: 

At its core VS is still an unmanaged executable, so it doesn't use winforms. There may be portions written in .NET particularly around some of the newer features, but the core extensibility model is COM based (and very complex...)

Rob Walker
+3  A: 

SharpDevelop is a .NET Windows Forms application.

Rune Grimstad
+15  A: 

This isn't quite a fair question. :)

Visual Studio .NET (devenv.exe) is not written directly in WinForms, as it is not a CLR executable. (My hunch is that it is still produced with Visual C++.) I know for fact that neither 2005 nor 2008 versions of devenv.exe carry a CLR header. (I just dropped them both on ILDASM; they're definitely not managed code.)

That said, just because devenv.exe isn't written in WinForms doesn't mean WinForms is too slow for an editor. WinForms isn't, on most systems, too slow at all -- our app code will be the bottleneck before the framework is.

My hunch is that devenv.exe is written in C/C++ due to it being an upgrade of a long-standing environment; the cost to Microsoft to rewrite it in .NET is undoubtedly prohibitive.

Again, as far as WinForms speed is concerned -- there are quite a few WinForms apps which have no performance issues whatsoever, including a fairly robust .NET IDE (SharpDevelop).

John Rudy
As well as monodevelop (the mono port of SharpDevelop) is all managed application, and runs well without any problems. (http://monodevelop.com/)
Sunny
Last time I checked, devenv.env showed signs of being written with C++ and MFC: if you use WinSpy to look at the window class names, many of them have the classic "Afx..." pattern of MFC.
DavidK
DavidK: That makes absolute sense, if one considers that devenv.exe has been around since the early days of Visual Studio, and has been upgraded/modified over the years rather than ground-up rewritten. Good call! (I didn't think to WinSpy it.)
John Rudy
Prohibitive until VS10, where the front end is all kinds of WPF. That's some heavy-duty dogfooding. :) (I really like to see them investing in their technology like that.)
Greg D
I'll second that, Greg D. That kind of ambition shows that they mean business with WPF.
John Rudy
+1  A: 

If the VS team didn't use WinForms, you're suggesting that the only possible reason would be that WinForms is too slow. That's not valid. The fact that SharpDevelop's IDE is written in WinForms and performs fine shows that it isn't "too slow," regardless of what Visual Studio's IDE uses.

ctacke
+1  A: 

This sounds a bit like a "Are you still beating your wife?" question with no answer that sounds good from Visual Studio's point of view.

No, Visual Studio (at least up to 2008) is not written using .NET. However, SharpDevelop and other editors are and do not suffer from speed problems necessarily.

BlackWasp
You really could have chosen a better metaphor than that...
RCIX
+1  A: 

This is kind of two questions in one. As others have mentioned, Visual Studio does not use WinForms. Your other question has nothing to do with the first, as a) Visual Studio isn't an "editor," it's an IDE and b) it's begging the question.

That said, WinForms is an excellent choice for any Windows-based application, including an IDE (like the aforementioned SharpDevelop) and any "editor" you can imagine, up to and including audio and video. So no, it's not "too slow" for an "editor type application."

You are free, of course, to write slow code that runs in a Windows Forms application. :)

Robert S.