+ All Categories
Home > Technology > Visual studio.net

Visual studio.net

Date post: 21-Jan-2015
Category:
Upload: satish-verma
View: 1,627 times
Download: 2 times
Share this document with a friend
Description:
 
Popular Tags:
44
Introduction to Visual Studio.NET Integrated Information Systems Mike Helstrom Solution Architect [email protected]
Transcript
Page 1: Visual studio.net

Introduction to Visual Studio.NET

Integrated Information Systems

Mike HelstromSolution Architect

[email protected]

Page 2: Visual studio.net

Agenda

What is .NET?.NET FrameworkVisual Studio.NETC#Visual Basic.NETQ & A

Page 3: Visual studio.net

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/

Page 4: Visual studio.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

Page 5: Visual studio.net

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

Page 6: Visual studio.net

.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)

Page 7: Visual studio.net

.NET Framework

Page 8: Visual studio.net

.NET Framework

.NET Framework consists of 3 main parts:

Common Language RuntimeFramework Classes/LibrariesASP.NET

http://msdn.microsoft.com/net

Page 9: Visual studio.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

Page 10: Visual studio.net

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

Page 11: Visual studio.net

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

Page 12: Visual studio.net

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

Page 13: Visual studio.net

.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

Page 14: Visual studio.net

.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

Page 15: Visual studio.net

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

Page 16: Visual studio.net

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

Page 17: Visual studio.net

Visual Studio.NET

Page 18: 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

Page 19: Visual studio.net

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

Page 20: Visual studio.net

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#

Page 21: Visual studio.net

Visual Studio.NET Demo

Page 22: Visual studio.net

C#

Page 23: Visual studio.net

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

Page 24: Visual studio.net

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

Page 25: Visual studio.net

Visual Basic.NET

Page 26: Visual studio.net

Visual Basic.NET

Leave it in VB6WebClasses, ActiveX Documents, DHTML Projects

Thinking in VB.NETData Types, Type vs. StructureProperty Functions, Zero Bound ArraysDefault Parameters

New FeaturesForms Designer, Declaration SyntaxStructured Exception HandlingOverloading, InheritanceFree Threading

ADO.NET

Page 27: Visual studio.net

VB.NET: Data Types

True is now = 1Integer Data type has changed

Short (Int16), Integer (Int32), Long (Int64)VB 6

VB.NET

Dim intAge As IntegerDim intID As Long

Dim intAge As ShortDim intID As Integer

Page 28: Visual studio.net

VB.NET: Type vs. Structure

Defining user defined types (UDT) has a new syntaxVB 6

VB.NET

Type Customer CustomerNumber as Long CustomerName As String CustomerCompany As StringEnd Type

Structure Customer Public CustomerNumber as Integer Public CustomerName As String Public CustomerCompany As StringEnd Structure

Page 29: Visual studio.net

VB.NET: Property Functions

VB 6

VB.NET

Public Property Get CustomerName() As StringCustomerName = m_CustName

End PropertyPublic Property Let CustomerName(sCustName As String)

m_CustName = sCustNameEnd Property

Public Property CustomerName() As String Get CustomerName = m_CustName End Get Set m_CustName = Value End SetEnd Property

Page 30: Visual studio.net

VB.NET: Zero Bound Arrays

Option Base 1|0 has been removedAll arrays are base 0The following declaration has 5 elements, arrElements(0) thru arrElements(4)

Dim arrElements(5) As String

Page 31: Visual studio.net

VB.NET: Default Properties

Default properties are no longer supported.Important! Early Binding is key in VB6VB 6

VB.NET

Note: Recordset (COM ADO) is not the preferred data storage object in VB.NET, this is just an example.

txtAddress = rs(“Addr_1”)lblFName = “First Name”

txtAddress.Text = rs(“Addr_1”).valuelblFName.Text = “First Name”

Page 32: Visual studio.net

VB.NET Forms Designer

New Forms DesignerVB.NET, C++, C#

Enhanced Menu EditorControl AnchorsNew PropertiesVisual Inheritance

Page 33: Visual studio.net

VB.NET Demo

Page 34: Visual studio.net

VB.NET: New Declaration Syntax

Variables can now be declared and initialized on declaration line.VB 6

VB.NET

Dim intLoop As IntegerintLoop = 10

Dim intLoop As Integer = 10

Page 35: Visual studio.net

VB.NET: Structured Exception Handling

VB.NET supports elegant error handlingVB 6

VB.NET

On Error Goto ErrTag ... ‘clean up Exit FunctionErrTag: ‘error handling ‘clean upEnd Function

Try ...Catch ‘error handlingFinally ‘clean upEnd Try

Page 36: Visual studio.net

VB.NET: Overloading

Functions can now be overloaded (accept arguments of different types)VB.NETOverloads Function ConvertSQL(ByVal strString As String) As String ConvertSQL = "'" & strString & "'"End Function Overloads Function ConvertSQL(ByVal intNum As Integer) As String ConvertSQL = CStr(intNum)End Function

Page 37: Visual studio.net

VB.NET: Inheritance

Public Class Customer Private m_CustName As String Public Property CustomerName() As String Get CustomerName = m_CustName End Get Set m_CustName = Value End Set End Property End Class

Public Class CustCompany Inherits Customer Private m_CustCompany As String Public Property CustomerCompany() As String Get CustomerCompany = m_CustCompany End Get Set m_CustCompany = Value End Set End PropertyEnd Class

Page 38: Visual studio.net

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

Page 39: Visual studio.net

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

Page 40: Visual studio.net

VB.NET Demo

Page 41: Visual studio.net

VB 6 Moving Forward

AvoidWeb Classes, ActiveX Docs, DHTML Apps

Development TechniquesEarly BindingDon’t use Default PropertiesUse Constants (such as true)Avoid GoSubUse ByVal and ByRef explicitly (ByVal is now default)Use ADO

VB6 to VB.NET Conversion TechniquesRelax, take breaks often

Page 42: Visual studio.net

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

Page 43: Visual studio.net

TechNet Briefing

Microsoft TechNet Briefing, Portland, ME3/27/01 9:00AM – 12:00PM

Co-located at the Maine Technology Job Fair http://www.mainetechnologyjobfair.com/

Attendees receive a FREE copy of SQL Server 2000 Evaluation Edition (120 day) and ISA Enterprise Edition Evaluation (120 day). Topics include: Using Microsoft Project 2000 and Visio 2000 to plan and track your Windows 2000 deployment, and How to make full use of Office and Windows 2000 Web integration.

Page 44: Visual studio.net

http://www.iisweb.com

Questions?


Recommended