Assemblies & Namespaces1. 2 Assemblies (1).NET applications are represented by an assembly An assembly is a collection of all software of which the application.

Slides:



Advertisements
Similar presentations
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.
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.
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Computer Organization CS224 Fall 2012 Lesson 12. Synchronization  Two processors or threads sharing an area of memory l P1 writes, then P2 reads l Data.
Henrico Dolfing Business Segment Partners. Océ Document Technologies GmbH2 June, NET Framework Version 3.0.
Programming with Objects: Class Libraries and Reusable Code.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Introduction to the C# Programming Language for the VB Programmer.
Advanced Object-Oriented Programming Features
Interpret Application Specifications
Module 1: Overview of the Microsoft.NET Framework.
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.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 18 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Week 1: Introduce ➤ What is the.NET Framework ?  CLR, MSIL,IL,FLC  Garbage collection  Namespace ➤ What C# is and how it relates to the.NET Framework.
Overview of Microsoft.Net and Vb.Net ITSE 2349 Spring 2002 Material from Microsoft.Net an Overview for ACC faculty by Stuart Laughton and Introduction.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
© 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.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
1 Namespaces and Assemblies © University of Linz, Institute for System Software, 2004 published under the Microsoft Curriculum License.
The Metadata System1. 2 Introduction Metadata is data that describes data. Traditionally, metadata has been found in language- specific files (e.g. C/C++
Session 1 - Introduction and Data Access Layer
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Using Visual Basic 6.0 to Create Web-Based Database Applications
8-1 Chapter 8 Using User-Defined Data Types and Object Oriented Programming.
Module 1: Overview of the Microsoft.NET Platform.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
.NET Framework Danish Sami UG Lead.NetFoundry
Namespaces Tonga Institute of Higher Education. Introduction to Namespaces The.Net Framework provides many classes for doing different things  File Input/Output.
Introduction to .NET Framework
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 17 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
DotNet Michelle Johnston, Firebird Services Ltd. What is Dot Net Aims to simplify web development Language independent – CLR (Common Language Runtime)
1 Application Model Fundamentals Chris Anderson Software Architect Microsoft Corporation Chris Anderson Software Architect Microsoft.
Programming with Visual Studio 2005.NET A short review of the process.
Programming with Visual Studio.NET A short review of the process.
Microsoft.Net Sven Groot. Common Language Runtime Superset of ECMA Common Language Infrastructure Defines  Language-neutral platform  Intermediate Language.
2/26/021 Pegasus Security Architecture Author: Nag Boranna Hewlett-Packard Company.
Compunet Corporation1 Programming with Visual Basic.NET Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz.
1 Working with Data Structures Kashef Mughal. 2 Chapter 5  Please review on your own  A few terms .NET Framework - programming model  CLR (Common.
Developing Applications with the CSI Framework A General Guide.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
.NET Ying Chen Junwei Chen. What is Microsoft.NET. NET is a development platform Incorporated into.NET COM+ component services ASP web development framework.
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.
NAMESPACE. Namespaces Namespaces are a way to define the classes and other types of information into one hierarchical structure. System is the basic namespace.
Identifying classes, Packages and drawing class Diagrams, Object Diagrams and composite structure diagrams Week 07 1.
.NET Mobile Application Development XML Web Services.
July 22, 2001Introduction to.NET1 Introduction to.NET Framework Gholamali Semsarzadeh July 2001.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
Introducing the Microsoft® .NET Framework
An Introduction to the Shared Source Common Language Infrastructure (SSCLI) Damien Watkins Copyright Watkins 2002.
Android Runtime – Dalvik VM
Foundations of .Net Programming with C#
Introduction to .NET Framework Ch2 – Deitel’s Book
CE-105 Spring 2007 Engr. Faisal ur Rehman
Introduction to Operating System (OS)
Part C - Introduction to Programming and the .NET Framework
Windows Internals Brown-Bag Seminar Chapter 1 – Concepts and Tools
VISUAL BASIC.
Social Media And Global Computing Using DLLs with MVC
Tonga Institute of Higher Education
Module 10: Implementing Managed Code in the Database
BO65: PROGRAMMING WRITING TO TEXT FILES.
.NET Base Type (CTS Data Type) Managed Extensions for C++ Keyword
NAMESPACE.
C# Programming Unit -1.
SPL – PS1 Introduction to C++.
.NET Framework Design Goals
Presentation transcript:

Assemblies & Namespaces1

2 Assemblies (1).NET applications are represented by an assembly An assembly is a collection of all software of which the application consists The Unit of Deployment, i.e. you need an assembly to install an application It is normally an executable file (.exe), or a dynamic link library file (.dll) Each assembly contains an assembly manifest, which is similar to a table of contents for the assembly. It contains information about the assembly (such as name, version), a list of files that are in this assembly, and a list of external references, etc.

Assemblies & Namespaces3 Assemblies (2) Project Properties Common Properties Configuration Properties Debug configuration: used by developer during development and testing, contains information for debugging Release configuration: debugging info is removed, better performance

Assemblies & Namespaces4 Namespaces (1) A software project may consist a number of pieces of code, components of an assembly To ease the use of these components, they are grouped into to Namespace A namespace is a group of components that are somehow related, these components can be type declarations, constants, procedures, functions, classes… Namespaces also resolve naming ambiguity issues (two methods with same name WriteError() in different libraries) Each assembly consists of a root namespace that contains all the components in the assembly, by default has the same name as the assembly. New namespaces can be defined under the root namespace using the Namespace keyword

Assemblies & Namespaces5 NamespaceExample (1) Namespace NSEx1 Public Module ModMain Sub Main() ' test the two methods Println("Called with Println() from NSEx1") NSEx2.Println("Called with NSEx2.Println() from NSEx1") System.Console.In.ReadLine() End Sub ' Write the message to the console Public Sub Println(ByVal message As String) System.Console.Out.WriteLine("Println() in NSEx1: " & message) End Sub End Module End Namespace

Assemblies & Namespaces6 NamespaceExample (2) Namespace NSEx2 Public Module ModAux Public Sub Println(ByVal message As String) System.Console.Out.WriteLine("Println() in NSEx2: " & message) End Sub End Module End Namespace

Assemblies & Namespaces7 Two Modules are defined under two different namespaces NSEx1 and NSEx2 Both modules have a method Println() To access a component declared in another namespace, you need to prefix it with the name of its namespace. e.g. NSEx2.Println() An important aspect of namespaces is that they allow only certain components to be exported and used by external code, by the Public, Private keywords. i.e. Encapsulation

Assemblies & Namespaces8 NamespaceExample (3)

Assemblies & Namespaces9 NamespaceExampleClient (1) Add Project, Add Reference Imports NamespaceExampleLib Imports NamespaceExampleLib.NSEx2 Module Module1 Sub Main() Dim s As String Do System.Console.Out.WriteLine("Enter some text and press ENTER") System.Console.Out.WriteLine("(leave empty and press ENTER to end)") s = System.Console.In.ReadLine() NSEx1.Println(s) ' calling Println() in NSEx1 NSEx2.Println(s) ' calling Println() in NSEx2 Println(s) ' calling Println() in NSEx2, as NSEx2 is imported Loop Until s.Length = 0 End Sub End Module

Assemblies & Namespaces10 You can’t import Imports NamespaceExampleLib.NSEx1 Imports NamespaceExampleLib.NSEx2 Compiler will complain

Assemblies & Namespaces11 Useful Namespaces (1) System: fundamental types, utility classes System.Collections: most commonly used collection classes such as arrays, lists, hash-tables, queues, stacks, etc. System.Data: data manipulation when interacting with external data storage System.Diagnostics: for debugging, testing and performance-monitoring System.DirectoryServices: provides access to Active Directory Services System.Drawing: graphics functions System.IO: read/write to streams

Assemblies & Namespaces12 Useful Namespaces (2) System.Messaging, System.Net: enable programs to communicate with other programs on different machines using messages and network protocols System.Runtime: for runtime support, contains other specialized namespaces for remoting, serialization, compiler, and interoperability services System.Security: to provide security and cryptography services System.Text: for parsing, encoding, and decoding of text streams, and together with System.Xml namespace is used to handle XML documents

Assemblies & Namespaces13 Useful Namespaces (3) System.Threading, System.Timer: offer access to operating system-level functions regarding thread handling and timer components System.Web: for developing and deploying Web-enabled applications System.Windows.Forms: GUI development Microsoft.VisualBasic: contains a large number of useful enumerations, structures, functions used in Visual Basic