Release 4.0.0

@seancorfield seancorfield released this Sep 17, 2016 · 1 commit to master since this release

Summary

The focus of the 4.0 release is on improving REST support. Improvements include:

  • JSON-encoded and URL-encoded POST / PUT body support.
  • Controllers have easy access to HTTP headers.
  • Builder syntax for renderData() result elements.
  • Support for user-supplied rendering functions.
  • Integrated support for HTTP OPTIONS verb.
  • Per-resource error handling.
  • Setting status text (in addition to status code) in HTTP responses.
  • Wildcard HTTP method support.

In addition, DI/1 has had a number of enhancements, including the addition of a builder syntax for programmatically declaring beans.

Breaking Changes

  • 443 - Prevented loadListener from being accidentally inherited and run on a managed subsystem bean factory (it should only run on the main parent factory). This is potentially breaking: if you relied on running load listeners multiple times -- however, that was never a recommended approach.
  • 400 - By default, property declarations that contain a type or default are now ignored for autowiring. In earlier versions of FW/1 (DI/1), such property declarations would have been treated as dependencies and autowired: you could override that behavior for typed properties by specifying omitTypedProperties : true in your configuration. That is now the default behavior. In addition a new omitDefaultedProperties setting has been added, also defaulted to true, which is what tells FW/1 (DI/1) to ignore property declarations that contain a default. If you need to restore the pre-4.0 behavior, add omitDefaultedProperties and/or omitTypedProperties to your configuration, set to false.
  • 391 - Adobe ColdFusion 9.0.2 is no longer a supported platform. FW/1 4.0 relies on closure support and therefore requires Adobe ColdFusion 10 or later. Support for Railo and Lucee has not changed.
  • 390 - If you override missingBean() in DI/1, read the documentation carefully as this is now an official extension point with different behavior to previous releases.

Enhancements

  • 448 - Added callClojure() extension point for cljcontroller.cfc.
  • 442 - In Alpha 1 and Beta 1, the decodeRequestBody setting was called enableJSONPOST. As a migration aid, attempting to set enableJSONPOST will throw an exception saying you should use decodeRequestBody instead.
  • 441 - decodeRequestBody handles URL-encoded form variables, which is typical for PUT, as well as JSON-encoded form bodies (see issue 389 below for the introduction of this setting).
  • 439 - Add framework.facade component to make FW/1 accessible out-of-band (for integration purposes).
  • 434 - Add getRoutePath() convenience method.
  • 419 - Add getCGIRequestMethod() convenience method.
  • 418 - Allow factoryBean() to accept function/closure.
  • 417 - Add builder syntax for bean declarations.
  • 416 - Delay bean discovery (where possible) until after declarations are processed.
  • 415 - Add support for CFML-only and Clojure-only search paths.
  • 414 - Add support for Boot to cfmljure.
  • 413 - layout() may now be called from controllers.
  • 412 - Add renderer() to access renderData() builder and add header() to set HTTP response headers.
  • 411 - Add headers argument to controllers.
  • 410 - Clarified license (Apache Source License 2.0), added LICENSE file.
  • 409 - Dependency injection uses additional caches to improve getBean() performance (by a factor of 9x-25x, depending on your usage and your CFML engine).
  • 407 - DI/1 now has a public hasParent() predicate method.
  • 400 - Dependency injection ignores typed/defaulted properties by default. This can be disabled via the omitDefaultedProperties and omitTypedProperties settings.
  • 399 - getBean() now accepts an optional second argument that can override beans in the factory to provide constructor arguments to be used in the bean's init() call.
  • 394 - Improved error messages when DI/1 attempts to use a CFC that has syntax errors to include filename/line number of the underlying error.
  • 392 - A wildcard resource match is generated for $RESOURCES to provide per-resource error handling. This can be disabled via the perResourceError setting.
  • 390 - DI/1 now considers missingBean() to be a fully supported extension point that allows users to handling getBean() calls for unknown beans by any means, including creating and returning their own beans.
  • 389 - A new setting decodeRequestBody tells FW/1 to deserialize the JSON-encoded body of an HTTP request.
  • 388 - The statusCode and jsonpCallback arguments to renderData() have been deprecated and a new builder syntax has been added to support all possible parameters available when rendering data, e.g., renderData( "json" ).data( result ).statusCode( 202 ).
  • 387 - A new setting preflightOptions tells FW/1 to provide built-in support for HTTP OPTIONS. An additional setting optionsAccessControl allows you to fine tune the Access-Control-* headers returned.
  • 386 - Routes can now have $* as an explicit wildcard for the HTTP method.
  • 385 - The new renderData() build syntax supports statusText() to set the HTTP response status text.
  • 328 - The renderData() type may be a function/closure that returns contentType, rendered content, and an optional writer for delivering the data to the browser.

Bug Fixes

  • 449 - Fix race condition in DI/1's bean resolution caching.
  • 446 - Fix bug in $RESOURCES when nested resource appeared in multiple resources.
  • 440 - Improved thread safety on application reloading. Even reloadApplicationOnEveryRequest : true should be safe now!
  • 429 - Removed expandPath() in calls to cachedFileExists().
  • 427 - Fixed bug that prevented before() / after() working in Clojure controllers; fixed bug that caused Clojure controller shims to be created twice.
  • 422 - Fix bug with case insensitive routes.
  • 420 - Fix bug in transient autowiring (caused by caching metadata).
  • 395 - Corrected calls to buildURL() in examples.

Downloads

Release 4.0.0 Release Candidate 1

@seancorfield seancorfield released this Jul 26, 2016 · 45 commits to develop since this release

This includes a minor bug fix since Beta 2 (ensuring a DI/1 load listener will only be executed for the main (parent) bean factory, and not for subsystems, unless those are explicitly configured to have their own load listeners).

Downloads

Release 4.0.0 Beta 2

@seancorfield seancorfield released this Jul 12, 2016 · 48 commits to develop since this release

Changes since Beta 1:

  • #442 enableJSONPOST has been renamed to decodeRequestBody. Using enableJSONPOST will now throw an exception explaining the change.

This is a breaking change if you were using enableJSONPOST in the earlier Alpha / Beta builds.

Downloads

Release 4.0.0 Beta 1

@seancorfield seancorfield released this Jul 11, 2016 · 51 commits to develop since this release

Changes since Alpha 1:

  • #427 Improve support for Clojure Controllers (incl. before() / after())
  • #429 Remove unnecessary calls to expandPath()
  • #434 Add getRoutePath()
  • #439 Add FW/1 facade (primarily to support ORM-based usage of bean factories)
  • #440 Improve thread safety on reload (so reloadApplicationOnEveryRequest should be thread safe now)
  • #441 Support URL-encoded form data (for POST / PUT) when enableJSONPOST is true

Note: enableJSONPOST is misnamed now and will probably change before release.

Downloads

Release 3.5.1

@seancorfield seancorfield released this Apr 6, 2016 · 114 commits to master since this release

This is identical to 3.5.0 with the addition of #394 added to provided better exception messages from DI/1 when a managed bean has syntax errors.

Downloads

Release 4.0.0 Alpha 1

@seancorfield seancorfield released this Mar 6, 2016 · 71 commits to develop since this release

The focus of the 4.0 release is on improving REST support. Improvements include:

  • JSON-encoded POST body support.
  • Controllers have easy access to HTTP headers.
  • Builder syntax for renderData() result elements.
  • Support for user-supplied rendering functions.
  • Integrated support for HTTP OPTIONS verb.
  • Per-resource error handling.
  • Setting status text (in addition to status code) in HTTP responses.
  • Wildcard HTTP method support.

In addition, DI/1 has had a number of enhancements, including the addition of a builder syntax for programmatically declaring beans.

For more detail, see the Change Log for FW/1 4.0.

Downloads

Release 3.5.0

@seancorfield seancorfield released this Oct 21, 2015 · 121 commits to master since this release

The major new features in FW/1 3.5.0 are:

  • Subsystems 2.0. A new, more streamlined way to add subsystems to an existing FW/1 application has been added. Thank you to Steven Neiland for the inspiration and guiding principles! Read about Subsystems 2.0 and how they differ from the older approach (which is still supported). The examples have been reworked to use Subsystems 2.0 so you can see how it works in practice.
  • An Alternative Application Structure is now supported that allows you to create FW/1 applications that do not require Application.cfc extends the FW/1 component. Read about the Alternative Application Structure. Some of the examples have been updated to use this approach so you can see how it works in practice.
  • Clojure integration. If you have Leiningen installed (Clojure's build tool) then it is very easy to write services and/or controllers in Clojure and have FW/1 automatically integrate those into your CFML application. Read about mixing CFML & Clojure for more details. An example of Clojure integration is provided in the repository (you'll need Leiningen installed for that example to run).
  • ForgeBox / CommandBox support. FW/1 now has a box.json file and is hosted on ForgeBox so it can be easily installed via CommandBox.

In addition to the major features, the following enhancements have been added:

  • redirect() allows queryString to be a struct, like buildURL().
  • isFrameworkReloadRequest() is now public in case an application needs to take action when the framework is reloaded.
  • getSubsystemSectionAndItem() added to supplement getFullyQualifiedAction() (the latter omits the subsystem if it is empty).
  • The WireBox adapter now supports custom binders.
  • The conventions used for various folder names can now be overridden in the framework configuration.

And the following bugs have been fixed:

  • 377 - AOP/1 now allows a single interceptor to be applied to multiple objects.
  • 361 - renderData() could kill sessions (this was backported to 3.1.1).
  • 336 - account for expandPath() returning the wrong directory on ACF11 when the path has a trailing /.

Finally, FW/1 includes experimental support for Lucee Language, so if you are running a prerelease build of Lucee Server that has Lucee Language support enabled, you can write controllers and views etc in .lc or .lucee files and FW/1 will use them.

You can read the full list of changes since 3.1 on GitHub, along with
accepted pull requests since 3.1.

Downloads

Release 3.5.0 RC 2

@seancorfield seancorfield released this Oct 6, 2015 · 157 commits to develop since this release

Changes since RC 1:

  • Fix layout display issue when using non-default subsystem delimiter #376 @dfair98
  • Fix subsystem model management behavior (regression from 3.1) #378
  • Fix subsystem delimiter edge case (regression from 3.1) #379
  • Expose Clojure integration example conditionally (as app and as subsystem) #380
  • Add internal trace type #381 @ryanguill
  • Fix AOP/1 issue with multiple interceptors #382 ( #377 ) @dbudde

Downloads

Release 3.5.0 RC 1

@seancorfield seancorfield released this Sep 22, 2015 · 172 commits to develop since this release

Changes since Beta 2:

  • Fixed concurrent modification exception in edge case DI/1 setter analysis #375
  • Improved debugging of DI/1 metadata failures (by adding more information to exceptions) #374
  • Fixed view() (and layout) handling with Subsystems 2.0 #373
  • isFrameworkReloadRequest() is now public #372
  • Clojure integration should ignore editor temporary files #371
  • Subsystem bean factory handling more consistent #370
  • Updated examples that use Alternative Application Structure

Downloads

Release 3.5.0 Beta 2

@seancorfield seancorfield released this Sep 16, 2015 · 185 commits to develop since this release

Changes since Beta 1:

Bug fixes:

  • Examples of Alternative Application Structure should work in more installations / configurations (6helloclojure, userManager)
  • Dotted CFC path deduction tweaked to fix an edge case bug

DI/1:

  • Add liberal plurals option (so libraries is treated as the plural of library, for example)

Subsystems:

  • setView() / setLayout() did not respect (new) subsystems #368
  • Ignore absolute / root-relative diLocations for subsystems

Clojure integration:

  • Add server scope caching option
  • More flexible namespace-to-bean name mapping #366
  • Improved null handling in conversion functions

Downloads