Middleware technologies such as Web Services, CORBA and DCOM have been very successful in solving distributed computing problems for a large family of application domains. As middleware systems are getting widely adopted and more functionally mature, it is also increasingly difficult for the architecture of middleware to achieve a high level of adaptability and configurability, due to the limitations of traditional software decomposition methods. Aspect oriented programming has brought us new design perspectives because it persuperimpositions of multiple abstraction models on top of one another. It is a very powerful technique in separating and simplifying design concerns. In this paper, we first show that, through the quantification of aspects in the legacy implementations, the modularity of middleware architecture is greatly hindered by the ubiquitous existence of tangled logic. We then go one step further by factoring out a number of aspects identified in the mining work and re...