Making Method Calls Simpler
Improving API usability.
Table of Contents
- Rename Method: Rename a method to better explain what it does.
- Add Parameter: Add a parameter that allows passing more data.
- Remove Parameter: Remove a parameter that is no longer used.
- Separate Query from Modifier: Separate the method into two methods: one for query and one for modification.
- Parameterize Method: Replace a method with a parameter.
- Replace Parameter with Explicit Methods: Replace a parameter with explicit methods.
- Preserve Whole Object: Pass the whole object instead of parts of it.
- Replace Parameter with Method Call: invoke the object’s method inside the method body.