27
Introduction to Visual Studio.NET Pradeep K. Shah [email protected]

Introduction to Visual Studio.NET Pradeep K. Shah [email protected]

Embed Size (px)

Citation preview

Introduction to Visual Studio.NET

Pradeep K. [email protected]

Agenda

What is .NET?.NET FrameworkVisual Studio.NETC#Q & A

What is Microsoft .NET?

.NET represents an advanced new generation of software that will drive the Next Generation Internet. Its purpose is to make information available any time, any place, and on any device.Quick Definition

.NET is an initiative to integrate all Microsoft products with the “Next Generation” web.

http://www.microsoft.com/net/

Next Generation Internet

Web siteWeb site

Web siteWeb site

Web siteWeb site

BackendBackendAppApp

MegaMegaServiceService

BackendBackendAppApp

MegaMegaServiceService

Loosely-Loosely-coupled, coupled, services services connected by connected by XML-based XML-based messages and messages and contracts, contracts, written in many written in many languageslanguages

ServiceServiceDeviceDevice

XML-XML-msgsmsgs ServiceService

ServiceService ServiceService

What is Microsoft .NET? (Cont.)

Core components of .NET are:.NET Infrastructure and Tools.NET Services

An integrated set of building block services for the new Internet, including Passport.NET (for user authentication), and services for file storage, user preference management, calendar management, and many others.

.NET User ExperienceA broader, more adaptive user experience, where information is delivered in a variety of ways on a variety of different devices.

.NET Device SoftwareEnables a new breed of smart Internet devices that can leverage Web Services

http://www.microsoft.com/business/vision/netvision.asp

.NET Infrastructure and Tools

.NET Infrastructure and Tools.NET Enterprise Servers

SQL 2000Exchange 2000ISA 2000Host Integration Server 2000Application Center 2000BizTalk Server 2000Commerce Server 2000

Visual Studio.NET.NET FrameworkWindows.NET

“Whistler” (Windows XP)

.NET Framework

.NET Framework

.NET Framework consists of 3 main parts:

Common Language RuntimeFramework Classes/LibrariesASP.NET

http://msdn.microsoft.com/net

The .NET Framework

Base Class LibraryBase Class Library

Common Language SpecificationCommon Language Specification

Common Language RuntimeCommon Language Runtime

ADO.NET: Data and XMLADO.NET: Data and XML

VBVB C++C++ C#C#V

isual S

tud

io.N

ET

Visu

al Stu

dio

.NE

T

ASP.NET: Web ServicesASP.NET: Web Servicesand Web Formsand Web Forms

JScriptJScript ……

WindowsWindowsFormsForms

WindowsWindowsFormsForms

Common Language Runtime (CLR)

A common runtime for all .NET languagesCommon type systemCommon metadataIntermediate Language (IL) to native code compilersMemory allocation and garbage collectionCode execution and security

Over 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

Common Language Runtime (CLR)

Enables cross-language interoperabilityCommon Language Specification describes interoperability requirements

Language/Hardware/OS IndependentCompact framework for small devices

Industrial strength Garbage collectorDesigned for multi-processor servers

CLR: Execution Model

VBVBSource Source codecode

CompilerCompiler

C++C++C#C#

CompilerCompilerCompilerCompiler

AssemblyAssemblyIL CodeIL Code

AssemblyAssemblyIL CodeIL Code

AssemblyAssemblyIL CodeIL Code

Operating System ServicesOperating System Services

Common Language RuntimeCommon Language Runtime

JIT CompilerJIT Compiler

Native CodeNative Code

ManagedManagedcodecode

UnmanagedUnmanagedComponentComponent

.NET Framework Libraries

Single consistent set of object oriented class libraries to enable building distributed web applications (Unified Classes)

Built using classes arranged across logical hierarchical namespaces

For example: System.Data.SQL

Work with all CLR languagesNo more “VBRun” or “MFC” divide

.NET Framework Libraries

Unified Classes

Web Classes (ASP.NET)

XML Classes

System Classes

Drawing Classes

Windows FormsData (ADO.NET)

Controls, Caching, Security, Session, Configuration etc

Collections, Diagnostics, Globalization, IO, Security,Threading Serialization, Reflection, Messaging etc

ADO, SQL,Types etc

Drawing, Imaging, Text, etc

Design, Cmpnt Model etc

XSLT, Path, Serialization etc

ASP.NET

ASP.NET is a new programming framework designed to make web apps easier to:

Build, Deploy, Run

Radical advancement of today’s ASPBroader programming language support

Visual Basic.NET, Jscript.NET, C#Easier page programming model

NamespacesRicher XML features and integrationXCopy/FTP deploymentBetter reliability and recoveryExcellent Visual Studio designer support

ASP.NET

ASP.NET is compiled, not interpretedBetter performanceEarly binding, strong typing, JIT compiling to native code

Configuration settings in XML-based filesSession state can now be shared across a web farm of ASP.NET servers

.NET State Server Process manages stateApplication state is still single severASP.NET detects and recovers from problems

Access violations, memory leaks, deadlocksASP.NET supports pre-emptive cycling of apps

Time and request based settings

Visual Studio.NET

Visual Studio.NET

Integrated Development EnvironmentVisual Basic.NET

Many language enhancementsInheritance,Overloading, Free Threading

Visual C++Integration with .NET Framework with managed extensions (classes)

C#New development languageBased on C/C++ with Garbage Collection/Memory Management

JUMP (Java User Migration Path) to .NET (1/25/01)

Visual J++ has been removed from the Visual Studio suite.

http://msdn.microsoft.com/vstudio

JUMP to .NET

Consists of 3 sets of tools and a service offering

Interoperability supportProgramming tools supportAutomated conversion from Java language source code to C#Migration services

VS.NET Features

Single IDE for all LanguagesServer Explorer

Event Viewer, Message Queues, ServicesSQL Databases, Data Connection, Etc.

Integrated IE BrowserHTML/XML EditorsMacros/Macro ExplorerSolution ExplorerTabbed DocumentsDynamic HelpCommon Forms Editor

VB.NET, C++, and C#

Visual Studio.NET Demo

C#

Intro to C#

Design Goals of C#Component Orientated LanguageRobust and Durable Software

FeaturesClassesNamespacesNo header files

VB.NET vs. C#Ability to embed C++ code in C# codeElegance of C/C++ language

Design Goals C#

Component OrientedProperties, methods, events

Robust and DurableGarbage collection (No memory leaks and stray pointers)Exception HandlingType-safety (No uninitialized variables)

Based on C++Interoperability

Support for XML, SOAP

ADO.NET

ADO.NET is the preferred data access method in the .NET FrameworkBetter support for disconnected data accessSpecialized namespacesSystem.Data.SQL – Tuned for SQL ServerSystem.Data.ADO – OLEDB

PortableNative XML Support

ADO.NET

ADOConnectionSimilar to Connection object in ADO

ADOCommandSimilar to Command object in ADO

ADODataSetCommandSomewhat like Recordsets for ADO.NET (DataSet)Designed for stateless operations

ADODataReaderFor streaming methods, similar to Stream

SQLConnection, SQLCommand, and SQLDataSetCommand, SQLDataReader

Resources

Microsofthttp://www.microsoft.com/net

http://msdn.microsoft.com/net

Programmer Resourceshttp://www.gotdotnet.com

http://www.devx.com

VB6 to VB.NET Whitepaperhttp://msdn.microsoft.com/library/techart/vb6tovbdotnet.htm

Example Sitehttp://www.ibuyspy.com