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 36 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.
  • C Chris Boss

    I don't use any dot.net languages. Actually I don't currently write software in any Microsoft languages. My impression though is that the improvements in programming languages is intended to make writing software easier. Writing Windows applications using C (with just the windows API) was just too hard to do so Microsoft came up with MFC (Microsoft Foundation Classes) and Borland has someting called OWL, if I remember correctly. MFC helped, but really didn't make programming the panacea that was hoped for, IMO. Programming languages like Visual Basic (which I have used. Currently have VB 5.0 pro but not used much) made a big difference because of the drag and drop environment, but it often left programmers wanting more. dot.net was suppose to be the next big solution to programming, but personally I was turned off by the huge runtimes required. Fortunately most PC's come with the runtimes today. Is programming easier and better today because of these improvements. Possibly, but I am not so sure yet. I do see the need to build Engines which make programming easier and more powerful though. Actually I have done so myself. I started using PowerBasic about 10 years ago, which was more like writing apps using pure C (just the Windows API), except it was Basic. I had to learn the Windows API from the ground up. My first reaction was, "this is too much work and there has to be a better way". Of course I could have gone the route of Visual Basic and later dot.net's version of VB, but I never liked the bloat in such software, its reliance on COM and COM components. For example I have VB 5.0 Pro and the core runtime doesn't handle any of the common controls. The runtime is 1.4 meg in size, but when you need to use a Listview, Treeview or RichEdit control you had to start adding a bunch of OCX's. Where does it end ? Rather than require a bloated programming tool, I chose to stick with Powerbasic and build my own GUI engine, but with the principles of fast, small size, ease of use and powerful features. One does really need a good programming language add/or addon tools to make things simpler. What started out as an inhouse tool became a commercial product which is now in its 4th generation (and version 5.0 is on the horizon). I don't want to go into details about it since it is a commercial product, but I do think it valuable to compare it to common tools like Visual Basic. Where as VB as a 1.4 meg runtime DLL and then a bunch of OCX's when you need things like the common controls or c

    H Offline
    H Offline
    Hernan Monserrat
    wrote on last edited by
    #127

    yeah! I used Borland's TurboBasic 1.0 with DOS... old times... I share most of your comments. for me .NET is defined as EEE: Easy to learn Easy to leave Easy to cameback at any time... I don't need it too. But the reason for these is the type of projects that I am involved in the work. Simplex Method: define your objetive function, then hire the specialist to resolve them!.

    C 1 Reply Last reply
    0
    • H Hernan Monserrat

      yeah! I used Borland's TurboBasic 1.0 with DOS... old times... I share most of your comments. for me .NET is defined as EEE: Easy to learn Easy to leave Easy to cameback at any time... I don't need it too. But the reason for these is the type of projects that I am involved in the work. Simplex Method: define your objetive function, then hire the specialist to resolve them!.

      C Offline
      C Offline
      Chris Boss
      wrote on last edited by
      #128

      Borland sold back the rights to TurboBasic back to its original developer, who in turn renamed it Powerbasic. Powerbasic still has a DOS compiler, plus a Console compiler for Windows and then their lead product Powerbasic for Windows. Powerbasic used to be marketed as an addon to Visual basic back when it was called PowerBasic DLL compiler. That last 4 versions of Powerbasic for Windows are designed for building complete GUI applications and it continues to improve with each new version.

      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?

        W Offline
        W Offline
        Westley Cooper Thorn
        wrote on last edited by
        #129

        Serious answer: cheese on toast please. Here are a couple of points.. .net is a powerful standardized environment. .net enforces a standard of programming in itself. It is availible to the masses. Development uses less code so you can get stuff done quicker - this is the advantage of having something on top/runtime. Easy cross-platform developmnent, for me: web , phone, desktop, cloud (Azure) all in c#. If your website is written in .net 2.0 you can, at the click of a button upgrade it to and take advantage of new powerful features that are available using a few lines of code such as AJAX with .net 3.5, Multi-threading with .net 4.0. etc. The system is upgradeable. Everyone knows a .net developer meaning that your code can be supported. ..there are many more, of course: Visual Studio is king to use.

        1 Reply Last reply
        0
        • _ _beauw_

          > The language and the framework are two different things. True, but I also think that ends up being a trivial distinction in practice. C# typically implies the .NET Framework, while assembly language typically does not. My comment attempted to make the point that working in a low-level development shop is not as agonizingly slow and difficult as .NET programmers seem to think it is. If nothing else, those .NET programmers spend more time scratching their heads and looking at the "hourglass cursor" than their assembly language counterparts do. Beyond that, Microsoft has done a good job of conflating .NET with its languages. C# is not C; it does not run on a wide variety of hardware, and it does not seem to be used independently of the .NET Framework to any significant degree. Personally, I like .NET because of its development tools. Breakpoints, step-by-step execution, watches, Intellisense, etc. are all easily available right out-of-the-box.

          A Offline
          A Offline
          AspDotNetDev
          wrote on last edited by
          #130

          _beauw_ wrote:

          C# typically implies the .NET Framework

          That's because .Net is so useful you'd have to be silly not to use it. You can remove all references in a new project and you'd then be using plain C# without the .Net Framework.

          [Forum Guidelines]

          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?

            K Offline
            K Offline
            Kenneth Kasajian
            wrote on last edited by
            #131

            It's a good question. Here's the way I see it. 1. First of all, you made some incorrect (albeit minor) assumptions. It is true that code written for Win32 would use the API directly, whereas with .NET, your code calls .NET which in turn calls Win32. It's similar to any other framework with that respect, such as MFC. However, it's not a "runtime". Your code is not running in a runtime the way it does with original Java, or VBA, etc. It's not interpreted. .NET code runs in native code. Next time you're debugging C#, switch to assembly view, and you'll see it's executing op-codes. Java, too, now, and for a long time, goes through to a JIT process to get the same performance. Typically, a compiler has a front end phase, and a back-end phase, even your C++ compiler that generates native code. It has a front-end to create some type of an internal intermediate language, and a back-end that converts that for the target platform. The difference with native code is that both of those steps are done when you compile your code. With .NET languages, the band-end step is deferred to when when code is launched (or installed) on the target platform. One advantage of this is that the same code can target an entirely different platform such as x64 Windows. 2. Why .NET instead of Win32? Why C# instead of C++? Well, Microsoft is surely investing heavily into C# and .NET. They are also into MFC and C++, but not to the same extent. So get the advantage of a more modern and kept-up language and framework. 3. Even highly seasoned programmers still make mistakes C/C++ -- look at all the buffer over-run vulnerabilities in software. Imagine a mediacore programmer using C++. C# makes it slightly harder to shoot yourself in the foot. Although C#, has ways of getting almost the same speed as C++ by using pointers and direct memory access. This is done using "unsafe" blocks, the code in which looks a lot like traditional C. 4. .NET is better for security, with features such as "code access secruity" 5. Languages such a C# are better creating analyizers.. Tools such as PEX, Moles, Resharper, Roundtrip engineering UML tools, LibCheck, ILMerge, FxCop, StyleCop, are just scratching the surface. These types of tools are eaiser to code for C#, so they're more likely available. 6. Reflector -- not sure if this an advantage, but it's certainly cool.

            ken@kasajian.com / www.kasajian.com

            1 Reply Last reply
            0
            • R Rob Graham

              b_dunphy wrote:

              Shouldn't Win32/64 code run just as well, if not better, since there is no runtime between the code and the system? I

              Shows a bit of ignorance on your part. Unlike java or UCSD Pascal, .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. Java and UCSD Pascal compile to p-code which must be then executed by an interpreter.

              b_dunphy wrote:

              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?

              That most people would rather not have to implement all that functionality themselves? that a large, robust framework really speeds application development be not forcing developers to re-invent the wheel every time?

              B Offline
              B Offline
              b_dunphy
              wrote on last edited by
              #132

              Rob Graham wrote:

              That most people would rather not have to implement all that functionality themselves? that a large, robust framework really speeds application development be not forcing developers to re-invent the wheel every time?

              In my original question, I meant to say that Microsoft could have just as easily implemented all of the built-in functionality in native code and provided the same capabilities without needing CIL at all.

              1 Reply Last reply
              0
              • G grgran

                DIP switch !!! DIP switch!!!! that's for you little ones just out of diapers Paddle switches are what you need I don't want to get out my bifocals magnifying glass just to move a switch with a toothpick. Real men use big beefy paddle switches for input (directly into memory) in octal, cause hex is for sissies.

                G Offline
                G Offline
                ghle
                wrote on last edited by
                #133

                :thumbsup:

                Gary

                1 Reply Last reply
                0
                • L Lost User

                  In languages like C, C++, C#, Java etc you still "have to" know how numbers are represented - ok you might get away with ignoring issues like that, but then your code is likely to suck. Such as this, I never want to see this, if I see this I will tell you in your face that you suck and I will tell your boss to fire you:

                  bool IsPowerOf2(int x)
                  {
                  for (int i = 0; i < 32; i++)
                  if ((int)Math.Pow(2, i) == x)
                  return true;
                  return false;
                  }

                  And yes, I saw that one in the wild. Suggested replacement: return (x & (x - 1)) == 0; edit: the replacement treats 0 as power of 2, of course, usually not a problem in my experience and easy enough to change.

                  G Offline
                  G Offline
                  ghle
                  wrote on last edited by
                  #134

                  harold aptroot wrote:

                  Suggested replacement: return (x & (x - 1)) == 0;

                  Um, faster, more clear...

                  return (x & 0x01) == 0; // Powers of two can't have LSB set, cause that would be an odd number

                  Or better, why would this need a routine, consuming those wasteful machine instructions and wait states?

                  if 0 != x & 0x01
                  {
                  }

                  Gary

                  L 1 Reply Last reply
                  0
                  • _ _beauw_

                    > The language and the framework are two different things. True, but I also think that ends up being a trivial distinction in practice. C# typically implies the .NET Framework, while assembly language typically does not. My comment attempted to make the point that working in a low-level development shop is not as agonizingly slow and difficult as .NET programmers seem to think it is. If nothing else, those .NET programmers spend more time scratching their heads and looking at the "hourglass cursor" than their assembly language counterparts do. Beyond that, Microsoft has done a good job of conflating .NET with its languages. C# is not C; it does not run on a wide variety of hardware, and it does not seem to be used independently of the .NET Framework to any significant degree. Personally, I like .NET because of its development tools. Breakpoints, step-by-step execution, watches, Intellisense, etc. are all easily available right out-of-the-box.

                    G Offline
                    G Offline
                    ghle
                    wrote on last edited by
                    #135

                    _beauw_ wrote:

                    Personally, I like .NET because of its development tools. Breakpoints, step-by-step execution, watches, Intellisense, etc. are all easily available right out-of-the-box.

                    I don't understand what is so unique here. I work with a 25-year old KMAN language, has all of above built in except Intellisense. C, C++, Assembly have the same capabilities in their tools. And before you ask, because it's not broke, that's why. :-O It bothers me that every month MS is downloading .NET updates to Windows. And when the update doesn't work, you have to unload all .NET (per MS knowledge base), then start over with a reinstall, followed by all updates to date. That kills productivity for users and support staff.

                    Gary

                    _ 1 Reply Last reply
                    0
                    • G ghle

                      harold aptroot wrote:

                      Suggested replacement: return (x & (x - 1)) == 0;

                      Um, faster, more clear...

                      return (x & 0x01) == 0; // Powers of two can't have LSB set, cause that would be an odd number

                      Or better, why would this need a routine, consuming those wasteful machine instructions and wait states?

                      if 0 != x & 0x01
                      {
                      }

                      Gary

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #136

                      That is not even correct..

                      G 1 Reply Last reply
                      0
                      • L Luc Pattyn

                        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 Offline
                        G Offline
                        ghle
                        wrote on last edited by
                        #137

                        Luc Pattyn wrote:

                        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

                        Ah yes, but my compiler compiles your compiler. :)

                        Gary

                        1 Reply Last reply
                        0
                        • L Lost User

                          That is not even correct..

                          G Offline
                          G Offline
                          ghle
                          wrote on last edited by
                          #138

                          harold aptroot wrote:

                          That is not even correct..

                          Um, I think it is, unless I am missing something. Powers of 2: 1,2,4,8,16,... :-O Oops, not even/odd. My bad. I stand corrected. I shall delete my post. Duh. Guess I shouldn't code at 3:30 AM. [Edit: 1,2,4,... not 0,2,4,... I'm going to bed now. :zzz: ]

                          Gary

                          modified on Friday, December 3, 2010 4:00 AM

                          1 Reply Last reply
                          0
                          • L Lost User

                            In languages like C, C++, C#, Java etc you still "have to" know how numbers are represented - ok you might get away with ignoring issues like that, but then your code is likely to suck. Such as this, I never want to see this, if I see this I will tell you in your face that you suck and I will tell your boss to fire you:

                            bool IsPowerOf2(int x)
                            {
                            for (int i = 0; i < 32; i++)
                            if ((int)Math.Pow(2, i) == x)
                            return true;
                            return false;
                            }

                            And yes, I saw that one in the wild. Suggested replacement: return (x & (x - 1)) == 0; edit: the replacement treats 0 as power of 2, of course, usually not a problem in my experience and easy enough to change.

                            G Offline
                            G Offline
                            ghle
                            wrote on last edited by
                            #139

                            harold aptroot wrote:

                            Suggested replacement: return (x & (x - 1)) == 0;

                            Had to rethink this one. I think wiki algorithm won't work for maximum negative int number. Subtract 1 from it and you'll end up with zero (plus overflow), passing the test with an incorrect returned result.

                            Gary

                            L 1 Reply Last reply
                            0
                            • G ghle

                              harold aptroot wrote:

                              Suggested replacement: return (x & (x - 1)) == 0;

                              Had to rethink this one. I think wiki algorithm won't work for maximum negative int number. Subtract 1 from it and you'll end up with zero (plus overflow), passing the test with an incorrect returned result.

                              Gary

                              L Offline
                              L Offline
                              Lost User
                              wrote on last edited by
                              #140

                              That's true, however even with 2 special cases for 0 and int.MinValue, it's still a heck of a lot better than a loop with Math.Pow (which, btw, is super inaccurate)

                              G 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?

                                S Offline
                                S Offline
                                Steve Naidamast
                                wrote on last edited by
                                #141

                                You're right! Let's just chuck the whole thing and start over... :) :-D

                                Steve Naidamast Black Falcon Software, Inc. blackfalconsoftware@ix.netcom.com

                                1 Reply Last reply
                                0
                                • L Lost User

                                  That's true, however even with 2 special cases for 0 and int.MinValue, it's still a heck of a lot better than a loop with Math.Pow (which, btw, is super inaccurate)

                                  G Offline
                                  G Offline
                                  ghle
                                  wrote on last edited by
                                  #142

                                  harold aptroot wrote:

                                  That's true, however even with 2 special cases for 0 and int.MinValue, it's still a heck of a lot better than a loop with Math.Pow (which, btw, is super inaccurate)

                                  Harold, you are absolutely correct. I had an Oh-My-Gawd moment when I saw that original logic. Reminds me of a programmer - previous experience was IBM-Assembly - that was given to me for a good-sized project. He would get his work done, but he would struggle. I took time to review his code one day. The man started by writing 90% debug code in his logic, then commenting - I mean GoToing around - his code as he got it to work. Nothing but a pile of garbage. I think someone didn't do their due diligence before hiring this guy. [ What is your experience? IBM-Assembler! You're hired. ]

                                  Gary

                                  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?

                                    M Offline
                                    M Offline
                                    mbb01
                                    wrote on last edited by
                                    #143

                                    Simply put, .NET environment provides so much support that you don't really need to worry about a lot of the low level stuff most of the time; rather you can spend your mental engeries on actually delivering a product.

                                    1 Reply Last reply
                                    0
                                    • G ghle

                                      _beauw_ wrote:

                                      Personally, I like .NET because of its development tools. Breakpoints, step-by-step execution, watches, Intellisense, etc. are all easily available right out-of-the-box.

                                      I don't understand what is so unique here. I work with a 25-year old KMAN language, has all of above built in except Intellisense. C, C++, Assembly have the same capabilities in their tools. And before you ask, because it's not broke, that's why. :-O It bothers me that every month MS is downloading .NET updates to Windows. And when the update doesn't work, you have to unload all .NET (per MS knowledge base), then start over with a reinstall, followed by all updates to date. That kills productivity for users and support staff.

                                      Gary

                                      _ Offline
                                      _ Offline
                                      _beauw_
                                      wrote on last edited by
                                      #144

                                      I was just trying to answer the original question (why I like .NET) after spending a couple of paragraphs basically relating the opposite (why I do not). But that's a good point; the interactive debugger definitely did not originate with .NET. I would go on to say that it also did not invent (or even improve upon) the idea of automatic garbage collection. The update problem bothers me, too, as does the fact that .NET and Visual Studio seem to be getting needlessly flabby. I recall migrating a WPF project from VS 2005 to VS 2008 during development, for example, and watching IDE memory usage more than double. The sad thing is that I was hoping for specific bug fixes that didn't end up getting included (e.g. designer support for ViewBoxes, which I know to be an easy fix for Microsoft.) None of this is to say that I hate .NET; it does have some problems, though.

                                      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?

                                        F Offline
                                        F Offline
                                        freenky
                                        wrote on last edited by
                                        #145

                                        Probably you ask yourself why all the ppl here make fun of this thread, well more or less :D. The answer you are seeking for would be a document of about 200 pages with brief descriptions of all the advantages, disadvantages and all the other elements that come with development like the community. Long story short: when you experience a few environments and a few companies and try solving complex problems in each environment then and only then you will get an answer to your question. Regards, Sanjin.

                                        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?

                                          J Offline
                                          J Offline
                                          jschell
                                          wrote on last edited by
                                          #146

                                          b_dunphy wrote:

                                          I have some limited experience with C# and VS 2008 and I don't understand why the .Net framework is so popular.

                                          What makes you think that it is "popular"? How do you define that term? The only data I have seen that seems realistic in terms of the commercial space is the following. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html[^] In terms of that C# is going up but VB is going down. Thus .Net as a group over time has remained basically flat.

                                          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