introduction to .net by quontrasolutions

Post on 18-Jan-2016

30 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Quontra Solutions provides C# .NET training by Real time Industry experts. C# .NET is having good demand in the market. Our C# .NET online training Instructors are very much experienced and highly qualified and dedicated.Our C# .NET online training program is job oriented. After completion of C# .NET training with us you should be able to work on any kind of project. After completion of C# .NET online training our dedicated team will be supporting you.Please call us for demo on C# .NET. Quontra Solutions is the best C# .NET online training Institute in USA. Highlights in our training:* Very in depth course material with real time scenarios.* We are providing class with highly qualified trainer.* We will provide class and demo session at student flexible timings.* In training case studies and real time scenarios covered.* Each topic coverage with real time solutions.* We will give every recorded session for play later.* We are giving placement support by multiple consultancies in USA , UK etc.* We will give full support while attending the interviews and contact us after completion of the course. 

TRANSCRIPT

Introduction to .NET

by Quontra Solutions

Email : info@quontrasolutions.com

Call us : 404-900-9988

Visit : www.quontrasolutions.com

.NET Framework

Introduction to .net

2

Introduction to .net

3

Computer programs were written using procedural languages .(C, Cobol, Pascal, etc.)

Code was written around functions; i.e., logic is built around the functions to be performed.

Object Oriented Programming (OOP) era ( C++ and Smalltalk).

Code was written around data; i.e., logic is built by identifying the data in the system and performing functions around this data.

Disadvantages

Introduction to .net

4

The resources (like memory) were managed by the programmer and there was no runtime support provided by the programming language.

This caused a lot of problems by assigning programmers a lot of responsibilities, the mishandling of which could easily crash the whole application (and sometimes the Operating System (OS) itself).

Introduction of Java

Introduction to .net

5

The first commercially successful language to provide such runtime support was Java by Sun Microsystems (although runtime support was present in languages like Smalltalk).

Java comes with a runtime environment, called Java Virtual Machine (JVM) which performs memory management, garbage collection, checking of runtime data types and memory access.

Java also presented the idea of 'Platform independence' by providing their JVM implementation for several OS and different hardware. This meant that a compiled java program can run on multiple OS and hardware without any change or re-compilation (at least in theory).

Introduction to .net

6

Drastic changes in other popular concepts-

Eliminating Pointers, Multiple inheritance, Operator overloading and Templates.

Java a very popular language

For both academic and development environments, especially web applications.

Java provides this ease and simplification at the penalty of performance by introducing interpreter at runtime.

Disadvantage : Also, because of the platform independence of Java, it lacks in some Platform specific features such as GUI and event handling.

History of .NET

Introduction to .net

7

In the beginning of 1998, a team of developers at Microsoft had just finished work on a new version of IIS 4.0 including several new features in ASP.

While developers were pleased to see new capabilities for internet development on WinNT they developed a new architecture called NGWS (next Generation windows services).

In July 2000 ,Microsoft held a professional Developers conference (PDC) in Orlando, Florida.

Next Generation Platform for windows and Internet Software Development (.NET)

Microsoft .NET

Introduction to .net

8

In the year 2000, Microsoft launched its new development environment called Microsoft Visual Studio .NET.

Microsoft .NET, at its core, is very similar to J2EE (Java 2 Enterprise Edition).

But, .NET is a compromise between traditional 'un-managed' and 'managed' style of programming.

It allows a programmer to run both managed (code managed by .NET Runtime) and un-managed code (not managed by .NET runtime).

In managed code, .NET does memory management, run-time type checking, memory access checking and exception handling on behalf of your program.

Introduction to .net

9

It’s the framework for the .NET platform. Its a common environment for building, deploying, and running Web

applications and Web Services. It consists of the following

CLR (Common Language Runtime) CTS (Common Type System) Common Class Libraries.

The .NET Framework provides the following. Rich Application Environment Simplified Development Easy Integration

The .NET is language neutral.

Microsoft .NET

Introduction to .net

10

Microsoft Visual Studio.NET is the common development environment for the .NET Framework.

Its for providing powerful, reliable enterprise Web Solutions.

It’s a framework designed by Microsoft.

It has been written so that applications on other platforms will be able to access these services.

Its built upon open standard technologies like XML and SOAP.

Microsoft .NET

Microsoft .NET

Introduction to .net

11

Microsoft .NET was originally called NGWS.

It is a new Internet and web based architecture.

.NET delivers software as Web Services.

It is a Framework for universal services.

It will run in any browser on any platform.

It Contains Common Class Libraries like ADO.NET and ASP.NET and windows forms to provide advanced std services that can be integrated on variety of computer systems.

Introduction to .net

12

.NET uses Just In Time (JIT) compilers to translate your intermediate compiled code to native executable code, which significantly improves the performance.

.NET also provides 'Platform independence' and 'Language Independence'. However, the concept of 'Platform independence' is somewhat different from Java.

In .NET, your compiled program can run on any hardware running any variant of the Windows OS (except for Windows 95).

Microsoft .NET

Microsoft .NET

Introduction to .net

13

.NET also provides cross language support. This means that modules written in different .NET compliant languages can call/use each others modules. Hence, it is possible to write your class in C#, inherit it in VB.Net and finally use it in VC++.NET

There are as many as 22 languages supporting the .NET Platform (including C#, VB, C++, J#, Cobol, Eiffel, Pascal, Fortran, RPG, Smalltalk and others) and enjoying full use of the .NET runtime and huge Framework class library (FCL).

Introduction to .net

14

.NET is useful for building a variety of Windows applications, web applications and services, database and embedded applications (using .NET compact version).

On the marketing and commercial side, Microsoft is apparently putting 80% of its development resources and investment on .NET by providing a number of .NET enabled/supported applications like SQL server .NET and Windows Server 2003

Microsoft .NET

Internet Standards Of .NET

Introduction to .net

15

HTTP – used as a Communication protocol between Internet Applications.

XML – used to exchange the data between internet applications.

SOAP – Used to request web services.

UDDI – Used to search and discover Web services.

Web Services

Introduction to .net

16

These are small units of code built to handle a limited task.

These are XML based communicating protocols.

These are independent of OS.

These are independent of Programming Languages.

These are connect people , system and devices.

.NET Architecture and .NET Framework

Introduction to .net

17

In the .NET Architecture and the .NET Framework there are different important terms and concepts which we will discuss one by one:-

• Common Language Runtime (CLR):

• MSIL (Microsoft Intermediate Language)

• Just In Time Compilers (JITers)

• Framework Class Library (FCL)

• Common Language Specification (CLS)

• Common Type System (CTS)• Garbage Collector (GC)

Common Language Runtime (CLR)

Introduction to .net

18

The most important concept of the .NET Framework is the existence and functionality of the .NET Common Language Runtime (CLR), also called .NET Runtime in short.

It is a framework layer that resides above the OS and handles the execution of all the .NET applications.

Our programs don't directly communicate with the OS but go through the CLR.

MSIL (Microsoft Intermediate Language)

Introduction to .net

19

When we compile our .NET Program using any .NET compliant language (like C#, VB.Net, C++.NET) it does not get converted into the executable binary code but to an intermediate code, called MSIL or IL, understandable by CLR.

MSIL is OS and hardware independent code.

When the program needs to be executed, this MSIL, or intermediate code, is converted to binary executable code (native code).

The presence of IL makes possible the Cross Language Relationship as all the .NET compliant languages produce similar, standard IL code.

Working of CLR

Introduction to .net

20

Code in any.net Language

MSIL CodeExecutable Native Code

Language Compiler

At Compile Time

Just In TimeCompiler

At Run Time

Just In Time Compilers (JITers)

Introduction to .net

21

When our IL compiled code needs to be executed, CLR invokes the JIT compilers which compile the IL code to native executable code (.exe or .dll) that is designed for the specific machine and OS

JITers in many ways are different from traditional compilers as they compile the IL to native code only when desired; e.g., when a function is called, the IL of the function's body is converted to native code just in time.

So, the part of code that is not used by that particular run is never

converted to native code.

Just In Time Compilers (JITers)

Introduction to .net

22

If some IL code is converted to native code, then the next time it's needed, the CLR reuses the same (already compiled) copy without re-compiling.

So, if a program runs for sometime (assuming that all or most of the functions get called), then it won't have any just-in-time performance penalty.

As JITers are aware of the specific processor and OS at runtime, they can optimize the code extremely efficiently resulting in very robust applications.

Just In Time Compilers (JITers)

Introduction to .net

23

Also, since a JIT compiler knows the exact current state of executable code, they can also optimize the code by in-lining small function calls (like replacing body of small function when its called in a loop, saving the function call time).

Although Microsoft stated that C# and .NET are not competing with languages like C++ in efficiency and speed of execution, JITers can make your code even faster than C++ code in some cases when the program is run over an extended period of time (like web-servers).

Types of JIT

Introduction to .net

24

JIT This the default JIT compiler of the NGWS runtime. It can cope up with unrestricted sets of IL instructions. Its main constraint is the time it takes to perform the optimizations.

EconoJIT It performs high speed conversion of IL to Managed native code. It allows caching for generated native code. It isn’t optimized as the code produced by the main JIT.

PreJIT It works like the traditional compiler. Its based on the main JIT Compiler. It has faster loading time and faster application start time.

Framework Class Library (FCL)

Introduction to .net

25

The .NET Framework provides a huge Framework (or Base) Class Library (FCL) for common, usual tasks

FCL contains thousands of classes to provide access to Windows API and common functions like String Manipulation, Common Data Structures, IO, Streams, Threads, Security, Network Programming, Windows Programming, Web Programming, Data Access, etc.

It is simply the largest standard library ever shipped with any development environment or programming language.

Framework Class Library (FCL)

Introduction to .net

26

The best part of this library is they follow extremely efficient OO design (design patterns) making their access and use very simple and predictable

You can use the classes in FCL in your program just as you would use any other class. You can even apply inheritance and polymorphism to these classes.

Common Language Specification (CLS)

Introduction to .net

27

Microsoft has released a small set of specifications that each language should meet to qualify as a .NET Compliant Language

As IL is a very rich language, it is not necessary for a language to implement all the IL functionality; rather, it merely needs to meet a small subset of CLS to qualify as a .NET compliant language.

This is the reason why so many languages (procedural and OO) are now running under the .NET umbrella.

Common Language Specification (CLS)

Introduction to .net

28

CLS basically addresses language design issues and lays down certain standards.

For instance, there shouldn't be any global function declarations, no pointers, no multiple inheritance and things like that.

The important point to note here is that if you keep your code within the CLS boundary, your code is guaranteed to be usable in any other .NET language.

.NET also defines a Common Type System (CTS).

Common Type System (CTS)

Introduction to .net

29

Like CLS, CTS is also a set of standards.

CTS defines the basic data types that IL understands.

Each .NET com language should map its data types to these standard data types. This makes it possible for the 2 languages to communicate with each other by passing/receiving parameters to/from each other.

For example, CTS defines a type, Int32 an integral data type of 32 bits (4 bytes) which is mapped by C# through int and VB.Net through its Integer data type.

Language Independent

Introduction to .net

30

It has the ability to use any language to write applications

The Component Object Model (COM) already allows reuse of COM components in any COM aware language and allows for COM components to be written in languages such as VB and C++.

But the superior capabilities of the .NET framework was very easy than COM Interoperability

Language Independent

Introduction to .net

31

With COM Interoperability in possible only when the components adhere to a binary standard for interaction. That is every component has to follow rules for communication established for sending information to compiled components.

The .NET CLR takes this Interoperability a step further by allowing cross –language inheritance and standardized exception handling

Garbage Collector (GC)

Introduction to .net

32

CLR also contains the Garbage Collector (GC), which runs in a low-priority thread and checks for un-referenced, dynamically allocated memory space.

If it finds some data that is no longer referenced by any variable/reference, it re-claims it and returns it to the OS so it can be used by other programs as needed.

The presence of a standard Garbage Collector frees the programmer from keeping track of dangling data.

.NET Framework

Introduction to .net

33

.NET Architecture

Introduction to .net

34

ASP.NET

Web services Web Forms Controls

Windows Forms

Drawing

ASP.NET application Services Windows Application Services

.NET Framework Base Classes

Common Type SystemMemory Management

Common Language Runtime

ADO.NET

NET

XML

SECURITY

THREADING

DIAGNOSTICS ETC

IO

Life Cycle Monitoring

CLR

Introduction to .net

35

Common Type System (Datatypes etc)

IL to Native code CompilersExecution Support

(Runtime Functions)Security

Garbage Collections , Stack ,Code Manager

Class Loader and Memory Layout

Features

Introduction to .net

36

In Team environments, developers can be free to use whatever language they choose to develop objects .whenever it comes time to integrate the Team members components, we can be sure that they can talk to each other seamlessly on the runtime as well as on the source-code level

It allows enhancements to existing objects coded In one language to be added using a different language

Introduction to .net

37

Thank you!!

top related