FLOW3 1.1 Highlights
The FLOW3 team is delighted to announce the release of FLOW3 1.1. With over 100 new features and 250 stability and speed improvements this version marks an important milestone for those who stayed observant after the first stable release in October last year. FLOW3 is now ready for the game and a perfect fit for your next project if the profile and feature set match your requirements.
Focus on Speed and Stability
Shortly after the 1.0 release, community members shared their first-hand experience from using FLOW3 in projects with thousands of users, complex database operations and loads which required a multi-server setup. Based on this feedback, we could identify a range of bottlenecks and reworked major parts of the framework – without changing the API – resulting in a significantly lower memory footprint and faster execution.
As an example, in one real world project, the memory consumption of a typical request could be lowered from 19.8 MB (FLOW3 1.0) to 5.1 MB (FLOW3 1.1). At the same time, the transactions per second measured for a typical, uncached operation could be more than doubled from 27 to 71. The medium latency, an indicator for the "snappiness" of the application, was lowered from 1.5 seconds to 0.6 seconds.
In a production context, the biggest performance gains result from a heavily optimize Reflection Service, a new cache backend which can be frozen once it is filled with data, and not least by a whole new modular bootstrap.
Contrary to the production context, where all results of code analysis and proxy class generation are statically cached as optimized PHP code, the development context needs to monitor class files for changes and analyze modified code on each request. In order to improve the speed during development, individual packages can now be "frozen" which excludes them from the change detection mechanisms. In practice, only those packages which are currently under development must be "hot", while all others can stay frozen.
The new bootstrap mechanism allows FLOW3, but also third-party packages, to take full control over the framework initialization. A pre-defined boot sequence can be extended or slimmed down for user-defined request types and thus allow for an extremely small footprint for specialized operations, such as custom handling of AJAX requests.
The I18n support is now officially part of FLOW3. The translation handling, based on XLIFF files, now supports translations on a per package basis and provides a powerful fallback mechanism for determining the best matching language. The validation framework now displays localized error messages and through an improved logging, it is much easier to debug issues occurring during the implementation of translation support for third-party packages.
The whole Model-View-Controller stack has been reworked to be a much better fit for REST services and applications making heavy use of HTTP features. Despite the refactoring, only few parts of the API had to be changed.
The MVC framework is now based on a new HTTP foundation which is a set of classes and methods modeled directly after the relevant specifications. Although the API is intuitive and convenient to use, FLOW3's HTTP model is, compared to other major PHP frameworks, probably closest to the rules of RFC 2616 and RFC 6265 and backed by more than 350 tests.
Through the HTTP foundation, a range of new features have been introduced, among them: cookie management, content negotiation for media types, cache headers support, expiration model support and a new virtual HTTP client which allows for writing functional tests covering the whole request-response stack.
With this release, we took the opportunity to iron out smaller design flaws and introduce new APIs, mostly visible in the MVC stack. Although we don't plan as big changes again for the near future, we always want the possibility to change an API if it eases a pain (not creates one) for developers using FLOW3.
In order to make these API changes as unspectacular as possible, we introduced a new code migration tool. Similar to the schema migrations for the database, it allows us (or any other package developer) to declare class or method APIs which have been changed and then adjusts any other code to fit these new interfaces.
For this particular release, you'll find all information about the code migration tool in the upgrading instructions (Upgrading.txt) in the main directory of FLOW3.
Besides introducing a new "Anonymous" role, we have also adjusted the way Access Control Lists are defined to the real-world needs we experienced in projects based on FLOW3 1.0. The new approach is not backwards compatible, but it is easy to adjust existing policies.
On the feature side, we have introduced a mechanism for automatic session expiration and new support for multiple password hashing strategies.
As powerful as FLOW3 is, you need to be able to tap into that wealth of functionality. So we fundamentally updated the documentation, fixing shortcomings of the existing parts and adding new chapters, such as the ones for MVC or Command Line.
And Much More
There are dozens of other features worth mentioning and we suggest that you read the full list of changes before upgrading from an earlier version. If you have questions or are stuck with an upgrade step, the team and fellow FLOW3 developers will gladly help you in our mailing list or IRC channel.
One major feature for FLOW3 1.2 will be a seamlessly integrated support of the Composer package management. This doesn't only allow you to conveniently import remote packages and manage dependencies, but also take advantage of the thousands of packages provided by the PHP community.
We expect FLOW3 1.2 to be released in October this year.
Finally, we'd like to say a big Thank You to all the great people who use and support this project. Your feedback and contributions have been invaluable and we are highly aware of that our work alone would be nothing without you. We are excited to see the community growing and invite you to help us spreading the word and living our dream of joyful PHP development!
Enjoy FLOW3 1.1!
your FLOW3 team