Sunday, March 12, 2006

AJAX, , WEB 2.0 or just plain Web Development

No more Internet Options and multiple clicks to clean your browser caches....
A great utility to prevent this is diskclean found at http://www.robertenfemke.nl/~diskclean/

All of the J2EE developers I have worked with all end up touching some HTML Renderer at some time or another. You find that they still want a JSP to quickly test a component. Why spend endless time with a complete object model when you just want a Harness for some of your code.

In comes the annoying Browser cache, great to ensure performance a prevent overloading of you webserver and J2EE containers, but horrendous when you write endless lines of code and you just can't see any changes.

In comes DiskClean to the rescue, you can find it at http://www.robertenfemke.nl/~diskclean/

Create a quick launch short cut and run it to clean everything, or run it interactively and clean exactly what you want
"C:\Program Files\DiskClean\dclean.exe" /q

Monday, March 06, 2006

Use Regular Expression to retrieve a substring

Use regular expressions to retrieve a substring, the match ([{}:x0-9a-f]*) below retrieves any substring of characters matching the any greedy match of characters within the square brackets...

String search = "The beginning part this is the substring which should be retrieved and here is the end part";
Pattern pattern = Pattern.compile("The beginning part ([x0-9a-f]*) and here is the end part");
Matcher match= pattern.matcher(search);
String result = "nothing":

if (match.matches()){
result = match.group(1);
}
else{
return null;
}

System.out.println("Result of the match: " + result);

OUTPUT: Result of the match: this is the substring which should be retrieved


Sunday, March 05, 2006

100% CPU Usage in IE6

Just a few lines of HTML an CSS to get IE to utilise 100% CPU...
http://www.sunpig.com/secondbest/2006/02/100_cpu_usage_in_ie6.html

Use JavaScript don't re-invent it.

Something that got me realising that my JavaScript was probably rewritting elements of JavaScript which are already provided by the Scripting Engine (ECMA Script) . It may be an entry about DHTML and related libraries, but it would still serve as a reminder to make sure your Web 2.0/AJAX solution isn't over the top...

http://www.digital-web.com/articles/keep_javascript_simple/
... They should remember that JavaScript is not Java. It is a programming language in its own right with its own purpose, functionalities, and structures. It does not need to become Java either. If they want to write Java they should write Java. If they want to write JavaScript they should learn how to write it properly.... also see
http://www.quirksmode.org/