Skip to content

4. Conclusion

Let’s recap what we wanted to do. We wanted to build the following three-tier MVC web application:

  • The model was already in place. It was used identically by all three proposed solutions
  • because layer independence was strictly maintained, the [web] layer could be implemented in three different ways without affecting the model. We worked exclusively within the [web] layer.
  • The solutions are similar. Whereas in the first solution we had a single servlet with one method per action to handle, in the other two solutions we also have a single servlet but stripped of the action-handling methods, with handling now handled by separate classes. The role of these classes was identical to that of the methods in the first solution.
  • The use of [Spring] in this application allows us to choose the classes that implement the Java interfaces of the [domain] and [dao] layers. These implementation classes could be changed within a layer without any impact on the other layers. Only the Spring configuration file would need to be changed. Thus, the [DAO] layer, currently handled by the [sqlMap] tool, could be handled by the [Hibernate] tool. This would affect the [DAO] layer but would have no impact on the [Web] and [Domain] layers.