ISSN : 2347 - 8446 (Online)
ISSN : 2347 - 9817 (Print)
www.ijarcst.com
International Journal of Advanced Research in
Computer Science & Technology (IJARCST)
© 2013, IJARCST All Rights Reserved
Vol. 1 Issue 1 Oct-Dec 2013
56
Internalization of Dynamic Slicing in Delegate Multicast
Events for E-tracking Systems in C#
Divanshi Priyadarshni Wangoo
ITM University, Sector-23A, Gurgaon, Haryana, India
divanshi.wangoo@gmail.com
I. Introduction
C++ developers do not have access to Windows Forms as a forms
generator. They are restricted to coding the graphical user interface
(GUI) from managed classes found in the Windows.Forms
namespace. There is no visual assistance. C-based programmers
must use C# for full access to Windows Forms visual tools.
C# opens a new door by including the feature of Event Driven
programming such as Events and Delegates. Events are the means
by which Windows Application receive automated notifcation of
the action that has occurred. In a Windows application a lot of
Events are occurring at a particular instant for e.g. Mouse Move,
Mouse out, Mouse Click etc. Delegates are pointer to the function
and are type-safe. Delegates are best complemented as new type
of Object in C#. They are also represented as pointer to functions.
Technically, delegate is a reference type used to encapsulate a
method with a specifc signature and return type i.e., a delegate can
be used to call any method that matches the signature and return
type as that of the delegate. If we consider a real world scenario
then delegates can be understood as any delegate representing a
country a group of people representing a company etc. This same
defnition can be mapped to C# as delegate act as an intermediary
between event source and destination. The .Net Framework has
a Namespace System which is a top-level namespace found in
the class library of the .NET framework. Delegates are derived
from System.Delegate namespaces. Delegates are useful for two
main reasons. First delegates support events. Second, delegates
give your program a way to execute methods at runtime without
having to know precisely what those methods are at compile time.
This ability is quite useful when you want to create a framework
that allows components to be plugged in [2]. We have two
favors of delegate in C#; Single Delegate, Multi-cast Delegate.
A delegate is called a single delegate that derives from the System
and Delegate class contains an invocation list with one method.
A delegate is called Multi-cast Delegate that derives from the
System and Multicast Delegate contains an invocation list with
multiple methods
In Multi-casting we create a single delegate that will invoke
multiple encapsulated methods. The return type of all the delegates
should be same. Now the question arises; why to use Multi-cast
delegates when Single-cast delegates are enough? Well the answer
to this question is in the need to call three methods when a button
is clicked. The Multi-cast delegates are used with events where
multiple calls to different methods are required. Multicast events
can be used with multicast delegates when multiple objects respond
to the same event message at run time.
A. Object-oriented Slicing in .Net(DotNet) Framework
Platforms
The .NET framework was created by Microsoft as a software
development platform. It was designed to accommodate Rapid
Application Development (RAD), platform independence and
network transparency. .NET is a multi language and multiplatform
operating environment in contrast to Java, which is single-language
and multi platform. .NET offers C#, Visual Basic .NET, and many
more .NET-compliant languages. Programming in .NET does not
require learning an entirely new language. To program to the Java
Virtual Machine (JVM) requires learning the Java language.
.NET applications are build in Windows and run in Linux, UNIX,
Macintosh, or any platform that offers a common language runtime
(CLR). .NET introduces a new component model that is largely
implicit. The messiness of COM (Component Object Model)
is removed. In .NET, developers use standard language syntax
to create, publish, and export components. There is nothing
else to learn. .NET addresses many of the shortfalls of COM,
including susceptibility to DLL. .Net provides a refective, object–
oriented API and it is designed for generic application, so that
it can accommodate numerous programming and development
languages.
Dot NET framework offers relatively strong integration with the
Windows operating system and the Component Object Model
(COM). The support and control backed by SQL Server gives
strong back-end support & help the frms for improved site
management.
.NET is tiered, modular, and hierarchal. Each tier of the .NET
Framework is a layer of abstraction. .NET languages are the top
tier and the most abstracted level. The common language runtime
is the bottom tier, the least abstracted, and closest to the native
environment. This is important since the CLR works closely with
the operating environment to manage .NET applications. .NET
supports managed and unmanaged programming languages.
Abstract
This paper focuses on the construction of SDG for delegates called DDG which will make message passing and event handling in
delegates simpler. An Event is an important C# feature that lays its foundation on delegates. The DDG can be incorporated into .Net
platforms and slices can be computed dynamically at the time of occurrence of an event. Generating events and passing the action
of the triggered event to the event handler can be dynamically generated at run time with the assimilation of DDG into the event
handling mechanism. “E-tracking systems” can have better trailing if the DDG is embedded into the event handling application
programs in .Net platforms. Multi-cast events enable multiple objects to respond to an event simultaneously and give fexibility to
the user to get response of more than one action on the triggered event. This brings effciency to the programmer and helps in better
maintenance of the software application project and also helps in reducing the execution time.
Keywords
System Dependence Graphs (SDG), Delegate Dependence Graphs (DDG), Event handling, Dynamic slicing, Graphical User Interface
(GUI), Integrated Development Environment (IDE)