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

PPTX
Intro to Microsoft.NET
PPTX
Middle ware Technologies
PPTX
Middleware Technologies
PPTX
Visual Basic User Interface-III
PPTX
VB IMPORTANT QUESTION
PPTX
Introduction to vb.net
PPT
JAVA object oriented programming (oop).ppt
PDF
.NET TECHNOLOGIES
Intro to Microsoft.NET
Middle ware Technologies
Middleware Technologies
Visual Basic User Interface-III
VB IMPORTANT QUESTION
Introduction to vb.net
JAVA object oriented programming (oop).ppt
.NET TECHNOLOGIES

Similar to .net Based Component Technologies (20)

PPS
dot NET Framework
PPTX
Tech presentation (part 1)
PPTX
Presentation1.pptx
PDF
Asp.NETZERO - A Workshop Presentation by Citytech Software
PDF
Dot NET Interview Questions PDF By ScholarHat
PPT
Introducing object oriented programming (oop)
PPTX
Object-Relational Mapping and Dependency Injection
PPTX
Scheduling Thread
PPT
Object oriented programming_Unit1_Introduction.ppt
PDF
Dotnet interview qa
PPTX
.Net framework
PPS
Asp.net new
PPT
Unit 1- Basic concept of object-oriented-programming.ppt
DOCX
Online lg prodect
PPTX
Clean sw 3_architecture
PDF
Eclipse plug in development
PPTX
Introduction to Spring & Spring BootFramework
PPTX
Oop.pptx
PPTX
Session2 (3)
dot NET Framework
Tech presentation (part 1)
Presentation1.pptx
Asp.NETZERO - A Workshop Presentation by Citytech Software
Dot NET Interview Questions PDF By ScholarHat
Introducing object oriented programming (oop)
Object-Relational Mapping and Dependency Injection
Scheduling Thread
Object oriented programming_Unit1_Introduction.ppt
Dotnet interview qa
.Net framework
Asp.net new
Unit 1- Basic concept of object-oriented-programming.ppt
Online lg prodect
Clean sw 3_architecture
Eclipse plug in development
Introduction to Spring & Spring BootFramework
Oop.pptx
Session2 (3)
Ad

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
01-Introduction-to-Information-Management.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Lesson notes of climatology university.
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Institutional Correction lecture only . . .
PDF
Insiders guide to clinical Medicine.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Pharma ospi slides which help in ospi learning
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
01-Introduction-to-Information-Management.pdf
Supply Chain Operations Speaking Notes -ICLT Program
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Anesthesia in Laparoscopic Surgery in India
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Cell Types and Its function , kingdom of life
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Lesson notes of climatology university.
O5-L3 Freight Transport Ops (International) V1.pdf
PPH.pptx obstetrics and gynecology in nursing
2.FourierTransform-ShortQuestionswithAnswers.pdf
Institutional Correction lecture only . . .
Insiders guide to clinical Medicine.pdf
Computing-Curriculum for Schools in Ghana
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
TR - Agricultural Crops Production NC III.pdf
Pharma ospi slides which help in ospi learning
Ad

.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.