Right now, we are serving up parts of our js (to display certain types of information, ie "Render a View") via our server which dynamically writes the java script with the needed data embedded in it using JSPs.
Three main points/ requirements we need to consider are:
We want to be able to make calls on the client side to render a view without knowing specifics about the View (in case we add/ change a View).
Currently we have our js very spread around and in large files which makes it hard to make edits. I've been looking into the module pattern to address this concern, but many of the posts I've been reading have been:
(a) Older (most recent from 2010)
(b) Had some disagreement about how to make modules that are also testable
Any ideas about ways we should change/ restructure our application to accomplish all three goals? do these goals have too much inherent conflict, or is there hope? Also, any helpful blog posts are appreciated.