![]() |
Why is everyone .NETing?
I see people using .NET languages all the time. Why are they so popular? Is it because .NET is so good? Or Microsoft's propaganda? Or because they teach them in schools? Why do they use .NET for teaching programming?
|
I use .NET because it's better for Windows development than any of the alternatives. Yeah, there's propaganda, but the reality is that .NET is a great platform to work with. I'm not sure about teaching though. I thought schools were still into the Java craze.
|
My programming teacher taught VB.NET because it was easy to develop the GUI and it had good debugging tools and stuff. I guess it made programming easier for others to understand and it practically codes itself as you type. I didn't like it, so I'm an exception.
|
I believe that Microsoft it pushing .net as the number one platform to develop windows apps on, so its is probably a good idea to have a basic understanding of what it is.
It abstracts the programmer away from the complexities of low level programming that C++ allows. This is its main advantage and disadvantage. It is nearly impossible to cause a buffer overrun or to have a memory leak in a .net app. On the down side the execution speed is reduced slightly and significantly significantly on the first run. This is due to the JIT compilation of the .net assemblies, whereby the first time a method is called it is converted form MSIL to x86(or whatever). If you call that method again it will be already in x86 machine code so will run nearly as fast as C or C++. Also there is the non-deterministic nature of the garbage collector. You can never tell when it will sweep unless you explicitly cause it to run. So it is defiantly not suitable for real time applications. The other advantage is that .net assemblies can work together no mater what language they were written with. So you can use a class written in VB.net in a c# app. As long as your .net compiler outputs assemblies that are correct and conforms to the common language specification (CLS) you code will work seamlessly with any other .net language. There is also the fact that the .net base class library is very rich. Even if functionality is not there it is very easy to call a native C function such as Beep. This is one area that Java lacks horribly. When java was originally designed they thought that by creating a rich set of standard libraries people would never want to call C code, and this is not the case. It is not very simple to use JNI(the system to call C code form Java) and is the source of some very subtle bugs. Also there is the fact that C# was designed by Anders Hejlsberg, the same person that wrote Turbo Pascal and designed Delphi. c# is a very easy to learn language that is very expressive. I personally prefer C# over Java or VB.net for RAD programming. |
Quote:
Quote:
That said, C# still has some legacy cruft it's dragged from C++, and its type system is rather primitive. All static languages lack some flexibility when one compares them to dynamically typed languages, but this can be mitigated with a sufficiently advanced type system, which C# rather lacks. |
I really agree with Tim, and the .NET is where the money is, I think that all of us are studying, learning to make money, and .NET is coming in the scene because .NET can be perfect in data driven application that can be used to create a very large business applications, and you can create them fast because it allows everyone to design their forms not _write_ forms, but of course its not as easy as it looks at the first sight because it has its own complexity, because you must write what will go on behind a button, form load etc. Also .NET allows C/C++ programmers to write unmanaged code in their methods, properties, classes etc. using unsafe keyword.
|
Competly agree Arevos.
One thing that really gets me is that MS tie a .net release to a version of Visual Studio. This means if you want to develop .net 2.0 apps using Visual Studio you have to upgrade to 2005. I can see the business sense behind this but it does not help developers migrate to newer versions of .net. One thing that saddends me is that there is this move away from programming native (as MS call it) code. If you teach someone java or some .net language they dont have to worry about the complexities of the platform. There is no need to teach about memory management or pointers(though in c# pointers are still present). This is all brought about though the use of a managed runtime. This is all great but the memory and cpu overhead it produces makes me want to cry. In Delphi(win32 version) I can create a VCL app that when running uses about 5MB of ram, but when the same app is ported to .net it consumes over 25MB of memory and is noticably slower. There are some people that say that this memory overhead is the price we have to pay for RAD and secure programs, but Delphi can do RAD and it is possible to create secure programs easily using it, yet it is fading away. I dont understand it, is it just because some people believe the average programmer is completly incompetant and cant be trusted with pointers and memory management? Or is it just the marketing departments of companys such as MS and Sun telling us to use these technologies? |
Quote:
Currently, I have to put up with this: :
Whilst in 2.0 I could do this: :
:
It's still got some way to go before it gets to the same level of expressiveness as Haskell, however: :
parseFields = map trim $ split delimiterQuote:
The other reason is ease of use. Computers are used to do all the tedious mental tasks that we don't want to do. We use spreadsheets to add up changing columns of numbers rather than add them up by hand, and databases instead of filing cabinets to keep track of large amounts of data. Higher level languages are merely an extension of this ideal. Why should I have to worry about memory management, pointers and primitives when I can let my computer deal with it? If you think about it, letting computers handle memory management and other low level concepts is little different to letting computers compile code into executables, rather than writing the machine code ourselves. Sure, a clever assembly hacker might be able to write assembly more efficiently than a compiler could, but a compiler saves time, and allows us to write larger and more complicated programs than we otherwise could. Abstraction is a trade off between efficient use of the programmer's time, and efficient use of the computers time. Computers double in speed about every two years, whilst humans do not. Thus, it would seem to me as if computers would be the more logical choice to deal with any efficiencies, rather than human programmers. |
Quote:
I can do more, faster, with much less effort. Sure, I despise ugly, crappy, inefficient code, when better is merely a matter of additional thought. I bitch about slugs at the keyboard, not at the machine or its languages. The trade-off is too valuable. |
I like using C# and .NET 2.0.
This is because C# is the only programming language (besides PHP) that I can actually accomplish projects in. I have tried almost every language under the sun, and have had trouble developing decent applications. In C#, I was able to complete a full GUI program that allows a user to fill out forms, and then writes the form data to a .txt file. The file was then sent to an e-mail address using System.Net.Mail. Despite building the GUI parts in Visual Studio, I wrote the mail and file writing features. Just by looking at the code, I can see how it works quite easily. It also helps that Visual Studio has excellent documentation, even while you are writing code (The auto complete feature allows me to browse what I'm looking for right away). I have yet to find an IDE like this in python. |
| All times are GMT -5. The time now is 1:30 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC