The Metadata System1. 2 Introduction Metadata is data that describes data. Traditionally, metadata has been found in language- specific files (e.g. C/C++

Slides:



Advertisements
Similar presentations
pa 1 Porting BETA to ROTOR ROTOR Projects Presentation Day, June by Peter Andersen.
Advertisements

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 Framework Overview Pingping Ma Nov 16 th, 2006.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
Overview of the.NET Framework. What is the.NET Framework A new computing platform designed to simplify application development A consistent object-oriented.
Object Oriented System Development with VB .NET
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Introduction to the C# Programming Language for the VB Programmer.
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
2. Developing in.NET and C#. 2 Microsoft Objectives “Microsoft.NET development is based on an underlying framework of tools and classes. These tools and.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Tahir Nawaz Visual Programming C# Week 2. What is C#? C# (pronounced "C sharp") is an object- oriented language that is used to build applications for.
Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#
HELIA – Bite ATK36F © Tuomo Ketomäki.NET Overview.NET Programming.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
.NET Framework Introduction: Metadata
Introduction to .Net Framework
1 Namespaces and Assemblies © University of Linz, Institute for System Software, 2004 published under the Microsoft Curriculum License.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
Session 1 - Introduction and Data Access Layer
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
.NET Framework & C#.
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Understanding Code Compilation and Deployment Lesson 4.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Importing outside DLLs into.Net platform and using them By Anupama Atmakur.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
ASSEMBLY. A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces.
Introduction to MDA (Model Driven Architecture) CYT.
C# Programming Fundamentals of Object-Oriented Programming Fundamentals of Object-Oriented Programming Introducing Microsoft.NET Introducing Microsoft.NET.
CS795/895: Introduction. Topics Distributed Systems –Availability –Performance –Web Services Security –Authentication –Authorization –Confidentiality.
Component-Based Software Engineering Introduction to.NET Paul Krause.
.NET Framework Danish Sami UG Lead.NetFoundry
MSIL & CLI Kun-Yuan Shieh.
Generic API Test tool By Moshe Sapir Almog Masika.
.NET common type system. Role of type system provides a logically consistent and unchanging foundation ensures that programs can be checked for correctness.
March 27, 2007HPC 07 - Norfolk, VA1 C++ Reflection for High Performance Problem Solving Environments Tharaka Devadithya 1, Kenneth Chiu 2, Wei Lu 1 1.
Module 14: Attributes. Overview Overview of Attributes Defining Custom Attributes Retrieving Attribute Values.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
.NET Ying Chen Junwei Chen. What is Microsoft.NET. NET is a development platform Incorporated into.NET COM+ component services ASP web development framework.
Attributes C#.Net Software Development Version 1.0.
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.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
.NET Mobile Application Development XML Web Services.
Module 4: Deployment and Versioning. Overview Introduction to Application Deployment Application Deployment Scenarios Related Topics and Tools.
July 22, 2001Introduction to.NET1 Introduction to.NET Framework Gholamali Semsarzadeh July 2001.
The Execution System1. 2 Introduction Managed code and managed data qualify code or data that executes in cooperation with the execution engine The execution.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Assemblies. 2 Objectives Introduce assemblies –concept –creation –naming Discuss deployment –main.exe –dependent assemblies.
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
OE-NIK HP Advanced Programming Using and creating DLL files.
INTRODUCTION BEGINNING C#. C# AND THE.NET RUNTIME AND LIBRARIES The C# compiler compiles and convert C# programs. NET Common Language Runtime (CLR) executes.
.NET Omid Darroudi.
Outline Introduction to the Phalanger System
An Introduction to the Shared Source Common Language Infrastructure (SSCLI) Damien Watkins Copyright Watkins 2002.
.Net A brief introduction to
CS360 Windows Programming
.NET and .NET Core 10. Enabling Contracts Pan Wuming 2017.
Module 10: Implementing Managed Code in the Database
.NET Base Type (CTS Data Type) Managed Extensions for C++ Keyword
Data Structures and ADTs
Product Training Program
Plug-In Architecture Pattern
Presentation transcript:

The Metadata System1

2 Introduction Metadata is data that describes data. Traditionally, metadata has been found in language- specific files (e.g. C/C++ header files), but providing interoperability between such files across multiple languages is difficult (or almost impossible) Compilers usually remove most of the metadata information when source files are compiled, so executable files often have little or no metadata about their types available at runtime In some systems, components’ metadata is not stored with the components, but as separate files (e.g. IDL in CORBA), may cause versioning and inconsistency problems Traditional metadata facilities are primitive, allow developers to specify the syntax of an interface but not its semantics Thus, compilers and execution engine require metadata.

The Metadata System3.NET Metadata System The metadata system is the part of CLR that describes the types in the CLR. It is the essential facility that enables type sharing between compilers (languages). Allows metadata to be persisted along with types at compile time. Can be interrogated by other CLR compilers, and compilers can use the metadata to make types available in their own languages. Can be used by the execution system at runtime (to manage types) Enables other languages to inspect, use and extend types

The Metadata System4

5.NET Metadata System CLR extends the use of metadata to provide not only information about types but also information about assemblies, the unit of deployment in the.NET framework. Both assemblies and types are self-describing. Execution engines uses this information to ensure correct runtime execution of code. Some metadata facilities are needed to access the metadata

The Metadata System6 Reflection The act of inspecting a type’s metadata at runtime is called reflection. System.Object has a method GetType() specifically designed to facilitate this inspection. GetType() returns an object of type Type. Listing 3.1 ILDASM: a tool for examining metadata

The Metadata System7 ILDASM Tool

The Metadata System8 Reflection Classes Object MemberInfo EventInfoFieldInfoMethodBasePropertyInfoType ConstructorInfoMethodInfo

The Metadata System9 Metadata Extensiblity To provide more semantic information By Attributes, essentially a class, an instance of an attribute class is attached to a type or its members and persisted in the metadata for that type Custom Attributes: simple and easy means for developers to annotate a type or its members Standard Attributes: Framework Class Library predefined standard attributes

The Metadata System10 Using a standard attribute (Listing 3.5) using System; namespace Sample { public class TestClass { [Obsolete("Use NewMthod instead of OldMethod")] public static void OldMethod() { Console.WriteLine("Hi World"); } public static void NewMethod() { Console.WriteLine("Hello World"); }

The Metadata System11 Dynamic Discovery of Types Becoming increasingly important in modern software architectures Traditionally programming languages and systems used to have such information to be known at compile time, more type-safe (type checking) and efficient But leads to platform-specific code that is very difficult to migrate and execute on different systems Even, types can be known only at runtime.NET framework provides dynamic type discovery through its Reflection facilities.

The Metadata System12 Assemblies and Manifests (1) Assembly is basically a collection of files containing types and methods that can be used (similar to DLL libraries) Can be viewed as a collection of files that form a functionally unit, contain types, resources available to other assemblies. An assembly houses the components, but also provides facilities such as version information and type resolution. An assembly comprises one or more modules, a module is a file that contains CLR metadata. One of the modules has a manifest. The manifest contains information about the assembly, such as its name, version information, and names of all other modules and files Using an assembly (Listing 3.8)

The Metadata System13 Assemblies and Manifests (2) Assembly A File AModule B Module A Manifest Note: File A is not a module, would not contain any CLR metadata, just hold other resources such as bitmaps.

The Metadata System14 Assemblies and Manifests (3)

The Metadata System15 Assemblies and Manifests (3).assembly extern mscorlib {.publickeytoken = (B7 7A 5C E0 89 ) //.z\V.4...ver 1:0:3300:0 }.assembly AssemblyInformation { // --- The following custom attribute is added automatically, do not uncomment //.custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(bool, // bool) = ( ).hash algorithm 0x ver 0:0:0:0 }.module AssemblyInformation.exe // MVID: {ADDEC506-DB9F-4E90-80D5-5712F39A3081}.imagebase 0x subsystem 0x file alignment 512.corflags 0x // Image base: 0x

The Metadata System16 Meta-Programming The ability to dynamically create new types at runtime is known as meta- programming. Supported by CLR’s Reflection.Emit Creating dynamic types is a fundamental facility in the remoting services, automatic generation of proxy objects at runtime.