Reengenharia com Uso de Padrões de Projeto
Abstract
The reengineering process of a system originally developed with procedural orientation in C is conducted with change to the object oriented paradigm. This process has been preceded by the object oriented reverse engineering of the legacy system using the method Fusion/RE. It has also been preceded by a first phase in which C is preserved; and uses a segmentation process in which the code is restructured to satisfy some object oriented requirements. Java and SyBase are used in this paper to generate three types of implementation according to the tree alternative modes suggested by the Persistent Layer pattern. The operations of the CRUD pattern are implemented in the application classes (first mode), in the specific clases of each application class (second mode) and in a Broker class that does the mapping of all the object types to the relational database (third mode). Object Models of the different implementations and examples of source code are included to ilustrate the evolution obtained with the three configurations. These are used to evaluate the segmentation process which results in an implementation similar to that obtained through the first mode suggested by the Persistent Layer pattern as the inheritance involved in it is practically restricted to the method signature in the abstract class. This is compatible with the Lack of inheritance in the C language.
References
Java - JDBC Basics. URL: [link].
Yoder, J.W.; Johnson, RE.; Wilson, Q.D.— Connecting Business Objects to Relational Databases. In: Conference on the Pattern Languages of Programs, 5, Monticello-IL. EUA. Proceedings. 1998.
Penteado, R. A. D.- Um Método para Engenharia Reversa Orientada a Objetos. Tese de Doutorado — Instituto de Fisica de São Carlos, Universidade de São Paulo. São Carlos, 237 p.. 1996.
Penteado, R., Germano, F., Masiero, P. C. - An Overall Process Based on Fusion to Reverse Engineering Legacy Code. In: Working Conference Reverse Engineering. 3. Monterey-California. Proceedings. IEEE. p. 179-188. 1996.
Rational Corporation - Unified Modeling Language. URL: [link].
Penteado, R.; Masiero, P. C; Cagnin, M.L - An Experiment of Legacy Code Segmentation to Improve Maintainability. European Conference on Software Maintenance and Reengineering (CSMR'99), 3, Amsterdan. Proceedings. IEEE, p. 111-119. 1999.
Cagnin, M. I, Penteado,R. - Passos para Condução de Reengenharia de Sistemas Procedimentais para Sistemas Orientados a Objetos, Preservando a Linguagem de Implementação Original. Documento de Trabalho — Departamento de Computagao/UFSCar. Sao Carlos, 18 p.. Janeiro, 1999.
Taschwer, M.; Rauner-Reithmayer, D.; Mittermeir, R. — Gerating Objects from C Code — Features of the CORET Tool-Set. In: European Conference on Software Maintenance and Reengineering (CSMR'99). 3, Amsterdan-The Netherlands. Proceedings. IEEE, p. 91-100. 1999.
Gall, H., Klsch R. - Capsule Oriented Reverse Engineering for Software Reuse. In: European Software Engineering Conference, ESEC'93, 4. Garmish-Partenkirchen, Germany, p. 418-33. 1993.
Gall, H., Klésch R.- Finding Objects in Procedural Programs: An Alternative Approach. In: Working Conference on Reverse Engineering, 2. Toronto-Canada. Proceedings. IEEE Computer Society Press, p. 208-216. 1995.
Buschmann, Frank; et al. - Pattern-Oriented Software Architeture. European Conference on Object-Oriented Programming, 11. Finland. Proceedings. Finland. 1997.
Gamma, E., Helm, R., Johnson, R., Vlissides, J. - Design Patterns Elements of Reusable of Object-Oriented Software. Reading-MA. Addison-Wesley. 1995
Jacobson, L; Lindstrom, F.- Re-engineering of Old Systems to an Object-Oriented Architecture. In: OOPSLA 91. Proceedings. ACM. p. 340-350. 1991.
Harel, D. - STATECHARTS: A Visual Formalism to Complex Systems. Science of Computer Programming, v. 8, p. 231-274. 1987.
Symantec Corporation. URL: [link].
Cagnin, M. I. — Avaliação das Vantagens quanto à Facilidade de Manutenção e Expansão de Sistemas Legados Sujeitos a Engenharia Reversa e Reengenharia. Dissertação de Mestrado — Departamento de Computação, Universidade Federal de São Carlos. São Carlos, 101 p. agosto, 1999.
