View
224
Download
0
Category
Preview:
Citation preview
Neno LojeMicrosoft Student Partner
Universität Hamburg
Microsoft .NET Framework 2.0
Was ist „Whidbey“?
Code Name für• … die nächste Version vom .NET Framework• … die nächste Version von C#, Visual
Basic .NET• … die nächste Version von Visual Studio
Voraussichtliche Produktnamen• … .NET Framework 2.0• … Visual Studio 2005
Agenda
Was ist neu in… ?
• … .NET Framework (BCL)• … Spracherweiterungen / CTS• … Windows Forms 2.0• … ASP.NET 2.0• … ADO.NET 2.0• … Visual Studio 2005• … Noch einiges mehr
Drucken ist erheblich einfacher
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”
The .NET FrameworkA Once in a Decade Change
• PDC 2000 Paradigm Shift– Web services– Managed Code
19801980 19901990 20002000
Ric
hn
ess
Ric
hn
ess
Win16Win16 Win32Win32COMCOM
MFCMFCComponents
ComponentsServicesServices
APIsAPIs
Windows3.0
Landmarks To Date
• Running in over 60% of Fortune 100
• More than 70M systems with .NET Framework
• Strong developer ecosystem
• ISO standardization
0%
50%
100%
150%
200%
250%
300%
350%
Q202 to Q302 Q302 to Q402 Q402 to Q103 Q103 to Q203
Growth of ASP.NET (Netcraft)
Tools
Client Application Model
Windows Forms
Web & Service Application Model
ASP.NET Compact Framewo
rk
Yukon
Data Systems Application Model
Presentation
Mobile PC & Devices Application Model
Communication
Command Line
NT Service
System.MessagingSystem.MessagingSystem.DirectoryServicesSystem.DirectoryServicesSystem.Runtime.RemotingSystem.Runtime.Remoting
System.Windows.FormsSystem.Windows.Forms
System.ConsoleSystem.Console
System.ServiceProcessSystem.ServiceProcess
System.Windows.FormsSystem.Windows.Forms System.WebSystem.Web System.Data.SqlSe
rverSystem.Data.SqlServer
HttpWebRequestHttpWebRequestFtpWebListenerFtpWebListener
SslClientStreamSslClientStream
WebClientWebClient
System.NetSystem.Net
NetworkInformationNetworkInformation
SocketsSockets
CacheCache
System.Windows.FormsSystem.Windows.Forms
FormsForms
ControlControl
Print DialogPrint Dialog
DesignDesign
System.Web.UISystem.Web.UI
PagePage
ControlControl
HtmlControlsHtmlControls
MobileControlsMobileControls
WebControlsWebControls
AdaptorsAdaptors
DesignDesign
System.DrawingSystem.Drawing
System.Web.ServicesSystem.Web.Services
Web.ServiceWeb.Service
DescriptionDescription
DiscoveryDiscovery
ProtocolsProtocols
System.TimersSystem.Timers
System.GlobalizationSystem.Globalization
System.SerializationSystem.Serialization
System.ThreadingSystem.Threading
System.TextSystem.Text
System.DesignSystem.Design
SerializationSerialization
CompilerServicesCompilerServices
Base & Application Services
Fundamentals
System.ComponentModelSystem.ComponentModel
System.CodeDomSystem.CodeDom
System.ReflectionSystem.Reflection
System.EnterpriseServicesSystem.EnterpriseServices
System.TransactionsSystem.Transactions
Security
System.Web.SecuritySystem.Web.Security
AccessControlAccessControl
CredentialsCredentials
CryptographyCryptography
System.Web.ConfigurationSystem.Web.Configuration
System.ConfigurationSystem.Configuration
System.ResourcesSystem.Resources
System.ManagementSystem.Management
System.DeploymentSystem.Deployment
System.DiagnosticsSystem.Diagnostics
Configuration Deployment/Management
PortsPorts
InteropServicesInteropServices
System.RuntimeSystem.Runtime
System.IOSystem.IO
System.CollectionsSystem.Collections
GenericGeneric
PermissionsPermissions
PolicyPolicy
PrincipalPrincipal
TokenToken
System.SecuritySystem.Security System.WebSystem.Web
AdministrationAdministration
ManagementManagement
.NET Framework “Whidbey”
Data
System.WebSystem.Web
PersonalizationPersonalization
CachingCaching
SessionStateSessionState
System.XmlSystem.Xml
SchemaSchema
SerializationSerialization
XpathXpath
QueryQuery
DataSetDataSet
MappingMapping
ObjectSpacesObjectSpaces
ObjectSpaceObjectSpace
QueryQuery
SchemaSchema
System.DataSystem.Data
SqlClientSqlClient
SqlTypesSqlTypes
SqlXMLSqlXML
OdbcClientOdbcClient
OleDbClientOleDbClient
OracleClientOracleClient
Base Innovations
• 64-bit Support• Performance• Edit and Continue• Base Library
Enhancements• Generics
42
Tools
Client Application Model
Windows Forms
Web & Service Application Model
ASP.NET Compact
FrameworkYukon
Data Systems Application Model
Presentation
Mobile PC & Devices Application Model
Communication
Command Line
NTService
System.MessagingSystem.Messaging
System.DirectoryServicesSystem.DirectoryServices
System.Runtime.RemotingSystem.Runtime.Remoting
System.Windows.FormsSystem.Windows.Forms
System.ConsoleSystem.Console
System.ServiceProcessSystem.ServiceProcess
System.Windows.FormsSystem.Windows.Forms System.WebSystem.Web System.Data.SqlServerSystem.Data.SqlServer
HttpWebRequestHttpWebRequest
FtpWebListenerFtpWebListener
SslClientStreamSslClientStream
WebClientWebClient
System.NetSystem.Net
NetworkInformationNetworkInformation
SocketsSockets
CacheCache
System.Windows.FormsSystem.Windows.Forms
FormsForms
ControlControl
Print DialogPrint Dialog
DesignDesign
System.Web.UISystem.Web.UI
PagePage
ControlControl
HtmlControlsHtmlControls
MobileControlsMobileControls
WebControlsWebControls
AdaptorsAdaptors
DesignDesign
System.DrawingSystem.Drawing
System.Web.ServicesSystem.Web.Services
Web.ServiceWeb.Service
DescriptionDescription
DiscoveryDiscovery
ProtocolsProtocols
System.TimersSystem.Timers
System.GlobalizationSystem.Globalization
System.SerializationSystem.Serialization
System.ThreadingSystem.Threading
System.TextSystem.Text
System.DesignSystem.Design
SerializationSerialization
CompilerServicesCompilerServices
Base & Application Services
Fundamentals
System.ComponentModelSystem.ComponentModel
System.CodeDomSystem.CodeDom
System.ReflectionSystem.Reflection
System.EnterpriseServicesSystem.EnterpriseServices
System.TransactionsSystem.Transactions
Security
System.Web.SecuritySystem.Web.Security
AccessControlAccessControl
CredentialsCredentials
CryptographyCryptography
System.Web.ConfigurationSystem.Web.Configuration
System.ConfigurationSystem.Configuration
System.ResourcesSystem.Resources
System.ManagementSystem.Management
System.DeploymentSystem.Deployment
System.DiagnosticsSystem.Diagnostics
Configuration Deployment/Management
PortsPorts
InteropServicesInteropServices
System.RuntimeSystem.Runtime
System.IOSystem.IO
System.CollectionsSystem.Collections
GenericGenericPermissionsPermissions
PolicyPolicy
PrincipalPrincipal
TokenToken
System.SecuritySystem.Security System.WebSystem.Web
AdministrationAdministration
ManagementManagement
.NET Framework “Whidbey”
Data
System.WebSystem.Web
PersonalizationPersonalization
CachingCaching
SessionStateSessionState
System.XmlSystem.Xml
SchemaSchema
SerializationSerialization
XpathXpath
QueryQuery
DataSetDataSet
MappingMapping
ObjectSpacesObjectSpaces
ObjectSpaceObjectSpace
QueryQuery
SchemaSchema
System.DataSystem.Data
SqlClientSqlClient
SqlTypesSqlTypes
SqlXMLSqlXML
OdbcClientOdbcClient
OleDbClientOleDbClient
OracleClientOracleClient
Innovations In Data Access
• ADO.NET– No Model Changes– Advanced Features– Performance
• System.Xml– Performance– XQuery
• ObjectSpaces– Builds on ADO.NET– Domain objects: Customer,
Order, Address
Tools
Client Application Model
Windows Forms
Web & Service Application Model
ASP.NET Compact
FrameworkYukon
Data Systems Application Model
Presentation
Mobile PC & Devices Application Model
Communication
Command Line
NTService
System.MessagingSystem.Messaging
System.DirectoryServicesSystem.DirectoryServices
System.Runtime.RemotingSystem.Runtime.Remoting
System.Windows.FormsSystem.Windows.Forms
System.ConsoleSystem.Console
System.ServiceProcessSystem.ServiceProcess
System.Windows.FormsSystem.Windows.Forms System.WebSystem.Web System.Data.SqlServerSystem.Data.SqlServer
HttpWebRequestHttpWebRequest
FtpWebListenerFtpWebListener
SslClientStreamSslClientStream
WebClientWebClient
System.NetSystem.Net
NetworkInformationNetworkInformation
SocketsSockets
CacheCache
System.Windows.FormsSystem.Windows.Forms
FormsForms
ControlControl
Print DialogPrint Dialog
DesignDesign
System.Web.UISystem.Web.UI
PagePage
ControlControl
HtmlControlsHtmlControls
MobileControlsMobileControls
WebControlsWebControls
AdaptorsAdaptors
DesignDesign
System.DrawingSystem.Drawing
System.Web.ServicesSystem.Web.Services
Web.ServiceWeb.Service
DescriptionDescription
DiscoveryDiscovery
ProtocolsProtocols
System.TimersSystem.Timers
System.GlobalizationSystem.Globalization
System.SerializationSystem.Serialization
System.ThreadingSystem.Threading
System.TextSystem.Text
System.DesignSystem.Design
SerializationSerialization
CompilerServicesCompilerServices
Base & Application Services
Fundamentals
System.ComponentModelSystem.ComponentModel
System.CodeDomSystem.CodeDom
System.ReflectionSystem.Reflection
System.EnterpriseServicesSystem.EnterpriseServices
System.TransactionsSystem.Transactions
Security
System.Web.SecuritySystem.Web.Security
AccessControlAccessControl
CredentialsCredentials
CryptographyCryptography
System.Web.ConfigurationSystem.Web.Configuration
System.ConfigurationSystem.Configuration
System.ResourcesSystem.Resources
System.ManagementSystem.Management
System.DeploymentSystem.Deployment
System.DiagnosticsSystem.Diagnostics
Configuration Deployment/Management
PortsPorts
InteropServicesInteropServices
System.RuntimeSystem.Runtime
System.IOSystem.IO
System.CollectionsSystem.Collections
GenericGenericPermissionsPermissions
PolicyPolicy
PrincipalPrincipal
TokenToken
System.SecuritySystem.Security System.WebSystem.Web
AdministrationAdministration
ManagementManagement
.NET Framework “Whidbey” - Data
Data
System.XmlSystem.Xml
SchemaSchema
SerializationSerialization
XpathXpath
QueryQuery
DataSetDataSet
MappingMapping
ObjectSpacesObjectSpaces
ObjectSpaceObjectSpace
QueryQuery
SchemaSchema
System.DataSystem.Data
SqlClientSqlClient
SqlTypesSqlTypes
SqlXMLSqlXML
OdbcClientOdbcClient
OleDbClientOleDbClient
OracleClientOracleClient
Innovations In Data Access:SQL Server “Yukon”
• Extend SQL’s type system, stored procs, functions, triggers in managed code
• Leverage broad developer ecosystem
• Wide choice of languages – Visual Basic, C#, MC++,
COBOL, …and T-SQL
• Leverages much of the .NET Framework – BCL, network access,
Web services…
• Enable third parties to write libraries to extend the DB
Tools
Client Application Model
Windows Forms
Web & Service Application Model
ASP.NET Compact
Framework
Presentation
Mobile PC & Devices Application Model
Communication
Command Line
NTService
System.MessagingSystem.Messaging
System.DirectoryServicesSystem.DirectoryServices
System.Runtime.RemotingSystem.Runtime.Remoting
System.Windows.FormsSystem.Windows.Forms
System.ConsoleSystem.Console
System.ServiceProcessSystem.ServiceProcess
System.Windows.FormsSystem.Windows.Forms System.WebSystem.Web
HttpWebRequestHttpWebRequest
FtpWebListenerFtpWebListener
SslClientStreamSslClientStream
WebClientWebClient
System.NetSystem.Net
NetworkInformationNetworkInformation
SocketsSockets
CacheCache
System.Windows.FormsSystem.Windows.Forms
FormsForms
ControlControl
Print DialogPrint Dialog
DesignDesign
System.Web.UISystem.Web.UI
PagePage
ControlControl
HtmlControlsHtmlControls
MobileControlsMobileControls
WebControlsWebControls
AdaptorsAdaptors
DesignDesign
System.DrawingSystem.Drawing
System.Web.ServicesSystem.Web.Services
Web.ServiceWeb.Service
DescriptionDescription
DiscoveryDiscovery
ProtocolsProtocols
System.TimersSystem.Timers
System.GlobalizationSystem.Globalization
System.SerializationSystem.Serialization
System.ThreadingSystem.Threading
System.TextSystem.Text
System.DesignSystem.Design
SerializationSerialization
CompilerServicesCompilerServices
Base & Application Services
Fundamentals
System.ComponentModelSystem.ComponentModel
System.CodeDomSystem.CodeDom
System.ReflectionSystem.Reflection
System.EnterpriseServicesSystem.EnterpriseServices
System.TransactionsSystem.Transactions
Security
System.Web.SecuritySystem.Web.Security
AccessControlAccessControl
CredentialsCredentials
CryptographyCryptography
System.Web.ConfigurationSystem.Web.Configuration
System.ConfigurationSystem.Configuration
System.ResourcesSystem.Resources
System.ManagementSystem.Management
System.DeploymentSystem.Deployment
System.DiagnosticsSystem.Diagnostics
Configuration Deployment/Management
PortsPorts
InteropServicesInteropServices
System.RuntimeSystem.Runtime
System.IOSystem.IO
System.CollectionsSystem.Collections
GenericGenericPermissionsPermissions
PolicyPolicy
PrincipalPrincipal
TokenToken
System.SecuritySystem.Security System.WebSystem.Web
AdministrationAdministration
ManagementManagement
.NET Framework “Whidbey”- Yukon
Data
System.WebSystem.Web
PersonalizationPersonalization
CachingCaching
SessionStateSessionState
System.XmlSystem.Xml
SchemaSchema
SerializationSerialization
XpathXpath
QueryQuery
DataSetDataSet
MappingMapping
ObjectSpacesObjectSpaces
ObjectSpaceObjectSpace
QueryQuery
SchemaSchema
System.DataSystem.Data
SqlClientSqlClient
SqlTypesSqlTypes
SqlXMLSqlXML
OdbcClientOdbcClient
OleDbClientOleDbClient
OracleClientOracleClient
Yukon
Data Systems Application Model
System.Data.SqlServerSystem.Data.SqlServer
Innovations On The WebASP.NET Whidbey
• Reduce plumbing code by 70%
• Building Blocks• Page Framework• 40+ New ASP.NET
controls
Tools
Client Application Model
Windows Forms
Web & Service Application Model
Compact FrameworkYukon
Data Systems Application Model
Presentation
Mobile PC & Devices Application Model
Communication
Command Line
NTService
System.MessagingSystem.Messaging
System.DirectoryServicesSystem.DirectoryServices
System.Runtime.RemotingSystem.Runtime.Remoting
System.Windows.FormsSystem.Windows.Forms
System.ConsoleSystem.Console
System.ServiceProcessSystem.ServiceProcess
System.Windows.FormsSystem.Windows.Forms System.Data.SqlServerSystem.Data.SqlServer
HttpWebRequestHttpWebRequest
FtpWebListenerFtpWebListener
SslClientStreamSslClientStream
WebClientWebClient
System.NetSystem.Net
NetworkInformationNetworkInformation
SocketsSockets
CacheCache
System.Windows.FormsSystem.Windows.Forms
FormsForms
ControlControl
Print DialogPrint Dialog
DesignDesign
System.Web.UISystem.Web.UI
PagePage
ControlControl
HtmlControlsHtmlControls
MobileControlsMobileControls
WebControlsWebControls
AdaptorsAdaptors
DesignDesign
System.DrawingSystem.Drawing
System.Web.ServicesSystem.Web.Services
Web.ServiceWeb.Service
DescriptionDescription
DiscoveryDiscovery
ProtocolsProtocols
System.TimersSystem.Timers
System.GlobalizationSystem.Globalization
System.SerializationSystem.Serialization
System.ThreadingSystem.Threading
System.TextSystem.Text
System.DesignSystem.Design
SerializationSerialization
CompilerServicesCompilerServices
Base & Application Services
Fundamentals
System.ComponentModelSystem.ComponentModel
System.CodeDomSystem.CodeDom
System.ReflectionSystem.Reflection
System.EnterpriseServicesSystem.EnterpriseServices
System.TransactionsSystem.Transactions
Security
System.Web.SecuritySystem.Web.Security
AccessControlAccessControl
CredentialsCredentials
CryptographyCryptography
System.Web.ConfigurationSystem.Web.Configuration
System.ConfigurationSystem.Configuration
System.ResourcesSystem.Resources
System.ManagementSystem.Management
System.DeploymentSystem.Deployment
System.DiagnosticsSystem.Diagnostics
Configuration Deployment/Management
PortsPorts
InteropServicesInteropServices
System.RuntimeSystem.Runtime
System.IOSystem.IO
System.CollectionsSystem.Collections
GenericGenericPermissionsPermissions
PolicyPolicy
PrincipalPrincipal
TokenToken
System.SecuritySystem.Security System.WebSystem.Web
AdministrationAdministration
ManagementManagement
.NET Framework “Whidbey” – ASP.NET
Data
System.WebSystem.Web
PersonalizationPersonalization
CachingCaching
SessionStateSessionState
System.XmlSystem.Xml
SchemaSchema
SerializationSerialization
XpathXpath
QueryQuery
DataSetDataSet
MappingMapping
ObjectSpacesObjectSpaces
ObjectSpaceObjectSpace
QueryQuery
SchemaSchema
System.DataSystem.Data
SqlClientSqlClient
SqlTypesSqlTypes
SqlXMLSqlXML
OdbcClientOdbcClient
OleDbClientOleDbClient
OracleClientOracleClient
ASP.NET
System.WebSystem.Web
Innovations For Devices
• Mobile capabilities for all ASP.NET controls
• Tablet PC SDK extends the core Framework
• Improvements in .NET Compact Framework security, performance and interoperability
Tools
Client Application Model
Windows Forms
Web & Service Application Model
ASP.NET Yukon
Data Systems Application Model
Presentation
Mobile PC & Devices Application Model
Communication
Command Line
NTService
System.MessagingSystem.Messaging
System.DirectoryServicesSystem.DirectoryServices
System.Runtime.RemotingSystem.Runtime.Remoting
System.ConsoleSystem.Console
System.ServiceProcessSystem.ServiceProcess
System.Windows.FormsSystem.Windows.Forms System.WebSystem.Web System.Data.SqlServerSystem.Data.SqlServer
HttpWebRequestHttpWebRequest
FtpWebListenerFtpWebListener
SslClientStreamSslClientStream
WebClientWebClient
System.NetSystem.Net
NetworkInformationNetworkInformation
SocketsSockets
CacheCache
System.Windows.FormsSystem.Windows.Forms
FormsForms
ControlControl
Print DialogPrint Dialog
DesignDesign
System.Web.UISystem.Web.UI
PagePage
ControlControl
HtmlControlsHtmlControls
MobileControlsMobileControls
WebControlsWebControls
AdaptorsAdaptors
DesignDesign
System.DrawingSystem.Drawing
System.Web.ServicesSystem.Web.Services
Web.ServiceWeb.Service
DescriptionDescription
DiscoveryDiscovery
ProtocolsProtocols
System.TimersSystem.Timers
System.GlobalizationSystem.Globalization
System.SerializationSystem.Serialization
System.ThreadingSystem.Threading
System.TextSystem.Text
System.DesignSystem.Design
SerializationSerialization
CompilerServicesCompilerServices
Base & Application Services
Fundamentals
System.ComponentModelSystem.ComponentModel
System.CodeDomSystem.CodeDom
System.ReflectionSystem.Reflection
System.EnterpriseServicesSystem.EnterpriseServices
System.TransactionsSystem.Transactions
Security
System.Web.SecuritySystem.Web.Security
AccessControlAccessControl
CredentialsCredentials
CryptographyCryptography
System.Web.ConfigurationSystem.Web.Configuration
System.ConfigurationSystem.Configuration
System.ResourcesSystem.Resources
System.ManagementSystem.Management
System.DeploymentSystem.Deployment
System.DiagnosticsSystem.Diagnostics
Configuration Deployment/Management
PortsPorts
InteropServicesInteropServices
System.RuntimeSystem.Runtime
System.IOSystem.IO
System.CollectionsSystem.Collections
GenericGenericPermissionsPermissions
PolicyPolicy
PrincipalPrincipal
TokenToken
System.SecuritySystem.Security System.WebSystem.Web
AdministrationAdministration
ManagementManagement
.NET Framework “Whidbey” - Devices
Data
System.WebSystem.Web
PersonalizationPersonalization
CachingCaching
SessionStateSessionState
System.XmlSystem.Xml
SchemaSchema
SerializationSerialization
XpathXpath
QueryQuery
DataSetDataSet
MappingMapping
ObjectSpacesObjectSpaces
ObjectSpaceObjectSpace
QueryQuery
SchemaSchema
System.DataSystem.Data
SqlClientSqlClient
SqlTypesSqlTypes
SqlXMLSqlXML
OdbcClientOdbcClient
OleDbClientOleDbClient
OracleClientOracleClient
Compact Framework
System.Windows.FormsSystem.Windows.Forms
Road To Longhorn• All building on the .NET Framework
– Delivering amazing new user experiences with Avalon – Extending Web services to the client with Indigo– Everyday info with WinFS
Ric
hn
ess
Ric
hn
ess
Win16Win16 Win32Win32COMCOM
MFCMFC
Components
ComponentsServicesServices
APIsAPIsWindows
3.0
WinFXWinFX
.NET Framework “Whidbey”
Related Longhorn Era Technologies
• Windows Forms– Works great on Longhorn!– Two-way interop with Avalon– See: CLI391 Windows Forms: Exploiting Windows “Longhorn”
Features from Within Your Application
• ASMX, .NET Remoting and Enterprise Services– All work great on Longhorn!– Indigo unifies RPC style programming – See: WSV203 “Indigo”: Connected Application Technology
Roadmap
Summary
• Whidbey Design Goals– Deliver on the Fundamentals: Security, Deployment,
Manageability, Performance– Enhanced Productivity– Path to the Future WinFX
Tools
Client Application Model
Avalon Windows Forms
Web & Service Application Model
ASP.NET / Indigo Win FSCompact
FrameworkYukon Mobile PC Optimized
System.HelpSystem.Help
System.DrawingSystem.Drawing
System.NaturalLanguageServicesSystem.NaturalLanguageServices
Data Systems Application Model
Presentation Data
Mobile PC & Devices Application Model
Communication
Command Line
NT Service
DataSetDataSet
MappingMapping
ObjectSpacesObjectSpaces
ObjectSpaceObjectSpace
QueryQuery
SchemaSchema
ItemItem
RelationshipRelationship
MediaMedia
AudioAudio
VideoVideo
ImagesImages
System.MessagingSystem.Messaging System.DiscoverySystem.Discovery
System.DirectoryServicesSystem.DirectoryServices
System.RemotingSystem.Remoting
System.Runtime.RemotingSystem.Runtime.Remoting
ActiveDirectoryActiveDirectory
UddiUddi
System.Web.ServicesSystem.Web.Services
Web.ServiceWeb.Service
DescriptionDescription
DiscoveryDiscovery
ProtocolsProtocols
System.MessageBusSystem.MessageBus
TransportTransport
PortPort
ChannelChannel
ServiceService
QueueQueue
PubSubPubSub
RouterRouter
System.SerializationSystem.Serialization
System.ThreadingSystem.Threading
System.TextSystem.Text
System.DesignSystem.Design
Base & Application Services
Fundamentals
System.ComponentModelSystem.ComponentModel
System.CodeDomSystem.CodeDom
System.ReflectionSystem.Reflection
System.EnterpriseServicesSystem.EnterpriseServices
System.TransactionsSystem.Transactions
Security
System.Windows.TrustManagementSystem.Windows.TrustManagement
System.Web.SecuritySystem.Web.Security
System.MessageBus.SecuritySystem.MessageBus.Security
AuthorizationAuthorization
AccessControlAccessControl
CredentialsCredentials
CryptographyCryptography
System.Web.ConfigurationSystem.Web.Configuration
System.MessageBus.ConfigurationSystem.MessageBus.Configuration
System.ConfigurationSystem.Configuration
System.ResourcesSystem.ResourcesSystem.ManagementSystem.Management
System.DeploymentSystem.Deployment
System.DiagnosticsSystem.Diagnostics
Configuration Deployment/Management
System.WindowsSystem.Windows System.WindowsSystem.WindowsSystem.Windows.FormsSystem.Windows.Forms
System.ConsoleSystem.Console
System.ServiceProcessSystem.ServiceProcess
System.Windows.FormsSystem.Windows.Forms System.WebSystem.Web System.StorageSystem.Storage System.Data.SqlServ
erSystem.Data.SqlServer
AnimationAnimation
ControlsControls
ControlControl
DesignDesign
PanelPanel
ControlsControls
DialogsDialogs
SideBarSideBar
NotificationNotification
System.WindowsSystem.Windows
DocumentsDocuments
Text ElementText Element
ShapesShapes
ShapeShape
InkInk
UI ElementUI Element ExplorerExplorer MediaMedia
System.Windows.FormsSystem.Windows.Forms
FormsForms
ControlControl
Print DialogPrint Dialog
DesignDesign
System.Web.UISystem.Web.UI
PagePage
ControlControl
HtmlControlsHtmlControls
MobileControlsMobileControls
WebControlsWebControls
AdaptorsAdaptors
DesignDesign
PortsPorts
InteropServicesInteropServices
System.RuntimeSystem.Runtime
System.IOSystem.IO
System.CollectionsSystem.Collections
GenericGeneric
System.SearchSystem.Search
AnnotationsAnnotations
MonitoringMonitoring
LoggingLogging
RelevanceRelevance
System.DataSystem.Data
SqlClientSqlClient
SqlTypesSqlTypes
SqlXMLSqlXML
OdbcClientOdbcClient
OleDbClientOleDbClient
OracleClientOracleClient
CoreCore
ContactContact
LocationLocation
MessageMessage
DocumentDocument
EventEvent
System.StorageSystem.Storage
System.WebSystem.Web
PersonalizationPersonalization
CachingCaching
SessionStateSessionState
System.XmlSystem.Xml
SchemaSchema
SerializationSerialization
XpathXpath
QueryQuery
PermissionsPermissions
PolicyPolicy
PrincipalPrincipal
TokenToken
System.SecuritySystem.Security
System.CollaborationSystem.Collaboration
RealTimeEndpointRealTimeEndpoint
TransientDataSessionTransientDataSession
SignalingSessionSignalingSession
MediaMedia
ActivitiesActivities
HttpWebRequestHttpWebRequest
FtpWebListenerFtpWebListener
SslClientStreamSslClientStream
WebClientWebClient
System.NetSystem.Net
NetworkInformationNetworkInformation
SocketsSockets
CacheCache
System.WebSystem.Web
AdministrationAdministration
ManagementManagement
NavigationNavigation
Peer GroupPeer Group
PolicyPolicy
SerializationSerialization
CompilerServicesCompilerServices
RecognitionRecognition
System.SpeechSystem.Speech
SynthesisSynthesis
SystemSystem
System.GlobalizationSystem.Globalization
Talk Focus
• This talk is focused on– Features which enable you to be more productive
(write your code more quickly)
– Features which allow you to write faster, or more resource aware code
– Features which YOU asked for!• (more managed solutions)
AgendaTopic Breakdown
ProductivityEase-Of-Use
Faster, Resource Aware
IO
New Managed Solutions
FriendAssemblies
Strongly TypedResources
RAD Debugging
Generics
TryParse
Memory Pressure
EventLog
Environment
Tracing
SerialPort
Console
Threading
AgendaIncreased Productivity
IO
FriendAssemblies
Strongly TypedResources
RAD Debugging
Increased Productivity, Ease-Of-UseFaster code-development by being simpler to use,
and easier to find
Generics
TryParse
Memory Pressure
EventLog
Environment
Tracing
SerialPort
Console
Threading
Strongly-Typed Resources
In this demo, we’ll see how working with resources has become even easier, with
strongly-typed resources
Private/DimPrivate/Dim??????privateprivate??????protectedprotectedInternalInternalprotected internalprotected internalpublicpublic ProtectedProtectedFriendFriendProtected FriendProtected FriendPublicPublic
Friend Assemblies
Today, you have these options…Today, you have these options…
class Foo {}
class SubFoo : Foo {}
class SomeClassA {}
class Foo {}
class SubFoo : Foo {}
class SomeClassA {}
class SubFoo2 : Foo {}
class SomeClassB {}
class SubFoo2 : Foo {}
class SomeClassB {}
class SomeClassC {}class SomeClassC {}
C#C# VBVB
AssemAAssemA AssemBAssemB
AssemCAssemC
How can AssemA make itself visible to everything in AssemB, but NOT AssemC?How can AssemA make itself visible to
everything in AssemB, but NOT AssemC?
Applies to assemblies only
Step 2Reference the class!
class Bar {Foo f = new Foo();
}
Friend AssembliesUsing InternalsVisibleToAttribute
[assembly:InternalsVisibleTo(“AssemB”,PublicKeyToken=”32ab4ba45e0a69a1” )]
internal class Foo {public Foo() {}
}
Step 1Apply the attribute
AssemB // wants to access Foo
AssemA
AgendaFaster, Resource Aware Code
Faster, Resource Aware codeCode that runs faster, and more often
IO
FriendAssemblies
Strongly TypedResources
RADDebugging
Generics
TryParse
Memory Pressure
EventLog
Environment
Tracing
SerialPort
Console
Threading
public class Listpublic class List{{ private private objectobject[] elements;[] elements; private int count;private int count;
public void Add(public void Add(objectobject element) { element) { if (count == elements.Length) Resize(count * 2);if (count == elements.Length) Resize(count * 2); elements[count++] = element;elements[count++] = element; }}
public public objectobject this[int index] { this[int index] { get { return elements[index]; }get { return elements[index]; } set { elements[index] = value; }set { elements[index] = value; } }}
public int Count {public int Count { get { return count; }get { return count; } }}}}
public class public class ListList<T><T>{{ private private TT[] elements;[] elements; private int count;private int count;
public void Add(public void Add(TT element) {element) { if (count == elements.Length) Resize(count * 2);if (count == elements.Length) Resize(count * 2); elements[count++] = element;elements[count++] = element; }}
public public TT this[int index] { this[int index] { get { return elements[index]; }get { return elements[index]; } set { elements[index] = value; }set { elements[index] = value; } }}
public int Count {public int Count { get { return count; }get { return count; } }}}}
Generics
List intList = new List();List intList = new List();
intList.Add(1);intList.Add(1);intList.Add(2);intList.Add(2);intList.Add("Three");intList.Add("Three");
int i = (int)intList[0];int i = (int)intList[0];
List intList = new List();List intList = new List();
intList.Add(1); intList.Add(1); // Argument is boxed // Argument is boxedintList.Add(2); intList.Add(2); // Argument is boxed // Argument is boxedintList.Add("Three");intList.Add("Three"); // Should be an error // Should be an error
int i = (int)intList[0]; int i = (int)intList[0]; // Cast required // Cast required
ListList<int><int> intList = new List intList = new List<int><int>();();
intList.Add(1); intList.Add(1); // No boxing // No boxingintList.Add(2); intList.Add(2); // No boxing// No boxingintList.Add("Three"); intList.Add("Three"); // Compile-time error// Compile-time error
int i = intList[0]; int i = intList[0]; // No cast required // No cast required
Before GenericsBefore Generics
Generics In VBPublic Class ListPublic Class List((Of TOf T)) Private elements() As Private elements() As TT Private elementcount As IntegerPrivate elementcount As Integer Public Sub Add(ByVal element As Public Sub Add(ByVal element As TT)) If elementcount = elements.Length ThenIf elementcount = elements.Length Then
Resize(elementcount * 2)Resize(elementcount * 2) elements(elementcount) = elementelements(elementcount) = element count += 1count += 1 End SubEnd Sub Public Default Property Item(ByVal index As Integer) As Public Default Property Item(ByVal index As Integer) As TT GetGet Return elements(index)Return elements(index) End GetEnd Get Set (ByVal Value As Set (ByVal Value As TT)) elements(index) = Value elements(index) = Value End SetEnd Set End PropertyEnd Property Public ReadOnly Property Count As IntegerPublic ReadOnly Property Count As Integer GetGet Return elementcountReturn elementcount End GetEnd Get End PropertyEnd PropertyEnd ClassEnd Class
Dim intList As New List(Dim intList As New List(Of IntegerOf Integer) )
intList.Add(1) intList.Add(1) // No boxing // No boxing intList.Add(2) intList.Add(2) // No boxing // No boxing intList.Add("Three") intList.Add("Three") // Compile-time error // Compile-time error
Dim i As Integer = intList(0) Dim i As Integer = intList(0) // No cast required // No cast required
Generics In C++
generic<typename generic<typename TT>>public ref class List {public ref class List { arrayarray<T><T>^ elements;^ elements; int count;int count;public:public: void Add(void Add(TT element) { element) { if (count == elements->Length) Resize(count * 2);if (count == elements->Length) Resize(count * 2); elements[count++] = element;elements[count++] = element; }} property property TT default [int index] { default [int index] { TT get() { return elements[index]; } get() { return elements[index]; } void set(void set(TT value) { elements[index] = value; } value) { elements[index] = value; } }} property int Count {property int Count { int get() { return count; }int get() { return count; } }}};};
ListList<int><int>^ intList = gcnew^ intList = gcnew ListList<int><int>();();
intList->Add(1); intList->Add(1); // No boxing// No boxingintList->Add(2); intList->Add(2); // No boxing // No boxingintList->Add("Three"); intList->Add("Three"); // Compile-time error// Compile-time error int i = intList[0]; int i = intList[0]; // No cast required // No cast required
Enhancing The Base LibraryGeneric Collections
• System.Collections.Generic classes– List<ItemType>– Dictionary<K,V>– Stack<ItemType>– Queue<ItemType>
• System.Collections.Generic interfaces– IList<ItemType>– IDictionary<K,V>– ICollection<ItemType>– IEnumerable<ItemType>– IEnumerator<ItemType>– IComparable<OperandType>– IComparer<OperandType>
Enhancing The Base LibraryOther Generics to look out for
• Nullable<T>– Extremely useful for situations where null is a value, such as
database valuetypesNullable<int> intVal = Nullable<int>.default;intVal = 5; // implicit cast from int int i = (int)intVal; // explicit cast to int if (intVal.HasValue) { // checks for a value
• EventHandler<T>– Saves on making your own EventHandlers
delegate void EventHandler<T>(Object sender, T e) where T : EventArgs;
Enhancing The Base LibraryOther Generics to look out for
• IComparable<T>– No boxing of valuetypes on comparison/sorting– No chance of passing in an invalid type
public class DemoString : IComparable<string> { public int CompareTo(string other) ; public bool Equals(string other);}
• ArraySegment<T>– Allows you to easily specify a subsection of an array– Supports cleaner API designConstructor: public ArraySegment(T[] array, int
offset, int count);Old API: public void Send ( byte[], int, int );New API: public void Send ( ArraySegment<byte> );
Speeding Things Up: Parsing Values
In this demo, we'll see how TryParse can save you precious milliseconds, when comparing it to the traditional Parse
routines
ThreadingSemaphore
• Resource counting for mutex’s// construct a semaphore with a count of 2Semaphore sem = new Semaphore(2);
private void UseResource {// Wait until a count is available…sem.WaitOne(); // the sem count is reduced by one
// other code …
// Release the count:sem.Release(); // the count is incremented by one
AgendaNew Managed Solutions
IO
FriendAssemblies
Strongly TypedResources
RAD Debugging
Generics
TryParse
Memory Pressure
EventLog
Environment
Tracing
SerialPort
Console
New Managed SolutionsManaged solutions which weren’t available in V2003
Threading
Console: Additional Features
In this demo, we’ll see additional Console features making the Console a more robust experience
Others…
• New String APIs, to make tasks easier, and make the most appropriate code easier– Remove( startIndex )– Contains ( someString )– Split ( char(), omitEmptyEntries )
• IO ACLs• Named Events in Threading• Timing out streams• IO: Decompression support• Transactions• RegularExpressions: character
class subtraction• Performant scenarios for resources
Summary
• Features have been introduced to provide:– An easier, better programming experience– Faster, more resource aware code– More managed solutions
• Focus has been on evolution, not revolution
Keep those requests coming!
• Features have been introduced to provide:– An easier, better programming experience– Faster, more resource aware code– More managed solutions
• Focus has been on evolution, not revolution
Keep those requests coming!
Designer Features
Designer Features
• More in-situ design experience, reduce obligatory visits to– the property grid– toolbars– menus
• Streamline common tasks– reduce clicks– reduce amount of code necessary
Feature List
• Snaplines • Smart tags• New selection UI / Semi-transparent dragging• In-situ string property editing• Document Outline• Toolbox improvements• Control Position / Size in Statusbar
• Runtime Features– Visual Styles– GDI Text
Snaplines
• Replaces grid layout mode• In-situ alignment (natural extension of IDE toolbar items
“Align Tops”, etc.)• Like snaps to like (e.g. left border to left, etc.), exposes
margins/padding• Controls can expose “interesting points”
– TextBox and Label “baseline” snapline
Snaplines (cont)
• New features: – Respects the new padding and margin properties on
controls– These values will be set to Windows UI style
guidelines– Works for resize operations– Supports multiselection– Initial control creation
In-Situ String Editing
• Ability to edit a single property for all controls at once.• Similar to tab order editor in v1.1• Only works for string properties
Smart Tasks
• In-situ tasks, immediate• Extensible by 3rd parties
New Selection UI
• Reduced number of handles• Reduced size of UI• Rounded to look good with visual styles• ... but still tweaking ...
Dragging UI Improvements
• Real-time control rendering -- WYSIWYG• Semi-transparent
Document Outline View
• Not just for HTML anymore!• Allows easy control navigation, Z-order
modification, parenting
Toolbox Improvements
• Auto-population• Informative tooltips• Search/filter
Location / Size information in the Statusbar
Visual Styles
• Visual styles just work and are on by default– Setting the FlatStyle property is no longer necessary– Manifest is no longer necessary
• VS and the design experience will support visual styles• Visual Style APIs
– High level control based API for common drawing operations– Low level theme API for drawing theme parts– Low level API will be strongly typed for the beta– Works in semi trust
GDI Text Rendering
• GDI+ text is resolution independent– It doesn’t look like GDI text
• GDI text benefits from 10+ years of hardware acceleration
• GDI text has better globalization character set support on XP and above
GDI Text Continued
• Added System.Windows.Forms.GDI namespace• Added a new TextRender class for text
drawing– Provides a stateless API
• Added new WindowsFont class to encapsulate GDI fonts
• All Windows Forms controls use GDI text by default
ClientClientServerServerOfficeOffice
ClientClientServerServerOfficeOffice
Fragen?
Recommended