Skip to main content

Release 3.0

· One min read
Miguel Gamboa
HtmlFlow Author

This release introduces the following changes and features:

  • Improved performance, making HtmlFlow one of the most performant template engines and Java DSLs for HTML.
  • Replaced the º() method with __().
  • Added new static factory methods view() in the DynamicHtml and StaticHtml classes.
  • Removed the static factory methods html(), head(), and div() from HtmlView.
  • HTML code is now emitted on the fly when HtmlApi methods (e.g., html(), div(), h1()) are called.
  • HtmlView now serves as a container for a template function and an ElementVisitor, which defines the HTML output format.
  • All emitted HTML is cached.
  • Data binding requires using the new dynamic() method to bypass caching. Otherwise, context objects are ignored on subsequent renders.
  • Added an of() method to allow using other methods in the fluent chain.
  • Added an addPartial() method to reuse the same HTML template function with different HTML fragments.
  • Removed the binder() method. Its role is replaced by the template function concept, which receives the context object U, captured and used as needed, such as in dynamic().