Introduction to dot net framework by vaishali sahare [katkar]

24
Introduction to .NET Framework By, Vaishali Sahare (Katkar)

Transcript of Introduction to dot net framework by vaishali sahare [katkar]

Page 1: Introduction to dot net framework by vaishali sahare [katkar]

Introduction to .NET Framework

By,Vaishali Sahare (Katkar)

Page 2: Introduction to dot net framework by vaishali sahare [katkar]

Development Model

Client

Database Client

Internet Explorer

Outlook Express

Cute FTP

MS Excel

MS Word

Server

Database Server

IIS

MS Exchange

Configured IIS

Charting Comp.

Spell Checker

Page 3: Introduction to dot net framework by vaishali sahare [katkar]

Development Model

Front End

Business Logic

Back EndConnection Tools

Communication Tools Connection Tools

Single Tier - All component on same machine

Two Tier - Any two component on one machine and other one on Another Machine

Multi / Three Tier - All component on different machine

Page 4: Introduction to dot net framework by vaishali sahare [katkar]

Platform

Working• Operating System

– Different Software • Application• System

Development• Editor (IDE)

– Like TC , VB , VC++• Compilers• Libraries• Tools• Debuggers

• Distribution

Page 5: Introduction to dot net framework by vaishali sahare [katkar]

Types Of Applications• Console

– Commands• Windows

– Word – Excel

• Component Library– GramerCheck.dll – Rundll32.dll

• Embedded– Mobile Phones

• Distributed Apps.– Network Based

• Web (app.) Based Programs – Banking Applications – E-Commerce Applications

• Gaming Application– Games– Navigation System

• Database Application– ADO, RDO, ODBC

• Real-Time Emb. Apps.– Flight Controller – Engine Controller

•What Is support of language•We need different function for each type For ex. IO, Forms, Web Form, Threading, Socket, 2D Drawing, Exception, OOP, etc.

Page 6: Introduction to dot net framework by vaishali sahare [katkar]

.Net Framework What Is It

• NET is a framework consisting of common language runtime and a set of .NET base classes which allow us to build distributed, secure, scalable, robust, easily deployable and maintainable applications in a language independent, object-oriented, web enabled, managed way using rich level of integration amongst present technologies.

Page 7: Introduction to dot net framework by vaishali sahare [katkar]

Simple Start

CTS

VB VC

C#N.

Base ClassLibrary

Compilers

.Net Exe (Debug)

•Test executable•Convert executable in O.S. form•Run executable•Manage application memory •ETC.

RuntimeEnvironment

DevelopmentEnvironment

.Net Exe (Release)

.NetFramework

Page 8: Introduction to dot net framework by vaishali sahare [katkar]

Language Infrastructure

VB.NetVB.Net C#C# VC++.NetVC++.Net J#.NetJ#.Net JScriptJScript ------

Common Type SystemCommon Type System

•Type declaration •Type management •Object-oriented type model •Defined rules that languages must follow to be interoperable (CLS)

Page 9: Introduction to dot net framework by vaishali sahare [katkar]

Language Infrastructure

VB.Net C# VC++.Net J#.Net JScript ---

Common Type System

Client-Side Server-Side Mobile-Side

• WinForms • WinForm Controls • Rich Client Apps. • Components • Windows Services

• WebForms • WebForm Controls • WebServices • Mobile WebForms

• Smart Clients • Real-Time Apps.

Page 10: Introduction to dot net framework by vaishali sahare [katkar]

Base Class Library

VB.Net C# VC++.Net J#.Net JScript ---

Common Type System

Client-Side Server-Side Mobile-Side

Base Class Library

• GDI+• Networking • Threading • Web • Protocols • Messaging

•Serialization • Security • Reflection • Timers • ADO.NET • Windowing

Page 11: Introduction to dot net framework by vaishali sahare [katkar]

Common Language Runtime

VB.Net C# VC++.Net J#.Net JScript ---

Common Type System

Client-Side Server-Side Mobile-Side

Base Class Library

Common Language Runtime

- Just In Time Comp. - Garbage Collection - Class loading - Secure environment - Handling Exceptions - Application Domains

Page 12: Introduction to dot net framework by vaishali sahare [katkar]

Platform

VB.Net C# VC++.Net J#.Net JScript ---

Common Type System

Client-Side Server-Side Mobile-Side

Base Class Library

Common Language Runtime

• Transaction support • Message Queuing • Object Pooling • Load Balancing

Windows COM+ Services

• GUI • Multitasking • Event driven model

Page 13: Introduction to dot net framework by vaishali sahare [katkar]

.Net Framework

VB.Net C# VC++.Net J#.Net JScript ---

Common Type System

Client-Side Server-Side Mobile-Side

Base Class Library

Common Language Runtime

Windows COM+ Services .Net

Fra

mew

ork

Windows 2000 / NT / XP

Page 14: Introduction to dot net framework by vaishali sahare [katkar]

.Net Program ExecutionVB.Net Code C# Code VC++.Net Code

CompilerCompiler Compiler

IL Exe Or IL Dll

JIT CompilerClass Library

Native CodeGet ExecuteUnder CLR

CPU-independent instructions

CPU-Dependent

While Execution & After Safety Verification

Page 15: Introduction to dot net framework by vaishali sahare [katkar]

Overall

CLR o.s.

UnmanagedApp.

CustomObjectLib.

ManagedApp.

InternetInformationServer

ASP.Net Run-Time Managed Web

Application

ClassLib.

Page 16: Introduction to dot net framework by vaishali sahare [katkar]

Let’s Start ProgrammingFile | New | Project

Page 17: Introduction to dot net framework by vaishali sahare [katkar]

What Is ProjectProject

Resources DB ToolsUser ControlModulesForms

Standalone Image File

Sound File

Help File

Other files

Win Controls

Win. Forms

Web Controls

Web Forms

Procedures

Functions

Methods

Class Modules

ADO, RDO, ODBC, ADO.Net

Crystal ReportData Report

Connection Tools

Reports Tools

Page 18: Introduction to dot net framework by vaishali sahare [katkar]

Console Modules Imports System Module Module1

Sub Main( )

System.Console.WriteLine ( “First Program" )

End Sub

End Module

Namespace

Required User Defined

Keywords

Class Method OrMember Function Parameter

Auto Generated

Can Be Avoided If Imported

Page 19: Introduction to dot net framework by vaishali sahare [katkar]

Simple Declaring Variables(Access) (Var.name) (As) [New] (Type) [= InitExpr]

Dim i As Integer = 1Dim S As StringDim St As String = “Hello”

Note : New Keyword Is Use While We Are Creating A Object Variable

Eg. Dim B As New Button

More Example:

Dim I, J, K As Integer ' All three are Integer variables.Dim L, M As Long, X, Y As Single ' L and M are Long, X and Y are Single

Page 20: Introduction to dot net framework by vaishali sahare [katkar]

Decision Making

If…Else :

If condition Then[statements]

[ElseIf condition-n Then[elseifstatements]] ...

[Else[elsestatements]]

End If

For & For Each …Next

Syntax :

For counter = start To end [Step step]

[statements][Exit For]

[statements]Next [counter]

Syntax :

For Each element In group[statements]

[Exit For][statements]

Next [element]

Page 21: Introduction to dot net framework by vaishali sahare [katkar]

Do – While Loop

Do

Do [{While | Until} condition][statements]

[Exit Do][statements]

Loop

Or, you can use this syntax:

Do[statements]

[Exit Do][statements]

Loop [{While | Until} condition]

While & With Statement

Syntax :

While condition[statements]

End While

Syntax :

With object[statements]

End With

Page 22: Introduction to dot net framework by vaishali sahare [katkar]

IDE

Form Designer

ToolBox

Solution Explorer

Property Window

Tool Bar

Task Window

Tabbed View

Page 23: Introduction to dot net framework by vaishali sahare [katkar]

IDE

Code View

Server Explorer

Class View

Dynamic Help

Index Result

Run / Stop Program Compilation Mode

Page 24: Introduction to dot net framework by vaishali sahare [katkar]

Flow Of GUI Language Form Designing

Property Setting

Decide Event

Writing Code

Output