Development Platform Overview: Erik Sargent May 16, 2002
Development Platform Overview: Erik Sargent May 16, 2002
NET
Development Platform Overview
Erik Sargent May 16, 2002
Outline
What is .NET? - Microsofts Strategy Under the Hood Security & Managed Code ASP.NET Cross-Language Debugging Zero-Footprint Desktop Deployment
What is .NET?
A comprehensive XML Web Services platform
Windows XP, Windows CE, Pocket PC, Office
Visual Studio
Language Neutrality
CLR doesnt know what language it is running. There are more than 25 languages for .NET, including COBOL, PERL, Eiffel and Java! CLS objects are cross-language. A VB.NET class can be created as an object in PERL and then passed to a COBOL method! Java is language specific and platform neutral. .NET is language neutral, but platform specific.
Role-Based Security
Programmers can use role-based security to control access to methods or properties at run-time. Isolate security from code logic by applying attributes defined in System.Security or EnterpriseServices System.Security is feature-rich, but is limited to Windows user groups. EnterpriseServices uses COM+ roles for more flexibility but classes must inherit from EnterpriseServices You can implement your own security provider for databases, LDAP,
Evidence-Based Security
Evidence is the characteristics of the code such as its directory or digital signature. Code Groups are logical groupings of code with evidence that satisfies certain conditions like <Directory=c:\winnt\> or <URL=UseDotNet.com>. Named Permission Sets define the permissions applied to Code Groups.
Application Domain Hosts such as browsers or the shell can enforce more restrictive permissions and, if trusted, provide evidence about the hosted assembly to the CLR.
Evidence-Based Security
Effective Permissions are determined by calculating the intersection of Named Permissions granted at each Policy Level. Each Policy Level grants permissions based on the union of Named Permissions for all matching Code Groups defined at that level. Attributes can be applied to Code Groups in each policy level to modify the default determination. The effect is for least restrictive permissions within a Policy Level (unless nothing is specified) but most restrictive permissions when Policy Levels are combined. Enterprise, Machine, User and Application policies are adhered to but defined independently.
Website Security
ASP.NET is compiled to managed code before executing, so web pages can utilize the same role-based features as other .NET applications. Web.config can define built-in ASP.NET security providers such as Forms, Windows or set event handlers for custom providers. Web.config is an application level security policy file. Settings in higher level policy files take precedent, so administrators of shared web servers can breath.
ASP.NET
Programming model can handle client-side events on the server as if they happened on the server. Design-time provides GUI configuration of controls on the page. Microsoft provides controls that are fast and scalable for .NET (vs. VS6). Compiled code means 2-5 times faster execution. Session State is now fast and scalable.
Publish web applications with simple XCopy! Dynamic Code Replacement - Without Rebooting! Concurrently Run Different Versions of Business Objects Side-By-Side! Script Builds from Source Control
Web Services
Imports System.Web.Services <WebService(Namespace := "http://tempuri.org/")> _ Public Class Service1 Inherits System.Web.Services.WebService <WebMethod()> Public Function HelloPerson(ByVal YourName As String) As String HelloPerson = "Hello, " & YourName & "." End Function End Class
Web Services
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button.Click Dim ws As New HelloService.Service1() Results.Text &= ws.HelloPerson(strName.Text) & "<br>" End Sub
Cross-Language Debugging
DEMO: Because all .NET code is implemented based on the language independent Common Language Specification, it doesnt matter what language you use when debugging.
DEMO
Issues
Only Windows 2000 and XP as servers. Windows 98 or better as clients. CE support is in beta and will be a subset. Transparency of Source Code MSIL is relatively easy to reverse engineer to source code. Obfuscators and encryption will solve this in the future. Security of .NET is still questioned based on past experience with Microsoft.
.NET Myths
Myth: Passport is required for authentication in .NET. BizTalk is required for XML Web Services. Windows CALs are required for access to authenticated IIS applications. Myth: J# is another Microsoft attempt to corrupt Java. Myth: The Microsoft .NET Pet Store benchmark proves ASP.NET is 15-28 times faster, requires the CPU, the code and supports 6-8x as many users as J2EE. Related Myth: Oracles latest Java Pet Store proves J2EE on Oracle is faster than .NET Myth: .NET is a huge mental leap for VB developers.
Resources
Microsofts .NET 6-Week Guide http://msdn.microsoft.com/net/guide/ Mono Open Source .NET on Linux http://www.go-mono.com/ DotNetExtreme.Coms Explaination of .NET http://www.dotnetextreme.com/articles/DotN et.asp UseDotNet Get the Slides & Samples http://www.usedotnet.com/