Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Reusing the Model Tier > Extra Credit: Refactor the Startup Process

Extra Credit: Refactor the Startup Process

Your Model tier is now a standalone, reusable library. Your App and Test projects reference it but it does not reference them, ensuring that the most important separation of concerns in your app is enforced. There is one more thing you might want to do at this point, particularly if you are planning (or are already building) another app, which will use this Model tier—reuse the “model preparation” phase of the StartupCommand.

  • In the library project:

    1. Create a new controller package, sibling to model (e.g. com.futurescale.sa.controller).

    2. Copy the StartupCommand over from the App project into the controller package, renaming it PrepareModelCommand.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial