Refactoring Project

Project Resources

"In the situation where I have to design new pieces of code for an existing project RIT has prepared me well. I am constantly creating classes under the guidelines of design patterns, low coupling, high cohesion, etc. I find that I write effective and maintainable code. However, in the situation where I have to maintain existing code, where no features are added, then I wasn't prepared well. I have been learning about refactoring on my own. It would be nice if RIT had a class about what to do in the situation where you work with old code."

The comment above was written by a student who graduated from RIT's Software Engineering program. It was in response to a survey question: "Generally, how well do you feel that RIT's Software Engineering program prepared you for your current job responsibilities?" Their comment is directly applicable to the material in this course, Engineering of Software Subsystems.

The design activity for this unit is to analyze an existing program. Your team will reverse engineer the design and discover the intentional (and unintentional) uses of design patterns in the program. You will provide an analysis of the existing design describing what you perceive its strengths and weaknesses to be. You will also analyse the code base using quantitative metrics, e.g. using a tool like SonarQube. After doing the analysis of the existing code base you will suggest a refactoring of the design to better adhere to the design principles that you worked with in this course. Principles such as coupling, cohesion, delegation vs. inheritance, assignment of responsibilities, elimination of bad code smells, metric values, etc. should be in your consideration when doing the analysis and refactoring. The refactored design should have some connection to the original design. The intention is not to throw away the design and start with a clean sheet of paper.

After doing the refactoring of the design the team will select some significant aspects of the refactoring to implement. The aspects of the design that will be implemented must be approved by your instructor by the date specified on the course schedule.

The system that you are to work with is a previous student team submission for the introduction to SE course. The provided repository includes a statement of the problem that this software system solves, all available documentation, and the code base.

Assessment

Component Percent
Presentation 15
Reverse Engineering, Refactoring and Documentation including initial metric hot spot analysis 70
Implementation 15

The instructor will use the following rubrics to evaluate your work on this project:

Submission Instructions

Make sure that your team makes its submission before the end date and time specified for the Project submission dropbox for the Refactoring Project in myCourses. Name your file XXrefactor.zip where XX is the two-digit number of your team. For example, if your team is team 5, submit a file named 05refactor.zip. Note that you can submit many versions of this file and they all be kept in the dropbox, though your instructor will only look at the last submission.

For full consideration during grading, the file must contain the following:

  1. The final design documentation as a single PDF document. named design.pdf. Instructors may, at their discretion, further restrict the acceptable formats. This is the only file that the instructor will look at to evaluate your design. Your documentation of your refactoring efforts must at least include the elements in this design refactoring documentation template.

  2. A copy of the final presentation presentation.pdf (for other presentation software).

  3. All the Java source files required to compile and run your project.

  4. A JAR file named refactor.jar containing the final compiled version of your project. A file start.bat that can be executed on an SE Department lab machine to start your refactored program running.

  5. The zip file must be submitted by the time specified in the schedule for your section. Teams are advised to submit something early to ensure they receive at least minimal credit.

Presentation Guidelines

On the day scheduled for completion of this unit, each team will do a presentation of their refactoring work. The emphasis of the presentation will be on the areas that you have refactored in the design, and your rationale for the design refactoring that you did. You do not need to present a detailed discussion of the original design. Present your refactored design using UML diagrams particularly for the areas where you have refactored. To highlight the improvements you made by refactoring the design, show sequence charts for, at least, two major features executing in the original design and in your refactored design. Describe the aspects that your team choose to implement. Discuss the metrics report for that implementation comparing the metrics against those for the original implementation. In your presentation do not discuss every metric. Select the ones that are most important and relevant and that guided your refactoring.