Lecture 1 .NET Framework
Lecture 1 .NET Framework
that runs primarily on Microsoft Windows. It includes a large class library (a library is a
collection of non-volatile resources used by computer programs, often for software development.
These may include configuration data, documentation, help data, message templates, pre-written
code and subroutines, classes, values or type specifications.) named as Framework Class Library
(FCL) and provides language interoperability (each language can use code written in other
languages) across several programming languages. Programs written for .NET Framework
execute in a software environment (in contrast to a hardware environment) named the Common
Language Runtime (CLR). The CLR is an application virtual machine that provides services
such as security, memory management, and exception handling. As such, computer code written
using .NET Framework is called "managed code". FCL and CLR together constitute the .NET
Framework.
NET Framework
It is used to develop applications for web, Windows, phone. Moreover, it provides a broad
range of functionalities and support.
This framework contains a large number of class libraries known as Framework Class Library
(FCL). The software programs written in .NET are executed in the execution environment, which
is called CLR (Common Language Runtime). These are the core and essential parts of the
.NET framework.
This framework provides various services like memory management, networking,
security, memory management, and type-safety.
The .Net Framework supports more than 60 programming languages such as C#, F#,
VB.NET, J#, VC++, JScript.NET, APL, COBOL, Perl, Oberon, ML, Pascal, Eiffel, Smalltalk,
Python, Cobra, ADA, etc.
Following is the .NET framework Stack that shows the modules and components of the
Framework.
4. Other Modules (WCF, WPF, WF, Card Space, LINQ, Entity Framework, Parallel
LINQ, Task Parallel Library, etc.)
It is a program execution engine that loads and executes the program. It converts the program
into native code. It acts as an interface between the framework and operating system. It does
exception handling, memory management, and garbage collection. Moreover, it provides
security, type-safety, interoperability, and portablility. A list of CLR components are given
below:
Windows Forms is a smart client technology for the .NET Framework, a set of managed
libraries that simplify common application tasks such as reading and writing to the file system.
ASP.NET
ADO.NET
WF (Workflow Foundation)
Windows Workflow Foundation (WF) is a Microsoft technology that provides an API, an in-
process workflow engine, and a rehostable designer to implement long-running processes as
workflows within .NET applications.
It is a query language, introduced in .NET 3.5 framework. It is used to make the query for
data sources with C# or Visual Basics programming languages.
Entity Framework
It is an ORM based open source framework which is used to work with a database using
.NET objects. It eliminates a lot of developers effort to handle the database. It is Microsoft's
recommended technology to deal with the database.
Parallel LINQ
It can improve and provide fast speed to execute the LINQ query by using all available computer
capabilities.
Apart from the above features and libraries, .NET includes other APIs and Model to improve and
enhance the .NET framework.
In 2015, Task parallel and Task parallel libraries were added. In .NET 4.5, a task-based
asynchronous model was added.
So far, we’ve talked in general terms about how great .NET is, but we haven’t said much about
how it helps to make your life as a developer easier. This section briefly identifies some of
the improved features of .NET.
➤ Object-oriented programming — Both the .NET Framework and C# are entirely based
on objectoriented principles right from the start.
➤ Good design — A base class library, which is designed from the ground up in a highly
intuitive way.
➤ Language independence — With .NET, all of the languages — Visual Basic, C#, and
managed C++ — compile to a common Intermediate Language. This means that languages are
interoperable in a way that has not been seen before.
➤ Better support for dynamic web pages — Though Classic ASP offered a lot of flexibility, it
was also inefficient because of its use of interpreted scripting languages, and the lack of object-
oriented design often resulted in messy ASP code. .NET offers an integrated support for web
pages, using ASP. NET. With ASP.NET, code in your pages is compiled and may be written in a
.NET-aware high-level language such as C# or Visual Basic 2010. .NET now takes it even
further with outstanding support for the latest web technologies such as Ajax and jQuery.
➢
Code sharing — .NET has completely revamped the way that code is shared
between applications, introducing the concept of the assembly, which replaces the
traditional DLL. Assemblies have formal facilities for versioning, and different
versions of assemblies can exist side by side.
➤ Improved security — Each assembly can also contain built-in security information that can
indicate precisely who or what category of user or process is allowed to call which methods on
which classes. This gives you a very fine degree of control over how the assemblies that you
deploy can be used.
➤ Zero-impact installation — There are two types of assemblies: shared and private. Shared
assemblies are common libraries available to all software, whereas private assemblies are
intended only for use with particular software. A private assembly is entirely self-contained, so
the process of installing it is simple. There are no registry entries; the appropriate files are simply
placed in the appropriate folder in the file system.
➤ Support for Web services — .NET has fully integrated support for developing Web services
as easily as you would develop any other type of application.
➤ Visual Studio 2010 — .NET comes with a developer environment, Visual Studio 2010,
which can cope equally well with C++, C#, and Visual Basic 2010, as well as with ASP.NET or
XML code. Visual Studio 2010 integrates all the best features of the respective language-
specific environments of all the previous versions of this amazing IDE.
➤ C# — C# is a powerful and popular object-oriented language intended for use with .NET
Practical Lesson
Using the provided reference book on .net architecture, perform the following
1. Installing and getting started with Visual Studio 2010 – page 435
2. Creating and running your first application
3. Debugging and deploying an application
4. Create windows Forms (Assignment)