SlideShare a Scribd company logo
. NET BASED COMPONENT
TECHNOLOGIES
Dr. K.Prakash
Assistant Professor
Kristu Jayanti College
Bengaluru
COM
• Component Object Model (COM) is an interface standard for software
component introduced by Microsoft in 1993.
• It is used to enable interprocess communication and dynamic object
creation in any programming language that supports the technology.
• COM is often used in the software development industry as an umbrella
term that encompasses the OLE, OLE Automation, ActiveX, COM+ and
DCOM technologies.
• The essence of COM is a language-neutral way of implementing objects
that can be used in environments different from the one they were created
in, even across machine boundaries.
• The different allocation semantics of languages are accommodated by
making objects responsible for their own creation and destruction through
reference-counting.
• Casting between different interfaces of an object is achieved through the
QueryInterface() function.
COM
• COM is primarily used with Microsoft Windows. COM is
expected to be replaced at least to some extent by the
Microsoft
• .NET framework, and support for Web Services through the
Windows Communication Foundation (WCF).
• COM objects can still be used with all .NET languages without
problems.
• COM is very similar to other component software interface
standards, such as CORBA and Java Beans, although each has
its own strengths and weaknesses.
DISTRIBUTED COM
• Distributed Component Object Model (DCOM) is a proprietary
Microsoft technology for communication among software
components distributed across networked computers. DCOM, which
originally was called "Network OLE", extends Microsoft's COM, and
provides the communication substrate under Microsoft's COM+
application server infrastructure. It has been deprecated in favor of
Microsoft .NET.
• In terms of the extensions it added to COM, DCOM had to solve the
problems of Marshalling – serializing and deserializing the
arguments and return values of method calls "over the wire".
• Distributed garbage collection – ensuring that references held by
clients of interfaces are released when, for example, the client
process crashed, or the network connection was lost.
OBJECT REUSE
A.java
B.java
C.java
D.java
A.java
• Is the copying of a source file from one
project to another reuse?
• Is the copying of a compiled class file from
one project to another reuse?
Copy
Project 1 Project 2
VERSIONING
• The versioning issue discussed relates to clients of the property.
Suppose we wish to add a new method or property to IHttpContext.
We effectively created a new interface and now all clients need to
recompile. Not only that, but any components you might be using
that refer to IHttpContext need to be recompiled. This can get ugly.
• Adding this method doesn't break older clients. Newer clients who
might need to call this method can recompile and now call this new
method if they wish. This is where we get the versioning benefits.
CONNECTABLE OBJECTS
• The connectable object is only one piece of the overall
architecture of connectable objects. This technology includes the
following elements:
• Connectable object: Implements the IConnectionPointContainer
interface; creates at least one connection point object; defines an
outgoing interface for the client.
• Client: Queries the object for IConnectionPointContainer to
determine whether the object is connectable; creates a sink object to
implement the outgoing interface defined by the connectable object.
• Sink object: Implements the outgoing interface; used to establish a
connection to the connectable object.
• Connection point object: Implements the IConnectionPoint
interface and manages connection with the client's sink.
CONNECTABLE OBJECTS
• The relationships between client,
connectable object, a connection point,
and a sink are illustrated in the following
diagram:
OLE CONTAINERS AND
SERVERS
• A container application is an application that can incorporate
embedded or linked items into its own documents.
• The documents managed by a container application must be able
to store and display OLE document components as well as the
data created by the application itself.
• A container application must also allow users to insert new items
or edit existing items by activating server applications when
necessary.
• A server application or component application is an application that
can create OLE document components for use by container
applications.
• Server applications usually support drag and drop or copying their
data to the Clipboard so that a container application can insert the
data as an embedded or linked item.
OLE CONTAINERS AND
SERVERS
• Most servers are stand-alone applications or full servers; they can either be
run as stand-alone applications or can be launched by a container
application.
• Containers and servers do not communicate directly. Instead, they
communicate through the OLE system dynamic-link libraries (DLL). These
DLLs provide functions that containers and servers call, and the containers
and servers provide callback functions that the DLLs call.
ACTIVEX CONTROLS
• ActiveX is a component object model (COM) developed
by Microsoft for Windows platforms.
• By using the COM runtime, developers can create
software components that perform a particular function
or a set of functions.
• Many Microsoft Windows applications - including many
of those from Microsoft such as Internet Explorer,
Microsoft Office, Microsoft Visual Studio, Windows
Media Player etc - use ActiveX controls to build their
feature set as well as encapsulate their functionality.
• Internet Explorer also allows the ActiveX controls to be
embedded inside web pages.
.NET COMPONENTS
• .NET components provide a programmable interface that is
accessed by consumer applications (often called client
applications).
• .NET object-oriented programming involves not much more than
creating a class, adding the properties, methods, and events required
by the class, and including the class in different applications.
• A .NET component, however, is a pre-compiled class module with a
.DLL (dynamically- linked library) extension. At run time, a .NET
component is invoked and loaded into memory to be used by some
consumer application.
• Each .NET DLL component may contain multiple classes. This means
that each DLL may expose a single class or a variety of classes.
ASSEMBLIES
Assemblies are a fundamental part of programming with the
.NET Framework. An assembly performs the following
functions:
• It contains code that the common language runtime executes.
Microsoft intermediate language (MSIL) code in a portable
executable (PE) file will not be executed if it does not have an
associated assembly manifest. Note that each assembly can have
only one entry point (that is, DllMain, WinMain, or Main)
Boundaries
• Security boundary - An assembly is the unit at which permissions
are requested and granted.
• Type boundary - Every type's identity includes the name of the
assembly in which it resides. A type called MyType loaded in the
scope of one assembly is not the same as a type called MyType
loaded in the scope of another assembly.
• Reference scope boundary - The assembly's manifest
contains assembly metadata that is used for resolving types and
satisfying resource requests.
• Version boundary - The assembly is the smallest versionable
unit in the common language runtime. All types and resources in
the same assembly are versioned as a unit.
AppDomain
• An AppDomain is a light-weight process.
• A Win32 process is heavy-weight compared to a Unix process.
• A Win32 thread is heavy-weight compared to a Unix thread.
• In .NET, threads run in AppDomain.
• AppDomain is analogous to a Win32 process in that it offers many
of the same benefits.
• A thread in one process cannot invoke a method in a thread that
belongs to another process.
• In .NET, however, threads can cross AppDomain boundaries, and a
method in one thread can call a method in another AppDomain.
Therefore, here's a better definition of an AppDomain: a logical
process inside of a physical process.
CONTEXTS
• In computer science, a task context (process, thread ...) is the
minimal set of data used by this task that must be saved to allow a
task interruption at a given date, and a continuation of this task at
the point it has been interrupted and at an arbitrary future date.
These data are located in:
• Processor registers
• Memory used by the task
• Operating systems, control registers used by the system to manage
the task
• The storage memory (files)
REFLECTION
• Reflection can be used for observing and/or modifying program
execution at runtime.
• A reflection-oriented program component can monitor the execution
of an enclosure of code and can modify itself according to a desired
goal related to that enclosure.
• Reflection can also be used to adapt a given program to different
situations dynamically.
• For example, consider an application that uses two different classes
X and Y interchangeably to perform similar operations.
• Without reflection-oriented programming, the application might be
hard-coded to call method names of class X and class Y. However,
using the reflection- oriented programming paradigm, the
application could be designed and written to utilize reflection in
order to invoke methods in classes X and Y without hard-coding
method names.

More Related Content

Similar to .net Based Component Technologies

.NET TECHNOLOGIES
.NET TECHNOLOGIES.NET TECHNOLOGIES
.NET TECHNOLOGIES
Prof Ansari
 
Tech presentation (part 1)
Tech presentation (part 1)Tech presentation (part 1)
Tech presentation (part 1)
Abhijit Roy
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
SubashiniRathinavel
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareAsp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech Software
Ritwik Das
 
Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)
Hemlathadhevi Annadhurai
 
Object-Relational Mapping and Dependency Injection
Object-Relational Mapping and Dependency InjectionObject-Relational Mapping and Dependency Injection
Object-Relational Mapping and Dependency Injection
Shane Church
 
Scheduling Thread
Scheduling  ThreadScheduling  Thread
Scheduling Thread
MuhammadBilal187526
 
Dotnet interview qa
Dotnet interview qaDotnet interview qa
Dotnet interview qaabcxyzqaz
 
.Net framework
.Net framework.Net framework
.Net frameworkRaghu nath
 
Asp.net new
Asp.net newAsp.net new
Asp.net new
Ganesh Jaya
 
C# and dot net framework
C# and dot net frameworkC# and dot net framework
Online lg prodect
Online lg prodectOnline lg prodect
Online lg prodect
Yesu Raj
 
Clean sw 3_architecture
Clean sw 3_architectureClean sw 3_architecture
Clean sw 3_architecture
AngelLuisBlasco
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in development
Martin Toshev
 
Introduction to Spring & Spring BootFramework
Introduction to Spring  & Spring BootFrameworkIntroduction to Spring  & Spring BootFramework
Introduction to Spring & Spring BootFramework
Kongu Engineering College, Perundurai, Erode
 
Oop.pptx
Oop.pptxOop.pptx
Oop.pptx
KalGetachew2
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)
DrUjwala1
 
Javascript best practices
Javascript best practicesJavascript best practices
Javascript best practices
Jayanga V. Liyanage
 
CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)
Dilawar Khan
 

Similar to .net Based Component Technologies (20)

.NET TECHNOLOGIES
.NET TECHNOLOGIES.NET TECHNOLOGIES
.NET TECHNOLOGIES
 
dot NET Framework
dot NET Frameworkdot NET Framework
dot NET Framework
 
Tech presentation (part 1)
Tech presentation (part 1)Tech presentation (part 1)
Tech presentation (part 1)
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareAsp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech Software
 
Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)
 
Object-Relational Mapping and Dependency Injection
Object-Relational Mapping and Dependency InjectionObject-Relational Mapping and Dependency Injection
Object-Relational Mapping and Dependency Injection
 
Scheduling Thread
Scheduling  ThreadScheduling  Thread
Scheduling Thread
 
Dotnet interview qa
Dotnet interview qaDotnet interview qa
Dotnet interview qa
 
.Net framework
.Net framework.Net framework
.Net framework
 
Asp.net new
Asp.net newAsp.net new
Asp.net new
 
C# and dot net framework
C# and dot net frameworkC# and dot net framework
C# and dot net framework
 
Online lg prodect
Online lg prodectOnline lg prodect
Online lg prodect
 
Clean sw 3_architecture
Clean sw 3_architectureClean sw 3_architecture
Clean sw 3_architecture
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in development
 
Introduction to Spring & Spring BootFramework
Introduction to Spring  & Spring BootFrameworkIntroduction to Spring  & Spring BootFramework
Introduction to Spring & Spring BootFramework
 
Oop.pptx
Oop.pptxOop.pptx
Oop.pptx
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)
 
Javascript best practices
Javascript best practicesJavascript best practices
Javascript best practices
 
CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)
 

Recently uploaded

Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 

Recently uploaded (20)

Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 

.net Based Component Technologies

  • 1. . NET BASED COMPONENT TECHNOLOGIES Dr. K.Prakash Assistant Professor Kristu Jayanti College Bengaluru
  • 2. COM • Component Object Model (COM) is an interface standard for software component introduced by Microsoft in 1993. • It is used to enable interprocess communication and dynamic object creation in any programming language that supports the technology. • COM is often used in the software development industry as an umbrella term that encompasses the OLE, OLE Automation, ActiveX, COM+ and DCOM technologies. • The essence of COM is a language-neutral way of implementing objects that can be used in environments different from the one they were created in, even across machine boundaries. • The different allocation semantics of languages are accommodated by making objects responsible for their own creation and destruction through reference-counting. • Casting between different interfaces of an object is achieved through the QueryInterface() function.
  • 3. COM • COM is primarily used with Microsoft Windows. COM is expected to be replaced at least to some extent by the Microsoft • .NET framework, and support for Web Services through the Windows Communication Foundation (WCF). • COM objects can still be used with all .NET languages without problems. • COM is very similar to other component software interface standards, such as CORBA and Java Beans, although each has its own strengths and weaknesses.
  • 4. DISTRIBUTED COM • Distributed Component Object Model (DCOM) is a proprietary Microsoft technology for communication among software components distributed across networked computers. DCOM, which originally was called "Network OLE", extends Microsoft's COM, and provides the communication substrate under Microsoft's COM+ application server infrastructure. It has been deprecated in favor of Microsoft .NET. • In terms of the extensions it added to COM, DCOM had to solve the problems of Marshalling – serializing and deserializing the arguments and return values of method calls "over the wire". • Distributed garbage collection – ensuring that references held by clients of interfaces are released when, for example, the client process crashed, or the network connection was lost.
  • 5. OBJECT REUSE A.java B.java C.java D.java A.java • Is the copying of a source file from one project to another reuse? • Is the copying of a compiled class file from one project to another reuse? Copy Project 1 Project 2
  • 6. VERSIONING • The versioning issue discussed relates to clients of the property. Suppose we wish to add a new method or property to IHttpContext. We effectively created a new interface and now all clients need to recompile. Not only that, but any components you might be using that refer to IHttpContext need to be recompiled. This can get ugly. • Adding this method doesn't break older clients. Newer clients who might need to call this method can recompile and now call this new method if they wish. This is where we get the versioning benefits.
  • 7. CONNECTABLE OBJECTS • The connectable object is only one piece of the overall architecture of connectable objects. This technology includes the following elements: • Connectable object: Implements the IConnectionPointContainer interface; creates at least one connection point object; defines an outgoing interface for the client. • Client: Queries the object for IConnectionPointContainer to determine whether the object is connectable; creates a sink object to implement the outgoing interface defined by the connectable object. • Sink object: Implements the outgoing interface; used to establish a connection to the connectable object. • Connection point object: Implements the IConnectionPoint interface and manages connection with the client's sink.
  • 8. CONNECTABLE OBJECTS • The relationships between client, connectable object, a connection point, and a sink are illustrated in the following diagram:
  • 9. OLE CONTAINERS AND SERVERS • A container application is an application that can incorporate embedded or linked items into its own documents. • The documents managed by a container application must be able to store and display OLE document components as well as the data created by the application itself. • A container application must also allow users to insert new items or edit existing items by activating server applications when necessary. • A server application or component application is an application that can create OLE document components for use by container applications. • Server applications usually support drag and drop or copying their data to the Clipboard so that a container application can insert the data as an embedded or linked item.
  • 10. OLE CONTAINERS AND SERVERS • Most servers are stand-alone applications or full servers; they can either be run as stand-alone applications or can be launched by a container application. • Containers and servers do not communicate directly. Instead, they communicate through the OLE system dynamic-link libraries (DLL). These DLLs provide functions that containers and servers call, and the containers and servers provide callback functions that the DLLs call.
  • 11. ACTIVEX CONTROLS • ActiveX is a component object model (COM) developed by Microsoft for Windows platforms. • By using the COM runtime, developers can create software components that perform a particular function or a set of functions. • Many Microsoft Windows applications - including many of those from Microsoft such as Internet Explorer, Microsoft Office, Microsoft Visual Studio, Windows Media Player etc - use ActiveX controls to build their feature set as well as encapsulate their functionality. • Internet Explorer also allows the ActiveX controls to be embedded inside web pages.
  • 12. .NET COMPONENTS • .NET components provide a programmable interface that is accessed by consumer applications (often called client applications). • .NET object-oriented programming involves not much more than creating a class, adding the properties, methods, and events required by the class, and including the class in different applications. • A .NET component, however, is a pre-compiled class module with a .DLL (dynamically- linked library) extension. At run time, a .NET component is invoked and loaded into memory to be used by some consumer application. • Each .NET DLL component may contain multiple classes. This means that each DLL may expose a single class or a variety of classes.
  • 13. ASSEMBLIES Assemblies are a fundamental part of programming with the .NET Framework. An assembly performs the following functions: • It contains code that the common language runtime executes. Microsoft intermediate language (MSIL) code in a portable executable (PE) file will not be executed if it does not have an associated assembly manifest. Note that each assembly can have only one entry point (that is, DllMain, WinMain, or Main) Boundaries • Security boundary - An assembly is the unit at which permissions are requested and granted. • Type boundary - Every type's identity includes the name of the assembly in which it resides. A type called MyType loaded in the scope of one assembly is not the same as a type called MyType loaded in the scope of another assembly.
  • 14. • Reference scope boundary - The assembly's manifest contains assembly metadata that is used for resolving types and satisfying resource requests. • Version boundary - The assembly is the smallest versionable unit in the common language runtime. All types and resources in the same assembly are versioned as a unit.
  • 15. AppDomain • An AppDomain is a light-weight process. • A Win32 process is heavy-weight compared to a Unix process. • A Win32 thread is heavy-weight compared to a Unix thread. • In .NET, threads run in AppDomain. • AppDomain is analogous to a Win32 process in that it offers many of the same benefits. • A thread in one process cannot invoke a method in a thread that belongs to another process. • In .NET, however, threads can cross AppDomain boundaries, and a method in one thread can call a method in another AppDomain. Therefore, here's a better definition of an AppDomain: a logical process inside of a physical process.
  • 16. CONTEXTS • In computer science, a task context (process, thread ...) is the minimal set of data used by this task that must be saved to allow a task interruption at a given date, and a continuation of this task at the point it has been interrupted and at an arbitrary future date. These data are located in: • Processor registers • Memory used by the task • Operating systems, control registers used by the system to manage the task • The storage memory (files)
  • 17. REFLECTION • Reflection can be used for observing and/or modifying program execution at runtime. • A reflection-oriented program component can monitor the execution of an enclosure of code and can modify itself according to a desired goal related to that enclosure. • Reflection can also be used to adapt a given program to different situations dynamically. • For example, consider an application that uses two different classes X and Y interchangeably to perform similar operations. • Without reflection-oriented programming, the application might be hard-coded to call method names of class X and class Y. However, using the reflection- oriented programming paradigm, the application could be designed and written to utilize reflection in order to invoke methods in classes X and Y without hard-coding method names.