Microsoft Academic Program VS.NET Tools Student Technology Conference 2005 Neno Loje Microsoft Student Partner Universität Hamburg
Microsoft Academic Program
VS.NET Tools
Student Technology Conference 2005
Neno LojeMicrosoft Student Partner
Universität Hamburg
Microsoft Academic
Program
Student Technology Conference 2005
VS.NET Tools
Neno LojeMicrosoft Student PartnerUniversität [email protected]
Microsoft Academic
Program
Student Technology Conference 2005Wer bin ich?
• Neno Loje– Microsoft Student Partner (MSP)– Student der Informatik an der Universität Hamburg– Entwickler bei der KEEP IT SIMPLE GmbH in Hamburg
• Und noch?– Autor für div. Fachzeitschriften und Sprecher auf
Fachkonferenzen– Microsoft Certified Professional (MCP)– Microsoft Most Valuable Professional (MVP) für Visual C+– Codezone Site-Editor für Deployment und die Base Class Library
• Arbeitsschwerpunkte– .NET-Architektur und Technologien– Design wiederverwendbarer Komponenten und API‘s– Smart Clients (Windows Forms)
Microsoft Academic
Program
Student Technology Conference 2005Making of…
• Sehr viel Neues– Zur Beruhigung: Mehr Evolution als
Revolution
• Weitaus mehr als in einen Vortrag passt– Persönliche Auswahl
• Viele weitere Vorträge
Microsoft Academic
Program
Student Technology Conference 2005Beta Content Warning
• Die eingesetzte Software ist eine Vorabversion.
• Stabilität und Funktionsumfang spiegeln nicht die des endgültigen Produkts wieder.Wir möchten nachdrücklich darauf hinweisen, dass die
Betaversion eines Produkts nicht dieselbe Stabilität aufweist wie die Verkaufsversion eines Microsoft-Produkts. Es ist
möglich, dass Probleme auftreten, die zu Datenverlust oder Datenbeschädigungen führen. Die Version ist nicht für eine
vollständige Verwendung geeignet. Sie sollten Ihre vorhandenen Daten sichern, bevor Sie diese Software
installieren und ausführen.
Don‘t try this with your PC at home!Don‘t try this with your PC at home!(or use Virtual PC (or use Virtual PC ))
Microsoft Academic
Program
Student Technology Conference 2005Developer Roadmap
WindowsWindows““Longhorn”Longhorn”
Microsoft Academic
Program
Student Technology Conference 2005Ziele von Visual Studio 2005
• Zwischenschritt auf dem Weg zu WinFx/Longhorn
• Top-Customer Issues• Produktivität
– Weniger Codezeilen bis zum Ergebnis
• Performance• Dinge, die bisher nicht möglich waren
– Neue Managed-Klassen– .NET Code in der Datenbankschicht
Microsoft Academic
Program
Student Technology Conference 2005“Einfacher” Drucken
Private Sub Button1_Click(…) Handles Button1.ClickWith My.Computer.Printer.WriteLine("Circuit Board ID: " & _ txtCircuitBoardID.Text).WriteLine("Date Printed: " & Now).WriteLine(PictureBox1.Image) .WriteHorizontalLine(Height:=3).WriteLine("Test Data").WriteLine(TextBox1.Text).Print(PreviewDialog:=True)End WithEnd Sub
Private Sub Button1_Click(…) Handles Button1.ClickWith My.Computer.Printer.WriteLine("Circuit Board ID: " & _ txtCircuitBoardID.Text).WriteLine("Date Printed: " & Now).WriteLine(PictureBox1.Image) .WriteHorizontalLine(Height:=3).WriteLine("Test Data").WriteLine(TextBox1.Text).Print(PreviewDialog:=True)End WithEnd Sub
Private Sub Button1_Click(…) Handles Button1.Click PrintPreviewDialog1.Document = PrintDocument1 PrintPreviewDialog1.ShowDialog()End SubPrivate Sub PrintDocument1_PrintPage(…) Handles PrintDocument1.PrintPage Dim font As New Font("Arial", 10) Dim brush As Brush = Brushes.Black Dim X As Integer = 50 Dim Y As Integer = 50 Dim LineHeight As Integer = 20 With e.Graphics .DrawString("Circuit Board ID: " & _ txtCircuitBoardID.Text, font, _ brush, X, Y) Y = Y + LineHeight .DrawString("Date Printed: " & Now, font, _ brush, X, Y) Y = Y + LineHeight .DrawImage(PictureBox1.Image, X, Y) Y = Y + LineHeight + _ PictureBox1.Image.Height .DrawLine(Pens.Black, X, Y, 750, Y) Y = Y + LineHeight .DrawString("Test Data", font, brush, X, Y) Y = Y + LineHeight .DrawString(TextBox1.Text, font, brush, X, Y) End WithEnd Sub
Private Sub Button1_Click(…) Handles Button1.Click PrintPreviewDialog1.Document = PrintDocument1 PrintPreviewDialog1.ShowDialog()End SubPrivate Sub PrintDocument1_PrintPage(…) Handles PrintDocument1.PrintPage Dim font As New Font("Arial", 10) Dim brush As Brush = Brushes.Black Dim X As Integer = 50 Dim Y As Integer = 50 Dim LineHeight As Integer = 20 With e.Graphics .DrawString("Circuit Board ID: " & _ txtCircuitBoardID.Text, font, _ brush, X, Y) Y = Y + LineHeight .DrawString("Date Printed: " & Now, font, _ brush, X, Y) Y = Y + LineHeight .DrawImage(PictureBox1.Image, X, Y) Y = Y + LineHeight + _ PictureBox1.Image.Height .DrawLine(Pens.Black, X, Y, 750, Y) Y = Y + LineHeight .DrawString("Test Data", font, brush, X, Y) Y = Y + LineHeight .DrawString(TextBox1.Text, font, brush, X, Y) End WithEnd Sub
Visual Basic .NET 2003
Visual Basic “Whidbey”
Microsoft Academic Program
Visual Studio Debugger
Microsoft Academic
Program
Student Technology Conference 2005RAD Debugging
• Edit and Continue: Code zur Laufzeit verändernErlaubte Änderungen – Beispiele:– Hinzufügen von privaten Felder zu einer Klasse– Hinzufügen von privaten, nicht-virtuellen Methoden zu einer
Klasse– Verändern des Inhalts einer Methode (auch während des
“Stepping”)Verbotene Änderungen – Beispiele:– Entfernen von Feldern/Methoden– Bearbeiten von generischen Klassen (Generics)– Die Serialisierung erkennt neue Felder nicht.
• Display-Attribute für ein komfortableres Debuggen
Microsoft Academic Program
Streng-Typisierte Ressourcen
Microsoft Academic
Program
Student Technology Conference 2005Performance
• Zielsetzungen– Langfristig: Performance der CLR ähnlich zu nativem Code– Reduzieren des Overheads von zusätzlichen verwalteten
Prozessen– Verringern der Startzeit und des Arbeitsspeicherbedarfs
• NGen– Kompiliert IL-Code in nativen Code, speichert Ergebnis auf
Platte– Vorteile: Rekompilierung des IL nach nativen Code
unnötig, somit schnellerer Programmstart– VS 2005: Wesentliche Reduktion des privaten, nicht
gemeinsam verwendeten Arbeitsspeicherbedarfs.– OS: ‘Kein-JIT-Plan, jeglicher managed Code wird ge-NGen-
ed
Microsoft Academic
Program
Student Technology Conference 2005
VS .NET VS .NET ProjektProjekt
Assembly: geom.dll
VB, C#, …VB, C#, … BuildBuild
SQL Server SQL Server 20052005
SQL Daten-Definition: SQL Daten-Definition: create create assembly … assembly … create function … create function … create create procedure … procedure … create trigger … create trigger … create create type …type …SQL Query: SQL Query:
SELECT name FROM Supplier SELECT name FROM Supplier WHERE Location::Distance ( @point ) < 3WHERE Location::Distance ( @point ) < 3
CLR gehosted in SQL (in-proc)
SQL CLR-Funktionalität
Define Location.Distance()
Microsoft Academic
Program
Student Technology Conference 2005SQL-Programmiermodell
Zeichenkette splitten• Der bisherige Weg….
declare @str varchar(200)declare @str varchar(200)select @Str = 'Microsoft Corporation|SQL Server|2003|select @Str = 'Microsoft Corporation|SQL Server|2003|SQL-CLR|2002-08-20|11:32:00|Document|3.b.3'SQL-CLR|2002-08-20|11:32:00|Document|3.b.3'SELECTSELECTsubstring(@Str + '|', 0 + 1, substring(@Str + '|', 0 + 1, charindex('|', @Str + '|', 0 + 1) - 0 - 1 ),charindex('|', @Str + '|', 0 + 1) - 0 - 1 ),substring(@Str + '|', charindex('|', @Str + '|') + 1, substring(@Str + '|', charindex('|', @Str + '|') + 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') - 1 ),charindex('|', @Str + '|') - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1,charindex('|', @Str + '|') + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|','|', charindex('|', @Str + '|') + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - 1 ),charindex('|', @Str + '|') + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1, charindex('|', @Str + '|') + 1) + 1) + 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|','|', charindex('|', @Str + '|') + 1) + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|','|', charindex('|', @Str + '|') + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1,charindex('|', @Str + '|') + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|', '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|','|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|', '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1,charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|', '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|','|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|', '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|', '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1, 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|', '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|','|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - 1) - charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|', '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - 1 ),1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1,1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|','|', charindex('|', @Str + '|', charindex('|', @Str + charindex('|', @Str + '|', charindex('|', @Str + '|','|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1) - 1) + 1) - charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - 1 ) 1) - 1 )
declare @str varchar(200)declare @str varchar(200)select @Str = 'Microsoft Corporation|SQL Server|2003|SQL-CLR|2002-select @Str = 'Microsoft Corporation|SQL Server|2003|SQL-CLR|2002-08-20|11:32:00|Document|3.b.3'08-20|11:32:00|Document|3.b.3'SELECTSELECTsubstring(@Str + '|', 0 + 1, substring(@Str + '|', 0 + 1, charindex('|', @Str + '|', 0 + 1) - 0 - 1 ),charindex('|', @Str + '|', 0 + 1) - 0 - 1 ),substring(@Str + '|', charindex('|', @Str + '|') + 1, substring(@Str + '|', charindex('|', @Str + '|') + 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') - 1 ),charindex('|', @Str + '|') - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1,charindex('|', @Str + '|') + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - 1 ),charindex('|', @Str + '|') + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1, charindex('|', @Str + '|') + 1) + 1) + 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1,charindex('|', @Str + '|') + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1,charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1,charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - 1 ) charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - 1 )
Microsoft Academic
Program
Student Technology Conference 2005
SQL-Programmiermodell Zeichenkette teilen
Public Shared Sub SplitString()Public Shared Sub SplitString() Dim s As StringDim s As String s = "Microsoft Corporation|SQL s = "Microsoft Corporation|SQL Server|Server|2003|SQL-CLR|2002-08-2003|SQL-CLR|2002-08- 20|11:32:00|20|11:32:00|Document|3.b.3"Document|3.b.3" Dim myArray() As String = Split(s, "|")Dim myArray() As String = Split(s, "|")End SubEnd Sub
• Der neue Weg….
Weitere VorträgeWeitere Vorträge
Managed Code statt T-SQLManaged Code statt T-SQLDonnerstag, 17:30hDonnerstag, 17:30h
Neues vom SQL Server 2005Neues vom SQL Server 2005Donneratag, 9:00hDonneratag, 9:00h
Microsoft Academic Program
XML Code Documentation
Microsoft Academic
Program
Student Technology Conference 2005Projects and Testing
• Often an expensive afterthought• Strategies for minimizing impact
RequirementsCoding
IntegrationBeta Test
Post-Release
5
10
15
20
25
30
Relative CostTo Fix Bugs...
Microsoft Academic
Program
Student Technology Conference 2005Defence In Depth
• Microsoft uses a 'defence in depth' strategy– Unit testing– Code reviews– Frequent builds
• Catch bugs early– Static checks– Runtime checks
Microsoft Academic
Program
Student Technology Conference 2005VSTS Test Types
• Unit Tests– Test class methods
• Web Tests– Record and playback interactions
• Load Tests– Simulate multiple users
• Manual Tests– Provide scripts for manual tasks
• Third-party Tests– Integrated into VSTS
Microsoft Academic Program
Unit Testing & Code Coverage
Microsoft Academic
Program
Student Technology Conference 2005Static Analysis
• Find errors in your code before you run or deploy it
• A range of checks– From style to code correctness to security issues
• Integrated into the Team System Build Environment
Microsoft Academic
Program
Student Technology Conference 2005Static Analysis
The dev process with Static Analysis
CodCodee CompileCompileCompileCompile StaticStatic
AnalysisAnalysisStaticStatic
AnalysisAnalysis
AnalyzeAnalyzeCodeCode
AnalyzeAnalyzeCodeCode
CheckCheckRulesRulesCheckCheckRulesRules
RaiseRaiseErrorsErrorsRaiseRaiseErrorsErrors
BinarBinaryy
Microsoft Academic
Program
Student Technology Conference 2005PREFast
• Static analysis for C/C++ code– Managed and unmanaged C++
• Catches common bugs– Buffer overruns, uninitialized memory– Memory leaks, null pointer dereference
• Reported as compiler warnings– Display path to problem– Use #pragma to turn off
Microsoft Academic
Program
Student Technology Conference 2005FxCop
• Static analysis for .NET assemblies– Not just C++
• Uses design guidelines• Customizable
– Which checks to include– Whether to report as error or warning– Create custom rules
Microsoft Academic Program
Static Code Analysis
Microsoft Academic
Program
Student Technology Conference 2005Unit Test Management
Microsoft Academic
Program
Student Technology Conference 2005Code Coverage
• How much of your class have you tested?– Percentage or graphical
Microsoft Academic
Program
Student Technology Conference 2005
Au
tho
Au
tho
rsrs
PROJECT FILE - $%#^$&% - @$#%$^#
AbracadabraAbracadabraFe
ed
sFe
ed
s
Visual Studio .NET 2002/2003
VS Build SystemVS Build System
ProducesProduces
Final Product
Pre build stepPre build step00110101010011010101111001011011100101101101100111110110011100101001110010100111Post build Post build stepstep
Microsoft Academic
Program
Student Technology Conference 2005
Final Product
Produces
Feeds
Authors
DEVELOPER
Authors
MSBuild
MSBuildMSBuild
PROJECT FILE<Project> <Property … /> <Item … /> <Target … /></Project>
Microsoft Academic Program
MSBuild
Microsoft Academic
Program
Student Technology Conference 2005
Mehr Informationen
• MSDN Online Deutschlandhttp://www.microsoft.com/germany/msdn/
• Codezonehttp://www.codezone.de
Microsoft Academic
Program
Student Technology Conference 2005Danke!
Danke für Ihre Aufmerksamkeit!
Microsoft Academic
Program
Student Technology Conference 2005
Fragen und Antworten ??
??
?