Developing Ajax-based Java applications

Developing Ajax-based Java applications


This Tech Talk provides an overview of the ICEfaces framework, which is designed to add AJAX to JSF based on a technology called Direct-to-DOM Rendering. This approach allows a web application to be rendered entirely on the server side. The browser essentially acts as a remote control to a server-side rendering of the DOM – making the AJAX capabilities transparent to the developer. Developers can work in a pure JSF programming model, have no exposure to JavaScript development or any of the low-level intricacies of AJAX and still get the full rich web capability.


Use multiple identities on Google Talk

Want to run Google Talk with multiple Gmail identities?If you have several Google Gmail accounts you also may want to run multiple instances of Google Talk. This is especially important for families that share a single PC. Nothing worse than a family member signing you out so they can sign in under their own account!Basically, to have “Google Polygamy” you need to run Google Talk with the following switch: /nomutexStep 1: Right-click on the desktop

Step 2: Select NewStep

Step 3: Select ShortcutStep

Step 4: Paste this into the text box:”c:\program files\google\google talk\googletalk.exe” /nomutex

Step 5: Click Next and choose a shortcut name such as Google Talk1, Google Talk2, or something related to your Gmail account for easy remembering which account is which.

Step 6: Click OK a few times.

Sign and verify XML documents using Apache WSS4J and WebSphere DataPower SOA Appliances

With the increasing adoption of Web services and Service-Oriented Architectures (SOAs), ensuring the authenticity, integrity, and nonrepudiability of XML messages has become an essential component of secure and robust messaging infrastructures. Using a sample scenario, this article walks you through how to use Apache WSS4J and IBM® WebSphere® DataPower® SOA Appliances together to enable the signing and verification of XML documents.


Traits for Java

What are Traits?Traits are like interfaces, but can have a method body and a class that implements a Trait inherits the method body. In many ways Traits are similar to abstract classes, but they don’t have constructors, don’t have initializers, don’t have fields, can be multiply inherited (like an interface), and super does not refer to a method in an inherited trait, instead of super you have to qualify the intended name [TraitName].[methodName]( … ).By way of example consider current best practice: you write an interface, e.g. List, write a useful abstract class to make writing lists easier, AbstractList, and then implement some lists, e.g. ArrayList. This is all well and good, but suppose you now want to add some extra methods to List, e.g. sort. You can’t because every class that implements List would need to add a sort method and you don’t have control over all the source that uses List. So instead you use a helper class, Collections, and add sort as a static method. The user then calls sort( list ) (assuming a static import is used). A better technique is a Trait, with a trait you modify List:

public interface List extends Collection {

void sort() { … } // same syntax as an interface but allows method bodies


ArrayList now automatically pick up sort and the user does not need a special import, instead just like any other instance method the user writes list.sort().


With Traits, if there is a conflict due to multiple inheritance then you have to resolve this conflict (this is a key difference from Mixins – see below). E.G.:

interface X { int m() { return 1; } }

interface Y { int m() { return 2; } }

interface Z extends X { int m() { return 3; } }

class XY implements X, Y { // conflict – 2 m’s

public int m() { return X.m(); } // resolve conflict


class XZ implements X, Z {} // no conflict – Z’s m overrides X’s

Note on Mixins

The difference between a Trait and a Mixin is that order is important. In the class XY example given above, with a Trait you have to explicitly say which m you want. With a Mixin the order in which the interfaces are mixed in determines what happens. class XY implements X, Y {} is read as first mixing in X then mixing in Y; hence the m from Y overrides the m from X, since it is mixed in afterwards.

Note on Extension Methods

An alternative way of adding methods to a class is Extension Methods, these are proposed for Java 7, but have a number of problems.

Extending existing classes

To be able to add methods to an interface without recompiling, all clients of the interface, the class loader has to be extended to automatically add in the extra methods if they are not present and to flag an error if an unresolved conflict exists. Currently the class loader flags a missing method, the required extra action would be to see if the missing method is in an implemented interface and if it can be added without conflict.

As an alternative to abstract classes

Traits would be a viable alternative to abstract classes in many cases, for example the methods in AbstractCollection could be moved to Collectionand no one would need to use AbstractCollection in the future. But a Trait cannot have any fields, therefore some abstract classes, e.g. AbstractList (it contains a field) would still be needed, although some methods may be moved to an interface.



Supporting Java Traits in Eclipse





Increase the visibility of your resume with keywords


Have you been submitting resumes and not hearing back? A piece on suggests it may not be your lack of qualifications but more of a lack of keywords.

Keywords are phrases that communicate your job skills, responsibilities, and/or functions. The more you reference keywords that are contained in the recruiter’s search, the more likely you’ll get calls. Here’s some advice from

First, be aware that keywords are best when they refer to hard skills. In other words, “network engineer” and “Help Desk agent” are likely to get more direct attention than “team player” or “multi-tasker.”

The physical location of keywords is also important. Dice says, “Providing a summary of keywords at the conclusion of your resume is an effective way to assure that your resume is selected during database searches. However, to help move you to the interviewing stage, list your keywords near the top.” Deborah Walker, a certified career coach and president of Alpha Advantage in Portland, Oregon, suggests including keywords in the top four to five inches of your resume because the recruiter won’t look beyond that when quickly reviewing a batch of candidate resumes.

And another little tip from the same article: If you’re changing careers and don’t have the relevant experience yet that would allow you to incorporate the keywords, you can include an “objective” that includes a list of skills you want to develop. That way, your resume will come up in keyword searches.

Ref: TechRepublic 

Satish Jacob from Hotel Palestine, Baghdad: Pages from a War Diary



        Satish Jacob was the only Indian correspondent in Baghdad during the US-led was to topple the Iraqi President, Saddam Hussein. From Baghdad’s Hotel Palestine, Satish’s spirited reports were the only eyewitness accounts of the drama of those days on Indian television. They were also special in that his perception of the events differed significantly from that of the Western media more prone to accept uncritically the invading armies’ version of events.                        

        In From Hotel Palestine, Satish Jacob writes of anation devastated on a whim, and explains Iraq’s role in the Arab world, the complex relationships that divide the region’s Muslims, Christians, and Jews. Above all, he applauds the courage of the Iraqis in this war of unequals, and shows us that while Saddam may be a loathsome monster for some, he is a nation-builder like Turkey’s Ataturk to others.



10) Competition is good. 90% market share is better.

9) We’re disappointed that the US government failed to reach a reasonable settlement with Microsoft. We thought that our press release last year about Microsoft buying the US government took care of these little details.

8) We support a free marketplace. So long as our support is visibly branded everywhere, at any price.

7) The Road Ahead: Revised edition, “How to avoid the sink holes.”

6) When in doubt, spend gobs of cash on ads in all the major newspapers on a one-day rampage against government. That always beats befriending politicians and bureaucrats.

5) We value our customers. That’s why we only charge $75 per question on our toll-free tech support phone lines! (Hey, at least the phone call is free)!

4) Just because our marketing memos effectively caught us with our pants down and our hands in the cookie jar, doesn’t mean we can’t bully our way out of this mess.

3) We love the idea of competition. That’s why we bought a huge chunk of Apple.

2) The US economy depends heavily on Microsoft’s ability to release Windows98 on time. Yeah, and that also proves how insignificant and non-monopolistic we are as compared to our software competitors.

and finally,

1) No Netscape for you!