Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
FREELessons:16Length:1.8 hours

Next lesson playing in 5 seconds

  • Overview
  • Transcript

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.

Back to the top