2 Replies Latest reply on Apr 19, 2012 12:51 PM by Chris Muir-Oracle

    Where to put the "Model" project?

    Chris Muir-Oracle
      I note in ADF Mobile there's "ViewController" and "ApplicationController" projects. For vanilla applications we'd typically have "Model" and "ViewController".

      Say I want to build a web service data control, cache the results, and store them in the local store for retrieval when the application is start/stopped/activated/deactivated. Presumably all this logic would go in the ApplicationController as it is already seeded with a DataControls.dcx and LifeCycleListenerImpl.java? I wouldn't create a separate Model project and then attach that to the ApplicationController in this case?


        • 1. Re: Where to put the "Model" project?
          Joe Huang-Oracle
          Hi, Chris, you would typically put your Web Services DC and related artifacts in the ViewController project - in the same project where related TaskFlow and Views resides. You can create additional Model projects to hold the model layer components. However, feature archives are created at the project level, so if you want to re-use certain set of functionality by creating feature archives, you will need to remember to include all the feature archives needed to provide that functionality.
          Whether or not you need/want to put model layer artifacts in a separate project has to do with the complexity of your application. On-device mobile apps are typically much more focused in functionality/features than web-based apps, and you would typically design your mobile apps accordingly.

          Joe Huang