Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 5 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
add comment

Your Answer

 
discard

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.