The Overview of .NET Framework And Salient Features
Most of the .NET functionalities are provided via managed types. These managed types are organized in hierarchical namespaces. .NET framework contains thousands of types and the number is prospering with every passing day as more and more developers are contributing towards expanding the language library. This article sheds light most important features and types included in the .NET framework 4.5. We will briefly explain the most important C# types and where they reside in .NET framework. Then we will discuss some of the application type that can be developed with .NET framework. Along with the technology types that can be used to develop those applications. But first, let us start with .NET features.
1. System Types
The most basic and fundamental C# managed types are located inside the System namespace. This namespace includes the base classes Enum, Delegate, Array, Exception, DateTime, TimeSpan, Nullable, Guid and Type. The System namespace also contains Convert and BitConverter class for performing conversion between various managed types. Other important classes stored in the System namespaces include Math class for performing mathematical functions and Random class for generating random numbers. And last but not the least, System namespace also include GC class and IDisposable interface that are used for garbage collection purposes in C#.
2. Collection Types
C# and .NET framework contains collection types that are used to store and managed large collection of items. These types can store collection of data in list based structure as well as dictionary based structures. Apart from that, several interfaces are also available that help customize out collection of data. Following are the major namespaces that are used to store collections of data.
3. Text and String Manipulation
Text and string manipulation is also a routine task in any software application. .NET frame contains System.Text namespace that contains types to perform these functionalities. StringBuilder class is a mutable string class that is used to generate editable strings. In addition to that it also contains classes for working with encoded text such as UTF-8.
Another important namespace is System.Text.RegularExpression; this namespace includes classes that allow complex pattern based search in text and text replacement.
4. XML Generation and reading
XML documents are extremely important part of any software application due to its portability. .NET frame have dedicated namespaces that contain types that are used to generate, interact and read XML. Following are some of the important XML namespaces in this regard.
LINQ stands for language integrated queries and was introduced for the first time in .NET framework 3.5. LINQ is used to execute type-safe queries over the .NET collections and SQL Server Tables. A great benefit of using LINQ for querying collections and databases is that it contains a common interface in various domains. Classes useful for performing LINQ queries reside in following namespaces.
.NET framework contains several classes that help in code diagnostics and analysis. Debugging alone is not enough for debugging the code. Therefore, .NET framework contains namespaces dedicated to diagnostics, error logging and code analysis. The most commonly used namespace in this regard is the System.Diagnostic namespace.
7. Streams and File handling
Often times during development, you come across situation where you need to read and write data to a text file or a network connection. .NET framework doesn’t leave you alone in such scenarios. It contains specialized namespaces that contain classes for interacting with files and streams. These classes allow you to write and read streams of data from files and networks. Namespace which is most importantly used for this purpose is the System.IO namespace.
Multithreading is a self-explanatory terms. Modern day applications make use of the multi-core processor and for that purpose several programming features have been developed. Threading is one of those features that allow multiple program and different parts of a single program run on a multiprocessor hardware machines. .NET framework contains namespaces which have classes that can be used for multithreading in programs. These classes are located in System.Threading and System.Threading.Tasks namespaces. Using the types in these namespaces it is extremely simply to develop multithreading application because these classes hide the complexities of the interaction between our program and underlying multiprocessing hardware.
9. Networking Types
Almost all the modern applications make use of the network somehow. Be it a desktop application or a web based application. It is usually imperative for an application to access and interact with the network. Like all the modern software development platforms, .NET framework also provides specialized classes to interact with the network protocols such as HTTP, TCP/IP and FTP and SMTP. Following are some of the namespaces that contain types for interacting with the network and performing simple functions as downloading file using browser, sending mail etc etc.
While transferring data between distributing system through communication technologies such as WCF, Remoting or Web Services, we need to convert object into binary or text representation from the sender’s end and then we have to again convert this binary data or text representation into actual object form. This process is called serialization. Serialization might not look complex to you and the fact of the matter is, it is actually quite complex. However .NET framework has made it simple for developers by providing built in types that allow you to serialize and de-serialize the data. Following are the namespaces that include types for serialization purposes.
In our article on dynamic binding, we explained how we can make use of the System.Dynamic namespace to resolve types dynamically and attach method to the type during runtime. This allows us to compile the code even if compiler doesn’t find the corresponding method in the type. .NET framework has this capability of invoking methods via dynamic language runtime. For this purpose, the namespace which .NE framework uses is the System.Dynamic namespace.
12. Assemblies and Reflections
When a .NET code is compiled, assemblies are generated. An assembly is a kind of code package of compiled code (Referred to as MSIL or Microsoft Intermediate Language) and metadata. Metadata basically stores information about the compiled code i.e It stores information about the types, the members and attributes associated with that type. Sometimes you need to look into code on the fly, .NET framework has a special feature to achieve this functionality which is known as reflection. Reflection allows us to look into the code inside the compiled assembly and invoke the methods dynamically. Also, new code can be added to the assembly using Reflection.Emit.
Following are the namespaces in .NET that contains types related to reflection in .NET.
Security of the application has always been at the top of the priority list of the developers. .NET frame contains security classes that provide advanced security apart from the machine dependent security mechanism. .NET frame allows you to limit access to your code; it also allows you to decrypt your code so that it cannot be intercepted by any unauthorized entity. For this purpose, .NET framework contains specialized namespaces that contain dedicated classes for security purposes. Following are those namespaces.
In .NET framework you can further organize your application within a process with the use of application domain. Application domains are basically a way to provide a layer of isolation within a process where you can perform a specific task such as unit testing within a process without affecting other parts of the process. .NET framework also provides a way to interact with these application domains via remoting.
|All times are GMT +5.5. The time now is 13:45.|