tags:

views:

626

answers:

11

I'm an inquisitive .NET student without any commercial working knowledge and I have been puzzled by what exactlty are .NET languages meant for?

Q1.If you look on job websites, .NET seems mainly used for web applications, not much for Windows applications? (My dream job is to develop standalone small Windows applications.)

Q2.Are most "major" Windows applications developed using C/C++? e.g. word processing applications like MS Word or OpenOffice; photo editing software like ACD See or Photoshop; MSN or Yahoo Messenger; disc burners... Is .NET too slow and too indirect to handle these kinds of tasks?

Q3.Are .NET languages mostly only used in SIMPLE business applications involving database backend? E.g. payroll or GPS applications Because it's too slow and too indirect for major software applications?

Q4.I thought for the last few years .NET was the only development tool encouraged by Microsoft for Windows applications and C/C++ are outdated languages? Do they use MFC to access Windows API which is also outdated in new versions of Windows(backward compatible but not encouraged by Windows)?

Q5.If C/C++ are the main tools for major standalone Windows Applications, then the (slow) managed code approach is only a joke? Or the dominance of C/C++ is due to most major applications are older than .NET? Can you give me some famous names of software developed using .NET?

Thanks a lot for your industrial insight!

+4  A: 
  1. .NET is certainly used for standalone applications, though determining exact percentages is next to impossible.
  2. Yes they're mostly done with older languages. Many certainly could be done with .NET, but you'd need a lot of incentive to rewrite something as large as Word, Photoshop, etc., from the ground up.
  3. Not necessarily, but it can look that way simply because a huge percentage of business applications can be (and are) written as database front-ends.
  4. I don't think MS has a really unified message here -- they've certainly put a lot of work into .NET, but they also continue to develop and improve alternatives such as MFC (probably at least in part because they use it themselves).
  5. Some of both. More than speed, C++ and C give flexibility, portability (e.g., Office for the Mac) and greater ability to distinguish your application from the others.
Jerry Coffin
+18  A: 

If you look on job websites, .NET seems mainly used for web applications, not much for Windows applications?

1) .NET is not very common for "mainstream" desktop applications, if you consider mainstream to be Photoshop, etc. This is often more due to the fact that mainstream applications are based on code that was written long before .NET came around, and those applications are never rewritten, only grown. They carry a huge amount of legacy code from previous versions.

Are most "major" Windows applications developed using C/C++?

2a) See #1.

Is .NET too slow and too indirect to handle these kinds of tasks?

2b) Absolutely not. .NET can be blisteringly fast or dismally slow. Like with any tool, it depends on who is using it.

Are .NET languages mostly only used in SIMPLE business applications involving database backend? E.g. payroll or GPS applications

3) Payroll or GPS are hardly simple. Line of Business (LOB) applications can be immensely complex and .NET is often a good match for these precisely because they are so complicated.

I thought for the last few years .NET was the only development tool encouraged by Microsoft for Windows applications and C/C++ are outdated languages?

4) That is wrong. C/C++ are not outdated, they are just different. They provide a more precise level of control over the machine in exchange for longer and more difficult development time.

If C/C++ are the main tools for major standalone Windows Applications, then the (slow) managed code approach is only a joke? Or the dominance of C/C++ is due to most major applications are older than .NET? Can you give me some famous names of software developed using .NET?

5) Dominance is very much inherited. Again, .NET is not slow. Mainstream applications are well-known in large part because they have been around longer than .NET, so there's no reason to expect many, if any, .NET applications as well-known or popular as Word or Photoshop. Several years in the future, it's not unreasonable to expect some famous applications to arise that are .NET-based.

Edit:

Some people seem to be confused and believe that somewhere in this answer, it is asserted that .NET is as fast as c++. The only argument present is that both .NET and c++ are fast enough to run most mainstream applications. And anyone who thinks development time in c++ and .NET are equal, all other things being equal, hasn't done much development in one of the two :)

Rex M
Thank you for directly addressing application speed.
overslacked
I was with you until you asserted that C++ use necessitated a longer and more difficult development time. This is not so. The length and difficulty of development depends entirely on the developers, their process, and their familiarity with their tools, not on their language choice.
@pdusen: I guess that you're a C++ dev who hasn't used C# very much. Correct me if I'm wrong.
Conrad Albrecht
@pdusen where do you feel the extra precision and control come from? Gains in one area come at the cost of another. If that was not the case, .NET would have been pointless to develop.
Rex M
c and c++ HAVE been neglected by microsoft for the past 10 years. their focus has been 99% cramming c# down everyone's throat.
Inverse
@pdusen: While their is some truth to what you say, not all programming languages are created equal. They all have their own strengths and weaknesses.
Daniel Stutzbach
There are no "slow" programming languages. It is as fast or slow as you make it.
Chris Ballance
@pdusen - I must disagree, I use C++ more than C# and my development time is much reduced in C#, because the Visual C++ compiler is slow, Intellisense is unreliable, the language requires a lot more lines of code, and for many other reasons.
Qwertie
2b) .NET cannot reach the same speed as C++ because an optimizing compiler beats the JIT any day. I've looked at the generated x86 assembly from the JIT and it is hard to get excited about (it doesn't seem to use registers efficiently, leaving too much on the stack). That said, JIT'd code is definitely faster than a debug build of C++ code.
Qwertie
@Qwertie the discussion is not whether .NET is faster than c++, it is whether .NET is fast enough to support a major mainstream application. The answer is yes.
Rex M
IMO: does the .NET languages like C# speed up development ? Mostly No, the language does not make any difference imo. But the huge .NET library does makes life easier, and the fact that M$ kinda ignores the C++ part of Visual Studio compared to that of C#.
smerlin
+4  A: 

Most large Windows applications are C++ because they were written before .NET existed. It would be pointless spending 2 years of development time rewriting Microsoft Office (say) in .NET, only have exactly what you started with two years ago as the result.

Instead, most large software application build .NET into them slowly. Look at VSTO, for instance, for a great example of .NET interoperability in a C++ app.

On the other hand, Microsoft have released a number of software packages that were written entirely (or primarily) in .NET languages. Expression Blend was probably their first. Visual Studio 2010 (which is largely WPF-based) is the latest.

Dean Harding
+8  A: 

.NET is increasingly becoming the language of choice for most Windows development, including standalone desktop applications.

That being said, C/C++ are still used heavily in this space. However, on Windows, much of the "cutting edge" work is done in .NET, or a mix of .NET with native code.

The latter is, frankly, probably where the most exciting work is happening. It allows you to have the "close to metal" feel of native code when required, but still have all of the power provided by the newest .NET framework (such as WPF) for the user interface layer and non-performance critical sections. This is becoming more common over time - for example, Visual Studio is still largely native (C++) code, but the entire user interface was written using WPF (.NET).

I do nothing but desktop Windows development. I personally prefer to use .NET for everything I possibly can - and revert to C/C++ for the very small (and increasingly smaller) portions where .NET doesn't make sense.

Reed Copsey
even on linux theres heavy movement on the .NET side. Many well known tools for gnome are done with mono.
atamanroman
+1  A: 
  1. ASP.NET is very large because you control the hardware. It dosen't matter if your users are on linux or on mac. The page renders and works. When you have the hardware as a parameter, people are wary of .NET which (mono-aside) is prettymuch windows exclusive. (Mono 'works' but it's less accepted than other x-platform approaches).

    .NET also requires a download to be installer (.NET Framework). There's a lot of friction for users installing things to USE your thing, it's been a small barrier in XP, but now that 3.0/3.5 is baked into vista/win7 it's becoming a non-issue.

  2. In the past, yes. These days, not as much. (Correct me if i'm wrong, cuz it's very possible i am) I believe VStudio 2010, and Office 2007+ are now developed in .NET since they don't heavily require on maximum performance. C/C++ is still faster for games, but even some indie developers are building games for xbox/pc on XNA (DX for .NET, sorta)

  3. No. .NET isn't as slow as it used to. There are Lots of big big applications built in .NET now because it offers a wide variety of features to develop BIG applications FASTER, BETTER, and MORE STABLE.

  4. .NET does not use MFC. Winforms hook GDI+, and WPF hooks the Windows Presentation Foundation to do it's api calls. .NET is for the most part a re-write, but some things (like direct file-i/o, are wrapped down to the windows API)

  5. Software is developed in C/C++ because it's a) fast b) commonly known. But with today's new programmers, it's shifting I think. I also believe the new versions of Sony Vegas have been re-written for .NET, but once again I may be wrong. The key to remember is that .NET isn't as slow as it used to be, MS has bee working on the performance issue hard because they want to sell .NET for windows development.

Aren
+7  A: 

One issue I take with your question is that you ask a factual question ("Are most "major" Windows applications developed using C/C++?") and judgmental/causation question ("Is .NET too slow and too indirect to handle these kinds of tasks?") in one go.

It is indeed true that most Windows desktop applications (e.g. Microsoft Office, Adobe Photoshop and the likes) are written in native code. However it is also quite true that on server side, at least in Microsoft stack, it is all ASP.NET, i.e. managed code.

Consider now that performance requirements of a typical web application are much more strict than that of a typical desktop application - after all, a desktop application only have one user, when a server application may have thousands and thousands. So the causation link you imply sounds weak.

As the others have pointed out, there are many requirements at play when choosing implementation technique for your desktop app. It might be portability, tradition, existing code base, training of your developers, existence of managed wrappers for particular APIs (historically Windows was often lacking in the latter) and many other factors.

For the specific examples of "all managed" desktop apps I would cite ReSharper - it is a fully .Net desktop application with non-trivial user interface and logic. Visual Studio 2010 also have considerable portions (including UI/presentation layer) written in managed code.

Mitya
But the question isn't about server side .NET applications or niche products like Resharper. It's asking where are all the commerical desktop based applications written in .NET (ie .NET alternatives to Photoshop, Office, Games etc)? Paint.NET is simply not a alternative to Photoshop for most graphic designers etc.
Ash
Why there should be a .Net "alternative" to PhotoShop if PhotoShop is good enough as it is?
Mitya
So by that reasoning we should never write any desktop application using .NET where there is already a native "good enough" application.
Ash
+5  A: 

There are a few main issues that, I believe, still contribute to the relative lack of commerical .NET applications (the type you buy in a box at your local software store):

  • Requiring customers to (possibly) download the correct version of the framework runtime and/or install it before running your app.
  • Where ultra-high performance is required, .NET array/collection bounds checking (managed code protection in general) is obviously slower than languages/tools that don't do this for you.
  • The view that JIT compilation causes slower startup times.
  • There is often little business value in re-writing 1000's of lines of working C/C++ code in .NET.

I'm not saying whether these issues are valid or not, just trying to answer your question as to why there is still a relative a lack of commerical (shrink-wrapped) .NET software.

Ash
+1  A: 

Windows itself is not written in .NET. There's good reason for that...

Chris Ballance
Because it would require a ridiculous rewrite of the operating system?
rossisdead
See [Why Windows 7 isn’t written in C#?](http://stackoverflow.com/questions/783238/why-windows-7-isnt-written-in-c/783258#783258)
John Saunders
+1  A: 

One of the major problems for .NET in mainstream applications is that the ISV's producing them would like to have portable code. Photoshop for instance has a very succesful Mac OSX version. Of course, such portability is precisely not the goal of Microsoft.

Now, for the Web this doesn't matter too much. You can use .Net on the server-side and still produce a Safari-compatible website.

MSalters
+1  A: 

IMHO the tide will come whenever IE will become a managed application.

Florian Doyon
Why? What does IE have to do with anything?
John Saunders
+1  A: 

If you want to develop LOB apps for small shops that can't afford to hire programmers, and you wish to offer max features for minimum work, write them in MS-Access. Serious.

http://stackoverflow.com/questions/2437387/is-ms-access-still-the-most-efficient-rad-tool-for-small-scale-custom-apps

FastAl