• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[ANSWERED] Best practice on directory/file structure for reuse

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [ANSWERED] Best practice on directory/file structure for reuse

    Hi all,

    We are going to be redesigning our entire system using Valence 4.0 and I am trying to figure out the best way to structure the file system. I don't want to get several months down the road and find out I have done something that will require a bunch of rework. Links to any references would be great as I don't mind doing the research. Everything I have been able to find is a simple case where you just have a single app, I haven't been able to find how to have many apps that will need to share a lot of things. I have been reviewing the valence-4.0 folder and files to try and get an idea. I appreciate any ideas from those who are farther along on this than I am. I have created several Valence apps, all stand-alone and none that have used the MVC architecture. They were all based on examples that came with Valence 3.2. I do plan on using Sencha Architect if that matters. Some of my confusion definitely stems from my inexperience with some of this.

    Several issues I am not sure on:

    1. It looks like I should have a 'shared' folder for those items that can be reused among apps. If I have a store that is in the shared folder should an app refer to that directly or should it have a file in the store directory that references the shared file?

    2. How do you make test copies of an app for when you are making changes? If I have a top level folder '/davisapps' that contains the production apps do I just create a '/davisapps-test' folder for development/testing and just copy all the folders for that particular app to the test folder? I can see that if all references are relative that this might work. But what about shared items that are under the production folder, do I have to temporarily change the reference so they can be found. Or, does my test folder have to contain everything that the production one does so that all the relative references will work correctly? I could see that maybe the test folder has to be a complete duplicate copy of production.

    3. I followed the video about using Sencha Architect to create an app by opening the template within Valence and doing a 'Save As' to the location where I want the new app. When I look at the files in the new folder created I notice that there are theme specific files contained within the packages, metadata, and theme folders. I assume that this could be a problem when these files need to be changed because of a future upgrade. When I look in the valence-4.0 folder the examples have a similar issue but it seems that all the apps (such as AppUsage, ActiveSessions, etc.) do not. I can see why Architect does this because it assumes that this app will all be self-contained but how do I change things so that I only have one copy of theme related files and I assume that it would probably be best to reference the main ones that belong to Valence.

    Thanks for anyone who has some insight on the above or any other issues you think I might run into that have not anticipated,

    Scott

  • #2
    You've asked a lot of in-depth questions here. It is better to ask shorter, easier-to-answer questions on the forum. Most readers don't have a lot of time to respond with long answers. If at all possible you should strongly consider registering for training courses VV202 and VV203. For more information see https://www.cnxcorp.com/training/.

    Some basic answers to your questions:

    1) You can share components or you can duplicate them, unless we know your app and your need for reusability it's difficult to say which is better for you.

    2) Just copy the path, or better yet have a live production instance of Valence and a development instance. Use Instance Manager to create other instances. Develop in one instance and deploy in another using the same paths.

    3) Theme files in Sencha Architect are compiled. Yes you see theme files within each app but they contain only what that app actually needs. This is what we are recommending for customer development. Many apps included with Valence Framework 4.0 use a shared theme, yes. You can reference any theme package in Sencha Architect's resources area. This would be a great thing to learn in the VV203 course.

    Comment


    • #3
      Richard,

      Thanks for these answers, it helps propel me forward and I will post any more specific answers as I move along. I am working on getting the training approved, do you have any plans to offer online training? Or, maybe the ability to watch a video of the classes at a reduced rate?

      Thanks,

      Scott

      Comment


      • #4
        Besides some basic videos to help you get started we are not currently planning on doing online training.

        Comment

        Working...
        X