So what are bad smells in code?
Bad smells are warning signs in your own code that possibly indicates a deeper design problem. You can find a detail description about different types of bad smells and how to re-factor them in here.
JDeodorant
JDeodorant is an Eclipse plugin that identifies bad smells, and resolves them by applying appropriate refactorings.JDeodorant only detects four types of bad smells.They are,
- God Class
- Long method
- Type checking
- Feature Envy
Installing JDeodorant plugin in Eclipse
Download JDeodorant Eclipse plugin and extract its contents into Eclipse plugins directory. Then close the Eclipse IDE and open it again. Now you can see a menu item named 'Bad Smells' appear in the menu bar. Also you can install the plugin through JDeodorant Update site by using Eclipse Install New Software feature (Help-->Install New Software).
Procedure of detecting bad smells
As an example, first I am going to show you how to identify a God class and how re-factor it by the means of extracting.
Read full article from Asanka Indrajith's TechHalt: Detecting and refactoring bad smells in code using JDeodorant plugin for Eclipse
No comments:
Post a Comment