1. #1
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    195
    Vote Rating
    2
    hitman01 is on a distinguished road

      0  

    Default Unanswered: Using Sencha Command and Integrating into Existing Project

    Unanswered: Using Sencha Command and Integrating into Existing Project


    I'm trying to integrate a sencha touch application into an existing application.

    My Structure:
    /js/mobile/ - folder where my touch application will be residing
    /js/mobile/app

    /ext/sencha-touch-2.1 - folder where my sencha touch lib will be residing
    /ext/ext-4.1.3/
    /ext/ext-4.1.0/

    index.html doesnt exist, will be generated by php
    /index.php

    Having this structure, I have some questions.

    1.Where do I place app.json? I would like to generate it from php as well, preferably from root (outside of app folder) directory.
    2. I would like to separate the touch lib from the app folder and have it point to /ext/sencha-touch-2.1, this way I would be able to switch between versions on the fly without touch my app.
    3. How do I setup paths for app.json and how can I setup Sencha Command to build it?

    Could someone provide an example please.

    Thank you in advance.
    http://www.dev4.life - Software Development Blog

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,549
    Vote Rating
    873
    Answers
    3567
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    app.json should go in the root of your app.

    "How do I setup paths for app.json" Paths for what? Like have the index pointing to app.json or paths to something else?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    195
    Vote Rating
    2
    hitman01 is on a distinguished road

      0  

    Default


    Well, after investigating this tool for couple of days, I came to a conclusion that it works good if you have a simple setup and follow sencha's recommended file structure. However, if you have a custom file structure and existing project, this tool is not very useful and fairly complicated to use.

    My main requirement is to have a separate folder for my mobile app and another one for my desktop but having and single entry point with index.php at the root. Also, I wanted to detach the touch lib from the mobile folder and having built one js file for touch lib (based on my dependencies and having another js file for my app.

    The best information I got was from this article, however, I still did not achieve my goal.
    http://docs.sencha.com/ext-js/4-1/#!/guide/command_app_single

    u
    sing this command to build:

    sencha -sdk ../ext-4.1.1a compile -classpath=js page -yui -in index.php -out build/index.php
    http://www.dev4.life - Software Development Blog

Thread Participants: 1