4 ms·
What are good ways to organize files to avoid having a big "chorizo" all the way down.
by pacomerh 16y ago
What are good ways to organize files to avoid having a big "chorizo" all the way down.
- geuis 16y agoI like the way the jQuery build system works. Basically you order your js files from the base up. So functionality that is used more commonly by other files is lower in the stack (i.e. loaded first). If you organize your code so that dependencies are contained, this also has the benefit that if your app doesn't need particular sections of code, you can remove the ones highest in the chain without adverse side effects.
- pacomerh 16y agoHaving the files contained from bottom up sounds smart do you have any links you can share that show this technique
- geuis 16y agoTake a look at this. http://www.youtube.com/watch?v=i_qE1iAmjFg http://www.youtube.com/watch?v=i_qE1iAmjFg This is Paul Irish giving a breakdown of interesting bits about jQuery. He talks about this technique roughly 50 minutes in.