Posts

Showing posts from August, 2007

Replacing DisplayTag

I have been involved in an Intranet application for a big SCM client for around 2 years now. This application is being build on JBoss with Struts 1.1. Since the days of its prototype, DisplayTag has been used for the Grid type functionality. There are a couple of screens which require Grid. Some of the Grids are editable as well. Moreover, there are various complex scenarios attached with them e.g. pressing escape should bring revert the changes done to selected row or tabbing off the row should result in saving of the row among others.
However, now, we are replacing Display Tag with a Grid Applet. The reason being that it is slow to render pages (through pagination).
So, do you have a view here. Any suggestions which applets can be considered?

AdvertisementAmazon.com Textbooks

5 ways to speedup javascript

From http://www.whenpenguinsattack.com/2007/08/20/5-ways-to-speedup-javascript/

1) use a compressor
JSMin is a filter which removes comments and unnecessary whitespace from JavaScript files. It typically reduces filesize by half, resulting in faster downloads. It also encourages a more expressive programming style because it eliminates the download cost of clean, literate self-documentation.

2) Minimize the number of .js files
Each .js file reference on a web page means another http request from a client's browser. Although it may decrease the readability/maintainability of your code, it is faster to have one larger .js file than multiple smaller ones.

3) use profiler and timer tools
Firebug offers a suite of profiler and timing tools that allows you to see exactly how long your scripts take to execute and gives you the ability to tweak and optimize them.

4) asynchronize your code
Browsers run Javascript code synchronously. This means that when a <script></script> tag has been…

Reference Guide: HProf

InformIT has published a user guide to HProf, the Java profiling tool from Sun.


Sun includes a profiling tool built into the JVM called HProf that can provide you with method-level response times as well as heap information. The JVM provide various programmatic interfaces that allow you to obtain runtime information, and as of Java 5.0 SE, the newest and least invasive is the Java Virtual Machine Tool Interface(JVMTI), which HProf is based on. HProf can be invoked by providing a command line option when you start your Java application and then it generates a log file as output, which you can either examine manually or programmatically parse. Furthermore, HProf executions can be integrated into a build script in order to generate reports automatically.


http://www.informit.com/guides/printerfriendly.aspx?g=java&seqNum=363

Using Ajax across multiple domains

From http://www.whenpenguinsattack.com/2007/08/13/using-ajax-across-multiple-domains/

XMLHttpRequest, the main component behind AJAX, does not automatically work across multiple domains. This means that you cannot make a request to an ovject on a domain that is different from the web page’s domain. There is an easy solution to this issue: apache’s mod_rewrite module.

Example

function getXMLHttpObject() {
if (window.XMLHTTPRequest) {
return new XMLHttpRequest();
} else if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
} else {
return null;
}
}

function handleHTTPResponse() {
if (http.readyState == 4) {
results = http.responseText;
}
}

var http = getXMLHttpObject();

http.open("POST"."http://www.yahoo.com/service");
http.onreadystatechange = handleHttpResponse;

The above example will fail with both Firefox and Internet Explorer (unless you are running it on a web page located on the yahoo domain). There are other ways to a…

Secret of success

"Sir, What is the secret of your success?" a reporter asked the President of a Bank.

"Two words."

"And, Sir, what are they?"

"Right decisions."

"And how do you make right decisions?"

"One word.'

"And, sir, What is that?"

"Experience. "

"And how do you get Experience?"

"Two words"

"And, Sir, what are they?"

"Wrong decisions ."

12 skills that employers can't say no to

There is an interesting article on Javaworld.com titled "12 skills that employers can't say no to"by Mary Brandel, listing skills, some of which are already essential to succeed on-job, some are acquiring that status, and few could acquire that status.
Machine learningMobilizing applicationsWireless networkingHuman-computer interfaceProject managementGeneral networking skillsNetwork convergence techniciansOpen-source programmingBusiness intelligence systemsEmbedded securityDigital home technology integration.Net, C #, C ++, Java -- with an edgeJavaworld.com

Online Hindi Radio Stations

Here is the list of Online Hindi Radio Stations. Copy the URL in your media player and enjoy !!


106.2 HUMFM - UAE ==> http://www.humfm.com/humfm.asx

AajKal - Asian Network ==> http://stream.servstream.com/ViewWeb/BBCRadio_music/Event/BBCAsianNetwork_hi.asx

Amrit Bani - UK ==> http://62.25.97.192/amritbani?MSWMExt=.asf

ApnaRadio - USA ==> http://www.apnaradio.com/live/media24/ApnaRadio.asx

Asian Gold Radio - UK ==> http://62.25.96.7/asiangold

Asian Sound Radio - UK ==> http://www.vtuner.com/vtunerweb/mms/mms15278.asx

BBC News ==> http://www.bbc.co.uk/worldservice/meta/tx/nb/live_news_au_nb.asx

BombayBeats FM ==> http://www.1.fm/player/energybbfm32k.asx

City 101.6 FM - Dubai ==> http://asx.abacast.com/arabian_radio-city-24.asx

DDLive Video - India ==> http://164.100.51.209/ddlive?MSWMExt=.asf

DesiSoundz - India ==> http://desisoundz.com:8000

Haagstad Radio - Holand ==> mms://81.205.146.32:21/haagstadradio

kismatradio.com ==> http://www.kismatradio.com/newmedia…