Why, What and Where Moodle’s AMD
Moodle is it still alive? Yes, and step-by-step it became more contemporary. I appreciate new features, which helps makes our life more easy, and yes, you’r right I talk about AMD.
Asynchronous module definition (AMD) deserve popularity by getting to us power to separate out code into small useful pieces and solve an issue with dependency injection (I remember that “good” times when we include all into footer.php, but now we can relax and drink martini).
Access via PHP looks strange (Oh my God!… Why don’t trust to client’s browser?), but it brings to us more good security level and new benefits, because it’s still hard to check which role user has on front-end side.
Moodle Using NodeJS grunt
It was interesting to me, because I love NodeJS and know what this technology can do. Grunt is little bit old, but good solution for production build. And there is eslint too, so we can install all dependencies and run grunt to pass all tests for out AMD JS code and then uglify it:
// on your Moodle root
What is Great to Read Before Learn AMD?
You can read more about Moodle AMD in an official docs, I was try to put some good background before you start to do that. Thanks for reading, will try to post more interesting things soon.