Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
.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.