0% found this document useful (0 votes)
10 views25 pages

DotNet Chapter One

.NET is a software framework developed by Microsoft for building various applications, supporting over 60 programming languages and multiple operating systems. It consists of key components like the Common Language Runtime (CLR) and Framework Class Library (FCL), which provide essential services such as memory management and security. The document also contrasts .NET Framework with .NET Core, highlighting their differences in open source, cross-platform capabilities, and application models.

Uploaded by

loid.carter11009
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)
10 views25 pages

DotNet Chapter One

.NET is a software framework developed by Microsoft for building various applications, supporting over 60 programming languages and multiple operating systems. It consists of key components like the Common Language Runtime (CLR) and Framework Class Library (FCL), which provide essential services such as memory management and security. The document also contrasts .NET Framework with .NET Core, highlighting their differences in open source, cross-platform capabilities, and application models.

Uploaded by

loid.carter11009
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/ 25

BCA 5th Semester(TU)

DotNet Technology

Chapter 1
Introducing C# and .Net Framework

Presented By
Er. Diwakar Dhungana
DotNet (.Net)
• .NET is a framework to develop software applications. It
is designed and developed by Microsoft and the first beta
version released in 2000.
• It is free, open-source development platform for building
many kinds of apps.
• It is used to develop applications for web, Windows.
Moreover, it provides a broad range of functionalities
and support.
• .Net 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, and type-safety.
2
DotNet (.Net) Continue…
You can create .NET apps for many operating
systems, including:
•Windows
•macOS
•Linux
•Android
•iOS
•tvOS
•watchOS
Supported processor architectures include:
•x64
•x86
•ARM32
•ARM64 3
DotNet (.Net) Continue…

• 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.
• The .NET Framework is composed of four main
components:
• Common Language Runtime (CLR)
• Framework Class Library (FCL),
• Core Languages (WinForms, ASP.NET, and ADO.NET),
and
• Other Modules (WCF, WPF, WF, Card Space, LINQ,
Entity Framework, Parallel LINQ, Task Parallel Library,
etc.)
4
DotNet (.Net) Continue…
1. CLR (Common Language Runtime) :
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. Function of
CLR are Exception handling, memory management, and garbage
collection. Moreover, it provides security, type-safety, improved
performance, platform independent and portability.
A list of CLR components are given below:

5
DotNet (.Net) Continue…

CLR Components :
1. Base Class Library Support
It is a class library that provides support of classes to the .NET
application.
2. Thread Support
It manages the parallel execution of the multi-threaded
application.
3. COM (Component Object Model) Marshaler
It provides communication between the COM objects and the
application.
4. Type Checker
It checks types used in the application and verifies that they match
to the standards provided by the CLR.
5. Code Manager
It manages code at execution run-time.
6. Garbage Collector
It releases the unused memory and allocates it to a new
application.
7. Exception Handler
It handles the exception at runtime to avoid application failure.
6
8. Class Loader
DotNet (.Net) Continue…

• Native Code:
• Native code is computer programming code that is compiled to
run with a particular processor (such as an Intel x86-class
processor) and its set of instructions.
• Operating systems come with a large volume of APIs that aren't
present in the managed class libraries. A prime example for this
scenario would be access to hardware or operating system
management functions.

2. FCL (Framework Class Library) :


It is a standard library that is a collection of thousands of classes ,
namespaces, interfaces and value types that are used for .NET
applications.
BCL is the core of the FCL and provides basic functionalities.

7
DotNet (.Net) Continue…
Framework Class Library component are listed below:

8
DotNet (.Net) Continue…
3. WinForms :
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.

4. ASP.NET
ASP.NET is a web framework designed and developed by Microsoft. It is
used to develop websites, web applications, and web services. It provides
a fantastic integration of HTML, CSS, and JavaScript. It was first
released in January 2002.

5. ADO.NET
ADO.NET is a module of .Net Framework, which is used to establish a
connection between application and data sources. Data sources can be
such as SQL Server and XML. ADO .NET consists of classes that can be
used to connect, retrieve, insert, and delete data.
9
DotNet (.Net) Continue…
6. WPF (Windows Presentation Foundation)
Windows Presentation Foundation (WPF) is a graphical subsystem by
Microsoft for rendering user interfaces in Windows-based applications.
WPF, previously known as "Avalon", was initially released as part
of .NET Framework 3.0 in 2006.

7. WCF (Windows Communication Foundation)


It is a framework for building service-oriented applications. Using WCF,
you can send data as asynchronous messages from one service endpoint
to another.

8. 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.
10
DotNet (.Net) Continue…
9. LINQ (Language Integrated Query)
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.

10. 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.

11. Parallel LINQ


Parallel LINQ or PLINQ is a parallel implementation of LINQ to objects.
It combines the simplicity and readability of LINQ and provides the
power of parallel programming.
It can improve and provide fast speed to execute the LINQ query by
using all available computer capabilities. 11
DotNet (.Net) Continue…
• Managed Code
• Managed code is just that: code whose execution is managed by a
runtime. In this case, the runtime in question is called
the Common Language Runtime or CLR
• Managed code is written in one of the high-level languages that
can be run on top of .NET, such as C#, Visual Basic, F# and
others. When you compile code written in those languages with
their respective compiler, you don't get machine code. You
get Intermediate Language code which the runtime then compiles
and executes.

• Memory Management
• Automatic memory management is one of the services that
the Common Language Runtime provides during
Managed Execution. The Common Language Runtime's
garbage collector manages the allocation and release of
memory for an application.
12
DotNet (.Net) Continue…
• Compilation Process
• Compilation Process is done in two parts
• First phase is done by language compilers
• Second phase is done by JIT
• MSIL – Microsoft Intermediate Language
• .dll – dynamic link library
• .exe – executable file

13
DotNet (.Net) Continue…
• Framework:
In computer programming a framework can be best defined
as a tool which allows to develop software and create systems.

• Advantages of using a software framework:


• Assists in establishing better programming practices and fitting
use of design patterns
• Code is more secure
• Duplicate and redundant code can be avoided
• Helps consistent developing code with fewer bugs
• Makes it easier to work on sophisticated technologies
• The time required to develop an application is reduced
significantly

14
DotNet (.Net) Continue…

• Programming Language vs Frameworks


• A programming language tells the computer what it should do.
Every programming language features a syntax and a particular
set of rules, which need to be followed every time the code is
written.
• A software framework is built on top of a programming
language. For example:
• Ruby on Rails, is a web framework built on top of the Ruby
programming language.
• Django and Flask are two different web frameworks built on
top of the Python programming language. Hence, they are
also known as Python frameworks. React, and Angular are
front-end web frameworks built on top of the JavaScript
programming language.
•Frontend: build how a website looks.
•HTML, CSS, JavaScript, React etc
•Backend: build how a website works.
•render on the server-side of a website or application
•C#, PHP, Python, Ruby, Node.js etc 15
DotNet (.Net) Continue…
• Others Frameworks:
Types of Frameworks
There are many types of software frameworks to make it easier
for developing applications for a wide range of application
development domains. Let us dive into some of the software
frameworks that are in used today.

• Web Application Frameworks


1. Angular
• Angular is a typescript-based, open-source JS framework that
makes it easy to build applications on the web
• Angular empowers developers to build applications that live on
the web, mobile, and desktop.
• Some popular websites developed using AngularJS are:
• Netflix, PayPal, Upwork, YouTube and Django

16
DotNet (.Net) Continue…
2. Laravel
Laravel is a PHP-based web application framework with an expressive,
elegant syntax. The open-source framework and follows a model-view-
controller design pattern that is robust and easy to understand.

• Data Science Frameworks


1. Apache Spark
Apache Spark is a unified analytics engine for large-scale data
processing. You can write applications quickly in Java, Scala,
Python, R, and SQL using the Apache Spark.
Over 3,000 companies are using Apache Spark, including top players
like:
• Amazon
• Cisco
• Microsoft
• Oracle
17
DotNet (.Net) Continue…
2. PyTorch
• PyTorch is an open-source machine learning framework that
accelerates the process from research and prototyping to
production deployment.
• Primarily developed by Facebook’s AI research group, PyTorch
can be used with Python as well as C++. PyTorch is used for
Computer Vision and Natural Language Processing (NLP).

• Mobile Development Frameworks


1. Xamarin
Xamarin is a free, open-source application development
platform for building Android, iOS applications with .NET,
and C#. Xamarin is part of the .NET platform that has an
active community of over 60,000 contributors from more
than 3,700 companies.

18
DotNet (.Net) Continue…

.Net Framework and .Net Core


.Net Framework:
.NET is a software framework that is designed and developed by
Microsoft. 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. There is a
variety of programming languages available on the .Net platform, VB.Net, and
C# being the most common ones. It is used to build applications for Windows,
mobile, web, etc. It provides a lot of functionalities and also supports industry
standards.
.Net Core:
.NET Core is a free open source, a general-purpose development
platform for developing modern cloud-based software applications on
Windows, Linux, and macOS operating systems. It operates across several
platforms and has been revamped to make .NET fast, scalable, and modern. .NET
Core is one of Microsoft’s big contributions and released under the MIT License.
It offers the following features:
•Cross-Platform, Open Source, High Performance, Multiple environments and
development mode
19
DotNet (.Net) Continue…

.Net Core Vs .Net Framework


Based On .Net Core .Net Framework

Certain components of the .Net frameworks are open


Open Source .Net Core is an Open Source
source

Works on the principle of “build once, run anywhere”. It is compatible with .NET Framework is compatible with the windows
Cross - platofrm
various operating systems — Windows, Linux, and Mac OS as it is cross-platform. operating
system. Although, it was developed to support
software and applications on all operating systems.

.Net Framework is used for the development of both


.Net Core does not support desktop application development and it rather
Application Models focuses on the web, windows mobile, and windows store. desktop and web applications as well as it supports
windows forms and WPF applications.

Performance and .Net Framework is less effective in comparison to .Net


Scalability .NET Core offers high performance and scalability. Core in terms of performance and scalability of
applications.

.NET Core is compatible with various operating systems — Windows, Linux, and .NET Framework is compatible mostly with the Windows
Compatibility
Mac OS. operating system.

.NET Core provides light-weight editors and command-line tools for all supported .Net
Framework is heavy for Command Line Interface and
CLI Tools developers prefer to work on the lightweight Command
platforms. Line Interface.

20
DotNet (.Net) Continue…

.Net Standard
.NET Standard is a formal specification that defines a versioned
set of APIs that must be available on .NET implementations that comply
with that version of the standard. .NET Standard is targeted at library
developers. A library that targets a .NET Standard version can be used on
any .NET Framework, .NET Core, or Xamarin implementation that
supports that version of the standard.
.NET Standard is included with the .NET Core SDK, as well as with
Visual Studio when you select the .NET Core workload.
Supported .NET implementations
.NET Standard 2.0 is supported by the following .NET
implementations:
•.NET Core 2.0 or later
•.NET Framework 4.6.1 or later
•Mono 5.4 or later
•Xamarin.iOS 10.14 or later
•Xamarin.Mac 3.8 or later
•Xamarin.Android 8.0 or later
21
•Universal Windows Platform 10.0.16299 or later
DotNet (.Net) Continue…

.NET Standard 2.0 includes the following new features:


1. A vastly expanded set of APIs :
Through version 1.6, .NET Standard included a comparatively small subset
of APIs. Among those excluded were many APIs that were commonly used
in .NET Framework or Xamarin. This complicates development, since it
requires that developers find suitable replacements for familiar APIs when
they develop applications and libraries that target multiple .NET
implementations. .NET Standard 2.0 addresses this limitation by adding over
20,000 more APIs than were available in .NET Standard 1.6, the previous
version of the standard
Some of the additions to the System namespace in .NET Standard 2.0
include:
•Better support for working with arrays from additional members in the Array
class.
•Better support for working with attributes from additional members in the
Attribute class.
•Better calendar support and additional formatting options for DateTime values.
•Additional Decimal rounding functionality.
•Additional functionality in the Environment class.
22
DotNet (.Net) Continue…

2. Support for .NET Framework libraries


• Many libraries target .NET Framework rather than .NET
Standard. However, most of the calls in those libraries are to
APIs that are included in .NET Standard 2.0
• The single requirement is that the APIs called by the .NET
Framework class library must be included in .NET Standard 2.0.
.Net Ecosystem:

23
DotNet (.Net) Continue…

• Object Oriented:
• An object is basically a block of memory that has been
allocated and configured according to the design.
• A program may create many objects of the same class.
Objects are also called instances, and they can be stored in
either a named variable or in an array or collection.
• Object Oriented Programming (OOP) is a programming
model where programs are organized around objects and
data rather than action and logic.
• C# is an object-oriented programming language. The four basic
principles of object-oriented programming are:
•Abstraction Modeling the relevant attributes and interactions of entities as
classes to define an abstract representation of a system.
•Encapsulation Hiding the internal state and functionality of an object and
only allowing access through a public set of functions.
•Inheritance Ability to create new abstractions based on existing
abstractions.
•Polymorphism Ability to implement inherited properties or methods in
different ways across multiple abstractions.
24
25

You might also like