DEV Community

Cover image for Start to .Net Technologies
Nitish Prajapati
Nitish Prajapati

Posted on

Start to .Net Technologies

Microsoft .Net Framework has been truly Better for Web Development.
.Net Framework Includes LINQ,ASP.NET, ADO.NET, CLR(Common Language Runtime).
C#:-
C# is a general-purpose, multi-paradigm programming language encompassing strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.
Pros and Cons of C#:-

  • Easier to learn than c++
  • Easier to read code than c++
  • More rapid and potentially less error-prone development than c++ or java (you have unsigned types, you have ref/out, you can make your own value types, you have other useful things that java omits which means you have less jumping through hoops, which means less unnecessary code complexity).
  • All things are passed by reference except for value types, by default
  • Garbage collector cleaning up objects once they're no longer used, so you don't have to manually track everything yourself The program is compiled to native binaries optimized for the platform when it is run (and yet it ran slightly slower than c++ code).
  • Easy to make multiple threads Have a variety of means of suspending threads to wait for signals and such lock(someObject) { code }, which is kind of like java's synchronized but can be used anywhere and requires an object. P/Invoke is much easier to use than JNI - but we probably wouldn't use it since we want to be cross-platform Has an excellent free IDE (visual c# express) - but on windows only (see cons).
  • You can make value types, which are by default pass by value instead of pass by reference, by making a struct instead of a class.
  • You have 'ref' and 'out' keywords which allow you to pass a reference to a parameter to a function, without meaning that the parameter must be assigned by the function before it returns. Essentially, ref/out allows the function to modify the variable being passed as the parameter, like passing a reference in c++. Fairly cross-platform with mono, and/but mono is still improving Has unsigned integers (so does c++, java doesn't) If the program crashes, it pops up a dialog telling the user wherein the code and why (on windows) or writes a stack trace to the console (with mono if run with --debug). Programs are compiled to .exe files, and don't need to be recompiled for other OSes - mono can directly run .NET exes. Cons:

Uses more memory than c++

  • Garbage collector using CPU cycles and memory - (but barely any, at least CPU time) Some things don't work in mono - calling functions in some windows dlls which won't exist on Linux, mono implementation of windows forms need workarounds in code (but we probably won't use them) Mono isn't perfect yet
  • Have to use .net 2.0 for generics (among other things), 1.1. doesn't have them. Can't use anything newer than 2.0 because 3.0 and up drop support for Windows 98, ME, and maybe 2000. Can't declare functions synchronized
  • No good IDE on non-windows. Eclipse has a c# plugin but it might not support most of Eclipse's features.
  • No pointers, but they're replaced by the ref and out parameters, so they're not needed much
  • Calling methods via delegates are significantly slower than normal method calling (or function pointers in c++, presumably) Requires the (correct version of the) .NET framework to be installed to run the program, which is several hour downloads on dialup.

This is some Terms we should keep in Mind Before Starting for .NET Technology.

Top comments (0)