Skip to content

Releases: webfirmframework/wff

wffweb-12.0.13

14 May 03:19
7c8d49a

Choose a tag to compare

Release Changes

Major optimization

  • Code optimization in JsonParser for performance gain.

New features

  • getValueAsEnum and sizeAwareConvertTo method implementation in JsonMapNode and JsonListNode.
  • putEnum method implementation in JsonMapNode.
  • addEnum method implementation in JsonListNode.
  • JsonMapNode.toWffBMObject(boolean parseJsonValue) and JsonListNode.toWffBMArray(boolean parseJsonValue) implementation.

Other improvements

  • build method of JsonParser.Builder is modified to check needful illegal arguments.

wffweb-12.0.12

18 Apr 05:06
8084caa

Choose a tag to compare

Release Changes

Major enhancements

Enhancements to JSON parser.

  • Implementation of getValueAsShort method JsonListNode and JsonMapNode classes.
  • Implementation of asShort method in JsonValue class.
  • Modified JsonConcurrentMap.parse & JsonConcurrentSkipListMap.parse to support parsing null values from JSON text. Implemented putNull method in these classes to add null value (JsonValue.NULL) in the object so that its toJsonString can contain null value in the key-value pair.
  • Implementation of JsonNumberValueType.AUTO_INTEGER_LONG_BIG_INTEGER_BIG_DECIMAL.
  • Memory optimization improvements.
  • Code optimization for performance improvement.

Other major improvements.

  • Code optimization for performance improvement.

Migration changes

No code changes required to migrate from old wffweb-12.x.x version to this version.

wffweb-12.0.11

14 Apr 06:01
7010581

Choose a tag to compare

wffweb-12.0.11 Pre-release
Pre-release

Release Changes

Major enhancements

This release is mainly for the enhancements of JSON parser.

The existing JsonParser is more advanced now.

It focuses on the following:

  • In some cases, if the json data is large, the parsed json object (JsonMapNode) will not be used to get all values by keys. In most of the case we parse a large json text just to get few properties. There should be some mechanism to do a lazy parsing so that the json parsing process may be finished quickly. The JSON value part parsing process may be postponed, it can be done at the time of getting the value. The JsonValue value type implementation was incomplete for that purpose, this release contains needful enhancements for that.
  • Enhanced the basic parsing to more advanced parsing which will also parse unicode chars from json data to java chars if an optional argument decodeUnicodeCharsSequence is passed in string value getting methods. Now, the special/escape characters will be converted to JSON compatible string in the generated JSON string.
  • convertTo method is implemented in JsonListNode and JsonMapNode. It can convert JsonListNode and JsonMapNode to a user defined JSON object and JSON array classes respectively.
  • New JsonConcurrentSkipListMap is implemented.

Sample code to create JsonValue based parsing

JsonParser jsonParser = JsonParser.newBuilder()
                .jsonObjectType(JsonObjectType.JSON_MAP)
                .jsonArrayType(JsonArrayType.JSON_LIST)
                .jsonStringValueTypeForObject(JsonStringValueType.JSON_VALUE)
                .jsonStringValueTypeForArray(JsonStringValueType.JSON_VALUE)
                .jsonNumberValueTypeForObject(JsonNumberValueType.JSON_VALUE)
                .jsonNumberValueTypeForArray(JsonNumberValueType.JSON_VALUE)
                .jsonBooleanValueTypeForObject(JsonBooleanValueType.JSON_VALUE)
                .jsonBooleanValueTypeForArray(JsonBooleanValueType.JSON_VALUE)
                .jsonNullValueTypeForObject(JsonNullValueType.JSON_VALUE)
                .jsonNullValueTypeForObject(JsonNullValueType.JSON_VALUE).build();

JsonMap jsonMap = jsonParser.parseJsonObject(inputJsonObjectString) instanceof JsonMap jsonMapTmp ? jsonMapTmp : null;

convertTo method usage

class CustomJsonMap extends JsonLinkedMap {
}
class CustomList extends JsonList {
}
JsonLinkedMap jsonMap = new  JsonLinkedMap();
jsonMap.put("number", new JsonValue("14", JsonValueType.NUMBER));
jsonMap.put("string", new JsonValue("string value", JsonValueType.STRING));
jsonMap.put("bool", new JsonValue("true", JsonValueType.BOOLEAN));
jsonMap.put("fornull", new JsonValue());
JsonList jsonList1 = new JsonList();
jsonList1.add("one");
jsonList1.add("two");
jsonList1.add(3);
jsonList1.add(true);
jsonList1.add(null);
jsonMap.put("jsonList1", jsonList1);

CustomJsonMap convertedJsonMap = jsonMap.convertTo(
                CustomJsonMap::new, CustomJsonMap::put,
                CustomList::new, CustomList::add, true);


CustomJsonList convertedJsonList = jsonList1.convertTo(
                CustomJsonMap::new, CustomJsonMap::put,
                CustomJsonList::new, CustomJsonList::add, true);

Other major changes

  • Code optimizations for performance improvement.

Migration changes

No code changes required to migrate from old wffweb-12.x.x version to this version.

wffweb-12.0.10

14 Jan 03:28
1ba69b7

Choose a tag to compare

Release Changes

Today January 14th is the birthday of the author of this framework so this is a birthday release!

Major enhancements

  • Thread-safety & GC improvements.
  • Introduced a secondary Cleaner object and used it in appropriate places (issue /issues/103).
  • Improved SharedTagContent for better thread-safety, performance and GC (issue /issues/104).
  • Improved SharedTagContentTest.

Migration changes

No code changes required to migrate from old wffweb-12.x.x version to this version.

wffweb-12.0.9

26 Nov 03:45
620ce26

Choose a tag to compare

Release Changes

New features

  • New methods in AbstractHtml tag class - getParentChildLinkedTags, getNextSibling and getPreviousSibling.
  • New method toOutputStream in JSON parser classes. The toBigJsonString is also available for JsonListNode, it's a top level method in JsonBaseNode class.

Major bug fixes

  • A bug fix related to losses communication (rarest possible bug).

Major enhancements

  • Major improvements to lossess communication. A manual ping-pong is implemented for reliable websocket reconnection. This can prevent when user switches from one network to another or physical connection loss, eg: When user switches from WIFI to 2G/3G/4G/5G etc.. network. The heartbeat timeout value can be set by setWebSocketHeartbeatTimeout in BrowserPage. The default heartbeat timeout value is 10000 milliseconds.

Security improvements

  • JavaScript security improvements to avoid wff objects mutation/deletion. This will prevent other JavaScript files in the browser to mutating/deleting the wffweb JavaScript objects.

Other improvements

  • Better handling for browserPage removal from BrowserPageContent on browser page close or related scenarios.

Migration changes

No code changes required to migrate from old wffweb-12.x.x version to this version.

wffweb-12.0.8

14 Sep 14:17
714cbd4

Choose a tag to compare

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

30 Aug 12:20
9c5b0c3

Choose a tag to compare

Release Changes

Code optimization for performance improvement.

wffweb-12.0.6

28 Aug 14:37
b9caf98

Choose a tag to compare

wffweb-12.0.6 Pre-release
Pre-release

Release Changes

New features

  • Implemented jsonMapFactory and jsonListFactory in JsonParser.

Major improvements

Major improvements to AbstractHtml

  • Thread-safety and performance improvements.
  • Now, for appendChildren, prependChildren, insertAfter, insertBefore, replaceWith & addInnerHtmls methods, 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 the TBody tag 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

14 May 02:47
427a4f7

Choose a tag to compare

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

14 Mar 04:12
be1bf5f

Choose a tag to compare

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 & getValueAsWffBMArray methods in WffBMArray & WffBMObject.
  • Optimized code for performance improvement.