1. #1
    Sencha Premium Member
    Join Date
    May 2013
    Posts
    159
    Vote Rating
    0
    Dierk is on a distinguished road

      0  

    Default What is "URL prefix"?

    What is "URL prefix"?


    When trying the preview option I get screenshot below. This is confusing: SA created an app.html file and thus knows exactly where it is.

    Why would I get asked for a URL and what should I enter?
    Attached Images

  2. #2
    Sencha - Architect Dev Team
    Join Date
    Jan 2009
    Location
    Frederick, Maryland
    Posts
    922
    Vote Rating
    32
    jminnick has a spectacular aura about jminnick has a spectacular aura about

      0  

    Default


    It knows where the physical files are in the file system; it has no concept of what the url might be.
    Jason Minnick
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    May 2013
    Posts
    159
    Vote Rating
    0
    Dierk is on a distinguished road

      0  

    Default


    Huh?

    Doesn't translate e.g. the physical location "c:\tmp\app.html" to the URL "file:///c|/tmp/app.html"?

    What am I missing?

  4. #4
    Sencha - Architect Dev Team
    Join Date
    Jan 2009
    Location
    Frederick, Maryland
    Posts
    922
    Vote Rating
    32
    jminnick has a spectacular aura about jminnick has a spectacular aura about

      0  

    Default


    In URL Prefix, Architect is looking for http://[yourServer]/[yourFilePathToApp]

    Check out the first step in the "Preliminary Steps" section of this article:

    http://docs.sencha.com/architect/2/#...st_desktop_app
    Jason Minnick
    Sencha Architect Development Team

  5. #5
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    18
    Vote Rating
    3
    CFritts is on a distinguished road

      1  

    Default


    I think this confuses a lot of developers who aren't used to using web application frameworks. HTML is rendered in the browser, and browsers can load html pages locally without issue.... but when it comes to handling requests through ajax and using some of the advanced features of scripts, local browsers are restricted by security policies.
    The reason you need to host the page on a web server is because by design and for security reasons, most web browsers do not execute requests through ajax using the file protocol (file://). For the full functionality of a heavily ajax/js-based application, you must access it with HTTP protocol.
    Sure the HTML will render (partially) when you 'launch' the page using explorer (file://), but the ajax requests will not unless they're accessed with HTTP.
    ExtJS/Touch are web application frameworks after all.

  6. #6
    Sencha Premium Member
    Join Date
    May 2013
    Posts
    159
    Vote Rating
    0
    Dierk is on a distinguished road

      0  

    Default


    Thanks for these insights

Thread Participants: 2