1. #1
    Sencha Premium Member mik3e's Avatar
    Join Date
    Jan 2012
    Location
    Vienna / Austria
    Posts
    81
    Vote Rating
    1
    mik3e is on a distinguished road

      0  

    Default appFolder with subdirectories

    appFolder with subdirectories


    Just a short suggestion: Is it possible to define subdirectories for the appFolder property of Application? That would have been useful in my case, where the App is in a subdirectory of the webserver-root, cause the main root is called to build a servert side MVC (Zend Framework which I use to build cache proxy) and the server side MVC has a special view which loads the ExtJS GUI.

    For example:

    /index.php (Starts the server side MVC)
    /src/designer.js
    /src/app/store/<STORE>.js

    If I refer to the designer.js in the loaded view, that works without problems. But the Designer then tries to load:
    http://domain.com/app/store/<STORE.js> which of course isn´t working.

    The correct path should be:
    http://domain.com/src/app/store/<STORE.js>

    Maybe that´s a small improvement for Sencha Designer.
    Besides for that case it would also be senseful to disable the generation of the designer.html file, cause it´s useless...

    Ciao,
    Mike

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,413
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Hey Mike -

    Your case is pretty common, in fact I'd venture to say that it is more often the "normal" situation.

    We have a lot envisioned here in terms of deployment/packaging. In an ideal world, your index.php should be including a few files... the library css, the library javascript and your packaged application as a single file.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member mik3e's Avatar
    Join Date
    Jan 2012
    Location
    Vienna / Austria
    Posts
    81
    Vote Rating
    1
    mik3e is on a distinguished road

      0  

    Red face


    Hi Aconran,

    That won´t work in this case, cause the index.php only initializes the bootstrap of the framwork. Due to security reasons, only the index.php file and other files, which must be directly accessable by the client browser, are in a public directory (as common in the newer MVC frameworks).

    So you have to add the JS scripts to the view component - which also is the correct way I think.
    It was just a suggestions for improvement in a upcoming version. At the moment I simply packed the whole app directly in the main root folder - not so beautiful but it works

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,413
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Maybe you misunderstood me.

    The deployment packaging would create a highly customized version of ext-custom.css and ext-custom.js that only included what you needed (for example if you didn't use a tree or a grid it wouldn't include those packages). It would also create a special version of resources with the proper images. It would also package together all of your application files into a single file called application.js.

    You would then copy this clientdeploy/ folder into your php app and include the following:
    Code:
    <link rel="stylesheet" href="clientdeploy/resources/css/ext-custom.css" />
    <script src="clientdeploy/ext-custom.js"></script>
    <script src="clientdeploy/application.js"></script>

    And your client deploy would look something like this:
    Code:
    /YourApp/clientdeploy
       |-resources
       |---css
       |---images
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha Premium Member mik3e's Avatar
    Join Date
    Jan 2012
    Location
    Vienna / Austria
    Posts
    81
    Vote Rating
    1
    mik3e is on a distinguished road

      0  

    Default


    Hi Aaron,

    Oh, I understand now - sorry, didn´t use the deployment till now. So it make sense for sure and can be easily embedded as you described

    Wish you a nice weekend!
    Michael

  6. #6
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,413
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Michael, To clarify currently the designer will copy all of the resources you need but does not yet do the automatic pruning of unnecessary classes/creating an optimized build. That will be coming in the future.

    Hope you have a great weekend too!
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #7
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    11
    Vote Rating
    0
    keithjjones is on a distinguished road

      0  

    Default


    I am still having trouble trying to add any parent directories to the front of an application's appFolder property in Designer 2. You can not add it directly in Designer 2 because the tool will not allow any special characters (the / character being one of them) in this property's value. I did not see a clear answer to the original problem raised in this thread and I am wondering if I am missing something.

    The only way I can get the scenario described in the first message to work (and using parent paths to the application is something I have to do often) is to go in and hand edit the auto generated designer.js file so that the appFolder property contains the proper path with the parent directories. However, every time I change the application and save it (or deploy it), I have to go back in and hand edit it with the proper paths again. This could easily occur a hundred times a day during heavy development. Is there a better work around to this problem that I may be missing?

    Thank you for your help! I love the improvements in Designer v2!

    PS - I am in the development phase and need the output of the designer as is, with just this slight change to add a parent path. Any deployment solution (such as using the SDK's packaging capabilities) will not help me during the development phase.

  8. #8
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,413
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Keith -

    We are tracking an issue with appFolder. I suggest you subscribe to this thread:
    http://www.sencha.com/forum/showthread.php?175586

    I will cross reference this thread as well.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  9. #9
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    11
    Vote Rating
    0
    keithjjones is on a distinguished road

      0  

    Default


    Thank you for the quick reply! Although I think they are potentially two different problems involving the same property, I will write more on the other thread since it has already been classified as a bug over there.

    Thanks!

  10. #10
    Sencha User
    Join Date
    Aug 2011
    Location
    Miami, Florida
    Posts
    24
    Vote Rating
    -1
    tmort is an unknown quantity at this point

      0  

    Default


    Any progress on this? I've moved my app to Sencha Touch 2 b1 and ran into a brick wall with this.

    Is there any work around or hack in the meantime?