Why is .NET so popular? (Serious Question)
-
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?
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. What am I not seeing here?
It is. .Net is a library/framework, and it's popular because it works and has the kinds of flexbility developers need. It also easier to learn and use than MSs previous GUI frameworks. C# is a language. Near as I can tell, its popular because Microsoft, wanting to out-compete Java, told us developers to like it. Its slow and a bit buggy with some half thought out features built right into the language and others designed into the Visual Studio IDE. If it weren't for the .Net library, I'd have no interest in learning and using it. Of course, as things stand now, whatever the reasons, it has become a resume prerequisite.
patbob
-
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?
Does anyone ever give serious answers to these questions, or is this the humor page? And how would I know if an answer to this question that made me laugh was a serious answer? .NET is designed NOT to be cross platform. It is designed to create lock-in to microsoft OS products. That said, it is a very extensive, very complete library on microsoft products. People like it because it is effective, once you buy into the OS lock-in. It's more efficient at run-time than many Java things, partly because it's a thin wrapper over windows C libraries. C# does have some language features that Java doesn't have, if you care about such arcana. And the microsoft IDE is rich, fast, and stable. What's not to like, except for the lock-in?
-
.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.
Comparing .NET to MFC is like comparing apples to poisoned gruel with bits of glass splinters and rusty nails in it. The time I worked with MFC is what I consider my 'dark age of programming'. If you've read The Pillars of the Earth by Ken Follet, the pains Follet's characters go through does not seem that dissimilar to my pain when programming with MFC. Or maybe I should say against MFC. ... Although, when I think about it, OLE was even worse! :cool:
-
John Simmons / outlaw programmer wrote:
Why did the farmer cross the road?
To milk the bull with bear hands and earn a man points.
There is only one Ashley Judd and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
wouldn't that be 'bear paws'? ;P
-
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?
I have noticed that on average the time it takes to develop a Win32 app using .Net is about half of what it is with other technologies. The simple answer is I can get more done faster. In the rare case where .Net performance isn't up to the task, I can write specialized functions in C and put them in a Dll and use P/Invoke to execute them. It is very similar to Java, but Java is built to run on every platform and because of this doesn't perform as well.
-
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?
Boy, this thread, started to answer a simple question, is starting to look all too familiar. Look. people will always use the language that they like most and/or best suits their situation people will use the languages they know best people will always find ways of telling people that their choice of language/architecture/hair tonic is better than yours and that you are stupid/lazy/bald people will always come to threads like these to vindicate themselves and rationalize the use of their own preferred language, or just to bash the other side. people will always take a side and selectively listen to only the arguments that support their choice, blocking out all the others with ridicule and high-fallutin talk People will always be mac vs. pc (i'm not talking about actually liking one over the other, just the mindset. Red vs. blue, left vs. right, its all the same). It's human nature guys, lets all work together and make the world a better place, rather than split ourselves up and hate each other for what makes us great, our ability to think for ourselves.
-
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.This is only a good replacement if you also leave a comment describing what this does and why it works. I hate "cute" code that you have to think about for a long time to figure out what it is doing.
-
_beauw_ wrote:
it will also never present me with one of those head-scratching, out-of-the-blue errors that make it so difficult to work with high-level frameworks
The language and the framework are two different things. And you can use external code with assembly as well. Heck, you can make use of .Net DLL's using assembly. In which case you'd get that same "Failed set trust point in ssl context" error. The language itself is not really too much of an abstraction, but the amount it helps productivity is huge.
> 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.
-
i consider my reasons for saying such to be based on solid technical grounds you, however, add nothing to the discussion other than a personal attack based upon your undisclosed technical knowledge and unknown political agenda so i think /ignore is a good way to respond to you thanks for playing tho
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
He's right though ... unless you explain it in terms of your technical objections rather than just a simplistic generalization.
-
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.)
EXACTLY!!!!! OMG - My MANTRA! - Edit: LOL (nth degree version): Everything else is BLOAT!
Know way too many languages... master of none! I'm just another artist navigating the technical shark infested waters trying to find digital serenity!
-
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?
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
-
apologies if i misunderstood you i thought you were saying .NET was a good way to write web apps if you were saying it is better than using c++ then i would probably agree if you are saying it is "a good way" to write them i stick to my original opinion microsoft do not understand the web ... do not appear to want to understand the web ... and keep trying to get proprietary tools adopted (and failing miserably) ... in short they suck at web and should stick to what they do best, which is (i think) desktop apps nd frameworks if i sound jaded maybe it's because i have had to spend a lot of time using IIS and .NET for web and frankly it's crap
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
I like what you wrote but this bit: "if you were saying it is better than using c++ then i would probably agree" I would just disagree... but... based on my love for closer to the CPU/leaner style of coding. I think Scripts and JIT are "tools" but I think bits pouring through a oscillator that exercises logic on bit patterns being retrieved and stored in ram or device IO push/pull as being viable for speedy systems... Everything else - adds a layer - a layer who may or may not truly be advantageous... each scenarios different... but the lag I see when JIT does its JIT - STINKS! Worst times - Java? I love when Java jocks say they compile their code - all they do is "P" on it[edit:] They only Pre-Compile (P-Code) code to a Tokenized state which does allows for generic dispatch programming at the lowest level but this too is another layer albeit necessary for "p-compile once - run anywhere". This is actually why I think FreePascal is the best thing going because it combines all the benefits of a mature OOP and other paradigm capable language like C/C++; it compiles to pure binary like C/C++, it compiles faster than c++ because it uses a completely different organization of application code and data so ... it's simply easier/faster for the computer to turn source into machine code.
Know way too many languages... master of none! I'm just another artist navigating the technical shark infested waters trying to find digital serenity!
modified on Friday, December 3, 2010 3:35 AM
-
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
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!.
-
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!.
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.
-
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?
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.
-
> 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.
_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.
-
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?
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.
-
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?
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.
-
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.
-
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.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