Introduksjon til .NET - PowerPoint PPT Presentation

About This Presentation
Title:

Introduksjon til .NET

Description:

Title: PowerPoint-presentasjon Author: OHOI Last modified by: Jonas Folles Created Date: 4/23/2004 7:03:32 AM Document presentation format: Skjermfremvisning – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 29
Provided by: OHOI
Category:

less

Transcript and Presenter's Notes

Title: Introduksjon til .NET


1
XXXXXXXXXXXXXXXXXXX
  • Introduksjon til .NET
  • Jonas Follesø, Abeo AS
  • http//jonas.follesoe.no
  • jonas_at_follesoe.no

2
Agenda
  • Hva er .NET Framework
  • The Common Language Runtime
  • The Framework Class Libraries
  • Støtte for flere progammeringsspråk
  • Støtte for flere platformer
  • Gode utviklingsverktøy
  • Hvordan komme i gang?
  • Demoer ?

3
Hva er .NET?
  • En utviklingsplattform grensesnitt, komponenter
    og verktøy for å utvikle programvare.
  • Den største endringen i Microsofts
    utviklingsplattform siden Windows NT erstattet
    DOS
  • Hva er nytt?
  • Programmerings språk, kompilatorer
  • Måten kode er lastet og eksekvert
  • Sikkerhetsmodell
  • Objektmodell, metadata, distribuerte systemer
  • Klassebiblioteker

4
.NET - Microsofts visjon for programvare
  • Gjøre distribuerte systemer tilgjeng via
    Internett
  • Sømløs integrasjon mellom flere applikasjoner og
    enheter
  • Levere programvare som en tjeneste
  • Neste generasjon brukeropplevelser
  • .NET Framework er programmeringsmodellen som skal
    lansere .NET visjonen.

5
.NET Framework
  • Common Language Runtime (CLR)
  • Multi-language support
  • Common type system
  • Simplified deployment
  • Code Access Security
  • Rich Class libraries
  • Powerful, Consistent Programming Model
  • Focus on code, not plumbing
  • Built for Tools
  • Support for design-time functionality
  • Debugging, profiling, instrumentation support

C
VB.NET
C
J
Others
Web Forms
Web Services
Win Forms
ADO.NET and XML
Base Class Libraries
Common Language Runtime
6
Common Language Runtime
DEVELOPMENT
public static void Main(String args ) String
usr FileStream f StreamWriter w try
usrEnvironment.GetEnvironmentVariable("USERNAME")
fnew FileStream(C\\test.txt",FileMode.Cre
ate) wnew StreamWriter(f)
w.WriteLine(usr) w.Close() catch
(Exception e) Console.WriteLine("Exception"
e.ToString())
public static void Main(String args ) String
usr FileStream f StreamWriter w try
usrEnvironment.GetEnvironmentVariable("USERNAME")
fnew FileStream(C\\test.txt",FileMode.Cre
ate) wnew StreamWriter(f)
w.WriteLine(usr) w.Close() catch
(Exception e) Console.WriteLine("Exception"
e.ToString())
C J VB Cobol
Source code
MSIL Metadata Resources
7
Common Language Runtime
DEPLOYMENT
Setup Copy Browser Click Once
8
Common Language Runtime
DEPLOYMENT
Policy lt?xml version"1.0" encoding"utf-8"
?gt ltconfigurationgt ltmscorlibgt
ltsecuritygt ltpolicygt
ltPolicyLevel version"1"gt
ltCodeGroup class"UnionCodeGroup"
version"1"
PermissionSetName"Nothing"
Name"All_Code"
Description"Code group grants no permissions
and forms the root of the code group tree."gt
ltIMembershipCondition
class"AllMembershipCondition"
version"1"/gt
ltCodeGroup class"UnionCodeGroup"
version"1"
PermissionSetName"FullTrust"
EXECUTION
9
.NET Namespace
System.Web
System.WinForms
Services
UI
Design
ComponentModel
Description
HtmlControls
Discovery
WebControls
Protocols
System.Drawing
Caching
Security
Drawing2D
Printing
Text
Configuration
SessionState
Imaging
System.Data
System.Xml
ADO
SQL
XSLT
Serialization
Design
SQLTypes
XPath
System
Collections
IO
Security
Runtime
InteropServices
Configuration
Net
ServiceProcess
Remoting
Diagnostics
Reflection
Text
Serialization
Globalization
Resources
Threading
10
CLR Design Goals
  • Forenklet applikasjonsutvikling
  • Robust og sikkert kjøremiljø for kode
  • Støtte for flere programmeringsspråk
  • Enklere utrulling og vedlikehold

11
Enklere utvikling
Windows API
HWND hwndMain CreateWindowEx( 0,
"MainWinClass", "Main Window",
WS_OVERLAPPEDWINDOW WS_HSCROLL WS_VSCROLL,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, (HWND)NULL, (HMENU)NULL,
hInstance, NULL) ShowWindow(hwndMain,
SW_SHOWDEFAULT) UpdateWindow(hwndMain)
.NET Framework
Form form new Form() form.Text "Main
Window" form.Show()
12
Enklere utvikling
  • Organization
  • Code organized in hierarchical namespaces and
    classes
  • Unified type system
  • Everything is an object, no variants, one string
    type, all character data is Unicode
  • Component Oriented
  • Properties, methods, events, and attributes are
    first class constructs
  • Design-time functionality

13
Robust og sikkert
  • Automatic lifetime management
  • All .NET objects are garbage collected
  • No stray pointers, no circular references
  • Code correctness and type-safety
  • IL can be verified to guarantee type-safety
  • No unsafe casts, no uninitialized variables,
    no out-of-bounds array indexing
  • Evidence-based security
  • Based on origin of code as well as user
  • Extensible permissions

14
Støtte for flere språk
  • Velg språk som passer deg
  • All .NET funksjonalitet er tilgjennlig i alle
    programmeringsspråk
  • En applikasjon kan skrives i flere språk
  • Debuggere, kodeanalyse, profilering osv fungerer
    for alle språk.
  • Tilgjenglie kompilatorer
  • Fra Microsoft VB, C, C, JScript, Java
  • Fra andre APL, COBOL, Eiffel, Fortran, Haskell,
    ML, Perl, Python, RPG, Scheme, Smalltalk,

15
Uniform programmeringsmodell
16
Bred støtte for flere språk
Dim s as String s "authors" Dim cmd As New
SqlCommand("select from " s,
sqlconn) cmd.ExecuteReader()
VB.NET
string s "authors" SqlCommand cmd new
SqlCommand("select from "s, sqlconn) cmd.Execu
teReader()
C
C
String s S"authors" SqlCommand cmd new
SqlCommand(StringConcat(S"select from ", s),
sqlconn) cmd.ExecuteReader()
17
Bred støtte for flere språk
String s S"authors" SqlCommand cmd new
SqlCommand(StringConcat(S"select from ", s),
sqlconn) cmd.ExecuteReader()
Perl
s "authors" cmd SqlCommand("select from "
s, sqlconn) cmd.ExecuteReader()
Python
assembly_external(name"System.Data.SqlClient.SqlC
ommand") sqlcmdcharacter10 xsqlcmd Cmd
x'authors' cmd sqlcmd("select from "//x,
sqlconn)           call cmd.ExecuteReader() end 
Fortran
18
Bred støtte for flere språk
(let ( (s "authors")   (cmd (new-SqlCommand
(string-append "select from " s)
sqlconn))) (execute-command cmd))
Scheme
local       s STRING       cmd SQLCOMMAND do
     s "authors"       create cmd("select
from " s, sqlconn)       cmd.ExecuteReader() end
Eiffel
ExecuteReader invoke System.Data.SqlClient.Execu
teReader() SqlCommand create
System.Data.SqlClient.SqlCommand(String,\
System.Data.SqlClient.SqlConnection) qu
ery sqlconn -gt let s "authors" in   
cmd lt- SqlCommand ("select from "s, sqlconn)
  cmd ExecuteReader()     
Mondrian
19
Enklere utrulling og administrasjon
  • Assemblies
  • The unit of deployment, versioning, and security
  • Like DLLs, but self-describing through manifest
  • Zero-impact install
  • Applications and components can be shared or
    private
  • Side-by-side execution
  • Multiple versions of the same component can
    co-exist, even in the same process

20
Web Services
  • Expose APIs across the Internet
  • HTML human -- machine
  • XML/SOAP machine -- machine
  • Leverage the Web
  • The same infrastructure
  • Interoperability
  • Distributed scalable applications
  • Stateless
  • Internet and Intranet

21
Web Services
Application Concepts
Data
Schema
Services
Invocation
22
- Web Service demo, klient og deployment
23
.NET Compact Framework
  • .NET rammeverket på mobile enheter
  • Subset av .NET Framework
  • Samme utviklingsverktøy,programmeringsspråkog
    rammeverk

24
(No Transcript)
25
.NET oppsummering
  • Microsoft satser tungt på .NET
  • Visual Studio 2005 7.5 million lines
  • SQL Server 2005 3 million lines 
  • BizTalk Server 2 million lines
  • Visual Studio Team System 1.7 million lines
  •  Windows Presentation Foundation 900K lines
  • Windows Sharepoint Services 750K lines
  • Expression Interactive Designer 250K lines  
  • Sharepoint Portal Server 200K lines
  • Content Management Server 100K lines
  • Kan du .NET kan du enkelt programmere mot alle
    nye Microsoft produkter
  • WinFX kommer, bygd på toppen av. NET

26
Hvordan komme i gang?
  • Last ned Visual Studio Express Editions
  • http//msdn.microsoft.com/express
  • For mer informasjon om .NET
  • http//msdn.microsoft.com/netframework
  • To gode boktips
  • Microsoft Visual C 2005 Express Edition Build
    a Program Now!
  • Microsoft Visual Web Developer 2005 Express
    Edition Build a Web Site Now!

27
Materiell
  • I posen har du informasjon/tilbud fra Microsoft
    og partnere, godis og skrivesaker
  • Bakerst i rommet finner du materiell tilpasset
    denne sesjonen. Forsyn deg!
  • Vi setter pris på tilbakemeldinger på materiellet
    dere får utdelt.

28
Til slutt.
  • Hjelp oss å bli bedre
  • Fyll ut evalueringen som kommer på e-post
  • Gi direkte råd til Microsoft-representanter
  • Hold deg oppdatert
  • www.microsoft.no/informasjon eller fyll ut et
    Hold deg oppdatert kort
  • Besøk oss på www.microsoft.no
Write a Comment
User Comments (0)
About PowerShow.com