The UIZE JavaScript Framework gets an official discussion group, where developers can discuss ways that they're using UIZE in their own projects.
Now you can get support, give support, learn tips and tricks, show off your cool projects built on UIZE, and generally get involved in the discussion on all things UIZE. JOIN NOW
A number of methods in the Uize base class have been optimized for performance.
Because this optimization has occurred in the base class, performance for all applications built on the UIZE JavaScript Framework should be improved. Methods benefiting from this optimization include the Uize.clone and Uize.fireEvent static methods, and the fireEvent instance method. Many other small optimizations have been made to methods that are called most frequently.
A bug in the Uize.Node.Form.getValues static method of the Uize.Node.Form module has been fixed.
This bug was causing the values for radio button sets to be incorrectly reported and had broken some serialization options functionality in the JSON Prettifier tool.
A new Dynamic Collection example demonstrates how an instance of the Uize.Widget.Collection.Dynamic widget class can be used to wire up an editable grid of photos.
In the example, you can 1) select items in the grid by clicking on them, 2) make a non-contiguous selection by ctrl-clicking on items, 3) make a range selection by clicking on one item and then shift-clicking on another, 4) clear the selection by clicking a "SELECT NONE" button, 5) select all items by clicking a "SELECT ALL" button, 6) remove a selection of items by clicking a "REMOVE" button, and 7) reposition a selection of items within the collection by click-and-dragging them. CHECK IT OUT
Some methods of the Uize.Data module have been improved, and a new method has been added.
The Uize.Data.identical static method of the Uize.Data module has been improved with the addition of a new variation that allows comparison options to be specified in an optional optionsOBJ parameter.
One new comparison option allows for comparing only the structure of two objects to see if they are identical, regardless of property values for either of the objects. Another new comparison option allows for testing that values for properties of both objects are equal, but not according to a strict equality match, so the object {prop:1} would be considered identical to the object {prop:'1'} when using this option. Finally, the new allowConjoined comparison option lets you specify whether or not the two objects being compared may reference the same shared object at any level of their structure.
The Uize.Data.identical and Uize.Data.clones static methods have been optimized for performance.
The new Uize.Data.getTotalKeys static method lets you get the total number of keys in an object, without the cost of actually building an array of all the keys.
The JavaScript Template Tester tool has been improved with the addition of a "JST MODULE" tab that displays the input JavaScript template source code converted to a JavaScript template module.
Additionally, the "COMPILED FORM" tab now shows the actual compiled code, including JavaScript comments that may have been in your JavaScript template source code. Previously, this tab displayed the browser's serialization of the compiled template function to a string - something which varies from browser to browser, with some browsers omitting comments and imposing their own quotes, indenting, etc. CHECK IT OUT
Documentation for the SimpleDoc JavaScript Documentation System has been greatly improved and now explains in detail the various formatting rules, providing examples to accompany the explanations.
SimpleDoc is a human readable, non-XML, indentation based document format for writing structured documents that provides a healthy set of formatting features, such as bolding, italicizing, linking, lists, sample code blocks, note headings, and more. All the documentation on the uize.com Web site is written using SimpleDoc, and the new documentation explains all about it. CHECK IT OUT
Documentation has been added for the Uize.Node.centerInWindow, Uize.Node.getEventAbsPos, Uize.Node.getOpacityStr, Uize.Node.setAbsPos, and Uize.Node.setAbsPosAdjacentTo static methods, and the Uize.Node.isIe, Uize.Node.isSafari, and Uize.Node.isMozilla static properties of the Uize.Node module. CHECK IT OUT
The Uize.Node.doLinesOverlap static method of the Uize.Node module has been eliminated.
Notes have been added to the documentation for the Uize.Node.doRectanglesOverlap static method on how that method can be used for testing for overlapping line segments. Essentially, one can use the Uize.Node.doRectanglesOverlap method to accomplish the task of the now defunct Uize.Node.doLinesOverlap method.
The UIZE JavaScript Framework gets its very own merchandise store.
Pledge your support for the open source UIZE JavaScript Framework by proudly wearing your very own UIZE themed apparel, drinking from a UIZE themed mug, or mousing all over the UIZE logo on your very own UIZE mousepad. Evangelize the UIZE JavaScript Framework to all your geeky friends at work by proudly showing off your UIZE swag. LOAD UP ON SWAG NOW
Some heavily hit methods in the UIZE JavaScript Framework have been optimized to improve their performance.
Some profiling indicated that complex client applications using the UIZE JavaScript Framework (like the Zazzle shirt design tool) tend to hit the Uize.clone static method quite heavily, so a little bit of code massaging was able to significantly improve the performance of that method by reducing the cost of recursion. The Uize.Population module - that gets used heavily for data driven population of UI widgets like droplists and scrolly based selectors - has been optimized to avoid using try and eval, resulting in a substantial performance improvement.
The Uize.Data.indexIn and Uize.Data.isIn static methods have been deprecated in the Uize.Data module and migrated into the Uize base class.
DEPRECATED
Uize.Data.indexIn (...) >> BECOMES >> Uize.indexIn (...) Uize.Data.isIn (...) >> BECOMES >> Uize.isIn (...)
These methods have proven useful enough to various Uize subclasses and other modules that it was time to promote them to first class citizens in the framework. The benefit of this change is that modules that have been requiring the Uize.Data module only to access these methods will no longer need to. The new Uize.indexIn method now also supports searching backwards from the end of the array.
Because these methods have been deprecated, they are still accessible from the Uize.Data module for backwards compatibility reasons. At some point in the future, however, they will be cleared out. If you have modules that are using these static methods, you will want to at some point update the code to call the methods on the Uize module (or _class, if a call is within a subclass of Uize).
Some improvements have been made to the modules that support the SimpleDoc documentation build scripts.
The Uize.Simple module has been refactored and optimized for code size and performance. Additionally, a bug was fixed with the Uize.Simple.collapseChildren static method that was causing failures in cases where the name of a child node was name, value, or children. Also, a bug was fixed in the Uize.SimpleDoc module that was causing certain bullet lists to not be recognized correctly (eg. - =title= description), and documents now only get a contents list if there are some sections in the document (yes, you can occasionally have a document that has no nested structure).
Various miscellaneous small improvements have been made.
Several modules have been updated to take advantage of the migration of the Uize.Data.indexIn and Uize.Data.isIn static methods into the Uize base class. Some performance and code size optimizations have been made to the Uize.Fade class. A new Uize.Node.centerInWindow static method has been added to the Uize.Node module that positions the specified node so that it is centered within the window.
The UIZE JavaScript Framework gets a nice mention on the popular Web 2.0 blog site ajaxian.com.
Mentioned in connection with the partnership between Mozilla and Zazzle to deliver community created designs themed around Firefox 3 on an exhaustive offering of apparel products, UIZE is given a healthy nod of curiosity by the Ajaxians. Some of the ways that the UIZE framework enhances the Zazzle Web site are mentioned. READ THE ARTICLE
Reference documentation is now available for the Uize.Widget.SlideShow widget class.
The document discusses the Uize.Widget.SlideShow class' instance methods, set-get properties, and provides an overview of this class and its responsibilities. READ IT NOW
The new Uize.constrain static method provides a convenient way to constrain a number within specified lower and upper limits.
This method is implemented for performance and avoids calling the Math.min and Math.max methods, using ternary conditionals instead. Because this method is implemented in the Uize base class, it is conveniently available to all subclasses of Uize (including all subclasses of the Uize.Widget base class).
The new Simple Data Tester tool (which makes use of the Uize.Simple module) lets you test the parsing and conversion of Simple Data documents into internal data structures.
This tool provides a demonstration of the Simple Data formatting rules and lets you edit and preview changes to a sample Simple Data document. CHECK IT OUT
The Uize.Fade module has been enhanced with the addition of highly flexible quantization functionality, in the form of the new quantization set-get property.
This new property allows detailed control of the quantization steps for the interpolated values of a fade - even allowing different quantization steps for different components of arbitrarily complex fade values. Several modules (and examples) have been updated to take advantage of the new quantization feature in order to further improve their performance, including the Uize.Widget.Scrolly module and the Mask example.
The new Fade Quantization Chart example illustrates, by way of a color chart representation, how the quantization set-get property of the Uize.Fade class affects a fade's interpolated value over the course of its progress.
In the example, a color is being faded from red to black over a series of swatches, from left to right. The color chart lets you visualize how different quantization settings for a fade could be used to generate color gradients with varying characteristics. CHECK IT OUT
The new Fade As a Color Chart example illustrates, by way of a color chart representation, how the acceleration and deceleration set-get properties of the Uize.Fade class shape a fade's curve over the course of its progress.
In the example, a color is being faded from one to another over a series of swatches, from left to right. The color chart lets you visualize how different acceleration and deceleration settings for a fade could be used to generate color gradients with varying characteristics. CHECK IT OUT
The Uize.Fade module has been updated with the addition of the new getSeries instance method and the Uize.Fade.getSeries static method, both of which let you use a fade to generate an interpolated series of values.
These new methods can be useful when using fades in non-time based applications, such as displaying values in a bar chart, fading colors over a series of elements, plotting positions for a series of elements, populating data sets, etc.
Documentation has been added for the Uize.toString, Uize.valueOf, Uize.capFirstChar, Uize.recordMatches, and Uize.module static methods, and the Uize.moduleLoader static property of the Uize base class, as well as the setNodeInnerHtml instance method of the Uize.Widget base class.
The new Fade As a Graph example illustrates how the acceleration and deceleration set-get properties of the Uize.Fade class shape a fade's curve over time.
By default, the interpolated value for a fade is linear, but the acceleration and deceleration properties allow for varying amounts of a fade's head and tail to be in acceleration and deceleration phases. This example also illustrates how the Uize.Fade class can be used for non-time based fades. CHECK IT OUT
The Uize.Fade module now supports non-time based fades.
Essentially, this works the same as when you are doing time-based fades - except that one does not use the start and stop instance methods. Instead, after creating a fade instance, one can then set the value of the progress set-get property to a floating point number in the range of 0 to 1, where 0 represents the start point of the fade, and 1 represents the end point of the fade. Upon setting the progress value, the value set-get property will automatically be updated to the correct interpolated value for that point in the fade's progress. This allows one to harness the Uize.Fade class' interpolation of complex values, as well as its support for acceleration and deceleration, for such varied uses as fading colors over a series of elements, plotting positions for a series of elements, etc.
The button widget, implemented in the Uize.Widget.Button class, has been modified to give the active display state precedence over the grayed display state.
This means that if a button is selected (such as with a checkbox style button), then it will always be evident that the button is selected - even if the button becomes disabled. A checkbox style button could be disabled to prevent its selected state from being modified. Previously, if a checkbox style button was both selected and disabled, then it would only appear disabled (ie. it would appear unchecked, thereby falsely reflecting its value).
A number of small improvements have been made to the Uize base class.
The toString intrinsic method is now implemented also as a static method on Uize subclasses, so the alert statement can now be used to display a summary of info for an object that is a reference to a Uize subclass. For example, the statement alert (Uize.Widget.Page) would produce an output like...
[class Uize.Widget.Page] built : true busy : inherit busyInherited : false confirmDialog : [object Object] container : undefined enabled : inherit enabledInherited : true html : undefined idPrefix : page idPrefixConstruction : undefined insertionMode : undefined localized : undefined name : undefined nodeMap : undefined wired : false
This new behavior is similar to the existing behavior for instances of a Uize subclass, excepting that the summary of values for set-get properties is for the class (ie. static) rather than an instance.
Less compelling than the new Uize.toString static implementation, the valueOf intrinsic method is now also implemented as a static method on Uize subclasses.
This change is more for parity than anything else. This means that you can access the static value of a class' value set-get property by involving the class reference in an expression, such as +Uize.Widget.Bar.Slider, or Uize.Widget.ColorPicker + ''.
When registering set-get properties using the Uize.registerProperties static method, it is now possible to omit the public name for a property and it will default to the private name.
This may be useful in certain special cases, as outlined in more detail in the Set-get Properties explainer (see the section on Public Name Defaulting, which talks about Naked Set-get Properties and Private Set-get Properties).
A new variation of the set method that accepts the two parameters propertyNameSTR and propertyValueANYTYPE makes it possible to use an expression or the value of a variable for specifying the name of the property to set.
This variation is supported for both static and instance calls of this method.
INSTEAD OF...
var propertyToSetObj = {};
propertyToSetObj [propertyName] = propertyValue;
myInstance.set (propertyToSetObj);
USE...
myInstance.set (propertyName,propertyValue);
Various improvements have been made relating to dialog based widgets...
The Uize.Widget.Palette module has been updated to add support for the new okText, defaultOkText, cancelText, and defaultCancelText set-get properties.
These properties allow one to programmatically modify the label text on the ok and cancel buttons through the set-get property interface of a dialog widget.
The implementation of confirm/inform dialogs in the Uize.Widget.Page base class now supports okText and cancelText parameters for the confirm and inform instance methods of widgets.
EXAMPLE
myWidget.confirm ({
title:'Confirm Delete',
message:'Are you sure you would like to delete the selected items?',
okText:'YES, DELETE',
cancelText:'NO, DON\'T DELETE',
yesHandler:function () {myWidget.deleteSelected ()}
});
See how they're used in the Decorated Confirm Dialog example.
A new insertionMode set-get property implemented in the Uize.Widget base class provides a way for applications to control how a widget's HTML is inserted when the built set-get property is set to false and a non-empty value is specified for the html set-get property. For more details, consult the reference for the Uize.Widget class. | |
| The Slideshow With Wipes and Slideshow examples have been updated to use JavaScript Template (.jst) files for building the HTML of the slideshow widget's UI. | |
A bug in the Uize.Widget.Button class that was affecting the Firefox 2 and Opera browsers has been fixed. Basically, using the text set-get property of a button widget instance to change a button's label text was causing a button to become non-responsive when clicking on the text implied node (but not other parts of the button). |
The Uize.Node.getByNameOrId static method that was deprecated back in May of 2008, and the Uize.String.stripPadding and Uize.Node.getByMatch static methods that were deprecated back in July of 2008 have all been killed.
For a time, they were left for backwards compatibility in order to ease transition. Now those backwards compatibility references have been removed in order to keep the codebase from bloating up. New equivalents for those methods exist. Just to recap...
SUMMARY
Uize.Node.getByNameOrId >> BECOMES >> Uize.Node.getById Uize.Node.getByMatch >> BECOMES >> Uize.Node.find Uize.String.stripPadding >> BECOMES >> Uize.String.trim
A new explainer for the set-get property mechanism provides an exhaustive explanation of set-get properties and digs into the nuances of features such as onChange handlers, conformer functions, initial values, the Changed.* virtual event, and more.
Scores of examples are provided to illustrate the many facets of this powerful mechanism. Don't write a class for the UIZE JavaScript Framework without appreciating how to get the most out of set-get properties. CHECK IT OUT
The Uize.Data module has been updated with the addition of two new methods.
The new Uize.Data.getLookup static method provides a convenient way to generate a lookup hash object from a values array, where each key in the lookup is a value from the array. The new Uize.Data.getReverseLookup static method provides a way to generate a reverse lookup object from a hash object, where the keys and values of the source object are swapped in the reverse lookup object. CHECK IT OUT
A number of issues have been addressed...
| A workaround was implemented for an obscure issue with Firefox 2 where it would not always repaint an IFRAME-based modal dialog correctly when redisplaying the dialog, if the document had other elements beneath the dialog that used fixed positioning. | |
A bug in the Uize.Scruncher module, affecting regular expressions preceded by operators (eg. if (!/^\d$/.test (sourceStr)) {...}), has been fixed. | |
A strange bug in the Uize.Color.hexStr static method, that was causing erratic behaviors in the Uize.Color module in IE6, has been fixed. | |
| A number of modules have been updated to deal with an obscure JavaScript parsing bug in Safari. | |
A bug in the Uize.SimpleDoc module, that was causing the inline linked text syntax to fail for paragraphs containing more than one link, has been fixed. |
A critical bug was fixed with the Uize.Color.hexStr static method.
A new explainer has been added to delve into the class inheritance mechanism of the UIZE JavaScript Framework.
The explainer covers topics such as: adding instance and static methods and properties, overriding instance and static methods and properties inherited from a superclass, registering set-get properties, phases of construction, private vs. public methods and properties, the composition of a subclass module, and many more.
A bug (affecting Internet Explorer 7 and earlier) that was causing the Uize.Node.display static method to throw a JavaScript error when using it to display table, tr, th, td, tbody, colgroup, col, and caption nodes has been fixed.
An issue that was causing documentation pages to have obnoxious horizontal scrollbars in IE6 and IE7 (caused by white-space:pre for the code tag) has been fixed.
Also, a few issues have been addressed in IE6 that were causing the documentation to look lousy, because the CSS was relying on features only supported from IE7 on up (png with alpha, the max-width property, and position:fixed). As a result of these tweaks, the documentation (and the site in general) looks somewhat more respectable in IE.
The Uize.Data module has been improved with the addition of the two new Uize.Data.min and Uize.Data.max static methods that return the minimum value and maximum value from the specified array (or object), respectively.
Also, the Uize.Data.getValues static method has been improved to return the argument passed to it, if that argument is an array, providing a convenient way to canonicalize an object or array to an array of values.
The serializeParams instance method and the Uize.Comm.serializeParams, Uize.Comm.parseQuery, and Uize.Comm.getCacheDefeatStr static methods of the Uize.Comm module - that were deprecated back in June of 2008 - have finally been killed.
For a time, they were left for backwards compatibility in order to ease transition. Now those backwards compatibility references have been removed in order to keep the codebase from bloating up. New equivalents for those methods can be found in the Uize.Url module.
If you need to refresh your memory, refer back to 2008-06-17 - New Features & Changes.
For the Uize.Wsh.buildFiles static method, the logFilename property of the paramsOBJ parameter is now optional.
When not specified, the filename for the log file is determined from the value of the buildScriptName property by replacing the ".js" file extension with the extension ".log".
The new Uize.Templates.List module implements a template for generating the HTML markup for a nested, unordered list from a JSON data tree.
This module is used by the Uize.SimpleDoc module for generating the contents tree HTML for HTML documents generated from SimpleDoc files, but it may be useful in other applications as well.
This modest little example demonstrates how a JavaScript template for generating an unordered list can be used to populate list HTML into a node in the page. TRY IT OUT
A new page has been added that showcases some examples of JavaScript quirkiness and possibly counter-intuitive behavior.
The page has been started off with a list of interesting expressions that are all true (ie. the result of the expressions is always the boolean value true), with accompanying explanations of why they're true. Some of the expressions are cute or ironic to look at. Others may just be plain puzzling to the uninitiated. All in all, some fun stuff to contemplate for anyone who appreciates the JavaScript language. CHECK IT OUT
The Uize.SimpleDoc module now automatically adds a target="_blank" attribute in link tags generated for URL's that begin with a protocol (eg. http://www.somewhere.com/document.html vs. just document.html).
This causes absolute URL's (typically for links to external sites) to open up in a new tab or window, rather than replacing the current window or frame's contents.
The Uize.SimpleDoc module has been updated so that the automatically generated title attributes for list items in the contents tree now are stripped of SimpleDoc formatting.
The Uize.Widget.Tree.List widget class now supports a tooltip set-get property that lets you optionally specify a tooltip node that should be updated with the description of items as the user mouses over them.
The documentation in the uize.com Web site utilizes this feature - along with the Uize.SimpleDoc module's automatic generation of descriptions for items in the contents tree - to display a summary / teaser for sections when the user mouses over section links in the contents tree.
Any document created using the Uize.SimpleDoc module now contains a contents list that is generated based on the structure of the document.
The list item for each section is linked to the section's anchor in the document and has a title attribute (ie. a tooltip) that provides a preview of the section's first paragraph. Some other small tweaks were made to improve performance and the appearance of the generated markup.
The Uize.Widget.Tree module - that is the base class for the Uize.Widget.Tree.List module - now is implemented so that the setExpandedDepth instance method does not require the DOM for a list instance to already be created before this method can be called.
If an instance of Uize.Widget.Tree.List is not yet wired up and there is no corresponding DOM for the list, then the setExpandedDepth method will only modify the expanded property at the appropriate places in the tree structure JSON object. This allows a list widget to be instantiated, with its data tree, then the tree can be expanded to a desired depth, and then the UI can be built and wired up to immediately reflect that state. This is mostly a performance improvement.
A bug was fixed with tooltips not being positioned correctly in Safari when a document is scrolled.
Essentially, Safari is not consistent with other browsers in where meaningful values for scrollLeft and scrollTop are reflected.
The palette implied node of an instance of the Uize.Widget.PopupPalette widget class is now positioned to butt up against the selector child button's root node.
If the selector button is not visible at the time that the palette is shown, then the palette is positioned based upon the current mouse coordinates.
The new Uize.Node.setAbsPosAdjacentTo static method lets you absolutely position a specified node so that it butts up against a specified reference node.
This is useful for positioning a popup palette or droplist - that might be absolutely positioned and at the root of a document's DOM - next to its corresponding selector button node that might be deep in the document's DOM structure.
When no eventOBJ parameter is specified, the Uize.Node.getEventAbsPos static method now returns the absolute coordinates of the current mouse position.
The widgets.map, widgets.add, and widgets.remove backwards compatibility provisions in the Uize.Widget class have been eliminated.
This feature had been deprecated back in May, in favor of the more concise and semantically elegant children property, and the addChild and removeChild instance methods. If you have code that references the widgets property or its add and remove methods (which is unlikely), you will need to update your code. This change lightens the memory load for every widget instance and reduces code size for the Uize.Widget class a tiny bit.
The Uize.Widget.Window module now supports new title and defaultTitle set-get properties that let you modify the title displayed in a window's title bar.
The Uize.clone static method of the Uize base class now supports cloning values that are instances of JavaScript's built-in RegExp, Date, String, Number, and Boolean objects.
For example, if you clone an instance of the Date object, you get a new Date object instance of the same value.
The fixedX and fixedY set-get properties now cause updates in enabled state for a resizer's drag handles, allowing resizable windows to be made resizable only in one axis (or neither axes, so not resizable). | |
The values of the left, top, width, and height set-get properties are now conformed when set through the set instance method, so that a resizer (such as a marquee) does not violate bounds set by the constrain, constrainBounds, minWidth, and minHeight, set-get properties. This fixes a bug that allowed a marquee to pop outside of its bounds when clicking-and-dragging to create a new marquee region near the edge of its bounds. | |
Many performance optimizations have been made to improve the drag performance of the Uize.Widget.Resizer.Marquee subclass and the Uize.Widget.Window.Resizable class |
Instances of Uize.Widget.Drag now observe enabled state. This capability is utilized by drag handles in the Uize.Widget.Resizer class, allowing its fixedX and fixedY set-get properties to update resizing configuration at any time. | |
A bug was fixed that was causing the cursor that displayed during drag to not always be the cursor of the drag instance's root node (this was evident with the Uize.Widget.Resizer.Marquee and Uize.Widget.Window.Resizable classes). |
The basic marquee example has been updated to provide linked JavaScript statements that provide a demonstration of the widget's programmatic interface.
The configuration of the marquee can be updated in realtime.
The new Scrolly Carousel example demonstrates how the Uize.Widget.Scrolly class can be used to create a carousel scrolly that lets you step through a series of pages.
Such an interface could be provided on a company's homepage, with pages like "About Us", "Products", "Services", "Investor Relations", etc. Some examples of the scrolly's programmatic interface are also provided. CHECK IT OUT
Support for the 'nodes' mode for Uize.Widget.Button instances has been eliminated.
There were only a few cases of this feature being used, and they have been converted over to the more flexible 'classes' mode. The performance of applications that instantiate hundreds of button widgets is improved as a result of this change, and the code size of the module is reduced.
There are new additions to the Coding Style Guide and JavaScript Optimization appendixes, and various methods of various modules have been documented. Documentation continues to be fleshed out more upon each release.
The Uize.Widget.Page page widget class now provides an implementation for decorated confirm and inform (aka alert) modal dialogs.
All pages that use this class (or a subclass of this class) get the benefit of this functionality. Any widget that is on the widget tree of a page widget of this class (or a subclass) can use the decorated dialogs by calling its confirm and inform instance methods. The dialog widget itself is implemented in the new Uize.Widget.Palette.Confirm module.
The new Calendar example provides a simple demonstration of the Uize.Widget.Calendar widget class and some aspects of its programmatic interface. CHECK IT OUT
The new Calendar Controls Wikipedia example demonstrates how an instance of the calendar widget class (Uize.Widget.Calendar) can be wired up to let the user choose a date in time and then view Wikipedia reference information for that date inside an IFRAME document in the page. CHECK IT OUT
The new Decorated Confirm Dialog example demonstrates the decorated confirm and inform (aka alert) modal dialog functionality that is implemented in the Uize.Widget.Page base class. The example demonstrates various forms that the decorated dialog can take, including customizable title, message, and state icon. CHECK IT OUT
The Uize.Json module now supports serializing of values that are date objects (ie. instances of JavaScript's built-in Date object).
Date values are serialized as a call to the Date constructor, with a value formatted in POSIX time (ie. milliseconds since January 1, 1970 UTC). This means that for objects serialized to JSON format and that contain values that are dates, they can be returned back to an in-memory representation using a simple JavaScript eval, since the Date constructor will be invoked to create true date objects.
EXAMPLE
{
firstName:'Mary',
lastName:'Jackson',
dateOfBirth:new Date (20588354000)
}
Several modifications have been made to the Uize.Widget class, including...
The useNewIdSyntax set-get property, that was provided many moons back as a means of easing the transition over to the new id syntax for widgets and their implied nodes, has finally been completely killed. There are no longer any living widgets using the old id syntax. Any widgets that had not yet been converted over were either updated or killed. Removing this old facility clears out a little bit of cruft and extra complication from the code for the Uize.Widget class. | |
The wired instance method now only returns the value of the wired set-get property and no longer accepts an optional parameter for setting the property's value. The ability to set using the optional parameter was not being used anywhere and, in the rare event that you may need to set the wired set-get property (not generally advisable), you can simply use myWidget.set ({wired:wiredBOOL}). | |
The htmlSubstitutions set-get property has been KILLED. As it turns out, there are better alternatives for funneling data to HTML templates for widgets. When the html set-get property of a widget is a function or a compiled JavaScript template package, then the HTML generator function is supplied with the current state for all the widget's set-get properties. | |
the uiWired alias for the wired set-get property, that had been kept around for backwards compatibility purposes, has finally, after way too many years, been KILLED. No code was found that still referenced the old alias. | |
many miscellaneous small performance and code size optimizations have been made to the Uize.Widget class |
Several modifications have been made to the Uize.Widget.Button class, including...
for button widgets added to other widgets using the Uize.Widget.Button.addChildButton stitch-in method, the 'Click' instance event fired when such buttons are clicked no longer carries a buttonId property in the event object. Handlers of the 'Click' event can, instead, use event.source.get ('name') to obtain the name of the button widget that fired the event, which is equivalent to the old buttonId approach. This is a rare use case, and all code was paying a small price for a convenience enjoyed by only a few. Various modules have been updated accordingly. | |
various performance improvements have been made that benefit applications that use hundreds of button widget instances, like instances of Uize.Widget.Options that have large values arrays |
Several modifications have been made to the Uize.Widget.Options class, including...
The 'Option Bed Event' instance event has been eliminated. It was not found to be in use anywhere, and instances of Uize.Widget.Options with hundreds of options were paying a performance penalty. | |
| various performance improvements have been made that benefit applications that use instances that have large values arrays |
The Uize.Date module has been enhanced with the following new features...
the new Uize.Date.dayNames static property provides an array of English names for the days of the week | |
the new Uize.Date.monthNames static property provides an array of English names for the months of the year | |
the new Uize.Date.isLeapYear static method provides a way of determining whether or not a specific year is a leap year | |
the new Uize.Date.getDaysInMonth static method calculates the number of days in the specified month of the specified year |