Chapter 12 Microsoft Assemblies. Process Phases Discussed in This Chapter Requirements Analysis Design Implementation ArchitectureFramework Detailed Design.

Slides:



Advertisements
Similar presentations
Introduction to .NET Framework
Advertisements

Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
.NET Session Prepared By : Manu Sharma IBE Team. Topics Types of.NET Applications.NET Framework CLR Garbage Collection Importance of.NET.
History of.Net Introduced by Microsoft Earlier technology was VC++ and VB VC++ comes with so many library and VB was so easy to use and not flexible to.
.NET Framework Overview Pingping Ma Nov 16 th, 2006.
.NET Technology.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
Overview of the.NET Framework. What is the.NET Framework A new computing platform designed to simplify application development A consistent object-oriented.
Thursday Evening 6.30VB.NET Introduction 7.30Break for food 8.00VB.NET Migration 8.45Q & A 9.00Done.
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
Lesson 1 What is.NET Prepared by Shawn Dossie Microsoft NYIT.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Rajeswari Indupuri Introduction to.NET Framework.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
Introduction to .Net Framework
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
High thoughts must have high language. Aristophanes
Architecture of.NET Framework .NET Framework ٭ Microsoft.NET (pronounced “dot net”) is a software component that runs on the Windows operating.
Module 1: Introduction to C# Module 2: Variables and Data Types
 2002 Prentice Hall. All rights reserved. 1 Introduction to Visual Basic.NET,.NET Framework and Visual Studio.NET Outline 1.7Introduction to Visual Basic.NET.
Session 1 - Introduction and Data Access Layer
C# A 1 CSC 298 Introduction to C#. C# A 2 What to expect in this class  Background: knowledge of an object oriented language of the C++, Java, … family.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
.NET Framework & C#.
Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a library for.
Introduction to .NET Rui Ye.
 Internet providing backbone for applications  Use of several web sites and devices to provide one complete solution  Software as services  Quick software.
Introduction to .NET Framework
Chapter 10 Introduction to Components. Process Phases Discussed in This Chapter Requirements Analysis Design Implementation ArchitectureFramework Detailed.
Introduction .NET Framework
C# Overview and Features. Content I.History of C# II.Architecture III.How to install IV.Features V.Code Sample VI.Microsoft.NET Platform VII.Why use C#
CS795/895: Introduction. Topics Distributed Systems –Availability –Performance –Web Services Security –Authentication –Authorization –Confidentiality.
Managed C++. Objectives Overview to Visual C++.NET Concepts and architecture Developing with Managed Extensions for C++ Use cases Managed C++, Visual.
.NET Framework Danish Sami UG Lead.NetFoundry
Programming in C#. I. Introduction C# (or C-Sharp) is a programming language. C# is used to write software that runs on the.NET Framework. Although C#
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company Application Foundation Presented By : Naveed Sattar Software Engineer.
Rajiv and Shipra Introduction to.NET (asp.net,c#,vb)
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
SWE 316: Software Design and Architecture Objectives Lecture # 18 Introduction to Components SWE 316: Software Design and Architecture To learn:  benefits.
Module 3: Using Microsoft.NET- Based Languages. Overview Overview of the.NET-Based Languages Comparison of the.NET-Based Languages.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
Chapters 2 & 3. .NET Software development model that allows applications created in disparate programming languages to communicate Universal data access.
.NET Ying Chen Junwei Chen. What is Microsoft.NET. NET is a development platform Incorporated into.NET COM+ component services ASP web development framework.
Microsoft .NET A platform that can be used for building and running windows and web applications such that the software is platform and device-independent.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
C# and.NET. .NET Architecture  Compiling and running code that targets.NET  Advantages of Microsoft Intermediate Language (MSIL)  Value and Reference.
.NET Mobile Application Development XML Web Services.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
July 22, 2001Introduction to.NET1 Introduction to.NET Framework Gholamali Semsarzadeh July 2001.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Intro to ASP.NET CS-422 Dick Steflik. What is.NET As applications in the Enterprise become more and more netcentric and less and less standalone.NET is.
Introduction to the Microsoft.NET Framework Chris Wastchak Student Ambassador to Microsoft.
Introduction to .NET Framework Ch2 – Deitel’s Book
Microsoft .NET 3. Language Innovations Pan Wuming 2017.
CE-105 Spring 2007 Engr. Faisal ur Rehman
Application Foundation
Introduction to C# AKEEL AHMED.
.NET Base Type (CTS Data Type) Managed Extensions for C++ Keyword
Presentation transcript:

Chapter 12 Microsoft Assemblies

Process Phases Discussed in This Chapter Requirements Analysis Design Implementation ArchitectureFramework Detailed Design x Key:= secondary emphasis x = main emphasis Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Learning Goals for This Chapter  … Microsoft’s component (“assembly”) architecture  … where assemblies fit in.NET  … required rudiments of C#  … the contents of.NET manifests, including: Versioning Attributes  … the difference between private and shared assemblies  … create assemblies using C# Understand … Be able to … Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

.NET Goals and Solutions  Create interoperable components from multiple source languages o C++, Visual Basic, ….  Solve multiple component version clashes o “dll hell”: naming confusion in COM  Define a common runtime  Avoid registry o Necessity to register components with host computer Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Design Goal At Work:  Reusability  Microsoft wanted to allow developers to create interoperable components using their favorite source languages. Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

The Parts of.NET Web tools and Languages ASP.NET, Windows Forms; Visual Basic.NET, C#.NET Framework Classes net XMLIO Security.. Common Language Runtime (CLR) Memory ManagementCommon Type System (CTS).. uses Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

 Boolean  DateTime  Decimal – 28 significant digits  Double – 64-bit double-precision floating point  GUID – unique 128-bit integer; unique identifier  Int16, Int32, Int64  Sbyte – 8-bit signed integer –128 to +127  Single – 4-byte single precision floating point  TimeSpan – a period of time Types in the CTS Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

 Boolean Equals( Object )  Int32 GetHashCode() o Generates an integer corresponding to the value of the object o Used by sorting algorithms in System.Collections  Type GetType() o for the Reflection API  String ToString() Methods of System.Object Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Selected System.XX.NET Framework NameSpaces  Collections  ComponentModel o “to implement the runtime and design time behavior of components”  Data o To deal with databases via ADO  Drawing  IO  Net o to interface with common network protocols  Reflection  Runtime  Security  Text o ASII, Unicode etc.  Threading  Web  WinForms  XML Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Compilation Process in.NET Source Code C++ VB Compiler & metadata generator IL and metadata Ancillary info.dll or.exe Base class library Class loader IL compiler native code execute Process File Key: C# J#, Java (3 rd parties) Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

A File The Parts of a.NET Assembly (Component) Manifest o Identity o name o version o Names of files o Encrypted hash of files to ensure integrity o Specification of types defined o Names of referenced assemblies o Specification of required security permissions Microsoft Intermediate Language (IL) Source FilesA.NET assembly: xyz.dll Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Key Concept:  A.NET Assembly  -- includes class code from multiple files, in IL form, described by a manifest. Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

C# Goals 1 of 2 o Rapid application development o as with JavaBeans o Cross-platform deployment o generates character stream interpreted by.Net runtime. o as with Java Virtual Machine o Access to platform-native resources o take advantage of the Windows API to run as a full- featured application on Windows 2000 o Support for the COM and.NET platforms Unlike Java Unlike Java Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

 Features of C and C++ “with the functional ease of rapid application development tools.”  Components with properties, methods and events o built in C# Goals : 2 of 2 Unlike Java Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

HelloWorld Output Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Selected C# Features o Automatic garbage collection o Allows developers to disable garbage collection locally – o by marking code as “unsafe” o (e.g., where real time performance required?) o Eliminates pointers in favor of references o Introduces Interfaces Unlike Java Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

C# Web Features: Web Services  Attribute library allows wrapping of C# classes and functions as Web services. o a hosted software module callable over the Internet typically via SOAP protocol. o SOAP wraps method calls, parameters, and return values, in XML packets.  Using appropriate attributes, programmer can turn any C# class or function into a Web service. Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Creating a.NET Component 1 of 2 csc /t:library /out:hello.dll helloFile.cs “target” Create a library component: Don’t seek Main() “output” Component (output) name Input fileC# compilation Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Creating a.NET Component (“Assembly”) 2 of 2 helloFile.cs hello.dll csc /t:library /out:hello.dll helloFile.cs Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Using a.NET Component csc /r:hello.dll /out:helloApp.exe helloClient.cs hello.dllhelloClient.cs helloApp.exe … now execute helloApp. Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Creating a.NET Component Containing Multiple Classes csc /t:library /out:helloAuRevoir.dll HelloAuRevoirComponentSource.cs helloAuRevoir.dll GreetingUtilityHelloClassAuRevoirClass Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Output For “Multiple Class” Example Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Using metadata allows the CLR to support:  Multiple execution models o interpreted, o JITted (Just-in-time) o native o legacy code (prior to.NET)  Uniform services available to debuggers, profilers etc.  Consistent exception handling  Code access security  Memory management  Reflection  Interoperability with existing unmanaged COM applications  Interoperability with existing unmanaged code  Optimization to match the particular CPU or environment. Uses for Metadata Amended from Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Manifest of Component helloAuRevoir.dll Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Manifest Contents for helloAuRevoir.dll Component Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Manifest Detail of sayHelloWorld() in HelloClass Recall the source: public void SayHelloWorld( ) {GreetingUtility.OutputMessage ( "Component says: Hello World" ); } Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

The Version Field of an Assembly o Major version o Minor version o Revision o Build number Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Versioning (The process of evolving a component over time in a compatible manner.) A new version is …  … source compatible with a previous version if code that depends on the previous version can, when recompiled, work with the new version.  … binary compatible if code that depended on the old version can, without recompilation, work with the new version.” (adapted from Microsoft) Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Attribute s in.NET  Metadata: about … o … variables o … classes o … functions  Types of attributes: o Built-in o User-defined  Available at runtime Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Output of main() in ConditionalDemo with #define DEBUG without #define DEBUG Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Output For Authorship Querying Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Key Concept:  A.NET Manifest Lists … .. the files containing the IL-compiled classes, the.NET components on which the assembly depends, version numbers, attributes, and encrypted hash to verify not tampered in transit. Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Design Goal At Work:  Reusability  We want to reuse an assembly, confident it is the one it’s supposed to be. Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Using NameSpaces Application 1 : List available flights in following form From to departing at and arriving at. Application 2: List bookings already made in following form Please arrive at at airport for your flight. Implement applications 1and 2. Exploit common components. Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Namespaces Across Multiple Components Logo AvailabilityAnnouncement Itinerary namespace (Physical) File organization (3 files) Airlines namespace Namespace stated: Airlines.Availability Classes: Logo, AvailabilityAnnouncement Availability namespace ItineraryAnnouncement Logo (Logical) Namespace organization Source file name: AvailabilityComponentSource.cs Component name: availability.dll Namespace stated: Airlines.Itinerary Class: Logo Source file name: ItineraryLogoComponentSource.cs Component name: itineraryLogo.dll Namespace stated: Airlines.Itinerary Class: ItineraryAnnouncement Source file name: ItineraryAnnouncement.cs Component name: itineraryAnnouncmnt.dll Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Airline Reservation System Display Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Public Key Cryptography o Any message encoded with one key can be decoded with the other. o One can’t encrypt and decrypt a message with the same key. o It’s practically impossible to deduce one key from the other. o It’s very unlikely that an encoded document can be decoded with an unmatched key Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Public Key Encryption Used in.NET Public key: …iemhdZX… Private key: …92JiuHKM3… (secret) myKeys.snk Hashed versionEncoded version use private key Manifest Names & contents of assembly Verification process AssemblyInfo.cs Assembly source assembly hash OK / not OK Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Key Concept:  Component Identity  To ensure that the component we are using is the one intended, we use relatively or globally unique names:.NET also applies tamper-proofing via public key encryption. Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.

Summary  Microsoft “assembly” == component  Microsoft distributes computing among desktops and servers via, in part,.NET assemblies .NET assemblies supercede and are more versatile than (D)COM(+) objects. o Exist in Intermediate Language o Permit versioning o Include “attribute” feature o Identity technique for shared assemblies reduces “dll hell”  C# language designed for.NET  Assemblies constructed via C#, VB,... are interoperable Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.