Managing JavaScript complexity in a large project

前端 未结 2 1206
北恋
北恋 2021-02-09 23:14

What should I use to manage growing number of JavaScript files in my application?

We are building a django application with several apps. Each app has different function

相关标签:
2条回答
  • 2021-02-10 00:00

    Typically, grouping libraries by commonality (like your second example) would be preferred. However, more importantly would be making sure you have namespaced or otherwise make them unique so that you are unlikely to get naming collisions with other potential scripts.

    0 讨论(0)
  • 2021-02-10 00:09

    Backbone.js is used to organize javascript heavy applications in an MVC-style pattern. It's going to take some learning, but it's definitely something you'll want to look into and learn a bit about even if you don't end up using it.

    It's used on quite a few pretty impressive projects

    And, here's a site to learn more with tutorials.

    0 讨论(0)
提交回复
热议问题