Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why is .NET so popular? (Serious Question)

Why is .NET so popular? (Serious Question)

Scheduled Pinned Locked Moved The Lounge
csharphelpquestionc++java
146 Posts 75 Posters 48 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Joe Woodbury

    Rob Graham wrote:

    .Net JITs to native code, optimized for the particular OS and hardware it is running on, so it can in many cases actually be faster than pre-compiled Win32/64 code, since it can take advantage of OS specific and processor specific optimizations.

    Baloney. The JIT compiler is still saddled with the constructs of .NET. I've done extensive benchmarking and have found that purely algorithmic code is 4x slower on average with .NET than native C++. When using the framework, there are portions of .NET that are faster, though once you figure out what they're doing, you can get almost always get better performance with C/C++. (A common trap is file i/o. .NET can make this look so fast until you realize that they are often caching the entire file!)

    Rob Graham wrote:

    not forcing developers to re-invent the wheel every time?

    Laziness. There are plenty of libraries out there that offer fantastic functionality for C++. They are just as easy to learn as .NET and sometimes easier. The difference is that .NET puts all this massive amount of code (35MB of mostly native C++) in one place with one runtime. If you gave yourself a budget of even half that, you can easily build a list of fantastic C++ libraries that aren't very expensive. I will openly and totally conceded that dealing with COM is much easier in .NET. One reason is that the objects are actually documented (using undocumented objects in .NET is as big a pain as in C++ and Microsoft still has way too many undocumented "must use" COM objects.)

    I Offline
    I Offline
    Ian Shlasko
    wrote on last edited by
    #23

    It's still compiling to native code. Algorithmic code is slower because that native code includes a lot of extra checks that you would have to do manually in C++ (Or just know they aren't needed). You sacrifice runtime speed for better stability and less chance of nasty little buffer overruns and the like. Personally, I find that C# is absolutely perfect for my current (professional) situation. I'm a solo developer writing in-house software to support a small trading desk. I have no QA staff and no other programmers to divide up the work. Bugfixes and added features need to be done and deployed to the end users quickly (Talking minutes or hours, not days). If I desperately need a performance boost somewhere, I either drop to unmanaged code or move the functionality into a Managed C++ assembly... Otherwise, I use C# for rapid development and easy maintenance, and WPF for good-looking and responsive interfaces (WPF's data binding is incredibly useful, once you get used to it). Now, if I was at a game development shop, or a mainstream commercial developer, and they were using C#/WPF, I'd probably be saying much the same things as you are. The name of the game is using the right tools in the right situations.

    Proud to have finally moved to the A-Ark. Which one are you in?
    Author of the Guardians Saga (Sci-Fi/Fantasy novels)

    1 Reply Last reply
    0
    • R Rob Graham

      It does not however, compile to native code, which was my point.

      R Offline
      R Offline
      Rama Krishna Vavilala
      wrote on last edited by
      #24

      Rob Graham wrote:

      It does not however, compile to native code,

      May be I am not following you. Java HotSpot VM always compiled to native code and it works almost the same way as the .NET JIT compiler. Are you talking about "ngen" pre-compiler? I am not sure if there is a Java equivalent of that.

      R 1 Reply Last reply
      0
      • S Single Step Debugger

        Look at the alternatives and you will get your answer. 0. MFC is a poor framework with a Spartan visual components library. 1. Java libraries are a complete duck-typed mess of poor and good technologies, most of them with an insane learning curve. 2. Delphi is not what it used to be in the late 90s. 3. Nokia’s Qt Developer – I see a spark here, but I can’t comment on it yet because I’m looking on this IDE only from a week. Am I missing some other popular framework?

        The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

        modified on Wednesday, December 1, 2010 2:55 PM

        A Offline
        A Offline
        Ajay Vijayvargiya
        wrote on last edited by
        #25

        Deyan Georgiev wrote:

        0. MFC is a poor framework with a Spartan visual components library.

        Not entirely true. MFC is not well designed as Windows API or .NET classes, but it still has its place. Who, on MSVC environment would use VCL ?

        1 Reply Last reply
        0
        • S Single Step Debugger

          Look at the alternatives and you will get your answer. 0. MFC is a poor framework with a Spartan visual components library. 1. Java libraries are a complete duck-typed mess of poor and good technologies, most of them with an insane learning curve. 2. Delphi is not what it used to be in the late 90s. 3. Nokia’s Qt Developer – I see a spark here, but I can’t comment on it yet because I’m looking on this IDE only from a week. Am I missing some other popular framework?

          The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

          modified on Wednesday, December 1, 2010 2:55 PM

          A Offline
          A Offline
          Ajay Vijayvargiya
          wrote on last edited by
          #26

          Deyan Georgiev wrote:

          Am I missing some other popular framework?

          Yes, WX Widgets, for instance! ;)

          S 1 Reply Last reply
          0
          • R Rama Krishna Vavilala

            Rob Graham wrote:

            It does not however, compile to native code,

            May be I am not following you. Java HotSpot VM always compiled to native code and it works almost the same way as the .NET JIT compiler. Are you talking about "ngen" pre-compiler? I am not sure if there is a Java equivalent of that.

            R Offline
            R Offline
            Rob Graham
            wrote on last edited by
            #27

            I misspoke, having forgotten about the VM hotspot compiler. After actually checking on the facts :-O I note that Java now also has several precomilers like ngen available on various platforms...

            1 Reply Last reply
            0
            • A Ajay Vijayvargiya

              Deyan Georgiev wrote:

              Am I missing some other popular framework?

              Yes, WX Widgets, for instance! ;)

              S Offline
              S Offline
              Single Step Debugger
              wrote on last edited by
              #28

              Is it popular and well supported? I’ll give it a look.

              The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

              A 1 Reply Last reply
              0
              • R Rob Graham

                It does not however, compile to native code, which was my point.

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #29

                Of course it does. Bytecode and IL are basically equivalent concepts, and both get compiled just-in-time to whatever the CPU needs to execute them, i.e. native code. Unless you are using an interpreter on purpose. :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                R 1 Reply Last reply
                0
                • S Single Step Debugger

                  Is it popular and well supported? I’ll give it a look.

                  The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

                  A Offline
                  A Offline
                  Ajay Vijayvargiya
                  wrote on last edited by
                  #30

                  www.wxwidgets.org[^] It is quite powerful, had static binding, like MFC, unlike QT, which uses slots-signals (dynamic binding, thus slow). I always use MFC, WX is for cross platform. Many features are not even in MFC!

                  1 Reply Last reply
                  0
                  • C Chris Losinger

                    .Net is much more friendly to new programmers than something like MFC. .Net is a far more comprehensive library than MFC (or any other framework i've ever seen). also, .Net provides a far better way to do web programming than C++. (and i say this as a die-hard C++ programmer) and this "meta environment" you speak of is a bit exaggerated. .Net languages are compiled to native code, at run time. there isn't really any huge "runtime" between the code and the OS. there's an environment and a standard librar, just as there is with any other language. but it's not like .Net is interpreted or anything.

                    image processing toolkits | batch image processing

                    L Offline
                    L Offline
                    l a u r e n
                    wrote on last edited by
                    #31

                    you really think .NET is good for web??? do you mean the c# language or the .NET runtime? if you mean c# then sure it's a nice language and works well for many tasks including web if you mean, however, .NET is good for web then i would respectfully say you are talking from the wrong end of your body ... .NET is the antithesis of what the web is about and consequently sucks at it ... the web is not the desktop and should not be treated as such ... just because someone can write a desktop app does not mean they can write a web app ... completely different problem domain with different rules and constraints that need to be understood properly to write a good web app (website / service / etc) would you think it a great idea to use say php to write desktop apps? that a good javascript programmer would necessarily be a good c++ programmer for desktop environments? no the inverse is true as well /end_rant

                    "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

                    C P A 3 Replies Last reply
                    0
                    • H Henry Minute

                      Assembly! Assembly? You youngsters today are spoiled. Machine Code is the way to go. :-D

                      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                      S Offline
                      S Offline
                      Steve Mayfield
                      wrote on last edited by
                      #32

                      Hardware Binary Editor :thumbsup: (aka toggle switches)

                      Steve _________________ I C(++) therefore I am

                      P M 2 Replies Last reply
                      0
                      • H Henry Minute

                        Assembly! Assembly? You youngsters today are spoiled. Machine Code is the way to go. :-D

                        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                        F Offline
                        F Offline
                        fjdiewornncalwe
                        wrote on last edited by
                        #33

                        You looking for your punch card collection, Henry?

                        I wasn't, now I am, then I won't be anymore.

                        V S H 3 Replies Last reply
                        0
                        • B b_dunphy

                          I have some limited experience with C# and VS 2008 and I don't understand why the .Net framework is so popular. It is a meta environment running on top of the operating system just like Java and the non-Windows implementations do not have all of the capabilities of the Windows version so it's not truly cross platform. I don't see why -- other than Microsoft's semi-forcing the issue -- someone would choose to use this. Shouldn't Win32/64 code run just as well, if not better, since there is no runtime between the code and the system? I can't help thinking of Java or even UCSD P-System Pascal when I look at this. I realize .Net has a large amount of built-in functionality but the same thing could be implemented in native code as well. What am I not seeing here?

                          P Offline
                          P Offline
                          Pete OHanlon
                          wrote on last edited by
                          #34

                          b_dunphy wrote:

                          What am I not seeing here?

                          Commercials. You answer it yourself when you say:

                          b_dunphy wrote:

                          I realize .Net has a large amount of built-in functionality but the same thing could be implemented in native code as well

                          Yes you can create these items in your own framework, but the key things are that somebody else has already done this for you and this cuts things out of the development that you don't have to do for yourself. Couple this with the fact that you get the benefit of thousands of others testing the framework for you, then this serves to inspire a lot of confidence in the corporate suits. I used to write applications in Informix 4GL, and I could crank out database applications very, very quickly. Then I moved over to C and my productivity dropped. Moving on to C++ and Windows improved my productivity marginally, but not by a great deal - fortunately I was writing applications that required raw speed over cut development times. Compare that with the VB types who could crank out database applications for companies in a fraction of the time. With the move to the .NET framework, MS has provided a framework that provides the speed of development of the VB types with a much fuller featured framework. Now, others have mentioned ASP.NET which is a much more credible alternative to Java web applications, but nobody has mentioned WPF and Silverlight. WPF makes DirectX developed interfaces easy to develop; letting you go well beyond the standard look and feel of Windows applications - effectively commercial applications can be limited only by the creativity of your designer. With Silverlight applications, we have a credible alternative to Flash applications and this has opened up a new way of developing applications; potentially targeting other platforms.

                          I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                          Forgive your enemies - it messes with their heads

                          My blog | My articles | MoXAML PowerToys | Onyx

                          B 1 Reply Last reply
                          0
                          • R Rama Krishna Vavilala

                            b_dunphy wrote:

                            why the .Net framework is so popular.

                            Depends on whom you ask? How many*desktop* applications which you use on a day to day basis are written in .NET? Let' see:- 1. Internet Browsers - Chrome, IE, FF, Opera -> None of them are in .NET 2. Microsoft Office - Not .NET (though some add-ons can be .NET) 3. Windows Live Messenger, Yahoo messenger, Google Talk etc - Not .NET 4. Notepad, Paint, Calculator - Not .NET 5. Visual Studio - Mainly .NET 6. SQL Server - Not.NET but portions of Management studio/BI Studio are .NET 7. Task Manager - Not .NET I am just talking about Windows here. Mac and Linux users may survive even without knowing about .NET. The place where .NET is popular is in Websites developed for IIS (lot of intranet sites). ASP.NET is almost the de-facto choice. Now again, IIS is a very small percent of total websites out there. The only other place where .NET is popular is enterprise applications or custom developed enterprise apps.

                            L Offline
                            L Offline
                            Luc Pattyn
                            wrote on last edited by
                            #35

                            Rama Krishna Vavilala wrote:

                            Depends on whom you ask

                            Indeed. Let's see: 1. My editor: C# 2. My IDE: C# 3. My system tools: C# 4. My cross-compilers: C# 5. My simulators: C# 6. My image processing: C# + native C 7. My automation stuff: C# 8. My chess utilities: C# 9. My model railroad: C (on Mac), to be ported to C# 10. My web site: PHP (unfortunately) 11. My embedded stuff: C I'll use a native DLL when it is the right choice that fits the requirements, however I can't remember when I last did a native EXE. :)

                            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                            Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                            G 1 Reply Last reply
                            0
                            • L Luc Pattyn

                              Of course it does. Bytecode and IL are basically equivalent concepts, and both get compiled just-in-time to whatever the CPU needs to execute them, i.e. native code. Unless you are using an interpreter on purpose. :)

                              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                              Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                              R Offline
                              R Offline
                              Rob Graham
                              wrote on last edited by
                              #36

                              see above :-O [^]

                              1 Reply Last reply
                              0
                              • J Joe Woodbury

                                I love writing assembly, just can't find an excuse too. I really do believe assembly should be learned by all CS students very early on. It sheds a whole lot of light on what's really going on with the computer and makes you very jaded about claims of new technology (since you know that it's all just assembly in the end.)

                                P Offline
                                P Offline
                                Pete OHanlon
                                wrote on last edited by
                                #37

                                Joe Woodbury wrote:

                                I really do believe assembly should be learned by all CS students very early on

                                Hear hear. I did 68000 assembly at Uni, and loved it. I still have a real fondness for it.

                                I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                                Forgive your enemies - it messes with their heads

                                My blog | My articles | MoXAML PowerToys | Onyx

                                1 Reply Last reply
                                0
                                • L l a u r e n

                                  you really think .NET is good for web??? do you mean the c# language or the .NET runtime? if you mean c# then sure it's a nice language and works well for many tasks including web if you mean, however, .NET is good for web then i would respectfully say you are talking from the wrong end of your body ... .NET is the antithesis of what the web is about and consequently sucks at it ... the web is not the desktop and should not be treated as such ... just because someone can write a desktop app does not mean they can write a web app ... completely different problem domain with different rules and constraints that need to be understood properly to write a good web app (website / service / etc) would you think it a great idea to use say php to write desktop apps? that a good javascript programmer would necessarily be a good c++ programmer for desktop environments? no the inverse is true as well /end_rant

                                  "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

                                  C Offline
                                  C Offline
                                  Chris Losinger
                                  wrote on last edited by
                                  #38

                                  l a u r e n wrote:

                                  you really think .NET is good for web??? do you mean the c# language or the .NET runtime?

                                  if we're going to be pedantic, then i mean .Net + C# + ASP.Net + IIS + every other thing that's required to accomplish what everyone means when they say something like "using .Net for web apps".

                                  l a u r e n wrote:

                                  .NET is the antithesis of what the web is about and consequently sucks at it

                                  i encourage you to read what i actually wrote.

                                  l a u r e n wrote:

                                  would you think it a great idea to use say php to write desktop apps?

                                  i have no idea what you're talking about, now.

                                  image processing toolkits | batch image processing

                                  L 1 Reply Last reply
                                  0
                                  • B b_dunphy

                                    I have some limited experience with C# and VS 2008 and I don't understand why the .Net framework is so popular. It is a meta environment running on top of the operating system just like Java and the non-Windows implementations do not have all of the capabilities of the Windows version so it's not truly cross platform. I don't see why -- other than Microsoft's semi-forcing the issue -- someone would choose to use this. Shouldn't Win32/64 code run just as well, if not better, since there is no runtime between the code and the system? I can't help thinking of Java or even UCSD P-System Pascal when I look at this. I realize .Net has a large amount of built-in functionality but the same thing could be implemented in native code as well. What am I not seeing here?

                                    R Offline
                                    R Offline
                                    realJSOP
                                    wrote on last edited by
                                    #39

                                    It's really not popular at all. The latest batch of relaesed wikileaks documents shows that it's a plot by the government to distract everyone while they conduct covert operations all over the world. Nobody is safe. NOBODY! Why did the farmer cross the road?

                                    .45 ACP - because shooting twice is just silly
                                    -----
                                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                    -----
                                    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                    P L S L 4 Replies Last reply
                                    0
                                    • R realJSOP

                                      It's really not popular at all. The latest batch of relaesed wikileaks documents shows that it's a plot by the government to distract everyone while they conduct covert operations all over the world. Nobody is safe. NOBODY! Why did the farmer cross the road?

                                      .45 ACP - because shooting twice is just silly
                                      -----
                                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                      -----
                                      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                      P Offline
                                      P Offline
                                      Pete OHanlon
                                      wrote on last edited by
                                      #40

                                      John Simmons / outlaw programmer wrote:

                                      Why did the farmer cross the road?

                                      To get a better vantage point to line up the sites on the chicken.

                                      I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                                      Forgive your enemies - it messes with their heads

                                      My blog | My articles | MoXAML PowerToys | Onyx

                                      S 1 Reply Last reply
                                      0
                                      • P Pete OHanlon

                                        John Simmons / outlaw programmer wrote:

                                        Why did the farmer cross the road?

                                        To get a better vantage point to line up the sites on the chicken.

                                        I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                                        Forgive your enemies - it messes with their heads

                                        My blog | My articles | MoXAML PowerToys | Onyx

                                        S Offline
                                        S Offline
                                        Single Step Debugger
                                        wrote on last edited by
                                        #41

                                        Pete O'Hanlon wrote:

                                        To get a better vantage point to line up the sites on the chicken.

                                        You are not allowed to misspell the weapons parts when John is around!

                                        There is only one Ashley Judd and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

                                        P 1 Reply Last reply
                                        0
                                        • B b_dunphy

                                          I have some limited experience with C# and VS 2008 and I don't understand why the .Net framework is so popular. It is a meta environment running on top of the operating system just like Java and the non-Windows implementations do not have all of the capabilities of the Windows version so it's not truly cross platform. I don't see why -- other than Microsoft's semi-forcing the issue -- someone would choose to use this. Shouldn't Win32/64 code run just as well, if not better, since there is no runtime between the code and the system? I can't help thinking of Java or even UCSD P-System Pascal when I look at this. I realize .Net has a large amount of built-in functionality but the same thing could be implemented in native code as well. What am I not seeing here?

                                          C Offline
                                          C Offline
                                          CPallini
                                          wrote on last edited by
                                          #42

                                          On comparison, native memory management requires care, and MFC is a pain. :)

                                          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                          [My articles]

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups