Archive for June 2007
Maven quick start in presentation.
Here in our company, we got many new java developers, as we are strict on project structure and coding convention stuffs, at the same time we are aware of giving a good feed to our honorable new developers.
this project was intended for new to medium maven experienced java developers, who wants to use maven. or already been using. i belief you guys will get it helpful.
here is the presentation on maven
The technology-adoption & S-curve
Recently “emon.we4tech.com” has published a nice blog. here is the brief -
For last few day’s i was experiencing with “breakthrough” a book written by Mark Stefik and Barbara Stefik published by the MIT press. It was all about stories and strategies of Radical Innovation, technology markets that have declined dramatically since the late 1990s responding to the changing business climate. Very well described about breakthrough innovations that creates something new or satisfies a previously undiscovered need, launch new industries or transform existing ones.
“..Designing on a Dime: 100 Freebie CSS Resources..”
recently
has published a nice collection of CSS resource. here you go -
http://www.softwaredeveloper.com/features/designing-on-a-dime-060407/
here what they said on first couple of lines -
Do you want a spiffy Web site design, but lack the means or knowledge to get it? No problem, brush up on CSS and get that site you want with our freebie guide!
the nice thing is, they have separated their content in several groups, i.e. tutorials, tools, code libraries, browser bugs, galleries, templates, articles etc…
i think if you late you will really miss a list of useful resources.
best wishes,
Limit of maximum iterfaces per class.
I was reading through java doc for Proxy class. suddenly my eyes were stucked on the following lines of code – bit interesting perhaps,
The resulting proxy class must not exceed any limits imposed on classes by the virtual machine. For example, the VM may limit the number of interfaces that a class may implement to 65535; in that case, the size of the interfaces array must not exceed 65535.
Visitor Design pattern to traverse hierarchical object structure.
Those who know about visitor design pattern, i am not triggering my write up for them. but those who didn’t know about this or heard but always ignored i am writing for them.
Visitor design patter is used to traverse through the object structure. it is used to separate the iterating logic from the object.
Let’s imagine, you have the following object structure :
class Tree {
private List mBranches;
public List getBranches() {
return mBranches;
}
}
how we usually iterate through this list of objects, lets think like following code -
// ….
final List branches = tree.getBranches();
for (final Branch branch : branches) {
// …
}
// …
visitor design pattern emphases API designer to hide underlying object structure and iterating logic. now let’s see how we can implement the above example using visitor design pattern:
interface Visitor {
void visit(final Branch pBranch);
}
interface Visitable {
void accept(final Visitor pVisitor);
}
class Tree implements Visitable {
// … previous code
public void visit(final Visitor pVisitor) {
for (final Branch branch : mBranches) {
pVisitor.visit(branch);
}
}
}
now my concern is to make it “n” depth. so it will become a real tree with “n” depth, where can traverse branches and leafs. who is it possible over visitor dp.
here is simple extension over visitor patter, which will enable visitor to visit “n” depth hierarchical object structure.
let’s define our interfaces:
interface Visitor {
void visit(final int pDepth, final TreeItem pItem);
}
interface Visitable {
void accept(final Visitor pVisitor);
}
our tree class:
class Tree implements Visitable {
private TreeItem mRootItem;
// … setter getter
class TreeItem {
private String name;
// .. Setter getter
private List
mTreeItems;
// .. Setter getter
}
public void accept(final Visitor pVisitor) {
visitRecursivlyTreeItem(0, pVisitor, mRootItem);
}
private visitRecursivlyTreeItem(int pLevel, final Visitor pVisitor, final TreeItem pItem) {
pVisitor.visit(pLevel, pItem);
for (final TreeItem item : pVisitor.getTreeItems()) {
visitRecursivlyTreeItem(pLevel + 1, pVisitor, pItem);
}
}
}
That’s all





