没有合适的资源?快使用搜索试试~ 我知道了~
Aspect-Oriented Programming with C# and .NET
需积分: 10 57 下载量 109 浏览量
2007-05-24
19:50:05
上传
评论
收藏 114KB PDF 举报
温馨提示
试读
9页
Aspect-Oriented Programming with C# and .NET<br/>英文版的,使用C#和.NET进行面向方面编程,还可以,能有一些收获。
资源推荐
资源详情
资源评论
Aspect-Oriented Programming
with C# and .NET
Wolfgang Schult and Andreas Polze
Hasso-Plattner-Institute at University Potsdam
{wolfgang.schult|andreas.polze}@hpi.uni-potsdam.de
Abstract
Almost a year ago, Microsoft has introduced the .NET
architecture as a new component-based programming
environment, which allows for easy integration of
classical distributed programming techniques with Web
computing. .NET defines a type system and introduces
notions such as component, object, and interface, which
are building blocks for distributed multi-language
component-based applications.
As many other component frameworks, .NET mainly
focuses on functional interfaces of components. Non-
functional aspects of components, such as resource usage
(CPU, memory), timing behavior, fault-tolerance, or
security requirements are currently not expressed in
.NET’s component interfaces. These properties are
essential for building reliable distributed applications
with predictable behavior even in cases of faults.
Within this paper, we discuss the usage of aspect-
oriented programming techniques in context of the .NET
framework. We focus on the fault-tolerance aspect and
discuss the expression of non-functional component
properties (aspects) as C# custom attributes. Our
approach uses reflection to generate replicated objects
based on settings of a special “fault-tolerance” attribute
for C# components.
We have implemented an aspect-weaver for
integration of aspect-code and componen- code, which
uses the mechanisms of the language-neutral .NET type
system. Therefore, our approach is not restricted to the C#
language but works for any of the .NET programming
languages.Introduction and Motivation
1. Introduction
Reliable computer systems used in the
telecommunication industry, in cars and automated
factories (process control) are often implemented as
special purpose systems which are vendor-specific,
expensive, hard to maintain and difficult to upgrade.
Often, those systems apply proprietary techniques to
achieve security and predictable timing behavior, even in
case of faults. With the need of integrating multiple of
those control systems into a bigger whole, requirements
arise to open up proprietary systems for standard (non
real-time) distributed computing technology.
Component-oriented programming provides a
promising way to system composition out of units with
contractually specified interfaces and explicit context
dependencies. Software component can be deployed
independently, they are subject to composition by third
parties. There exist a number of distributed component
frameworks, notably the Common Object Request Broker
Architecture (CORBA) [14] , Microsoft’s Distributed
Component Object Model (DCOM/COM+) [4] , SUN’s
JavaBean Model [7] , and the relatively new .NET
framework [19] .
Although all of these frameworks simplify the
implementation of complex, distributed systems
significantly, the support of techniques for reliable, fault-
tolerant, and secure software, such as group
communication protocols or replication is very limited.
Any fault tolerance extension for components needs
to trade off data abstraction and encapsulation against
implementation specific knowledge about a component’s
internal timing behavior, resource usage, interaction and
access patterns. These non-functional aspects of a
component are crucial for the predictable behavior of real-
time and fault-tolerance mechanisms. However, in
contrast to the various mechanisms describing a
component’s functional interface (Interface Definition
Languages, Class/Method specifications), there is no
general means to describe a component’s non-functional
properties, such as security settings, fault-tolerance
measures and timing behavior.
Within this paper we present our approach towards
component replication for fault-tolerance in the .NET
framework. Following the idea of aspect-oriented
programming [9] we have developed tools and a
description technique for fault-tolerance requirements.
The description technique uses the extensible “custom
attributes”-mechanism of the C# programming language
as an underlying representation and allows specification of
fault-tolerance requirements independently from an
资源评论
starwishzzgg
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功