Why is .NET so popular? (Serious Question)
-
The question is wrong. It should be "Why is the old stuff so unpopular". If you have ever hunted down memory bugs in C++ or done COM+ or uh(!) oh(!) try to do useful things with hosted IEControls....or the ATL/MFC mess ......shudddering when I think back.... Try parse a XML document in native code (what ever level of "native" you mean with that) In .Net you code a lot faster. => Mo Money, Bro !!!
Hehe, it depends.. Here is my C++ code for parsing some simple XML with obstacle information for the map:
bool ObstacleXMLLoader::LoadFromFile(std::string file, std::vector &data)
{
this->m_data_out = &data;
m_data_out->clear();struct XmlStateMachineScriptCommand script \[\] = { XML\_NODE("@TOP"), XML\_NODE("@obstacles", XP\_SKIP\_UNKNOWN), // skip the tags like coordinate\_system and bounding\_box XML\_TRAN("@TOP", ELEMENT, "obstacles", "@obstacles"), XML\_TRAN("@obstacles", ELEMENT, "point", "@in\_obstacle", boost::bind(&ObstacleXMLLoader::\_StartObstacle, this, ObstacleXMLLoader::POINT)), XML\_TRAN("@obstacles", ELEMENT, "line", "@in\_obstacle", boost::bind(&ObstacleXMLLoader::\_StartObstacle, this, ObstacleXMLLoader::LINE)), XML\_TRAN("@in\_obstacle", ATTRIBUTE, "height", "", boost::bind(&XMLAttributeParser, "height", \_1, &m\_to\_be\_filled.height)), XML\_TRAN("@in\_obstacle", ELEMENT, "coordinate", "@in\_coor"), XML\_TRAN("@in\_coor", ATTRIBUTE, "lat", "", boost::bind(&XMLAttributeParser, "lat", \_1, &m\_current\_coordinate.y)), XML\_TRAN("@in\_coor", ATTRIBUTE, "lon", "", boost::bind(&XMLAttributeParser, "lon", \_1, &m\_current\_coordinate.x)), XML\_NEND("@in\_coor", boost::bind(&ObstacleXMLLoader::\_PushCoordinate, this)), XML\_NEND("@in\_obstacle", boost::bind(&ObstacleXMLLoader::\_FinishObstacle, this)) }; return BaseXMLLoader::LoadFromFile(file, s\_machine\_name, sizeof(script)/sizeof(script\[0\]), script);
}
Note this is SAX parser being able to process 25Mb XML in 4 seconds three-year old machine.
-
Pete O'Hanlon wrote:
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 meant Microsoft could have just as easily provided all of it as native code, as could anyone else in theory. Why do people tolerate a VM rather than just demanding Microsoft provide it as native code? It is just for the Garbage Collection or what?
The underpinnings of .NET are the CLR and CLS. These are key features that mean you can use a wider variety of languages than you currently can with the same framework. That's why the VM is so important - it's the environment that makes this all possible.
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
-
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'm going to go with: It requires less anal attention to detail combined with the general incompetence of a human being. I see the same weird behaviour in .NET that I've seen in 30 years of coding using non OO compilers. This started when I was at WASU, taking a COBOL class. My printout was messed up in the middle with some weird characters. I spent hours going over my code trying to find my logic problem. I took it to my prof, he suggested I run it again. Since it took one day to turn in the punch cards and wait for someone to feed in the cards and then get a printout, I didn't like that option, but used it. Perfect printout. I currently don't have VS for C#, so I'm compiling C# using line commands. I don't know how to get into the debugger through csc, so I was debugging the old fashioned way: putting write statements in the code to try and trace the problem. Of course, adding the write statements removed the problem. I prepared to see the problem reappear when I removed the write statements, but it didn't. I have a long history of putting write statements in and finding the problem, not finding it and when the statements are removed either the problem reappears or doesn't. When it doesn't fix the problem and I still don't see the problem with my code, I've added a new variable, set it to a value and the problem disappears. Of course, in earlier code you could overindex an array and rewrite the machine code so you have no clue what caused the code to try executing nonsense. It's possible the variable I added, protected the machine code and fixed it that way.
-
I only did any assembly at Uni, but really enjoyed doing it. No-one else in the class (it was a crap course at a crap university) could get to grips with it at all, to the extent that the lecturer gave everyone his solution. He marked mine wrong simply because it was different to his, then I pointed out that not only did my solution work, it was more efficient than his was.
Every man can tell how many goats or sheep he possesses, but not how many friends.
Yeah, them lazy lecturers... I remember I didn't get any points on one particular solution I wrote because I was feeling too lazy to calculate the exact amount of memory needed for a buffer and just used a sufficiently big number instead. The rest of the solution was just fine and quite probably better than the suggested solution, but it was different and the lecturer was too lazy to check past the arbitrarily sized buffer whether the rest was any good :omg: You might argue that you shouldn't waste resouces and therefore the lecturer was right to not accept a solution that wasted memory needlessly, but in truth I was quite aware of the resources at hand and considered the time resource I had available to finish the test to have a higher priority than the memory for some fictional program that no one would ever run. ;) On a side note, Assembler was my second computer language after Pascal. I believe that was a pretty good way to get introduced to computer languages. Unlike some fellow students who had delved into C=64 BASIC before I learned structured programming and good programming practices from the start, no chance for any bad habits to creep into my style. Later I also got into touch with BASIC, but decided right away that I wouldn't touch it with a long stick. I understand that today's variants of BASIC are much better structured, but I still don't feel any urge to try it out...
-
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"
-
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 is not as popular as one would think. The most popular web tech is PHP. .NET is probabaly the second or the third. I think its popularity is due to Microsoft technology in whole rather than .NET. Anyone doing software development using Microsoft previous technology (C++, Visual Basic, ASP, etc.) automatically switches to .NET.
TOMZ_KV
-
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?
-
l a u r e n wrote:
.NET is the antithesis of what the web is about
Pulling ideology into a technical argument is, at the least, unprofessional. It is unfortunate we see it happen so often nowadays..
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"
-
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?
First off, unless you are writing in microcode, maybe even picocode, you haven't been writing 'native' code. If the oldest CPU you wrote assembler for was the 8086 you probably haven't written 'native' code. If you are writing code for the Win32/64 system you haven't been writing to the 'system', you've been targeting OS level APIs that have been working with the system. Expect to see more languages that target a virtual processor, it's the only way to have a chance of getting a single binary to work under multiple OSes. Most of the popular web languages target a 'virtual processor', consider perl, javascript, PHP(?), those are 'interpreted' languages. C#, Java, UCSD P-System, many BASICs, all run on a 'virtual' processor, they could be called interpreters as well. The native vs. non-native binaries is a non-issue unless your doing embedded work, even your C compiler isn't targeting the metal. Yes, you can say 'but I'm closer to the metal' but the better interpreters use JIT compiling to get better performance. Eventually the difference between the JIT and pre-compiled will be nil. So the answer as I see it is, marketing. Of course it helps that MS bought the guy who designed Delphi away from Borland to design C#. Properties were a pain to implement in C++. :-D
-
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?
OK here's a serious answer. I've been developing software for 35 years or so. I think .Net is popular because it's a good and consistent platform that targets the largest installed base of computers on the planet. I'm not a web development expert but have done some work with it and find that it is a solid and competent platform for developing web-based applications as well. Knowing very little about web development I and VS2008 were able to build a very functional application on the web in fairly short order - with database access and fairly consistent GUI - and it worked well. I don't care for web development but it's obvious to me that doing so with .Net works well. All this in one box. Multiple languages, both Windows and Web development. Great IDE. Vast, rich library of code and classes that let you do just about *anything*. Relatively inexpensive price of entry as professional tools go. (If you think software tools are expensive, try setting up a body shop and seeing what it costs to equip it). I'm not an MS Shill (They don't pay me a dime) but I have been using their technology since Bill Gates started the thing. I know excellence when I see it - and .Net is excellent, IMHO. I love doing development work but I frankly don't have the time (or bandwidth) anymore to just fool around. I resisted moving to .Net for a number of years but now that I've spent a year working only with VS it's obvious to me that this platform has everything I need to pull off the product I'm developing. -Max
-
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?
Visual Studio, WPF GUI (or 3rd party win forms Gui), C# is easy to learn yet powerful. You don't need your code to be the Fastest. It just needs to be fast enough. When I look for (Free) help on open source languages the documentation is not there, the help is either too general or too complex. I find the mindset of the open source world to be "if your not at a 401 experience level then come back when you are" Microsoft has alot of 101, 201, 301 college level material available free. Open source seems to have 101 & 401 levels available. I find it too time consuming to make the jump with out paying someone. Also I discover Frameworks with intellisense. Open Source says real programmers don't need intellisense (text editor and command line is the way to go). Yes I am stereotyping. Honestly I would love to up my experience level of Java, Ruby, Python etc... from 101 to 401 but my kids would then hate me because they would never see me.
modified on Thursday, December 2, 2010 9:51 AM
-
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?
Ten years back, I had written my own windowing system using C helped by a great book by Al Stevens. Later I ported the whole framework to c++. This framework I built from scratch, contained about 5% assembly and the rest C/C++. This was during my college days and it was one of the most fun things I have done. I used this framework all through my college life and then in a project at my 2nd job too. However today the IT world is vastly different. My customers want applications with 75 windows and 1000s of windowing components like buttons (simple) and calendars (complex). And I don't want to sit with my framework I wrote 10 years back and add up new components as the need arises. Even if I claim to be the best programmer in this world, I cannot maintain a quality component better than what the creators of Java or now .NET do. Not to mention the upgrades and loads of free and paid components I can buy off the shelf. .NET in short is an enterprise development environment. Another reason for its popularity is the best of its kind coding platform like Visual Studio (2010), which makes like so much more easier. If I want to create an accounting package or a POS system with a serial interface today, I can get started in a few quick steps. Looking low level, .NET lets a team of (say) 100 developers work on a single code base, without worrying if programmer Mr. John ComeLately has forgotten to "delete" a pointer, causing the entire application to fail. From experience I can say, that the program will work perfectly fine till you have that big demo with the customer, and then it crashes spectacularly with a run-tme pointer exception :). At a higer level, .NET lets me learn a few tools quickly and get productive in the shortest possible time. It lets companies quickly replace programmers who move on to bigger and better things, without letting the project suffer. These are some of the reasons why systems like Java and .NET are so popular in my opinion.
-
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.
Actually, MSN is .NET/WPF now, has been for a while. edit: er, I mean Windows Live Messenger ;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 believe that Microsoft has actually addressed the productivity issue head on, where Oracle with it's Java platform have not. Since cost of development is currently the foremost concern of management, it makes it almost a no brainer to choose the .Net platform. It's unfortunate that Java has not progressed the same way to provide a head on competition to Microsoft as I believe that would have furthered both platforms. I have extensive experience in both platforms and have to admit that for me, the winner is hands down Microsoft. They did their homework and continually improve the product based on what the customers are seeking. Sounds like a win-win situation to me.
mvarey
-
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?
If this question is truly "serious"...as I do see all the fun responses. Pure and simple...abstraction. Look at the evolution of software languages. We as developers need to continue to work faster, more efficiently and more effectively to implement business solutions with time-to-market in mind. I've view it as an evolution of development...where I don't need to write code to interact with the network stack, input/output of any kind, or other basic operations...since .NET provides this. In addition, there are a multitude of libraries to assist in tasks that could take a long while to implement. Sure, you could argue C++ and libraries...or any other language, such as Java, which was stated...yet...it's about making it easier for developers to build a business-centric solution faster and easier to maintain (hopefully if you designed it well). So, in short...abstraction from the system. As others joked...toggle switches to machine language to binary....to.... .NET. :D
-
Hehe, it depends.. Here is my C++ code for parsing some simple XML with obstacle information for the map:
bool ObstacleXMLLoader::LoadFromFile(std::string file, std::vector &data)
{
this->m_data_out = &data;
m_data_out->clear();struct XmlStateMachineScriptCommand script \[\] = { XML\_NODE("@TOP"), XML\_NODE("@obstacles", XP\_SKIP\_UNKNOWN), // skip the tags like coordinate\_system and bounding\_box XML\_TRAN("@TOP", ELEMENT, "obstacles", "@obstacles"), XML\_TRAN("@obstacles", ELEMENT, "point", "@in\_obstacle", boost::bind(&ObstacleXMLLoader::\_StartObstacle, this, ObstacleXMLLoader::POINT)), XML\_TRAN("@obstacles", ELEMENT, "line", "@in\_obstacle", boost::bind(&ObstacleXMLLoader::\_StartObstacle, this, ObstacleXMLLoader::LINE)), XML\_TRAN("@in\_obstacle", ATTRIBUTE, "height", "", boost::bind(&XMLAttributeParser, "height", \_1, &m\_to\_be\_filled.height)), XML\_TRAN("@in\_obstacle", ELEMENT, "coordinate", "@in\_coor"), XML\_TRAN("@in\_coor", ATTRIBUTE, "lat", "", boost::bind(&XMLAttributeParser, "lat", \_1, &m\_current\_coordinate.y)), XML\_TRAN("@in\_coor", ATTRIBUTE, "lon", "", boost::bind(&XMLAttributeParser, "lon", \_1, &m\_current\_coordinate.x)), XML\_NEND("@in\_coor", boost::bind(&ObstacleXMLLoader::\_PushCoordinate, this)), XML\_NEND("@in\_obstacle", boost::bind(&ObstacleXMLLoader::\_FinishObstacle, this)) }; return BaseXMLLoader::LoadFromFile(file, s\_machine\_name, sizeof(script)/sizeof(script\[0\]), script);
}
Note this is SAX parser being able to process 25Mb XML in 4 seconds three-year old machine.
Oh God that code is hard to look at. I've been doing quite a bit of C/C++ in the last few months for embedded and Windows programming, and it really hurts after working with C# almost exclusively for a few years. I suppose it's kind of "fun," but it takes so much longer to do everything that I just feel unproductive.
-
Actually, MSN is .NET/WPF now, has been for a while. edit: er, I mean Windows Live Messenger ;P
No, it is not! When I first saw it I thought it was WPF too. Then I researched a little more using Spy++ and Visual Studio. It turns out that it is not WPF or .NET.
-
No, it is not! When I first saw it I thought it was WPF too. Then I researched a little more using Spy++ and Visual Studio. It turns out that it is not WPF or .NET.
What makes you think it isn't? The only way Messenger can take up 40mb in task manager is if it is loading the .NET runtime, there is no way it's running native code with that memory usage.
-
What makes you think it isn't? The only way Messenger can take up 40mb in task manager is if it is loading the .NET runtime, there is no way it's running native code with that memory usage.
Mike Marynowski wrote:
The only way Messenger can take up 40mb in task manager is if it is loading the .NET runtime
LOL:) Easiest way to find that is through Spy++. If an application is written in WPF (or has .NET) you see specific window classes. Also, when you attach a debugger you will find that there is no CLR loaded into the Live Messenger process.
-
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.