0% found this document useful (0 votes)
34 views24 pages

Framework

Uploaded by

neeraj kapoor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views24 pages

Framework

Uploaded by

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

Introduction to .

NET
framework
.NET Framework
.NET Framework is a technology that supports building and
running Windows apps and web services. .NET Framework is
designed to fulfill the following objectives:

•Provide a consistent, object-oriented programming environment


whether object code is stored and executed locally, executed
locally but web-distributed, or executed remotely.

•Provide a code-execution environment that:


• Minimizes software deployment and versioning
conflicts.
• Promotes safe execution of code, including code
created by an unknown or semi-trusted third party.
• Eliminates the performance problems of scripted or
interpreted environments.

•Make the developer experience consistent across widely varying


types of apps, such as Windows-based apps and Web-based apps.

•Build all communication on industry standards to ensure that


code based on .NET Framework integrates with any other code.
Genesis of .NET
Microsoft began to develop .NET in the late 1990s. The purpose of
.NET was to create a platform based on managed code, which is
code that can be run under a runtime environment. This runtime
environment was designed to relieve engineers from dealing with
security operations, memory management, and other low-level
tasks that are typically associated with C/C++ development.

The first version of .NET Framework was released in February


2002. Initially known as Next Generation Windows Services
(NGWS), .NET Framework was developed to provide a common
platform for running applications built using different languages,
such as C#, VB.NET, and Visual Basic.

.NET Framework is a virtual machine that provides a common


platform for running applications built using different
languages. The main objective of this framework is to develop an
application that can run on the Windows platform.

.NET Framework includes a large set of libraries that have broad


functionality and have been optimized for performance on
multiple operating systems and chip architectures. .NET has the
following design points: Productivity is full-stack with runtime,
libraries, language, and tools all contributing to developer user
experience.
Genesis of .NET
Features
1. Language Interoperability: Language Interoperability means code
written in any language can be used by other languages and there is
an access provided to COM components in the System. In other
words, this is the ability of code to interact with code which is
written using a different programming language. It can help to
maximize code reusability and therefore improve the efficiency of
the development process.

2. Portable: The .NET Framework provides a common platform to


write portable programs using different languages of .NET
environment, based on open Internet standards which allow different
devices, software’s and applications to work together across a wide
and dispersed network of networks.

3. Type Safety: During program execution, the type checker ensures


that all objects and values, and the references to those objects and
values, have a valid type. For example, the type checker ensures that
only an integer value is assigned to an integer variable. The type
checker also ensures that only valid operations are performed on the
objects or values.
Features
4. Managed Multithreading Support: Applications running in the CLR
can utilize the managed multithreading support. Multithreading requires
careful programming For most tasks, you can reduce complexity by
queuing requests for execution by thread pool threads.

5. Performance: Its CLR environment promotes safe execution of code,


eliminates performance bottlenecks through its garbage collector,
minimizes software development conflicts through namespaces and
avoids versioning conflicts through assembly manifest.

6. Side by Side Execution: The NET Framework allows you to deploy


multiple versions of an application on a system by using assemblies.
Assemblies are the deployment units in the NET Framework. An
assembly contains the IL code and metadata. The metadata contains
information such as the version of the other assemblies on which the
assembly depends. The Common Language Runtime uses the version lo
information in the metadata to determine application dependencies and
enables you to execute multiple versions of an application side-by-side.
Advantages of .NET
•Object Oriented

•Visual Studio IDE

•Cross-Platform Design

•Flexible Deployment and Easy Maintenance

•dot NET Core Supports a Wide Range of Applications

•.NET Core Enables Top App Performance

•Cost-Effective

•Large Community

•Integration with Microsoft Ecosystem

•Security and Reliability

•Rapid Development

•Security Features

•Scalability and Performance


Advantages of .NET
1. Object Oriented

.NET is based on an Object-Oriented Programming Module. OOP is a


development model that involves breaking down software into easily
manageable smaller pieces. OOP compartmentalizes data into data fields
and describes objects’ behavior through the declaration of classes.

Object-Oriented Programming Module simplifies by making the code


manageable, responding to recurring issues, and easier to test. It eliminates
necessary programming and hence less coding for developers. In addition to
this, .NET makes it possible to reuse components and code, thereby saving
time and the cost of development.

2. Visual Studio IDE

An Integrated Development Environment makes application development


simpler by providing the needed to write and test software.

Visual Studio is an Integrated Development Environment by Microsoft that


is used for building, debugging, and publishing applications across various
platforms, including Android and iOS.
Advantages of .NET
3. Cross-Platform Design

.NET Core is cross-platform, which means it allows the code to run on


Windows, Linux, and OS X. dotNET core, unlike the original .NET
framework has a fully open source code that ensures that a wide engineering
community can contribute to its development.

If you are writing the code in F#, C#, or Visual Basic, your code will run
each of the compatible operating systems. This allows companies to reach
an extensive variety of platforms while staying within the .NET ecosystem.
At the same time, with the cross-platform design, it also becomes possible
for the .NET community to share their large pool of engineering skill sets.

4. Flexible Deployment and Easy Maintenance

One of the crucial and most advantageous features of .NET Core is flexible
deployment. It can be installed as a part of the application you are
developing as well as separately. The modular design allows including all
the dependencies that you need. Moreover, the deployment with .NET is as
easy as copying a folder.Another benefit is that you can have more than one
.NET Core version running side by side on the same machine. Hence,
making it easy to cover different projects and seamlessly perform a
deployment task.
Advantages of .NET
5. dotNET Core Supports a Wide Range of Applications

With the .NET framework, you get the opportunity to develop an application in
a multitude of domains, such as gaming, mobile, IoT, and AI.Microsoft has
recently announced a collaboration with SWIFT, which means putting AI and
data at the center of Fintech. This will include creating an ecosystem that offers
efficient and secure operations for banks and corporations.

6. .NET Core Enables Top App Performance

With each released version, Microsoft added a few percentages on the


performance of the application. Built using the .NET Core framework, Stack
Overflow, the leading knowledge website for coders, manages to serve it, users,
with 5.3 M page views/day, and that too with just 9 servers.Raygun, a company
from New Zealand, developed a cloud-based monitoring application for web
and mobile applications. The core of the application was written in the .NET
framework, but they were using API that received data written in Node.js or
Linux to support elasticity..
Advantages of .NET
7. Cost-Effective

When choosing the appropriate technology, one of the first things that you check
is the IDEs and tools that are mandatory or add to productivity. A lot of them are
free, but the best ones come with licensing costs per developer, which can sum
up to thousands of dollars. No matter, whether you are a Startup trying to find
your way into the market or a big company, the money could be spent in a better
way..

8. Large Community

When a framework is used by many businesses and developers, it means it has


such features that attract them. It also proves its stability and high level of trust
from the community, making everyone try the framework.

9. Integration with Microsoft Ecosystem:

The .NET Framework seamlessly integrates with other Microsoft technologies,


such as SQL Server, Azure cloud services, and Office applications. This
integration enables developers to leverage the power of these technologies and
build highly scalable and interconnected solutions. It also facilitates easy access
to various APIs and services provided by Microsoft, making it easier to develop
applications that interact with these resources.
Disadvantages of .NET
•Limited Object-Relational Support

•Vendor Lock-in

•Memory Leaks

•Difficulty in the transition to .NET core

•Deployment and Size

•Learning Curve

•Platform Dependency

•Open-Source Challenges

•Community Perception

•Containerization Complexity

•Third-Party Integration
Disadvantages of .NET
1. Limited Object-Relational Support

As mentioned above, .NET works on the Object-Oriented Programming


approach, which is based on objects rather than actions and data rather than
logic. The support of data-oriented software application development in the
.NET Framework is provided by the Entity Framework.

The entity acts as the bridge between the object-oriented .NET Framework
and SQL databases. However, some developers believe The Entity
Framework doesn’t offer the required flexibility and doesn’t support all the
available database designs.

2. Vendor Lock-in

.NET is a framework by Microsoft. While Xamarin and .NET Core are open
sources, the whole ecosystem is far from being community-driven. This
means that your products will depend upon decisions made by Microsoft.
Disadvantages of .NET
3. Memory Leaks

The problem of memory leaks is common with every technology. .NET is also
one of those platforms that are frequently criticized for memory-related and
memory leak issues. Although dotNET possesses a garbage collector for this
problem, engineers are still required to invest additional efforts into resource
management.

4. Difficulty in the transition to .NET core

The transition to the dotNET core could be long and difficult. The applications
built with older .NET versions are far more than those built with .NET core.
Transiting these applications to the latest versions of .NET can be a little bumpy.

5. Deployment and Size:

Applications built on the .NET Framework often require the installation of the
framework’s runtime environment on the target machines. This additional
installation step can increase the deployment complexity and the size of the
application package. However, with the introduction of .NET Core and its self-
contained deployment option, this disadvantage has been mitigated to some
extent.
Disadvantages of .NET
6. Learning Curve:

While the .NET Framework offers a wide range of features and functionalities, it
can have a steep learning curve for beginners. The framework’s extensive
libraries and tools require developers to invest time in learning and
understanding its concepts and best practices. Additionally, keeping up with the
frequent updates and new versions of the framework can also pose challenges for
developers.

7. Platform Dependency:

While .NET Core has made significant strides in enabling cross-platform


development, the full .NET Framework is primarily designed for Windows-based
environments. This platform dependency restricts the deployment of applications
built on the full framework to Windows-based systems, limiting their portability
and flexibility.

8. Open-Source Challenges:

While .NET Core marked a significant move towards open-source development,


some legacy components are still proprietary. This duality can lead to challenges
when dealing with open-source initiatives, as not all aspects of the framework
may be freely accessible.
Disadvantages of .NET
9. Community Perception:

In certain development circles, there might be a perception that .NET is


primarily suited for Windows-centric applications. Although efforts have been
made to dispel this notion through cross-platform support, overcoming
preconceptions remains a challenge.

10. Containerization Complexity:

While .NET Core has made strides in containerization support, some


developers find working with containers in the .NET ecosystem more complex
compared to certain alternatives. This complexity may be a barrier for teams
prioritizing containerized deployments.

11. Third-Party Integration:

Although the .NET ecosystem is extensive, some niche libraries and tools may
have more comprehensive support in other frameworks. Teams focusing on
specific integrations may need to evaluate the availability and maturity of
third-party components within the .NET ecosystem.
Common Language Runtime
The Common Language Runtime (CLR) is a virtual machine component of
Microsoft's .NET Framework that manages the execution of .NET programs. It
provides a managed execution environment by offering services such as:

Memory management, Type safety, Exception handling, Garbage collection, Security,


and Thread management.

The CLR converts managed code into machine instructions, which are then executed
on the computer's CPU. The CLR also allows programs to share common object-
oriented classes written in any of the supported languages. For example, developers
use various languages, but CLR ensures they all integrate seamlessly.
Common Language Runtime
Common Type System
The Common Type System (CTS) is a component of the .NET framework that defines
how types are declared, used, and managed in the common language runtime. It also
supports type safety, cross-language integration, and high-performance code
execution. The CTS provides a rich hierarchy of types without the need for libraries or
header files in the code.

CTS provides the types in the .NET Framework with which .NET applications,
components and controls are built in different programming languages so information
is shared easily. In contrast to low-level languages like C and C++ where
classes/structs have to be used for defining types often used (like date or time), CTS
provides a rich hierarchy of such types without the need for any inclusion of header
files or libraries in the code.

The .NET Framework supports many programming languages such as C#,


VB.NET, J#, F#, etc. Every programming language has its own data type. One
programming language data type cannot be understood by other programming
languages. But, there can be situations where we need to communicate between
two different programming languages. For example, we need to write code in
the VB.NET language and that code may be called from C# language. In order
to ensure smooth communication between these languages, the most important
thing is that they should have a Common Type System (CTS) which ensures
that data types defined in two different languages get compiled to a common
data type.
Common Language Specification
The Common Language Specification (CLS) is a set of rules and restrictions that
languages must follow to run under the .NET framework. CLS is a subset of the
Common Type System (CTS) and defines the base rules that allow languages to
interoperate with each other. CLS also produces verifiable code, which ensures
the type safety of code.

CLS (Common Language Specification) is a part of CLR in the .NET


Framework. The .NET Framework supports many programming languages such
as C#, VB.NET, J#, F#, etc. Every programming language has its own syntactical
rules for writing the code which is known as a language specification. One
programming language’s syntactical rules (language specification) cannot be
understood by other programming languages. But, there can be situations where
we need to communicate between two different programming languages. In order
to ensure smooth communication between different .NET Supported
Programming Languages, the most important thing is that they should have
Common Language Specifications which ensures that language specifications
defined in two different languages get compiled into a Common Language
Specification.
Common Language Specification
CLR in .NET Framework will execute all programming language’s code. This is
possible because CLR has its own language specification (syntactical rules) which are
common to all .NET Supported Programming Languages. At the time of compilation,
every language compiler should follow this language specification of CLR and
generate the MSIL code. This language specification of CLR is common for all
programming languages and this is known as Common Language Specifications
(CLS).

The Common Language Specification (CLS) is a fundamental set of language


features supported by the Common Language Runtime (CLR) of the .NET
Framework. CLS is a part of the specifications of the .NET Framework. CLS was
designed to support language constructs commonly used by developers and to
produce verifiable code, which allows all CLS-compliant languages to ensure the type
safety of code. CLS includes features common to many object-oriented programming
languages. It forms a subset of the functionality of common type system (CTS) and
has more rules than defined in CTS.
Microsoft Intermediate language
Microsoft Intermediate Language (MSIL) is a set of instructions that are
independent of the platform. It is also known as Common Intermediate Language
(CIL). MSIL is created by a language-specific compiler from source code and can
be executed on any of the Common Language Infrastructure (CLI) supported
environments such as the Windows .NET runtime.

A .NET programming language (C#, VB.NET, J# etc.) does not compile into
executable code; instead it compiles into an intermediate code called Microsoft
Intermediate Language (MSIL). As a programmer one need not worry about the
syntax of MSIL - since our source code in automatically converted to MSIL. The
MSIL code is then send to the CLR (Common Language Runtime) that converts
the code to machine language, which is, then run on the host machine. MSIL is
similar to Java Byte code.
MSIL is the CPU-independent instruction set into which .NET Framework
programs are compiled. It contains instructions for loading, storing, initializing,
and calling methods on objects.
Combined with metadata and the common type system, MSIL allows for true
cross- language integration Prior to execution, MSIL is converted to machine
code. It is not interpreted.
Meta Data
Metadata is data about the data or documentation about the information which is
required by the users. In data warehousing, metadata is one of the essential
aspects.

Metadata includes the following:

1.The location and descriptions of warehouse systems and components.

2.Names, definitions, structures, and content of data-warehouse and end-users


views.

3.Identification of authoritative data sources.

4.Integration and transformation rules used to populate data.

5.Integration and transformation rules used to deliver information to end-user


analytical tools.

6.Subscription information for information delivery to analysis subscribers.

7.Metrics used to analyze warehouses usage and performance.

8.Security authorizations, access control list, etc.


.NET Types

You might also like