If you recall, in Chapter 8, Application Implementation – Putting It All Together, I mentioned that we were using quite a few <script>
tags in our index.html
file to load our application's modules.
To refresh your memory, here is what we had:
While this implementation worked, it was not very scalable, since for each module file we needed to add a <script>
tag to our page. Also, by looking at the list of files being loaded, we could not determine how each module or component was dependent on another piece (or pieces) of the application.
We had to create another <script>
tag at the bottom of the page as well, which took care of booting-up the application, as shown here:
It would be nice if we could eliminate the need for having all the <script>
tags and our boot-up sequence in index.html
. Also, it would be very useful to implement a mechanism which could indicate and mange our modules' dependencies.