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

8. Advanced Model Topics > Reusing the Model Tier

Reusing the Model Tier

It has been stressed often throughout this book that the Model tier should remain unaware of the rest of the application. This means Proxys should never know (i.e. import) View Components, Mediators, or Commands. This also extends to not sending Notifications defined on the ApplicationFacade, AppConstants, or any other application-specific location.

When you are developing a small application, like StoryArchitect, you may suspect that eventually you will want companion applications, say for tablet and mobile. Those potential apps may have their own View Components, use cases, and business logic. You will be well served if you keep your Model reusable, but you do not have to move it to a separate project if you are sure you are taking the proper precautions. You could wait until you start work on your first companion app and at that time, move the Model tier code to its own library project. If you are positive the other apps will be built (perhaps they are being built in parallel), you may want to start out with the model package in a library project.


  

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