Recently, using Avalon to do the project, the feeling is that it really will be lower than the cost of learning angualr, I do not need to spend a lot of time to understand its function, no instructions, no service, spend a night to see the API will almost start to use. Avalon View it provides more functionality, a lot of detail processing, such as data type conversion, it helps us deal with it, such as Ms-duplex-number. Avalon It's still absorbing something from other libraries during the upgrade process, which is a good thing, but there will be something that makes me want to vomit. Examples of binding callbacks:
- data-repeat-rendered , with the ms-repeat binding, when the monitoring array is added, deleted, reflow and other operations when triggered; parameters: Current operation name ("Add", "Del", "Index", "clear", "move")
- data-with-sorted , with Ms-repeat, ms-with binding, to cast the object before rendering trigger, the output of a string array, the object's key value pair will be output according to it; parameter: An array of all the key names of the original object
- data-with-rendered , with ms-with binding, when the target object output page after the trigger; parameters: Current operation name ("Add", "Del", "Index", "clear", "move")
- data-each-rendered , with the Ms-each binding, when the monitoring array is added, deleted, reflow and other operations when triggered; parameters: Current operation name ("Add", "Del", "Index", "clear", "move")
Repeat, with and each have callbacks that are triggered after their rendering, but the callbacks before rendering, repeat and with are shared data-with-sorted ...
Most of Avalon's functions can be done in Avalon.define ({}), but when a page interacts too much, I start to worry about the problem with the code organization, too many properties and methods are mixed together, need to divide them into modules, and angular don't need to consider these issues, instructions , service, dependence, it all help us to divide, we use angular, we must write the code in the way it prescribes, angular it has a better expansion experience, from the code structure, should also be used angular will be more clear. I always had the feeling that when I was using Avalon, my thinking patterns were in the way of traditional DOM manipulation.
There are problems with the API, although there are, but not complete and clear, so in the use of the process will be quite painful.
Finally, with regard to popularity and community power, this is why I chose not to choose Avalon when I first learned the mv* framework. Angular has google support, and has a very strong community power.
Why, then, is Avalon used? Everything is from the demand!! If you ask me what impresses me most about these two libraries, angular I would say instructions and services, Avalon I would say compatibility. angular1.3 to IE support is from the beginning of IE9, for now also requires 6, 7, 8 of the company, in front of the project use ANGUALR is wishful thinking. The most important of the other reasons, but also from the demand, I took over a half of the Avalon Project O (∩_∩) O, although the background project, different modules, the total can not this with Avalon, that with angular bar, the handover will definitely be scolded as a dog ~ ~
Avalon Usage Experience