In this fourth iteration of the Contact Manager application, we refactor the application to make the application more loosely coupled. When an application is loosely coupled, you can modify the code in one part of the application without needing to modify the code in other parts of the application. Loosely coupled applications are more resilient to change.

Currently, all of the data access used by the Contact Manager application is contained in the controller classes. This is a bad idea. Whenever you need to modify one part of your application, you risk introducing bugs into another part of your application.

There are several reasons that you might need to modify your application. You might need to add a new feature to your application, you might need to fix a bug in your application, or you might need to modify how a feature of your application is implemented. Applications are rarely static. They tend to grow and mutate over time.

When an application is loosely coupled, on the other hand, you can make changes to one part of an application without touching other parts of an application. For example, you can switch data access technologies without modifying your controller logic.

In this iteration, we take advantage of several software design patterns and spring.net dependency injection framework to refactor our Contact Manager application into a more loosely coupled application.

To improve the design of our application, we will have the following steps:

1: Creating a service layer

2: Using the service layer in controllers

3: Using spring.net Dependency Injection framework

Last edited Jun 23, 2009 at 12:18 AM by koossery, version 3

Comments

No comments yet.