Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: webfirmframework/wff

wffweb-12.0.0-beta.2

09 Feb 07:03
510af35

Choose a tag to compare

wffweb-12.0.0-beta.2 Pre-release
Pre-release
  • Internal improvements for AbstactHtml.whenURI/URIStateSwitch.whenURI feature implementation, no code changes required for its usage.
  • Added URIUtil for various utility methods like parsing path param values, matching URI pattern etc...
  • OnClick event attribute can now accept preventDefault flag through constructor and setter method.
  • An internal caching mechanism is implemented for TagRepository.findTitleTag, TagRepository.findHeadTag and TagRepository.findBodyTag methods for fast lookup.

Checkout this sample project source code deployed at wffweb.herokuapp.com (free server).

wffweb-12.0.0-beta.1

30 Jan 08:53
d0bd6ad

Choose a tag to compare

wffweb-12.0.0-beta.1 Pre-release
Pre-release

This is a beta version of wffweb 12.

Major changes

New features

Feature to show UI based on the URI. A method whenURI is implemented in
AbstractHtml. And, browserPage.setURI, browserPage.getURI methods
are also implemented.

At client side wffAsync.setURI method is implemented.

The whenURI method can be used to change content of a tag based on the
URI change or to execute some code based on the URI change.

Eg:

URIStateSwitch someDiv = new Div(null);

//condition 1
someDiv.whenURI(uri -> uri.equals("/ui/login"), () -> new
AbstractHtml[]{loginComponent});

//condition 2
someDiv.whenURI(uri -> uri.equals("/ui/user/items/view"), () -> new
AbstractHtml[]{itemsViewComponent},
        (event) -> {
            browserPage.setURI("/ui/login");
        });

In the above example, the inner html of someDiv will be
AbstractHtml[]{loginComponent} when the URI is /ui/login and when
the URI is /ui/user/items/view the children of someDiv will be
replaced with AbstractHtml[]{itemsViewComponent}. If any of the
conditions doesn't match, then it will invoke
browserPage.setURI("/ui/login");. URIStateSwitch may be referred to
know the available methods.
The role of a supplier is to provide replacement tags for the existing
children if already exists. The role of the consumer is to invoke any
code written inside it. There are different combinations of consumer &
supplier overloading whenURI methods. The first argument is the
predicate to test for the URI change, the second argument and third
argument is consumer or supplier and the fourth argument is the index at
which this action to be replaced (in the above example there are three
arguments only). To remove all these conditions
someDiv.removeURIChangeActions may be called.

URIStateSwitch interface may be referred to know the available methods.

At client side, wffAsync.setURI method is also implemented to navigate
by JavaScript code. It accepts three arguments, second and third arguments are optional, the first one is the URI to navigate, the second one is a function which will be executed just after the URI change at client side and the third argument is also a function which will be executed after the URI change at server side, these second and third functions may be used to hide show progress icon.

To listen to URI change events at client side, the following code may be
used

const wffGlobalListeners = new function() {

    this.onSetURI = function(event) {
        console.log('wffGlobalListeners > onSetURI', event);
    };

    this.afterSetURI = function(event) {
        console.log('wffGlobalListeners > afterSetURI', event);
    };

};

Here, the wffGlobalListeners, onSetURI and afterSetURI are the
legal keywords used by the framework.

Checkout this sample project.

Javadoc for wffweb-12 is available here.

Other improvements

browserPage.contains method is optimized.

wffweb-12.0.0-beta

14 Jan 13:24

Choose a tag to compare

wffweb-12.0.0-beta Pre-release
Pre-release

Release changes :

This is a new birthday release.

It's the birthday of the author of this framework.

This is a beta version of wffweb 12.

Major changes

It is based on Java 17 so it requires minimum Java 17. It is a Java module package, the module name is com.webfirmframework.wffweb. If your project is a Java module project, in the project's module-info.java file you need requires com.webfirmframework.wffweb; to use this framework.

All deprecated methods in wffweb-3.0.19 are removed. The default charset for AbstractHtml.toOutputStream methods is utf-8 regardless of the OS.

ServerAsyncMethod interface is replaced with ServerMethod. It contains single param method, i.e. ServerMethod.invoke(Event) the data can be taken from the event object like event.data().

Other Major Improvements

The code syntax is upgraded to Java 17 and Java 17 features are leveraged to gain performance.

Migration changes from wffweb-3.0.19 to wffweb-12.0.0-beta

Replace ServerAsyncMethod with ServerMethod everywhere in the code. Use alternative methods for deprecated methods in wffweb-3.x.x. The alternative method info is available in the deprecated method's javadoc comment. Refer this sample project, it is a multi module project configured for wffweb-12.

Future features

A way to change BrowserPage content with respect to uri without reloading the entire page.

wffweb-3.0.19

01 Jan 07:07
83e77d1

Choose a tag to compare

Release changes :

This is a new year release. Happy new year!

Improvements

Improved internal id implementation to improve performance, in the
previous implementation two or more AbstractAttribute object cannot be
created at the same time by multiple threads as it requires to generate
a unique id with maintaining the generation order but in the new
implementation this drawback is fixed, now multiple AbstractAttribute
object can be created at the same time by multiple threads. This is a
non-blocking way of internal id generation.

Minor thread-safety and reflection related improvements. Upgraded some
possible code to Java 8.

Stored data object in event of ServerAsyncMethod.asyncMethod.

Related to SharedTagContent, some methods are deprecated and added
replacement methods for it.

Deprecated toHtmlString having charset parameter as the parameter is not
taken for any operation, affected classes are TagBase, BrowserPage,
AbstractHtml and AbstractAttribute.

Improved test cases.

No code changes required to migrate from wffweb-3.0.18 to wffweb-3.0.19

wffweb-3.0.18

05 Jul 04:34

Choose a tag to compare

Release changes :

New Features

Implementation of external drive path to store temporary memory data to an external drive so as to reduce spike in heap memory consumption. External drive path can be given by overriding useExternalDrivePath method of BrowserPage. It is recommended to use non-mechanical hard drive path, SSD or better is recommended.

Implementation of onInitialClientPing in BrowserPage to override and use it. It can be used as an alternative to afterRender method and it also makes sure that the websocket client connection is possible. It invokes only once in the whole lifetime of that browserPage instance. Checkout the sample project code.

Other improvments

GC improvements to SharedTagContent. Automatically remove listeners (ContentChangeListener, DetachListener) from the SharedTagContent object when its related tag is removed/detached from SharedTagContent object.

Some minor bug fixes in BrowserPageContext related to enableAutoClean(long maxIdleTimeout, Executor executor).

Minor thread-safety and GC related improvements

Now, BrowserPage doesn't use a default thread pool if an executor object is not provided but if an external drive path is given but executor object is not given then it will use a default thread pool. In the last release it was using a default thread pool if an executor object is not given, this behaviour is reverted in this release.

No migration changes required for upgrading from previous versions

wffweb-3.0.17

14 Jan 15:36

Choose a tag to compare

Release changes :

Multi-line JavaScript support major bug fix. The bug was caused by wffweb-3.0.15 release. If you want to use multi-line string in JavaScript you can use backtick (`) but your browser should support ECMAScript 6 or later.

Bug fixes

There is a major bug while using new lines in javascript code using in
js function body in event attributes, dynamically executing javascript
using TagRepository.executeJs method and custom server method's js
function body. This version is just to fix this bug.

It's birthday of the author of this framework. This is a birthday release.

wffweb-3.0.16

01 Jan 06:25

Choose a tag to compare

Release changes :

Mainly for BrowserPageContext enhancements and other improvements

Enhancements

Enhancements for BrowserPageContext to be able to handle non-closing http session. If an http session is never closed the BrowserPage object is kept in the BrowserPageContext forever, this is possibly a memory leak. To prevent this issue, an implementation of enableAutoClean method will be done in BrowserPageContext. If it is enabled it will check and remove the outdated/expired/invalid objects from the BrowserPageContext whenever possible. BrowserPageContext will be modified to handle HeartbeatManager.

In some special case, a non-expiring session may be required to implement remember me feature in a web app but not always because remember me may be handled with a different token (cookie) other than JSESSIONID.

Now, the BrowserPageContext can internally handle heartbeat manager, this will prevent making multiple hearbeat manager method invocation for the same session when multiple browser tabs are opened.

New features

getBrowserPageIfValid, clean, enableAutoClean, disableAutoClean, isAutoCleanEnabled, getHeartbeatManagerForHttpSession, getHeartbeatManagerForBrowserPage, existsAndValid methods are implemented in BrowserPageContext and also implemented an overloading method webSocketOpened.

Migration changes required for wffweb-3.0.15 to wffweb-3.0.16

No changes required unless you want to handle hearbeat managers by BrowserPageContext or you want to enable autoclean feature of BrowserPageContext.

wffweb-3.0.15

22 Oct 16:39

Choose a tag to compare

Release changes :

Mainly for thread-safety improvements, bug fixes and other enhancements.

New features

AbstractHtml.getLastChild implemented
TagRepository.findFirstParentTagAssignableToTag implemented
Implemented Onsubmit.preventDefault to prevent form submission when it
is added on form tag.

Now all event attributes support multi-line javascript for their js
methods, there is a bug in this feature will be fixed in wffweb-3.0.17.

SharedTagContent & BrowserPage class also allows to set Executor object.

jsPreFunctionBody has a new implicit object named action. The action has
a function named perform() it can be used to invoke serverAsyncMethod
and jsFilterFunctionBody just like the jsPreFunctionBody returns true.
If action.perform() is called inside jsPreFunctionBody the returning
true in it has no effect. action object will be useful to trigger
serverAsyncMethod from another tag's action.

Improvements and enhancements

A queuing system is implemented in BrowserPage to asynchronously execute
data received from the client browser page without breaking the first in
first out order of execution and execute one by one. This allows the
websocket thread to get released immediately once the data is put in the
queue. Also provided a provision to set Executor to use thread from it
for processing this data, its method name is BrowserPage.setExecutor.
When Java releases Virtual thread a virtual thread pool can also be
passed, it may benefit a lot in terms of memory and CPU.

Now event attributes support multi-line javascript for their js methods.

Optimized data sending from server to client and vice versa. The enhancement also increases throughput, although the main goal is not to
increase throughput.

Better minification done for generated JavaScript code.

Thread-safety improvements when an attribute is used under multiple
browserPages.

Enhancements in the core implementation related to Java memory model so
that ServerAsyncMethod.asyncMethod implemented for event attributes or
browserPage.addServerMethod will read from and write to the main memory
for the objects used in its method scope under the same thread.

AbstractHtml.getChildAt is optimized for performance.

Needful security improvements.

Minor code improvements and optimization.

Parameter naming improvements in event attributes.

Bug fix

AbstractHtml.toOutputStream was refering incorrect charset while using
charset other than system default, it is fixed now.

Bug fixed in finder methods in TagRepository it was causing deadlock
when passing argument parallel as true.

Deprecations:

In ServerAsyncMethod.Event class getSourceTag, getSourceAttribute,
getServerSideData and getServerMethodName are deprecated use sourceTag,
sourceAttribute, serverSideData and serverMethodName replacement methods
respectively. This is just a change of name improvement.

No changes required for the migration from 3.0.14 to 3.0.15. However, it
is recommended to avoid the use of deprecated methods.

wffweb-3.0.14

16 Feb 15:24

Choose a tag to compare

Release changes :

Mainly for bug fixes.

Bug fixes

Bug fix in AbstractHtml.replaceWith method. This video https://youtu.be/SBTKZh5LN_E contains the usage of this method, wffweb-3.0.14 is used in this video.

wffweb-3.0.13

14 Jan 02:43

Choose a tag to compare

This is a birthday release

January 14th is the date of birthday of the author of this framework.

Release changes :

Mainly for thread-safety improvements.

New features

An overloading give method is implemented in AbstractHtml class.
AbstractHtml.give(final BiFunction<R, C, R> consumer, final C input).
TagContent.text, TagContent.html, TagContent.prependText,
TagContent.prependHtml, TagContent.appendText &
TagContent.appendHtml are also implemented to pass it as a method
reference to the AbstractHtml.give method.

Today is birth day of author.