Results 1 to 3 of 3

Thread: When I should upgrade a Fiddle to version 2?

  1. #1
    Sencha Premium User
    Join Date
    Nov 2013
    Piacenza, Italy

    Default When I should upgrade a Fiddle to version 2?

    when I open an old Fiddle, I change it and than I save it, it asks me if I want to upgrade it to version 2:
    "Do you wish to upgrade your fiddle to use version 2?"

    What changes? What are pros and cons?
    In short, how can I decide if I need to upgrade or not?


  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL


    In the Working with Files guide, the top section goes over this:

    The way fiddles and the backing Ext JS framework are processed for each fiddle has been overhauled between the first iteration of Fiddle and the second. The rewriting of Fiddle’s file management serves to improve your ability to debug a running fiddle and results in a more flexible and naturalistic way of interacting with files.

    Note: This guide focuses on the architectural changes in the file system at large. For specifics on working with remote data assets specifically see the Making Data Requests guide.

    In Fiddle 1 your fiddle code was concatenated with the dev build of the selected Ext JS framework when running a fiddle. If you ran a fiddle in Fiddle 1 and viewed the element tab you’d see the code from any of your files from the Fiddle File System view concatenated into a script tag on the HTML page. In Fiddle 2, each file owned by the fiddle, including the default app.js file, will be delivered down to the browser as unique file requests.

    The benefit of having each file delivered individually is that your code is easier to debug in the browser’s dev tools. Fiddle 2’s file delivery matches what you’d see when developing locally with unique files.

    The caveat would be that with Fiddle 1 you did not have to explicitly include classes in separate files using a requires config or Ext.require(); all of your files were automatically concatenated for you. In Fiddle 2, user-added files will need to be required in order for each file / class to be loaded via the Ext JS loader just as you would in a local environment.

    If you load a saved fiddle that was created with Fiddle 1, Fiddle 2 will still run the code in the concatenated means like Fiddle 1 would. When you save that fiddle, Fiddle 2 will ask if you want to upgrade it to version 2. This means it will be run in the new format where each file is expected to be required in order to load. There is also a menu item under the ‘Admin’ menu in the left toolbar to upgrade it (upgrading a fiddle to the Fiddle 2 load format is permanent).
    Basically, Fiddle 1 loaded everything for you but the order of what was loaded was not always expected and was not individual file requests. Fiddle 2 only loads what you tell it to load much like you would need to do locally. So upgrading the fiddle would require you to load files using Ext JS' loader (if applicable to your fiddle).
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha Premium User
    Join Date
    Nov 2013
    Piacenza, Italy


    Thank you very much, Mitchell, for the detailed explanation!

    If possible, please, add a short description or a link to the relevant documentation in the dialog asking you to upgrade, so the user knows how to decide.

Similar Threads

  1. Fiddle 2.0 Upgrade? Preview not working?
    By sirwesley in forum Sencha Fiddle
    Replies: 22
    Last Post: 24 Nov 2016, 6:24 AM
  2. Replies: 12
    Last Post: 10 Dec 2015, 11:26 AM
  3. Replies: 9
    Last Post: 17 Nov 2015, 12:32 AM
  4. Downloaded Fiddle has different Ext version than live app
    By bartyhoho in forum Sencha Fiddle
    Replies: 3
    Last Post: 4 Mar 2015, 5:30 AM
  5. Deployable Version of Sencha Fiddle?
    By existdissolve in forum Sencha Fiddle
    Replies: 1
    Last Post: 5 Aug 2013, 5:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts