- Overview
- Transcript
5.1 Conclusion
I hope you’ve learned something during this course. My name’s Dan Wellman, and from all of us here at Tuts+, thanks for watching.
Related Links
1.Introduction2 lessons, 06:55
1.1Introduction02:46
1.2What You Need04:09
2.RequireJS Basics4 lessons, 27:18
2.1Defining Modules07:25
2.2Exporting Values From Modules04:02
2.3The Main Script Entry Point06:55
2.4Specifying Configuration08:56
3.Handling Common Tasks5 lessons, 51:21
3.1Using Non-AMD Scripts With RequireJS06:31
3.2Using the Text Plugin09:35
3.3Wiring Up More of Our Modules10:40
3.4Localization With the I18N! Plugin12:10
3.5Adding More Functionality to the App12:25
4.Advanced4 lessons, 22:08
4.1Testing AMD Modules08:12
4.2Resolving Circular Dependencies03:41
4.3Using the r.js Optimizer06:53
4.4Using an Alternative Module Loader03:22
5.Conclusion1 lesson, 02:59
5.1Conclusion02:59
5.1 Conclusion
Hey there. You've now reached the end of the course. I hope you've enjoyed learning all about the benefits of RequireJS and were going to use it in your own projects. Let's recap over everything that we've learned in the course. In the first introductory section, we learned a little bit about what RequireJS is and why it was created. We looked at the differences between AMD and the CommonJS module format. And looked at the reasons why we want to use a module system of some kind in the first place. We also got our development area setup, ready to start coding. In the second section, we looked at some RequireJS basics. Including how to define modules with the define method. How to export values from modules using either a standard return statement or the special exports object. How to specify the main entry point for our script. We also saw how to supply different configurations for Require. We saw that we can provide configuration in the HTML page in which Require is running, or in a separate configuration file. In the third section, we moved on to look at some common things that we want to do when using Require. Including loading text files with the text plugin. And localization with the I18N plugin. In the final advanced section of the course, we covered some additional tools and frameworks that we'll often want to use with Require. We saw how to use the excellent unit testing framework, Jasmine. To not only test our application modules, but also to write the tests themselves as modules. We looked a circular dependencies, including what they are and how to fix them using the require method if they are absolutely necessary. We also saw how to install and use a tool called Madge. That can scan our modules and allow us to circulate dependencies that may not be as obvious as the one we introduced as a test. We saw how to use the r.js optimizer to create a single minified file that contains all of our modules in order to provide a single package for deployment purposes. Lastly, we saw how to use Almond. A light-weight alternative module loader to RequireJS, that again, is optimized for deployment. During the course, we've put together a basic but fully working web application. And I think you can agree that the code is modular and better organized than if we were just coding it like we would have done for a website. It's easy to see which module controls which part of the app. And if we need to update it or add new features, we know exactly where to go to do it. We could easily improve the organization further if we wanted, by moving modules into additional sub-folders. Or even breaking down the existing modules further. And perhaps, splitting some of the larger modules into smaller modules. I'd recommend that you continue to build up the application and add more features. I've specifically left a feature missing to give you something to work on. Loading the lists that have been saved, this is a two-step process. First of all, you'll need to read previously saved lists and load the list names into the select box into the app header. You'll then need to wire up the load button in order to load and render the list selected in the drop-down. Good luck. I'm certain you can do it. But if you do get stuck, don't worry. The GitHub repo for this course does contain the full functionality, including this. Thanks for watching.