Release 3.0
· One min read
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 theDynamicHtmlandStaticHtmlclasses. - Removed the static factory methods
html(),head(), anddiv()fromHtmlView. - HTML code is now emitted on the fly when
HtmlApimethods (e.g.,html(),div(),h1()) are called. HtmlViewnow serves as a container for a template function and anElementVisitor, 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 objectU, captured and used as needed, such as indynamic().