Releases: webfirmframework/wff
wffweb-12.0.8
Release Changes
Client side JavaScript code optimization which may reduce CPU and memory consumption in the client browser page if there is a continues delivery of UI updates from the server. However, the difference may be negligible.
Note: This release doesn't contain any new features.
wffweb-12.0.7
Release Changes
Code optimization for performance improvement.
wffweb-12.0.6
Release Changes
New features
- Implemented
jsonMapFactoryandjsonListFactoryinJsonParser.
Major improvements
Major improvements to AbstractHtml
- Thread-safety and performance improvements.
- Now, for
appendChildren,prependChildren,insertAfter,insertBefore,replaceWith&addInnerHtmlsmethods, there is only a single implementation. If the given tags by these methods already exist in the browser page, the server will not send its entire tag data; instead, it will send only the wff id, and using its wff id the tags will be moved in the browser page for the ui changes. It will save a lot of data transfer in many scenarios,
eg: There is table in the browser page and it contains a large number of rows. The rows are sorted and added again to theTBodytag without removing it from the browser page, in such case we can see a significant performance improvement as it doesn't transfer the whole tags data to the UI.
Minor improvements
- Code optimization in
SharedTagContent.
wffweb-12.0.5
Release Changes
Major bug fixes
A major thread-safety bug fix in SharedTagContent reported in #97.
The bug is it throws NullPointerException while calling setContent/detach method if async update is enabled. To workaround this issue, disable async update by setAsyncUpdate method. By default, it is disabled.
Major improvements
JVM related improvements to prevent CPU overheating in a special multi-threading scenario.
wffweb-12.0.4
Release Changes
New Features
Support for basic JSON parser. This is the most efficient way to parse JSON text in the world.
Usage:
To parse json object string
JsonMapNode jsonMap = JsonMap.parse("""
{
"key" : "value",
"key1" : "value1"
}
""");
// To get value
String key1Value = jsonMap.getValueAsString("key1");
// Prints value
System.out.println("key1Value = " + key1Value); // key1Value = value1
String jsonString = jsonMap.toJsonString();
// Prints json string
System.out.println("jsonString = " + jsonString); // jsonString = {"key1":"value1","key":"value"}
To parse json array string
JsonListNode jsonList = JsonList.parse("[1, 4, 0, 1]");
//To get the value from an index
int intValueAt1 = jsonList.getValueAsInteger(1);
System.out.println("intValueAt1 = " + intValueAt1); // intValueAt1 = 4
//Prints the json string
System.out.println("toJsonString = " + jsonList.toJsonString()); // toJsonString = [1,4,0,1]
To parse json string with different config
JsonParser jsonParser = JsonParser.newBuilder()
.jsonObjectType(JsonObjectType.JSON_MAP)
.jsonArrayType(JsonArrayType.JSON_LIST)
.jsonNumberArrayUniformValueType(false)
.jsonNumberValueTypeForObject(JsonNumberValueType.BIG_DECIMAL)
.jsonNumberValueTypeForArray(JsonNumberValueType.BIG_DECIMAL)
.jsonStringValueTypeForObject(JsonStringValueType.STRING)
.jsonStringValueTypeForArray(JsonStringValueType.STRING)
.jsonBooleanValueTypeForObject(JsonBooleanValueType.BOOLEAN)
.jsonBooleanValueTypeForArray(JsonBooleanValueType.BOOLEAN)
.jsonNullValueTypeForObject(JsonNullValueType.NULL)
.jsonNullValueTypeForArray(JsonNullValueType.NULL)
.validateEscapeSequence(true).build();
JsonMap jsonObject = jsonParser.parseJsonObject("""
{
"key1" : "val1",
"key2" : "val2"
}""") instanceof JsonMap jsonMap ? jsonMap : null;
System.out.println(jsonObject.toJsonString()); //Prints {"key1":"val1","key2":"val2"}
Improvements
- Implemented
getValueAsWffBMObject&getValueAsWffBMArraymethods inWffBMArray&WffBMObject. - Optimized code for performance improvement.
wffweb-12.0.3
Release Changes
Major improvements
Performance improvements
Reduced the size of payload sending from the server to the client by implementing version 3 of Wff BM Bytes tag data compression algo. This should deliver data faster than before.
Major bug fixes
Major bug fix related to uri navigation
Bug: set uri from the server side using browserPage.setURI then click on back button on browser, it doesn't invoke the whenURI event. This bug is fixed now.
The workaround to fix this issue till wffweb-12.0.2 is to call wffGlobal.getAndUpdateLocation(); inside the wffGlobalListeners.onSetURI function implementation in the project.
Features
More finder methods findOneAttributeByFilter, findAttributesByFilter etc.. in TagRepository.
Implemented more feature methods in WffBMObject & WffBMArray to get values in different datatypes.
They are:
getValueAsBigDecimalgetValueAsBigIntegergetValueAsIntegergetValueAsLonggetValueAsDoublegetValueAsFloatgetValueAsBooleangetValueAsString
Implemented overloading put(... methods in WffBMObject.
They are:
put(String key, Number value)put(String key, Boolean value)put(String key, WffBMObject value)put(String key, WffBMArray value)put(String key, WffBMByteArray value)
Implemented other put...(... methods in WffBMObject.
They are:
putNull(String key)putUndefined(String key)putRegex(String key, String regex)putString(String key, String string)putFunction(String key, String function)
Implemented method similar in WffBMObject and WffBMArray to check if two objects contents are equal.
Implemented toStream method in WffBMNumberArray.
Improvements
In AbstractHtml, validating the appending/prepending children only if the debug mode is turned on by WffConfiguration.setDebugMode(true). If it is turned off it will save some memory and CPU consumption so it is turned off by default.
Java code improvements
Annotated serialVersionUID with @Serial in appropriate places.
Test cases
Test cases are added for all new features.
Migration changes
No code changes required to migrate from wffweb 12.0.2 to 12.0.3.
wffweb-12.0.2
Release Changes
New features
Added readState method in SharedTagContent.
Added utility methods in URIUtil class for building url query string.
Added more finder methods in TagRepository class.
Improvements
Internal code syntax performance improvements in TagRepository.
Micro optimization for performance improvement in TagRepository.
Javadoc needful improvements.
Migration changes
No code changes required to upgrade from 12.0.1 to 12.0.2.
wffweb-12.0.1
Release Changes
- Improved reliability of sending client ping message.
- The internal thread locking mechanism is optimized with a better alternative implementation.
- Minor bug fix in
AbstractHtml(related to add child method). - Upgraded code syntax in appropriate places.
- Minor optimization in
BrowserPageContext. - Session handling improvements in
BrowserPageContext. - Thread-safety improvements in
SharedTagContentto avoid unwanted async behavior. - Upgraded test scope dependencies.
New feature methods
New methods in AbstractHtml
Support for ParentGainedListener and ParentLostListener in tag class. ParentGainedListener will be invoked when a tag gains a new parent and ParentLostListener will be invoked when a tag loses its parent. Needful methods such as addParentGainedListener, removeParentGainedListener, addParentLostListener, removeParentLostListener etc.. will be available in AbstractHtml so that they can be accessed by any tag class. Eg: Refer removing server method using ParentLostListener.
New methods in PayloadProcessor
Implemented is isValid methods in PayloadProcessor which will be useful in websocket config. Refer the sample project websocket config for its usage.
Made some methods public in BrowserPageContext
- Made
BrowserPageContext.runAutoCleanpublic to allow to run a manual cleanup.
wffweb-12.0.0
Release Changes
It's ready for production use.
There is no major bug found in wffweb-12.0.0-beta.12 so wffweb-12.0.0 is the same copy of it. The only change done in wffweb-12.0.0 is some minor improvements in javadoc comment.
wffweb-12.0.0-beta.12
Release Changes
- Performance improvements for
SharedTagContent - New feature methods for
SharedTagContent - Major thread-safety improvements for
SharedTagContentto be compatible it with whenURI feature (to avoid deadlock) - Data consistency improvements for
SharedTagContent - Thread-safety improvements for attribute classes
- New methods for attribute classes
- Optimizations and code syntax improvements
New feature methods
New methods in SharedTagContent
hasPendingTaskpendingTasksSizesetAsyncUpdateisAsyncUpdategetContentWithType
New methods in AutoComplete
removeAllValuesassignValue
New methods in ClassAttribute
removeAllClassNames
New methods in Headers
removeAllHeaderIdssetValueassignValue
New methods in Rel
removeAllValues
New methods in Style
setCssPropertiesassignCssPropertiesremoveAllCssProperties
New methods in TagContent
textIfRequiredhtmlIfRequired
The javadoc contains the usage of these methods.