Inf 5040, 02.11.04 Outline

sprocketexponentialMobile - Wireless

Dec 10, 2013 (4 years and 7 months ago)


Inf 5040, 02.11.04
Gyrd Brændeland,
Sharath Babu Musunoori,
Åshild Grønstad Solheim
 Introduction
 An overview of .NET framework architecture
 More focus on .NET core components
.NET features
 Web services including an example of ASP .NET
 Summary
What is .NET?
 “A new environment for developing and running software
applications, featuring ease of development of web-
based services, rich standard run-time services available
to components written in a variety of programming
languages, and inter-language and inter-machine
 The versions:
.NET 1.0 released January 15th 2002
Current version is 1.1
Beta version 2.0 available
The.NET space
 Web services
 Designed to be accessed directly by another service or software
 Interaction through XML and SOAP
 Supplied services such as: NET Passport, .NET Alert, MapPoint
 Deployment platforms
 Server products: Windows Server, Microsoft BizTalk Server, Microsoft
Commerce Server, Microsoft SQL Server, ++
 Support and use web services and process XML
 Developer platform: The.NET Framework
 Our main focus
Developer platform
– contents of the.NET Framework I
 CLR - Common language runtime
 Large collection of framework class libraries
 A number of tools
Developer platform
– contents of the.NET Framework II
 CLR - Common language runtime
 Virtual instruction set to isolate from particular processors (like JVM).
 Enables components that require tight integration with the specific underlying
platform (unlike JVM)
 Implementation of the common language infrastructure (CLI) specification, adding
COM+ interoperation and Windows platform access service
 Supports several languages
 Large collection of framework class libraries
 Frameworks partially interfaced, partially class-based.
 A number of tools
 Editing, building or debugging across multiple languages
 Remote debugging for distributed systems
 Supportive tools for tasks such as modeling, browsing or documentation
 Third-party tools for analysis of performance and resource consumption
 Visual Studio .NET integrates most tools for the.NET framework
ECMA standard: Common Language Infrastructure
 A way to deal with the problem of language interoperability
What is What in .NET Framework Architecture
 Common Type System (CTS)
 Type Safety (TS)
 Managed code execution
 Side-by-side execution
 Common Language Runtime (CLR)
.NET is different from CORBA, Java
 Intermediate Language (IL)
 Support for extensible metadata
 Support for COM and platform interoperation
Common Type System (CTS)
 Super set in the type space
 CLI-complient code over CTS space
 CLS is a strict CTS subset
 Interoperate the code implemented in different languages
 CLS consumer / CLS producer / CLS extender
Value Type
Boolean, Byte,
Int16, Int32, Int64,
Char, Decimal, Guid,
Single, Double,
DateTime, TimeSpan
Top-level CTS type hierarchy
Common Language Runtime (CLR)
 Compiles IL code into native code, and execute the code
 Include services like….
Putting all in a different way
Assemblies, AppDomains, and Reflection
 Assembly:A set of files (dlls, exe, html etc) in a directory hierarchy
 resembles a jar file, or can be an application or a library
 enforces many security restrictions
 either private or shared among multiple applications
 each has a version number, compatibility version
 Application domains:aims to isolate an application from other
 Scope of loading and unloading of assemblies
 Context:divides AppDomains
 Reflection:support access to the metadata of loaded assemblies
 metadata include type structure, attributes
 enables creation of instances of types
 enables invocation of methods
 Combines context and reflection infrastructure
 Support for communication styles and patterns
 Proxies, channels and messages as building blocks
 Remote method calls
 Remote access styles:
 SingleCall: incoming requests are served by new objects.
 Singleton:incoming requests are served by a single server object.
 ClientActivatedObject:reference to a remote object is maintained until
the client is finished with it.
 Reference to remote objects (like Java RMI)
 Lease-based handling
 Renewal / expire of remote references
 Distributed garbage collector
.NET security facilities
 Web application security
 ASP.NET supports authentication schemes such as Kerberos
 Role based security
 Authentication: SSL/TLS client certificates
 ASP.NET security architecture
 Custom authentication or authorisation providers
 Evidence-based security
 Code access security (CAS)
 Cryptography - supported algorithms:
 Asymmetric encryption - RSA and DSA;
 Symmetric encryption - DES, TripleDES, RC2;
 Hashes - MD5, SHA1.
Web services with .NET
Web services with .NET
 Based on XML (extensible markup language)
 Normally uses SOAP (Simple Object Access Protocol).
 An XML-based protocol for invocation of remote objects
 typically uses HTTP
SOAP - summary from previous presentation (Group 5):
 SOAP specifies only a message from a sender to a receiver
 Anything beyond this is unspecified (e.g. using client/server model)
 Three main parts:
• Envelope
• Encoding Rules
• RPC Representation
Web service example
 Create simple web services with Active Server Pages (ASP).NET
 Example: web service for addition:
<%@ WebService Language="VB" Class="MyMath" %>
Public Class MyMath
Public Function <WebMethod()>Add(a As Integer, b As
Integer) As Integer
Return a + b
End Function
End Class
 First line addresses ASP.NET
 The attribute <WebMethod> tells ASP.NET that the method is “Web
 Then ASP.NET does the necessary work for the method to support SOAP
 The service can receive and send SOAP messages
 Java 2 Enterprise Edition (J2EE) and .NET
 Platforms for developing enterprise applications
 Built-in multi-language support:
.NET CLR supports multiple languages
 JVM supports only java.
 Efficiency
.NET source => IL (Intermediate Language) => machine code (install or load-time)
 Java source => byte code and interpreted by JVM, but more efficient JVMs may translate
into machine code.
 Language
 Small difference between C
and Java 2
 Derived from C and C
, garbage collection, attributes, metadata
 Platform dependency
 Java: In principle platform independent
.NET: Microsoft does not support other platforms, but C# and CLI open standards.
 MONO: Open source implementation of .NET Framework for Linux.
 Open source
 Some open source java compilers.
 Open source implementations of CLI:
 Mono project (
 Open CLI Library project (
 Overview of .NET
 CLI (Common Language Infrastructure) and C#: ECMA standards
 CTS (Common Type System) and CLR (Common Language Runtime).
 Assemblies – the .NET software components
 AppDomains, reflection and remoting
 Security
 Web services
 Comparison of .NET vs J2EE
 Jim Farley. Microsoft .NET vs. J2EE: How Do They Stack Up? January
 Student presentation: SOAP, group 5
 C. Szyperski. Component Software. Beyond Object-Oriented Programming.
Addison-Wesley. 2002
 Understanding .NET framework at a glance. http://www.c-
 Bertrand Meyer. “NET is Coming”, Pages 92-97, ISSN:0018-9162.