Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

ReleaseNotes0_6_0

Drew Folta edited this page May 22, 2013 · 18 revisions

version 0.6.0

Mojito 0.6.0 is now tagged and available on npm. List of changes between 0.5.9pr1 and 0.6.0 here.

Notes

  • ac.config.getAppConfig() was reworked to improve performance by computing the app config once per request, and reuse across all the mojit instances in the same page using the mojito-config-addon. This means you have to be extra careful if you attempt to change that object, because it might affect other mojits in the same page.
  • ac.config.getRoutes() was reworked to improve performance by computing the app config once per request, and reuse across all the mojit instances in the same page using the mojito-url-addon. This means you have to be extra careful if you attempt to change that object, because it might affect other mojits in the same page.
  • Using Y.Model.Vanilla class on the server side for ac.data and ac.pageData, while using Y.Model on the client side. This is a performance optimization, and while the API is still the same, on the server we do not support events on those model instances, while in the client, you might want to listen for changes in the model from the binder. In the future, Y.Model.Vanilla will be replace with Y.Model.Base when it becomes available in YUI.
  • Due to a known issue, tunnel calls initiated via mojitProxy.invoke() or mojitProxy.refreshView() to a server-only affinity controller (controller.server.js) for child mojits now fails. (Child mojits are mojits that are inline children of composite mojits, including HTMLFrameMojit). See "Changed Tunnel Call Support" below for more details.

Changed Tunnel Call Support

Since we no longer ship the instance configuration from server to client (since it is a security issue), deeply-nested specs will not have the children configured on the client. This affects mojits which have binders that call mojitProxy.invoke() or mojitProxy.refreshView() and a server-side-only controller (controller.server.js). As a workaround you can define your child mojits as separate top-level specs (in application.json) and refer to them using {base: 'new-name'}.

Example:

If you where doing this in your application.json:

"specs": {
  "home": {
    "type": "HTMLFrameMojit",
    "config": {
      "child": {
        "type": "Foo",
        "config": {
          "color": "blue"
        }
      }
    }
  },
  "container": {
    "type": "Container",  // controller which uses ac.composite
    "config": {
      "children": {
        "a": {
          "type": "Foo",
          "config": {
            "color": "blue"
          }
        },
        "b": {
          "type": "Bar",
          "config": {
            "size": "x-large"
          }
        }
      }
    }
  }
}

You can change it to this:

"specs": {
  "home": {
    "type": "HTMLFrameMojit",
    "config": {
      "child": {
        "base": "home_child"
      }
    }
  },
  "home_child": {
    "type": "Foo",
    "config": {
      "color": "blue"
    }
  },
  "container": {
    "type": "Container",  // controller which uses ac.composite
    "config": {
      "children": {
        "a": {
          "base": "container_a"
        },
        "b": {
          "base": "container_b"
        }
      }
    }
  },
  "container_a": {
    "type": "Foo",
    "config": {
      "color": "blue"
    }
  },
  "container_b": {
    "type": "Bar",
    "config": {
      "size": "x-large"
    }
  }
}

Deprecations, Removals

  • PR [#1103] Droping support for nodejs 0.6.
  • ac.staticAppConfig was a private API used by Mojito to allocate static config for the app, and this is now removed. If you need access to the config, you can use mojito-config-addon to access ac.config.getAppConfig().

Features

  • PR [#1103] Bringing windows to the front row by adding partial support for Mojito on windows. We plan to consolidate this going forward, but until after travis-ci.org supports windows environment as part of the build process to do sanity check, we cannot guarantee that everything will work on windows.
  • mojito-composite-addon and mojito-partial-addon support ac.flush from child mojits.
  • Command npm test is added to run all Mojito unit and functional tests with Phantomjs. Test results can be found under <mojitosrcdir>/artifacts/arrowreport by default. npm run unit, npm run func, npm run doc, npm run lint are also added.

Bug Fixes

Acknowledgements

Clone this wiki locally