Wednesday, April 30, 2008

Compression and Caching Filters

Found a plugin for FireFox which grades the performance of a web sites actions: https://addons.mozilla.org/en-US/firefox/addon/5369 it’s from Yahoo.

The main issues I found where:

* Too many javascript and css files resulting in multiple http get requests
* Not caching the javascript and css files
* Not caching images
* The javascript files were too big not minimized or obfuscated
* Not compressing the requests response back to the browser

I’ve been able to resolve these issues by using two Filters:

* Caching Filter – CacheFilter.zip also has the web.xml entries
* Compression Filter – got from http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html (CompressionFilter.zip)

I combined as many js files into one file and then did the minimizing using a tool from Yahoo: yuicompressor-2.3.5.zip

Tuesday, April 22, 2008

Need to make a priority list of future development.

Put Tina's request for page renew first, however, try and push for a test/sponsor search page next.

The ideal search page would allow for a registration agent to search for a test by test code, test name or even sponsor. As well, based on these search requests, the program would auto fill fields in the test select page in order to progress further through the application.

Knowing that ACT is in the process of updating their authorization system we may have to halt future development in order to accomplish our web service registration implementation.

Alert Dennis of the problem regarding internet access via web services.

Monday, April 21, 2008

Performance tuning with Servlet Filter by adding a header to cache the content

http://developer.yahoo.net/blog/archives/2007/05/high_performanc_2.html

http://www.jguru.com/faq/view.jsp?EID=1311010

Tuesday, April 08, 2008

usable log4j.properties



# Set root category priority to DEBUG and its only appender to A1.
#log4j.rootCategory=DEBUG, A1
#log4j.rootCategory=DEBUG

# A1 is set to be a ConsoleAppender.
#log4j.appender.A1=org.apache.log4j.ConsoleAppender
#log4j.appender.A1=

# A1 uses PatternLayout.
#log4j.appender.A1.layout=org.apache.log4j.PatternLayout
#log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

## New Trial Stuff
log4j.rootLogger=debug, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=clockin.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
call java exe

http://www.csie.ntu.edu.tw/~b90008/jniexe.html
http://java.sun.com/developer/JDCTechTips/2005/tt0727.html

pass parameters to an exe:
try {
Robot robot = new Robot();
robot.delay(1000);
// Simulate a mouse click
// robot.mousePress(InputEvent.BUTTON1_MASK);
// robot.mouseRelease(InputEvent.BUTTON1_MASK);

// Simulate a key press
robot.keyPress(KeyEvent.VK_G);
robot.keyRelease(KeyEvent.VK_G);
robot.keyPress(KeyEvent.VK_K);
robot.keyRelease(KeyEvent.VK_K);
robot.keyPress(KeyEvent.VK_3);
robot.keyRelease(KeyEvent.VK_3);
robot.keyPress(KeyEvent.VK_6);
robot.keyRelease(KeyEvent.VK_6);
robot.delay(1000);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
robot.delay(1000);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
} catch (AWTException e) {
e.printStackTrace();
}