Https://www.packtpub.com/mootools-1-2-beginners-guide/book
As always, it is the pucktpub press, as always the front-end, and as always open-source.
The company's internal km statistics on the most popular Ajax framework, or jquery, is the mainstream, but many boots choose mootools, And the legendary Oo, so it aroused the desire to learn mootools, I searched pucktpub and found a book called mootools 1.2 ininner's Guide. After countless delays, I finally took the courage to read it.
The language of this book is not as easy to understand as its Learning Series, but it should be easy to understand after cet6. The main content is the old stuff of the JS framework, Dom, events, animation, Ajax and Plugins. It feels like jquery, that is, there is another set of different syntaxes. We haven't seen the specific lethal effect in OO, and we may need to practice it.
Chapter 1 advantages and installation of mootools and me;
Chapter 2 writing JavaScript with mootools describes the separation of HTML, CSS, and JavaScript, that is, obtrusive, and then introduces some Hello world-level examples. What is memorable is the way to define the class and the way to inherit.
var Dog = new Class({ // Implements is a class property // upon which other classes methods will be added Implements: [ Options ], // Default options for our Dog options: { name : 'Barkee', type : 'Poodle', age : 4 }, // initialize is a MooTools method/constructor that executes the //following function whenever a new instance of a class is created initialize: function( options ) { this.setOptions( options ); }, // Create a method which when passed to a instance of Dog will //tell us our dog is barking. bark : function() { alert( this.options.name + ' is barking.' ); },});
Inheritance is to replace implements in the above Code with extends
Chapter 3 selecting DOM elements is Dom selection. Unlike jquery, mootools has a $ () and a $ (). The first one can only be selected by ID, in addition, when $ ("ID") does not have a "#" number, $ () is used in the same way as $ () in jquery, it may not be as powerful as jquery.
Chapter 4 the core's useful utility describes the client browser and OS Detection, time, and timer. I am not very interested in exploring browsers and operating systems.
In chapter 5, the events of mootools in working with events feel that jquery is more convenient and powerful.
Chapter 6 "bringing web pages to life using animation" describes animations.
Chapter 7 "Going 2.0 with Ajax" describes Ajax, which makes jquery more convenient and powerful.
Chapter 8 describes plug-in. Chapter 9 describes plug-in development.
The overall feeling is that this book is not so perfect, the code examples are simple in place, but it takes too much page space, and the language is not so smooth. And found that the front-end Lightweight Framework is basically those things. Important points such as ext JS are not an idea. To develop it quickly, I think ext JS is good. Just pull some components and a page will be built, and the rest will be done on the server side. But I still like this kind of thin things and feel a sense of control.