Introduction to .Net Frame work by Quontra Solutions

download Introduction to .Net Frame work by Quontra Solutions

of 45

description

Quontra Solutions provides .NET training by Real time Industry experts. .NET is having good demand in the market. Our .NET online training Instructors are very much experienced and highly qualified and dedicated.Quontra Solutions main motto is to Provide Industry Oriented best Online Training on all IT Courses. All our courses are taught by experienced trainers who have extensive field knowledge with the topics they teach. We are offering Job Oriented online Training Program on .NET .Our .NET online training program is job oriented. After completion of .NET training with us you should be able to work on any kind of project. After completion of .NET online training our dedicated team will be supporting you.Please call us for demo on .NET. Quontra Solutions is the best .NET online training Institute in USA. Course Features:• Interview guidance - Questions • Technical guidance and support after the course completion• We provide Course Materials • We help you in Resume Preparation• Providing job assistance till you get the right job in the industry• Project SupportFor attending the Free Demo Session, Please contact us: QUONTRASOLUTIONS3427 Vintage cir , SE Smyrna, GA-30080 Phone: (404)-900-9988 Email: [email protected]: http://www.quontrasolutions.com

Transcript of Introduction to .Net Frame work by Quontra Solutions

Introduction to .Net Framework BY Quontra Solutions

Email : [email protected] : 404-900-9988WebSite : www.quontrasolutions.com

Introduction to .Net FrameworkByQuontra Solutions

Before .NETWindows GUI development: Win32 API, MFC, Visual Basic, COMWeb development: ASPJava Write once, run anywhere.Embrace and extend: Visual J++

Life As a C/Win32 API ProgrammerTraditional software development for the Windows.

C developers are forced to contend with complex memory management and pointer arithmetic. It lacks the benefits provided by the object-oriented approach

When you combine the thousands of global functions and data types defined by the Win32 API to an already formidable language, it is little wonder that there are so many buggy applications floating around today.

Life As a C++/MFC ProgrammerC++ is an object-oriented layer on top of C. Programmers benefit from the famed pillars of OOP (encapsulation, inheritance, and polymorphism).

Microsoft Foundation Classes (MFC) provides a set of C++ classes that facilitate the construction of Win32 applications. It wraps a sane subset of the raw Win32 API behind a number of classes, magic macros, and numerous code-generation tools (wizards).

Regardless of the helpful MFC, programming for Windows using C++ remains a difficult and error-prone experience

Visual Basic 6.0 ProgrammerAbility to build complex user interfaces, code libraries, and data access logic with minimal fuss and bother. VB6 hides the complexities of the raw Win32 API from view using integrated code wizards, intrinsic data types, classes, and VB-specific functions.

Not fully object-orientedNo is-a relationships between types (i.e., no classical inheritance)No multithreaded applications unless you are willing to drop down to low-level Win32 API calls (which is complex at best and dangerous at worst).

Life As a Java/J2EE ProgrammerObject oriented with syntactic roots in C++. Java cleans up many unsavory syntactical aspects of C++. Java provides programmers with a large number of predefined packages that contain various type definitions.

Limited ability to access non-Java APIs.Little support for true cross-language integration. Not appropriate for many graphically or numerically intensive applications. A better approach for such programs would be to use a language such as C++ where appropriate.

Life As a COM Programmer Microsofts previous application development framework. reusable binary code. C++ programmers can build COM classes that can be used by VB6. Delphi programmers can use COM classes built using C. COMs language independence is limited. COM has no support for classical inheritance). COM is extremely complex under the hood.The Active Template Library (ATL) provides a set of C++ classes, templates, and macros to ease the creation of COM types.

Windows DNA ProgrammerMicrosoft has been adding more Internet-aware features into its family of operating systems and products. COM-based Windows Distributed interNet Applications Architecture (DNA) is quite complex.Due to the simple fact that Windows DNA requires the use of numerous technologies and languages (ASP, HTML, XML, JavaScript, VBScript, COM(+), and data access API like ADO).

The complete mazeCompletely unrelated syntaxes. JavaScript has a syntax much like C, while VBScript is a subset of VB6. The result is a highly confused mishmash of technologies.Each language and/or technology has its own type system:

An int in JavaScript is not quite the same as an Integer in VB6.

.Net, the Rescuer

.NETOOPJVMGUIWebcomponent-based designn-tier design

.Net, the Rescuer

11

.Net providesIntegrated environmentInternet, Desktop , Mobile devicesconsistent object-orientedTo provide a portable environmentA managed environment

What Is .NET.NET is a framework New programming methodology.NET is platform independent / cross platform.NET is language-insensitive

.NET is cross-platform

APP.exe

?Win64Win32(XP,2K,98)WinCE

Narrow view of .Net applicationsOperating System + Hardware.NET Framework

.NET Application

.Net Framework

.Net Architecture.NET architecture is:multi-languagecross-platformbased on the CLR, FCL, and JIT technology.NET components are packaged as assemblies

.Net Architecture

.Net Technical ArchitectureBase Class LibraryCommon Language SpecificationCommon Language RuntimeADO.NET: Data and XMLVBC++C#Visual Studio.NETASP.NET: Web Servicesand Web FormsJScriptWindowsFormsWindowsForms

Common Language RuntimeA common runtime for all .NET languagesCommon type systemCommon metadataIntermediate Language (IL) to native code compilersMemory allocation and garbage collectionCode execution and securityOver 15 languages supported todayC#, VB, Jscript, Visual C++ from MicrosoftPerl, Python, Smalltalk, Cobol, Haskell, Mercury, Eiffel, Oberon, Oz, Pascal, APL, CAML, Scheme, etc.Rational is working on Java compiler for CLR

The CLR Architecture

Class LoaderMSIL to NativeCompilers (JIT)CodeManagerGarbageCollector (GC)Security EngineDebug EngineType CheckerException ManagerThread SupportCOM MarshalerBase Class Library Support

CLR Execution Model (Narrow)Code in VB.NETCode in C#Code in another .NET LanguageVB.NET compilerC# compilerAppropriateCompilerIL(IntermediateLanguage) codeCLR just-in-timeexecution

CLR Execution ModelVBSource codeCompilerC++C#CompilerCompilerAssemblyIL CodeAssemblyIL CodeAssemblyIL CodeOperating System ServicesCommon Language Runtime

JIT CompilerNative CodeManagedcode

UnmanagedComponent

How CLR works?

CLR based execution

APP.exeother FCL components

CLR

JIT Compilerobj code OS Process

Underlying OS and HW

Core FCL

Common Language RuntimeExecution EngineCompiles Microsoft Intermediate Language (MSIL) into native codeHandles garbage collectionHandles exceptionsEnforces code access securityHandles verificationManaged v. Unmanaged

Implications of CLR execution modelClients need CLR & FCL to run .NET appsavailable via Redistributable .NET FrameworkDesign trade-offmanaged execution (memory protection, verifiable code, etc.)portability:slower execution?

CLR and JIT compilingIndirect execution of .Net applications.All .NET languages compile to the same CIL.The CLR transforms the CIL to assembly instructions for a particular hardware architecture.This is termed jiting or Just-in-time compiling.Some initial performance cost, but the jitted code is cached for further execution.The CLR can target the specific architecture in which the code is executing, so some performance gains are possible.

Advantages of CLRSupport for developer services (debugging)Interoperation between managed code and unmanaged code (COM, DLLs).Managed code environmentImproved memory handlingImproved garbage collection

Advantages of CLRJIT allows code to run in a protected environment as managed code.

JIT allows the IL code to be hardware independent.

CLR also allows for enforcement of code access security.

Verification of type safety.

Access to Metadata (enhanced Type Information)

Common Language Infrastructure

CLI

Common Language InfrastructureCLI allows for cross-language development.Four components:Common Type System (CTS)Meta-data in a language agnostic fashion.Common Language Specification behaviors that all languages need to follow.A Virtual Execution System (VES).

Common Type System (CTS)A specification for how types are defined and how they behave.no syntax specifiedA type can contain zero or more members:FieldMethodPropertyEvent

Common Type System (CTS)

CTS Data Types

Common Data TypesCLR provides a set of primitive types that all languages must support. The data types include:Integerthree types 16/32/64 bitsFloattwo types: 32/64 bitsBoolean and CharacterDate/time and Time spanThe primitive types can be collected intoArraysStructuresCombination of the two

Common Language Specification (CLS)Not all languages support all CTS types and featuresC# is case sensitive, VB.NET is notC# supports pointer types (in unsafe mode), VB.NET does notC# supports operator overloading, VB.NET does not

CLS was drafted to promote language interoperabilityvast majority of classes within FCL are CLS-compliant

Comparison to JavaHello.javaHello.classJVM

compile

executeHello.vbHello.exeCLR

compile

executeSource codeByte codeCILSource code

Base Class Library @ FCL

Base Class LibrarySimilar to Javas System namespace.Used by all .NET applicationsHas classes for IO, threading, database, text, graphics, console, sockets/web/mail, security, cryptography, COM, run-time type discovery/invocation, assembly generation

Framework Class Library @ BCLSingle consistent set of object oriented class libraries to enable building distributed web applications (Unified Classes)

Built using classes arranged across logical hierarchical namespaces

Work with all CLR languagesNo more VBRun or MFC divide

Example

Intermediate Language (IL).NET languages are not compiled to machine code. They are compiled to an Intermediate Language (IL).

CLR accepts the IL code and recompiles it to machine code. The recompilation is just-in-time (JIT) meaning it is done as soon as a function or subroutine is called.

The JIT code stays in memory for subsequent calls. In cases where there is not enough memory it is discarded thus making JIT process interpretive.

Thank you !!!

_1034280560.vsd

_1034283757.vsd

_1034284278.vsd

_1034965466.vsd

_1034281237.vsd

_1034280468.vsd