0% found this document useful (0 votes)
13 views

NET Framework

Uploaded by

Dinesh R Balaji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

NET Framework

Uploaded by

Dinesh R Balaji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

.

NET Framework
C#
Introduction to .NET Framework
• The .NET Framework is a software development framework
developed by Microsoft
• It provides a runtime environment and a set of libraries and tools for
building and running applications on Windows operating systems.
• The framework includes a variety of programming languages, such as
C#, F#, and Visual Basic, etc.
• It supports a range of application types, including desktop, web,
mobile, and gaming applications.
The .NET Framework includes two
main components:
• The Common Language Runtime (CLR)
• The .NET Framework Class Library.
• The CLR is responsible for managing the execution of code written in
any of the supported languages, while the class library provides a
large set of pre-built functions and classes.
Advantages:
• .NET Framework is its support for a variety of programming
languages.
• This means that developers can choose the language that best fits their needs
and expertise
• The same set of libraries and tools provided by the framework.
• .NET Framework support for a variety of application types.
• The framework includes libraries and tools for creating desktop, web, mobile,
and gaming applications, which makes it a versatile choice for developers
working on a wide range of projects.
• The .NET Framework also provides a number of features that help
improve the security, reliability, and performance of applications.
• These include features such as code access security, automatic
memory management, and just-in-time (JIT) compilation, which helps
improve the speed of application execution.
• The .NET Framework is also designed to integrate with other
Microsoft technologies, such as Microsoft SQL Server, Microsoft
SharePoint, and Microsoft Office, which can make it easier to build
applications that work seamlessly with other Microsoft products
• .NET is a software framework that is designed and developed by
Microsoft.
• The first version of the .Net framework was 1.0 which came in the
year 2002.
• In easy words, it is a virtual machine for compiling and executing
programs written in different languages like C#, VB.Net, etc.
• It is used to develop Form-based applications, Web-based
applications, and Web services.
• It is used to build applications for Windows, phones, web, etc.
There are three significant phases of the
development of .NET technology.

• OLE Technology
• COM Technology
• .NET Technology
• OLE Technology: OLE (Object Linking and Embedding)
• is one of the technologies of Microsoft’s component document.
• Basically, its main purpose is to link elements from different applications with
each other.
• COM Technology: Microsoft COM (Common Object Model)
• enables various software components to communicate.
• COM is mostly used by developers for various purposes like creating reusable
software components, linking components together to build applications.
• .NET Technology:
• .NET technology of collection or set of technologies to develop windows and
web applications.
• The technology of .Net is developed by Microsoft and was launched in Feb.
2002, by basic definition, Microsoft’s new Internet Strategy.
• It was originally called NGWS (Next Generation Web Services).
Programming Languages which are
designed and developed by Microsoft are:
• C#.NET
• VB.NET
• C++.NET
• J#.NET
• F#.NET
• JSCRIPT.NET
• WINDOWS POWERSHELL
• IRON RUBY
• IRON PYTHON
• C OMEGA
• ASML(Abstract State Machine Language)
Main Components of .NET
Framework
• Common Language Runtime(CLR):
• CLR is the basic and Virtual Machine component of the .NET
Framework.
• It is the run-time environment in the .NET Framework that runs the
codes and helps in making the development process easier by
providing various services such as remoting, thread management,
type safety, memory management, robustness, etc.
• Basically, it is responsible for managing the execution of .NET
programs regardless of any .NET programming language.
• Framework Class Library(FCL):
• It is the collection of reusable, object-oriented class libraries and
methods, etc that can be integrated with CLR.
• It is just like the header files in C/C++ and packages in java.
• Installing the .NET framework basically is the installation of CLR and
FCL into the system.
Is the .NET application platform
dependent or platform independent?
• The combination of Operating System Architecture and CPU Architecture is
known as the platform.
• A .NET application is platform-dependent because of the .NET framework
which is only able to run on the Windows-based operating system.
• The .Net application is platform-independent also because of the Mono
framework.
• Using the Mono framework the .Net application can run on any Operating
System including windows.
• Mono is a free and open-source .NET Framework-compatible software framework.
• Mono framework is a third-party software developed by Novell
Company which is now a part of Micro Focus Company.
NET Version CLR Version Development tool Windows Support

1.0 1.0 Visual Studio .NET XP SP1

1.1 1.1 Visual Studio .NET 2003 XP SP2, SP3

2.0 2.0 Visual Studio 2005 N/A

3.0 2.0 Expression Blend Vista

3.5 2.0 Visual Studio 2008 7, 8, 8.1, 10

4.0 4 Visual Studio 2010 N/A

4.5 4 Visual Studio 2012 8

4.5.1 4 Visual Studio 2013 8.1

4.5.2 4 N/A N/A

4.6 4 Visual Studio 2015 10 v1507

4.6.1 4 Visual Studio 2015 Update 1 10 v1511

4.6.2 4 N/A 10 v1607

4.7 4 Visual Studio 2017 10 v1703

4.7.1 4 Visual Studio 2017 10 v1709

4.7.2 4 Visual Studio 2017 10v 1803

4.8 4 Visual Studio 2019 11

4.8.1 4 Visual Studio 2019 11

6 Visual Studio 2022 11


• Visual Studio is the development tool that is used to design and
develop .NET applications.
• For using Visual Studio, the user has to first install the .NET framework
on the system.
• Windows 8, 8.1, or 10 do not provide a pre-installed version 3.5 or later
of .NET Framework.
• Therefore, a version higher than 3.5 must be installed either from a
Windows installation media or from the Internet on demand.
• Windows update will give recommendations to install the .NET
framework.
Advantages of .NET Framework
• Multi-language support:
• The .NET Framework supports a variety of programming languages.
• Cross-platform compatibility:
• The .NET Framework can run on multiple operating systems.
• Large community:
• The .NET Framework has a large and active community of developers who have created a wide
range of resources, including libraries, tools, and documentation.
• Security:
• The .NET Framework includes a variety of security features, such as code access security and
digital signatures, which can help protect applications from malicious attacks.
• Productivity:
• The .NET Framework includes a large set of pre-built libraries and tools that can help developers
save time and improve productivity.
Disadvantages of .NET
Framework
• Windows dependency:
• Although the .NET Framework can run on multiple operating systems, it was originally designed for
use on Windows operating systems, which means that it may not be the best choice for cross-
platform applications.
• Large footprint:
• The .NET Framework has a large installation footprint, which can make it difficult to deploy
applications on systems with limited storage or bandwidth.
• Licensing:
• Some versions of the .NET Framework require a license, which can add to the cost of developing and
deploying applications.
• Performance:
• it may not be the best choice for high-performance applications that require low-level access to
hardware or complex algorithms.
• Learning curve
Basic Architecture and Component
Stack of .NET Framework
• CLR (Common Language Runtime) : It is a run-time environment
which executes the code written in any .NET programming language.
• FCL (Framework Class Library) : A large number of class libraries are
present in this framework which is known as FCL.
• Types of Applications : Mainly the applications which are built in .Net
framework is divided into the following three categories :
• WinForms : Form – Based applications are considered under this category.
• ASP .NET : Web-Based applications.
• ADO .NET : It includes the application which are developed to communicate
with the database like MS SQL Server, Oracle etc.
• It mainly consists of classes that can be used to connect, retrieve, insert and delete data.
• WPF (Windows Presentation Foundation) : Windows Presentation
Foundation (WPF) is a graphical subsystem Windows-based applications
• WCF (Windows Communication Foundation) : It is a framework for building
connected and service-oriented applications used to transmit the data
• WF (Windows Workflow Foundation) : It is a technology given by Microsoft
which provides a platform for building workflows within .Net applications.
• Card Space : It is a Microsoft .NET Framework software client which is
designed to let users provide their digital identity to online services in a
secure, simple and trusted way.
• LINQ (Language Integrated Query) : It is introduced in .Net
framework version 3.5. Basically, it is a query language used to make
the query for data sources with VB or C# programming languages.
• Entity Framework : It is open–source ORM (Object Relational
Mapping) based framework which comes into .Net Framework
version 3.5.
• It enables the .Net developer to work with database using .Net objects.
• It convert data from the Data Set to .NET objects or vice-versa.
• It allows the developers to work at a higher level of abstraction.
• Parallel LINQ (Language Integrated Query) : It comes in .Net Framework
version 4.0 and also termed as PLINQ. It provides a concurrent query
execution engine for LINQ.
• TPL (Task Parallel Library) : It is a set of public types and APIs. It allows
the developers to be more productive by simplifying the process of
adding concurrency and parallelism to .Net applications.
• .NET API For Store/UWP Apps : In 2012, Microsoft added some APIs for
creating UWP(Universal Windows Platform) apps for Windows using C#
or VB.
• Task-Based Asynchronous Model : It is model used to describe the
asynchronous operations and tasks in .Net Framework.
What is managed code?
• A code which is written to aimed to get the services of the managed runtime
environment execution like CLR(Common Language Runtime) in
.NET Framework is known as Managed Code
• The managed runtime environment provides different types of services like
garbage collection, type checking, exception handling, bounds checking, etc.
• The application is written in the languages like Java, C#, VB.Net, etc. are
always aimed at runtime environment services to manage the execution and
the code written in these types of languages are known as managed code.
• When the programmer runs the executable, then the Just In Time Compiler
of CLR compiles the intermediate language in the native code which is
specific to the underlying architecture.
• The managed code also provides platform independence because
when the managed code compiled into the intermediate language,
then the JIT compiler compiles this intermediate language in the
architecture specific instruction.
.NET Framework Class Library
(FCL)
• The Framework Class Library or FCL provides the system functionality
in the .NET Framework as it has various classes, data types,
interfaces, etc. to perform multiple functions and build different types
of applications such as desktop applications, web applications, mobile
applications, etc
Categories in the Framework
Class Library
• Utility Features: The utility features in the FCL includes various
collection classes such as list, stack, queue, dictionary, etc. and also
classes for more varied manipulations such as Regex class for regular
expressions.
• Frameworks: There are various frameworks available in the FCL to
develop certain applications.
• For example,
• ASP.NET is used to develop web applications
• Windows Presentation Foundation (WPF) is used to render user interfaces in Windows
applications, and so on.
Garbage collection
• Garbage collection in C# is an automated memory management
process provided by the .NET framework.
• It relieves developers from explicitly managing memory allocation and
deallocation
• making the development process more convenient and less error-
prone.
• Purpose of Garbage Collection: Garbage collection automates this
process by identifying and reclaiming memory occupied by objects
that are no longer reachable or needed by the program.
• Detecting Unreachable Objects: The garbage collector continuously
monitors the managed heap and identifies objects that are no longer
reachable or accessible by the application.
Security
• C# is a powerful programming language used in various software and
web development projects, and ensuring robust security measures is
essential to protect applications from potential threats and
vulnerabilities.
• Error Handling and Logging: Properly handle exceptions and errors to
avoid exposing sensitive information to potential attackers.
Implement robust logging mechanisms to track and monitor
application activities, which helps in detecting and responding to
security incidents.
• Secure File Handling: Validate file uploads, restrict file types, and use
secure file paths to prevent arbitrary file execution and directory
traversal attacks.
Namespaces in the Framework
Class Library
• Namespaces in the Framework Class Library are a group of related
classes and interfaces that can be used by all the .NET
framework languages.
Namespace Description
Accessibility The Accessibility namespace is a part of the managed wrapper for the COM accessibility interface.

Microsoft.Activities The Microsoft.Activities namespace provides support for Windows Workflow Foundation applications.

Microsoft.CSharp The Microsoft.CSharp namespace has support for compilation and code generation for the C# source code.

Microsoft.VisualBasic The Microsoft.VisualBasic namespace has support for compilation and code generation for the VisualBasic source code.

System The System namespace has base classes for definition of interfaces, data types, events, event handlers, attributes, processing exceptions etc.

System.Activities The System.Activities namespace handles the creation and working with activities in the Window Workflow Foundation using various classes.

System.Collections The System.Collections namespace has multiple standard, specialized, and generic collection objects that are defined using various types.

System.Data The System.Data namespace accesses and manages data from various sources using different classes.

System.Globalization The System.Globalization namespace handles language, country, calendars used, format patterns for dates, etc. using various classes.

System.IO The System.IO namespaces support IO like data read/write into streams, data compression, communicate using named pipes etc. using various types.

System.Linq The System.Linq namespace supports Language-Integrated Query (LINQ) using various types.

System.Media The System.Media namespace handles sound files and accessing the sounds provided by the system using various classes.

The System.Net namespace provides an interface for network protocols, cache policies for web resources, composing and sending e-mail etc. using various
System.Net
classes.

System.Security The System.Security namespace has the .NET security system and permissions. Child namespaces provide authentication, cryptographic services etc.

System.Threading The System.Threading namespace allows multithreaded programming using various types.

You might also like