Skip to content

Lift Framework 3.0-M2

Pre-release
Pre-release
Compare
Choose a tag to compare
@Shadowfiend Shadowfiend released this 30 Sep 22:50

This is the first “clean” release of Lift 3.0. This means that we've removed all currently-deprecated items from Lift 3.0 (i.e., anything that is deprecated in Lift 2.6 is gone in Lift 3.0-M2). This release still shouldn't be considered stable per se, in that there may be some additional removals in the future, but we don't currently have any such removals planned.

Additionally, a lot of additional feature work has gone into this, as many of the pull requests that were pending a milestone release of 3.0 before have now gone in. Here's a high-level breakdown of things that have gone in, though they are not yet particularly well-documented (more documentation will come before the 3.0 final release; in the meantime, please ask any questions you may have on the Lift mailing list).

Breaking Changes

  • JavaScript handling
    • liftAjax is no longer available on the client, as it has been significantly restructured.
    • There is now a public API for Lift's few client-side functions; it resides under the window.lift object. It is not yet documented, and should be considered volatile until we announce otherwise.
    • Lift AJAX calls are now routed under <context path>/lift/ajax
    • Lift comet calls are now routed under <context path>/lift/comet
    • Everything under /lift is reserved for Lift's use. That path can be customized via
      LiftRules.liftContextRelativePath. Unlike before, when you could customize AJAX and comet paths
      separately, you can now only customize the top-level Lift path, and everything underneath
      it is reserved for Lift's use, both present and future.
  • (#1584) lift-json's JField stopped being a JValue; it is now instead a type alias for (String, JValue). This is a cleaner representation, but it means that map, transform, find, and filter only operate on proper JValues, and using these on fields requires using mapField, transformField, findField, and filterField.
  • (#1548) The old binding strategy based on the bind function is now gone. CSS selector transforms should be used instead. Several built-in snippets have been migrated away from the old bind strategy. The changed snippets are:
    • Paginator
    • ProtoUser
    • Crudify
    • LiftScreen (now behaves like CssBoundLiftScreen)
    • CssBoundLiftScreen (now LiftScreen)
    • FormProcessor (removed)
    • TableEditor
    • Util in mapper.view
  • (#1585) CometActor behavior has changed—comets with no type specified are no longer supported.

Improvements

  • (#1585) Sending new comets to the client in AJAX callbacks now works.
  • (#1585) Comets can now be instantiated programmatically via a well-defined S API.
  • (#1613) S.request is now empty in comet actors.
  • (#1607) The lazy-load snippet now works in AJAX responses (builds on the comet support above).
  • (#1607) Scala Future and Lift LAFuture can be used in a CSS selector transform and will automatically be set up for lazy loading.
  • (#1606, #1537) Lift 3 now builds exclusively on Scala 2.11, using sbt 0.13.
  • (#1522) Add the ability to force reading RestHelper post data as JSON or XML even if the sent Content-Type is incorrect.
  • (#1253) withFilter added to BaseResponse class (for testing) so that it can be used correctly in forcomprehensions.
  • (#1574) Fix an issue where there were two very different overloads of updateListeners in ListenerManager. One of them is now named sendListenersMessage.
  • (#1559) JavaScript added to the page via S.appendJs during the initial page render is now accumulated into a file under the <context path>/lift path and referenced from the page. Things like on* event handlers and such will in the future also be placed in this file so that the generated HTML is free of inline script when using Lift's built-in behavior. This will allow a restrictive Content-Security-Policy for security purposes.

Fixes

  • (#1253) withFilter added to BaseResponse class (for testing) so that it can be used correctly in forcomprehensions.
  • (#1572) Fixed an issue in 3.0-M1 where boolean values in roundtrip responses could cause issues.
  • (#1593) BsonRecordListField validates all elements by default on validate
  • (#1597) Fixed an issue in Lift 3.0-M1 where the AJAX paths did not include the context path.