2 Replies Latest reply on Sep 15, 2006 3:33 PM by luiz.bonfa

    Directory structure for the new Data Services Project

    luiz.bonfa Level 1
      1) I do as prescribed in the manual "Building and deploying Flex 2 Applications", page 325

      "To create a web application make a copy of the /flex directory and its contents. Rename the copy and store it in the same location under /servers/default directory."

      ("flex" is an empty Flex Data Services application that serves as a template for creating your custom application)

      2) I create a corresponding project from Flex Builder 2 :

      Project type: Flex Data Services
      Root folder: C:\fds2\jrun4\servers\default\MyDS
      Root URL: http://localhost:8700/default/MyDS

      Project name: MyDS
      Project contents: C:\fds2\jrun4\servers\default\MyDS

      2) I build the project

      Immediately after "build project" the directory structure at
      C:\fds2\jrun4\servers\default\MyDS becomes the following:

      ---------------- --------------- classes
      ---------------- ---------------flex

      Notice that bin directory now contains another pair of META-INF and WEB-INF in addition to those already existing in the template project "flex".

      Can anybody comment on this directory structure?
      Which META-INF and WEB-INF are supposed to be used for configuration?
      What is the purpose of having two pairs of META-INF and WEB-INF in the same web app?
        • 1. Re: Directory structure for the new Data Services Project
          Bill Sahlas
          Hello -
          first, those folders are necessary in deployment - You need only the contents of the bin folder for deployment, not the sources. Since you're compiling the application locally in FB2 it places all of the supporting and necessary files into one location namely the "bin" folder. You'd deploy the "bin" folder's contents to the FDS server, perhaps another FDS server that is not your "development" server -- like a production server. The data and configuration information that your app needs for FDS services are stored in the WEB-INF and META-INF folders so these need to travel with the final product. On the production server you'd just cop the "bin" folder and it's contents to the /servers/default folder - where you could then rename your bin folder to "MyDS"

          HTH, Bill
          • 2. Re: Directory structure for the new Data Services Project
            luiz.bonfa Level 1
            Bill, thank you for the clarification. I understand now that during deployment of the app to the "Production FDS" I will need to copy a "bin" folder.
            I still need to better understand what is going on during the development cycle. My development environment is configured on a single machine with FB2 project created under the JRun integrated server "default" server. Now, if I need to modify, for example, WEB-INF\services-config.xml file should I modify it in the WEB-INF folder that sits OUTSIDE "bin" folder? If the answer is "yes", how and when two service-config.xml files are synchronized? Is it done by Flex Builder every time I make a change or should I track the changes myself and manually synchronize them?