>-----Original Message-----
>From: Raminderjeet Singh [mailto:[email protected]]
>Sent: Thursday, March 22, 2012 1:35 PM
>To: [email protected]
>Subject: Re: [PROPOSAL] Improvements to JavaScript
>
>Yes i have seen the same while going through different files and debugging.
>+1 for improving on this.
>
>Only concern came in my mind was concatenating to one big file. That makes
>the debugging little difficult as develop need to search trough the different
>files to find the method. Can we do this concatenation just on distribution
>WAR and leave the Cargo/development war without concatenation. :) actually
>4) address my concern.
>
>Now just curious to know is this admin preference handled at maven profile
>level?

My plan is to make it a database portal preference (like the number of items 
per page and Page title suffix) that way it can be changed runtime.  This could 
be useful if someone is reporting client errors and an admin could flip it and 
start debugging.

Another alternative would be to allow 3 states instead of 2:
1) serve original separate JS files
2) serve concatenated un-minified single file
3) serve minifed concatenated single file

>Thanks
>Raminder
>
>
>On Mar 22, 2012, at 11:57 AM, Carlucci, Tony wrote:
>
>> Hello Rave Developers,
>>
>> Currently we have lots of duplicated JavaScript import statements <script
>src=""> across our JSP pages which is not ideal from a maintenance or
>extension perspective.  I'd like to propose (and plan to implement) the
>following changes to improve the code base:
>>
>> (1) Move all <script src=""> into one central tag file for easier maintenance
>and overlaying, and import this tag on all JSP pages.  Organize Rave vs 
>external
>third-party files as appropriate (same file or perhaps separate tags)
>>
>> (2) As part of the build, concatenate all of the Rave javascript files into 
>> one
>file for improved performance and bundle it in the WAR
>>
>> (3) As part of the build, also minify the concatenated file for even more
>improved performance and bundle it in the WAR
>>
>> (4) Add a new Administrative Preference to choose which file to serve out:
>the non-minified file (by default for debugging), or the minified file (for
>performance)
>>
>> Thoughts or concerns?  We've performed this design model on other
>applications internally to great success.  There should be minimal performance
>impact for serving the entire single Rave JavaScript file on all pages, 
>especially
>in the best-case scenario when it is minified AND cached appropriately in the
>browser.
>>
>> Thanks, Tony
>>

Reply via email to