Extjs5.1中的新特性
Ext JS 5.0.1 is a maintenance release that addresses many bugs and limitations discovered by our community while testing Ext JS 5.0.0. We believe this update significantly strengthens the Ext JS 5 branch and we’re excited to hear your feedback. If you feel there are pieces missing from this guide, please let us know in the Ext JS 5 forums.
Let’s discuss a few of these improvements.
Accessibility
Ext JS 4.2.2 introduced the “ext-aria” package to provide improved support for accessibility, as described in the WAI-ARIA 1.0 standard. While this was an important step in creating accessible applications, we learned a lot from the feedback we received from our testing partners and early adopters. Ext JS 5.0.1 incorporates much of that feedback to provide a better solution moving forward.
Ext JS 5.0.1 re-introduces the concept of “ext-aria”, in addition to many other exciting improvements. Further, we have migrated support for focus and keyboard navigation from “ext-aria” to the framework’s core.
Focus
Ext JS 5.0.1 contains an improved strategy for the internal handling of focus. This internalization better aligns with accessibility standards. Core components, including buttons, tabs, form fields, and grids, now provide a clear, visual indication of focus. This is a key requirement for accessible applications. Users can modify several SASS variables and mixin parameters to gain more control over these new visual aspects.
Keyboard Navigation
Ext JS previously relied on Ext.FocusManager to assist in managing focus. While this class remains, it is no longer the recommended approach. It’s important to note that Ext.FocusManager has been deprecated and its future existence should not be relied upon. In its place, we have added a “focusable” property to components. This property is used to manage the tabIndex DOM attribute. Any component, with this property set to true, will be able to receive focus by clicking or via the keyboard input.
When these focusable components are placed in certain containers (such as toolbars), the container provides arrow key navigation and manages which item will receive the focus on entry into the container.
For more details regarding accessibility, focus, and keyboard navigation improvements, see the Accessibility Guide.
ViewModels
We have addressed a number of bugs related to viewModels, but there are some noteworthy improvements related to binding as well.
Selection Binding
Developers may now use “selection” as a bindable property on certain components. These components include ComboBox, Grids, Trees, Breadcrumbs, etc. Using the selection binding keeps the component selections in sync.
For details, see the Kitchen Sink example.
Model & Field Validation
One key improvement with form fields is that two-way bindings now check that the value is valid before updating their bound properties. The form fields can now acquire the Model’s validators and include them in their own validation.
As of Ext JS 5.0.1, invalid values will never be put back into your records.
Data
Ext.data has also been an area of a few key fixes and improvements in Ext JS 5.0.1.
TreeStore vs Node Events
The TreeStore class was refactored in Ext JS 5.0.0 to extend Ext.data.Store. With this change, TreeStore would relay events from the root node (Ext.data.NodeInterface). Unfortunately, certain node events collided with store events, which created problems for listeners. One such example was the “remove” event.
Ext JS 5.0.1 modifies the TreeStore strategy by prefixing all node events with “node” before firing them as TreeStore events. This means that the node’s “remove” event is now fired from the TreeStore as “noderemove”.
We always strive to avoid such changes in a maintenance release. However, this was a crucial change necessary to resolve the issue without breaking node listeners and/or store listeners.
Associations
Ext JS 5.0.0 introduced a lot of exciting new changes in terms of associations. However, one limitation that we discovered was that if you created a new record and then dropped that record, there was no cleanup logic to handle potential child records. This could create a situation where a session would generate create or update operations for these child records. These operations could not be processed by the server since the parent record was not saved.
Ext JS 5.0.1 offers reference fields that declare parent/child ownership between Models. These reference fields are then consulted when dropping records. When you indicate this type of association, dropped records will automatically handle deleting their child records.
For example:
In this way, when an Order it dropped (marked for deletion), its child OrderItems will likewise be dropped:
Further, setting parent references to null (for example, by removing it from the parent’s association store) schedules that record for cleanup.
The server is still ultimately responsible for a full cascade delete, but the above handling ensures that the client will never reference dropped records in save operations.
Responsive Configs
The new responsiveConfig provided by Ext.mixin.Responsive and Ext.plugin.Responsive provide flexibility for cleanly managing dynamic conditions.
The new responsiveFormulas allow you to add properties for responsiveConfig rules. For example, your main controller could do something like this to publish new properties:
These responsiveForumulas then produce these new values, which can be used in any of your responsiveConfig’s. This can help streamline your application’s responsiveConfigs, as well as give you a single place to maintain these kinds of choices.
Charts
The “sencha-charts” package also benefits from several improvements (such as some stock marker sprites like arrows, diamonds, etc). We’ve also modified our build process to include a packaged version of the sencha-charts package so that users aren’t required to use Sencha Cmd. However, the most significant of these that we documented and exposed custom theme creation.
Chart Themes
Ext JS 5.0.0 shipped charts with several built-in themes that you could select for your charts. However, building custom themes was not a documented process. With this release, we have opened up this ability so that you can make your own color palettes and much more.
A theme for charts is a class derived from Ext.chart.theme.Base and given an alias that starts with:
A basic theme could be as simple as this:
From here, you can add any number of other configs to style your series, axes and markers. To see all the options check out Ext.chart.theme.Base reference for the available configs.
To use the above you would simply set the “theme” config on your charts:
Sencha Cmd
Last but not least, Sencha Cmd 5.0.1 expands upon options available in app.json. This gives you more fine-grained control to configure your application without having to delve into the build scripts.
Output
To give you a peek at the most useful of these new controls, let’s look at the “output” object. A common requirement for some environments is to maintain the “markup” file in a folder other than where the Sencha application resides. For example:
The difference with this model is that the markup file (“foo.php” above, but it could be anything) is in a parent folder. In previous releases, this required setting several build properties. In Sencha Cmd 5.0.1 we can now do this in app.json:
That single setting ensures that all paths will be calculated relative to the parent folder while also disabling the build step that rewrites the markup file. The “output” object can control many other aspects of your build’s output such from enabling compiler optimizations to tuning the microloader.
To learn more about these new available options, please open app.json and review the robust commenting.
Packager
Cordova and PhoneGap are now much more flexible and easier to use with the new “packager” property. This new setting allows your build to specify its packager (either “cordova” or “phonegap”) directly in app.json. Combined with the “builds” object, we can make an application that builds for web, iOS and Android. Further, we can specify local Cordova builds for Android and use the PhoneGap Cloud Build for iOS since iOS requires a Mac.
For example:
As before we can run a build like so:
The above will use the “web” build definition. But now we can also do these:
Of course, you will need to have Cordova and PhoneGap installed and you will also need to configure your PhoneGap Build account. Other than formalities, you can see how this property cleans up the build process. Using this approach also frees you up to add “testing” to any of these builds and get uncompressed JavaScript code for debugging.
Extjs5.1中的新特性的更多相关文章
- Extjs5.0中的新特性
We are excited that Ext JS 5 is now available! Ext JS 5 introduces many new and exciting improvement ...
- ASP.NET 5与MVC 6中的新特性
差点忘了提一句,MVC 6中默认的渲染引擎Razor也将得到更新,以支持C# 6中的新语法.而Razor中的新特性还不只这一点. 在某些情况下,直接在Web页面中嵌入某些JSON数据的方式可能比向服务 ...
- Webpack 3 中的新特性
本文简短地分享下最新发布的 Webpack 3 中的新特性,供大家参考. 1. Webpack 3 的新特性 6 月 20 日,Webpack 发布了最新的 3.0 版本,并在 Medium 发布了公 ...
- 使用示例带你提前了解 Java 9 中的新特性
使用示例带你提前了解 Java 9 中的新特性 转载来源:https://juejin.im/post/58c5e402128fe100603cc194 英文出处:https://www.journa ...
- HTML 5中的新特性
HTML 5中的新特性 html5新增了一些语义化更好的标签元素.首先,让我们来了解一下HTML语义化. 1.什么是HTML语义化? 根据内容的结构化(内容语义化),选择合适的标签(代码语义化)便于开 ...
- (数据科学学习手札73)盘点pandas 1.0.0中的新特性
本文对应脚本及数据已上传至我的Github仓库https://github.com/CNFeffery/DataScienceStudyNotes 1 简介 毫无疑问pandas已经成为基于Pytho ...
- 1 PHP 5.3中的新特性
1 PHP 5.3中的新特性 1.1 支持命名空间 (Namespace) 毫无疑问,命名空间是PHP5.3所带来的最重要的新特性. 在PHP5.3中,则只需要指定不同的命名空间即可,命名空间的分隔符 ...
- Firefox 23中的新特性(新陷阱)
话说有一天突然发现我们的网站页面上的JQuery功能都失效了,Firebug中显示如下的错误 Blocked loading mixed active content "http://xxx ...
- Python3中的新特性(3)——代码迁移与2to3
1.将代码移植到Python2.6 建议任何要将代码移植到Python3的用户首先将代码移植到Python2.6.Python2.6不仅与Python2.5向后兼容,而且支持Python3中的部分新特 ...
随机推荐
- oracle递归查询子节点
通过子节点向根节点追朔. select * from persons.dept start with deptid=76 connect by prior paredeptid=deptid 通过根节 ...
- Note over Chinese Encodings
I been confused years ago. Till recently I collected my thoughts together, and now I am clear about ...
- IPSEC VPN配置实例
TL-R400VPN应用——IPSEC VPN配置实例 TL-ER6120是TP-LINK专为企业应用而开发的VPN路由器,具备强大的数据处理能力,并且支持丰富的软件功能,包括VPN.IP/MAC 地 ...
- [转]解决LinearLayout中控件不能居右对齐
在LinearLayout布局时使用右对齐(android:layout_gravity="right")控件对齐方式不生效,需要设置 android:layout_weight= ...
- debug运行可以,release运行报错的原因及修改方法
通常我们开发的程序有2种模式:Debug模式和Release模式在Debug模式下,编译器会记录很多调试信息,也可以加入很多测试代码,方便我们程序员测试,以及出现bug时的分析解决Release模式下 ...
- java 实例变量和类变量的区别
Example4_10.java public class Example4_10 { public static void main(String args[]) { Lader.下底=100; / ...
- FlashDevelop调试Air出错
按下F5调试命令行窗口出现错误: Starting AIR Debug Launcher... invalid application descriptor: Unknown namespace: h ...
- 设置自己Eclipse代码风格(内部)
http://www.cnblogs.com/farseer810/p/4391318.html 经过这几次的代码提交,发现很多人的代码风格不够规范.个人认为很有必要强制性规定一下代码的规范. 整体来 ...
- hdu_5110_Alexandra and COS(DP+分块思想)
题目连接:hdu_5110_Alexandra and COS 题意: 给你一个图,X代表宝藏,然后有一个船,它的声纳的频率为D,定船到宝藏的距离为Dis=max(abs(x1-x2),abs(y1- ...
- 操,escape sequence的输入方法我以前找过一次,这次又忘了,又找了一次,记下来,
所有的手册和回答都没有说,都是用 echo -e '\e[22;22m,如果不愿意使用echo -e,也可以 输入CvC[[22:22m 不要再忘记了.