Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for other options for maintaining my personal JavaScript namespace. The problem I'm having boils down code Organization Vs. Performance. I would simply LOVE to be able to separate major sections of my code into a more "traditional" style. But I haven't because if I were to do that I would probably quadruple the amount of HTTP requests I send out.

Essentially I am including two different js files. jQUery/jQueryUI/my namespace in one and my implementation in the other. Great for performance in my web-apps... but looking at my JavaScript source makes me scared, confused, and horrified all at the same time.

What am I missing here?

share|improve this question
up vote 6 down vote accepted

Split the difference.

When developing separate out the source files. You will have a large number of HTTP requests and lots of files.

When deploying compile the source into one JavaScript file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.