Research paper - Google Sites

1 downloads 204 Views 88KB Size Report
Our approach is based on the analysis and dynamic level of the source code of an implementation ... [Software Engineerin
Master in Systems and Computer Science Universidad Nacional de Colombia - UNAL © 2009 Authors. All Rights Reserved.

Research paper (draft)

Refactoring oriented software architecture to detection of J2EE design patterns. Víctor E. Collazos Serrano

ABSTRACT The object model is the key that is maintained for any architecture supported by object-oriented technology. This architecture is usually based on implementations of design patterns, which are aimed at solving architecture that take place during the stages of analysis and implementation of a project. At the corporate level, one of the most technology implementations and their benefits because the architecture is called J2EE, which implements each of its layers a series of design patterns that solve a specific problem. Since this is very common in a reengineering process for this platform that raises the need to detect design patterns currently implemented in a solution of this technology, to make a diagnosis of current architecture and propose specialists from a solution objective for the optimization of the architecture itself. Our approach is based on the analysis and dynamic level of the source code of an implementation based on J2EE technology, which allows the detection of different patterns that use each of the layers constituting the architecture, as well as describe how it is implemented a prototype that allows the detection of these patterns illustrating the user about the current state in which is the design of the solution.

Categories and Subject Descriptor D.2 [Software Engineering] D.2.11 [Software Architecture] I.5 [Pattern Recognition]

General Terms Refactoring, design patterns, J2EE.

Keywords Refactoring, pattern-based refactoring, J2EE design patterns, refactoring techniques, static and dynamic tools for detecting patterns.

1. INTRODUCTION Refactoring is the term more common to refer to when to have as an option in the reengineering process optimization and improvement of software. This term is commonly recognized as the route to improve the internal structure of an object-oriented software while at the same time retains its external behavior.

Since in his book on the subject Fowler [1], reveals a series of programming and design patterns to simplify the task of refactoring, there have been various proposals and new thoughts for optimize software by this paradigm. Parallel and constantly develop new types of refactoring and areas in various approaches to solve new problems that are involved in the construction and evolution of software. Bearing in mind that J2EE or Java 2 Platform, Enterprise Edition (now known as Java Platform, Enterprise Edition or JEE since version 1.4) is a programming platform to develop and run software applications in Java programming language architecture with N distributed levels, which are based widely on modular software components running on an application server, is one of the platforms implemented at the enterprise level and is therefore almost inevitable that in an evolutionary process of an implementation of this architecture is necessary to use the refactoring as a mechanism for optimizing this solution.

It's a good idea to consider a process of refactoring detection patterns as a solution to give a real diagnosis of the current state of its architectural design. This paper presents an approach to detect patterns of a J2EE architecture using static structure supported by the source and its dynamic behavior to detect patterns that are implemented in each of its architectural layers as displayed in Figure 1.

2. APPROACH Víctor Edwin Collazos Serrano Maestría en Sistemas ciencias de la computación Departamento de Ingeniería de Sistemas e Industrial, Universidad Nacional de Colombia, Sede Bogotá E-mail: [email protected] Cel.: 311-2348381

The J2EE design patterns have their own intention and describe roles and responsibilities for each separate layer to which they belong. In the source, each function is commonly represented by a class and responsibilities are codified in those classes with attributes and methods. The guidelines also describe the collaboration between objects at runtime. In this paper we use the

functions, responsibilities and collaboration applications to analyze information to detection of J2EE design patterns and then categorize the results. Understand the structure and intent of the software system will give developers a quick overview of the entire system without going into detail about the source code.

Figure 2. The process of identifying J2EE patterns

3.1 Recognition of the structural model Figure 1. Taxonomy of the refactoring of J2EE Architecture

This recognition is based on gathering information from classes and uses of the methods, attributes and their parameters, in this way to define roles, responsibilities and relationships between clases and interfaces of the system.

2.2 Case Study ToDo: Choose a case study applied to the process of detection a particular design pattern in J2EE technology.

3. RECOVERING PATTERNS For the detection of patterns is necessary to take account not only the analysis performed at the files that make up the source code of a J2EE application to address the detection of patterns and structural composition of the classes and their relationships with each other, but also a dynamic analysis for the behavioral patterns at to make a more precise recognition of different patterns that implement it in certain layers. Figure 3. Lifting facts to class level ToDo: Description in detail the tools and techniques used to detect patterns in static type of the layers of a J2EE platform.

3.2 Recognition of the dynamic behavior The dynamic analysis is based on the transformation behavior in the aspect of the design pattern by a sequence diagram, and implementing the previously defined method calls and monitoring at runtime. The dynamic analysis is used to calculate the probability that a particular pattern is in the source aplication. ToDo: Description in detail the tools and techniques used for detection of dynamic patterns in the different layers of a J2EE platform.

3.3 Pattern Validation ToDo: Selection and description of the validation process based on metrics for detecting a particular pattern in J2EE.

4

PROTOTYPE FOR DETECTING PATTERNS (ECLIPSE PLUG-IN)

ToDo: Description of the prototype implemented for the detection of J2EE patterns.

5

CONCLUSIONS.

Information collected in this paper visualizes the process, techniques and methodology used to perform a detection process of J2EE patterns to support the process of refactoring at an abstract architecture of this technology. The most important thing is that there is planted the seed for future research based on reengineering in order to optimize the software, allowing applications to be more scalable and flexible without this demand a large amount of labor and economic efforts. ToDo: Description of the conclutions after the research work.

6

REFERENCES

[1] M. Fowler. Refactoring (Improving the Design of Existing Code). Addison Wesley, 1999. Proc. of the 6th Workshop Software Reengineering, Bad Honnef, Germany, Softwaretechnik-Trends, volume 24/2, pages 63–64, May 2004. [2] Birkner marcel, Objected-oriented design pattern detection using static and dynamic analysis in java software,Magister Thesis, university of applied sciences bonn-rhein-sieg sankt augustin, Germany, august 2007 [3] Jörg Niere , Wilhelm Schäfer , Jörg P. Wadsack , Lothar Wendehals , Jim Welsh, Towards pattern-based design recovery, Proceedings of the 24th International Conference on Software Engineering, May 19-25, 2002, Orlando, Florida http://doi.acm.org/10.1145/581339.581382

[4] L. Wendehals. Improving design pattern instance recognition by dynamic analysis. In Proc. Of the ICSE 2003 Workshop on Dynamic Analysis (WODA), Portland, USA, May 2003. [5] Naouel Moha. Detection and Correction of Design Defects in Object-Oriented Designs. Doctoral Symposium, 21st International Conference on Object-Oriented Programming, Systems, Languages and Applications, October 2007. [6] Sang-Uk Jeon, Joon-Sang Lee, Doo-Hwan Bae: An Automated Refactoring Approach to Design Pattern-Based Program Transformations in Java Programs. APSEC 2002: 337. [7] D.Janaki Ram, J.Rajesh, Detecting Intent Aspects from Code to Apply Design Patterns in Refactoring: An Approach Towards a Refactoring Tool, SODA’03, January, 2004, Bangalore, India. Copyright 2003 DOSLab, IIT Madras. [8] [20] Garlan, D.,Kompanek, A., Melton R., and Monroe R.: Architectural Style: An Object-Oriented Approach, February, 1996. [9] Maurice Lebon. A fine-grained model for design pattern detection in eiffel systems. Master’s thesis, York University, Toronto, Ontario, Canada,2006. [10] Joerg Niere, Wilhelm Schaefer, Joerg P. Wadsack, Lothar Wendehals, and Jim Welsh. Towards pattern-based design recovery. Technical Report tr-ri-01-227, University of Paderborn, Paderborn, Germany, October 2001.