Java to DWR - decrease the file size of your javascript
It was until yesterday i realized I was doing something wrong with regards to JAVA-DWR interfacing as pointed out by Cata.
Backgrounder: in dwr.xml we define the classes(services) we use, which generates javasript which we will call facades and these can be imported in our javascript files.
My practice: In my js file, i simply import those facades i need, even though i only use one method in one of the services.
Issue: when importing a facade to your js files it will include everything even those methods you don’t use, thus increasing the size of your js file.
Proposed solution: create another class composed of only those methods used in your front-end. So that it will lessen the file size of your javascript generated by the DWR.
- BROWSE / IN TIMELINE
- « Eclipse: running your project via mvn jetty:run and debugging it
- » Finding Memory Leaks
- BROWSE / IN Java
- » Finding Memory Leaks
SPEAK / ADD YOUR COMMENT
Comments are moderated.
You must be logged in to post a comment.

