Thursday, December 31, 2009

Wish you a Happy New year 2010

Wish u all a prosperous and a happy new year 2010. Lets our team continue to do good jobs and accomplish lot many achievements in personal as well as career life.

Have a gr8 year guys...

Tuesday, December 22, 2009

Radio Group in GWT

May be many of you know how to create a radio group still I would like to put small comment on GWT radiobutton group ..

There is no separate RadioButton group class .. its the same RadioButton class which makes the radio button to be treated as a group or a separate radiobutton.

Only the first parameter decides whether it wil be treated as a radio button or radiobutton group.

RadioButton radio1 = new RadioButton("Group Name", "Label Name1");
RadioButton radio2 = new RadioButton("Group Name", "Label Name2");

So now two radio button belong to the same group "Group Name" ..

Monday, December 21, 2009

Lightbox- a UI feature in Javascript.

Lightbox is a terminology for kindaa off UI display in which, u click a button a new division will be opened and rest of the elements in the screen will be looking de-selected and de-highlighted.

It involves the concept of overlapping one division over another with z-index in css.



<"html"><"head">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">


<title>LIGHTBOX EXAMPLE</title>
<style>
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
padding: 16px;
border: 16px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
</style>
</head><body>
<p>This is the main content. To display a lightbox click

<a href="javascript:void(0)" onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">here</a>
<div style="display: none;" id="light" class="white_content">This is the lightbox content. <a href="javascript:void(0)" onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div>
<div style="display: none;" id="fade" class="black_overlay"></div>

</body></html>


Try this sample to achieve this simple lightbox feature.

Sunday, December 20, 2009

Anonymous functions and its usage in Javascript

Everybody knows there exists anonymous classes, but not anonymous functions.

There exists anonymous functions only in Javascript. C,C++,Java doesnot like that.
It is widely used in python,ruby,c#,Lisp,PHP...

Anonymous function doesnt have name to it.
Example.

function square(x)
{
return x*x;
}

var a = (function(x) { return x*x;})(10); //100;

Which scenario it can used
--------------------------

var request;

function init()
{
var url = 'http://ajax.googleapis.com/ajax/services/search/local?hl=en&v=1.0&rsz=large&q=pubs paris &start=0';
sendRequest(url);
url='http://www.google.com';
sendRequest(url);
}
function sendRequest(addr) {
request = new XMLHttpRequest();
request.onreadystatechange = handleResponse;
request.open("GET", addr, true);
request.send(null);
}

function handleResponse() {
if (request.readyState == 4) {
alert(request.responseText);
}
}

sendRequest() is called for two URL next to next.. Whichevers request, is served first, then global variable 'request' is updated with that response. So when the second request's response comes then it cannot take its proper value.
If u run the above snippet, u would see alert() is called only once.

url='http://www.google.com';
sendRequest(url); ----> Change this line to setTimeout("sendRequest('http://www.google.com')",3000);

No issue will be seen. This is a race condition.

Changed code :

function init()
{
var url = 'http://ajax.googleapis.com/ajax/services/search/local?hl=en&v=1.0&rsz=large&q=pubs paris &start=0';
sendRequest(url);
url='http://www.google.com';
sendRequest(url);
}

function sendRequest(addr) {

var request = new XMLHttpRequest();
request.onreadystatechange = function(){

if (request.readyState == 4) {
alert(request.responseText);
}
};
request.open("GET", addr, true);
request.send(null);
}


Make the 'request' variable local to senrequest() and introduce anonymous functions to handle the response for each request. So that a local copy of 'request' will be given to function and when the response comes each call will have its own copy.So no clash.

what is Servelet Filters and how to use it

I was writting my GWT Client and had to switch between http to https and also menupulate the request and response, I found a easier and modular way to do it through Filters ...

Thursday, December 17, 2009

Quick references for HTML Tags

Hey I found this link which has all html tags which can be used as reference while webdevelopement

Wednesday, December 16, 2009

Online materials for Servlets,GWT,Ajax,Spring framework

It has good examples for all the topics.

http://courses.coreservlets.com/Course-Materials/

J2EE handbook

Book for J2EE handbook which explains full end to end design of J2EE product.


http://www.4shared.com/file/174245064/e3b50d3f/J2EEArchitectsHandbookV100.html

Servlets & JSP pages

Found this book useful for JSP pages design and servlets.

Available in the below link.

http://www.4shared.com/file/174242380/e5ca6248/Servlets__JSP.html

Monday, December 14, 2009

Step by step approach of deploying a webapp in Eclipse.

Hello all,

I was facing many issues in bringing up a small webapp using eclipse & tomcat. I couldnt succeed.
But then i followed the step by step steps given in the java tips site and were able to deploy a successfull sample web-app.

- came to know about basics of JSP,Servlets and webapp and how it is deployed in tomcat. Please go through it if u r a started & interested in delpoying a webapp


http://www.java-tips.org/index.php?Itemid=99&id=1507&option=com_content&task=view&mosmsg=Thanks+for+your+vote!

Saturday, December 12, 2009

Etherpad b4 Google wave???

Guyz,

Shall we use(try atleast :) ) for our team for sometime this Etherpad(http://etherpad.com/) before adopting Google wave as our collab tool?

Though support gonna be for this a while only as "Google Wave" hve already acquired for their feature strengthening. But to pacify the active user base ,this gonna be open-sourced soon.So few clients ll b there built out of this code.

Check out these Usecases. link: http://etherpad.com/ep/about/product#
Atleast the last two ones ll b useful for us in future workings ..(hope so any new dev proj from us soon).

This appealed me a lot.
Wats your say?

-VS

Wednesday, December 9, 2009

Apache Tomcat Vs Apache web server

Apache Tomcat Vs Apache Web Server
sometime back i setup tortoise SVN and i used apache server for network access to repository ..i had options for http,https etc.
yesterday I saw mani ans senthil setting up Apache TOMCAT. Me and Mani were wondering what is tomcat and what is apache web server...

Here is an excerpt from Wikipedia about apache Tomcat and Apache web server

Apache Tomcat (or Jakarta Tomcat or simply Tomcat) is a servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a "pure Java" HTTP web server environment for Java code to run.

Tomcat should not be confused with the Apache web server, which is a C implementation of an HTTP web server; these two web servers are not bundled together. Apache Tomcat includes tools for configuration and management, but can also be configured by editing XML configuration files
Members of the ASF and independent volunteers develop and maintain Tomcat. Users have free access to the source code and to the binary form of Tomcat under the Apache License. The initial Tomcat release appeared with versions 3.0.x (previous releases were Sun internal releases, and were not publicly released). Tomcat 6.0.20 is the latest production quality release of the 6.0.x trunk (the branch for the 2.5 servlet specification), as of 2009.

Components of Tomcat

Tomcat version 4.x was released with Jasper (a redesigned JSP engine), Catalina (a redesigned servlet container) and Coyote (an HTTP connector).
[edit] Catalina

Catalina is Tomcat's servlet container. Catalina implements Sun Microsystems' specifications for servlet and JavaServer Pages (JSP). The architect for Catalina was Craig McClanahan.
[edit] Coyote

Coyote is Tomcat's HTTP Connector component that supports the HTTP 1.1 protocol for the web server or application container. Coyote listens for incoming connections on a specific TCP port on the server and forwards the request to the Tomcat Engine to process the request and send back a response to the requesting client.
[edit] Jasper

Jasper is Tomcat's JSP Engine. Tomcat 5.x uses Jasper 2, which is an implementation of the Sun Microsystems's JavaServer Pages 2.0 specification. Jasper parses JSP files to compile them into Java code as servlets (that can be handled by Catalina). At runtime, Jasper is able to automatically detect JSP file changes and recompile them.
[edit] Jasper 2

From Jasper to Jasper 2, important features were added:

* JSP Tag library pooling - Each tag markup in JSP file is handled by a tag handler class. Tag handler class objects can be pooled and reused in the whole JSP servlet.
* Background JSP compilation - While recompiling modified JSP Java code, the older version is still available for server requests. The older JSP servlet is deleted once the new JSP servlet has been recompiled.
* Recompile JSP when included page changes - Pages can be inserted and included into a JSP at compile time. The JSP will not only be automatically recompiled with JSP file changes but also with included page changes.
* JDT Java compiler - Jasper 2 can use the Eclipse JDT Java compiler instead of Ant and javac.

Best regards
K.Rajasekaran

Guarana UI - a jQuery-Based UI Library - NOkia WRT

Nokia WRT has come up with a new UI library called 'Guarana UI - a jQuery-Based UI Library'. Which looks attractive and good. So next widget development will be based on that library.

http://wiki.forum.nokia.com/index.php/Guarana_UI:_a_jQuery-Based_UI_Library_for_Nokia_WRT

Monday, December 7, 2009

Top 10 -2009's mobile app, web app, webservices

Please find the list of top-10 2009 mobile app, web app, webservices, and RSS feeds.
There are lot of products which we might not be aware. I came to know few good products from this results.

http://www.readwriteweb.com/best_products_2009.php

Wednesday, December 2, 2009

Search Any

For the forumnokia's 2009 callingallinnovators UK regions contest, this widget was submitted. please go through it, if you find it useful please share with your friends.FREE for download now :)) but not for longer time.

SEARCH ANY

Why SearchAny:
How many times we get stuck in a new place and call our friends to get directions to pubs, restaurants nearby and still be in an endless search. SearchAny puts an end to all this endless searches.SearchAny takes two short keywords and directs you to the place you want to go with detailed map directions. It provides you the complete addresses, phone numbers, maps. It tells you where you are by using GPS or your cellID. You can store the search result in contacts, make a call right away from SearchAny with a single button click, and update twitter status with the result. Bookmark your favorite Places and store them for fast consultation when in offline usage.

Automatic location pickup:
If you are in travel and go to a new place then you don’t need to worry to ask others about restaurants near by. Just type the category and click search, SearchAny picks your current location automatically either through GPS or with the help if Cell-ID if GPS is not supported in the device.

Search categories :
To ease the user with typing category, there is a option to select frequently searched categories from categories menu in the first screen.

Options:
Once the desired result is chosen, you get options to make a call, save the result to your phonebook, and get step by step direction to that location from anywhere with detailed shown in maps, update your twitter status with the location you are , and finally book mark it in favorite.

Favorite:
As soon as results come one can make a location added to favorite. And favorites are displayed even when phone is offline, so that users can easy access their desired location within a second. And one also remove location from favorite.

If SearchAny is there in your mobile, then forget you worries of asking friends or others to get know about categories in a new place.

Use it and utilize it.

Thanks for the help provided by my friends Senthil VS and Rajasekar.

You can download the widget from the below link. Workd for N97, 5800, express music touch phones.
http://www.4shared.com/file/223739367/640b1ce8/SearchAny.html


Some snap shots of the widget::




how to make blog listed in search engine results

I was under the impression that once you have created google's blogspot and start using, it will be automatically be picked in google search result or in blogsearch result. But it actually doesnt.

I found it very interesting, on how to make our site under search engines results, what is meta deta, how to add keywords for the sites result,

pls check this links.

http://groups.google.com/group/blogger-help/web/i-cant-find-my-blog-on-google-where-is-it?pli=1

add in srubtheweb.com

http://www.scrubtheweb.com/addurl.html


Google webmaster.
http://www.google.com/webmasters/

Tuesday, December 1, 2009