Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

pset 4

Singleton Design Pattern and the Spring Framework.

The Singleton design pattern is one of the most widely used and abused Design Patterns in Java. The Spring Framework prevents Singleton abuse and makes you look like a Rockstar.

Steps:

  • Tag your most recent commit and put your new changes on a branch.
  • Refactor Mario to use the Singleton Design Pattern as described in the following video.
  • Be sure to note that the Singleton pattern, while good does have it's disadvantages. Watch this video
  • Refactor your code so that you replace the Singleton pattern with Dependency Injection. Watch this video about using the Spring Framework to manage your Dependency Injection. Once you start using Spring, you will no longer have a need to use the Singleton pattern because of Dependency Injection.
  • In order to use Spring, you have to add a few new Java library jars to your project. Watch this video on Maven to learn how to do so.
  • If you have problems setting up your Spring environment, flip ahead to the spring project example in PSET6. The example project in PSET6 is how professional Spring projects are setup.

Last problem working with Mario; moving on to some of my favorite topics of the entire course.

Email me when you're done.