Best practices for managing and deploying large JavaScript apps

后端 未结 7 1779
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 14:38

What are some standard practices for managing a medium-large JavaScript application? My concerns are both speed for browser download and ease and maintainability of developm

7条回答
  •  暖寄归人
    2020-12-04 15:21

    Also, I suggest you to use Google's AJAX Libraries API in order to load external libraries.

    It's a Google developer tool which bundle majors JavaScript libraries and make it easier to deploy, upgrade and make them lighter by always using compressed versions.

    Also, it make your project simpler and lighter because you don't need to download, copy and maintain theses libraries files in your project.

    Use it this way :

    google.load("jquery", "1.2.3");
    google.load("jqueryui", "1.5.2");
    google.load("prototype", "1.6");
    google.load("scriptaculous", "1.8.1");
    google.load("mootools", "1.11");
    google.load("dojo", "1.1.1");
    

提交回复
热议问题