Monday, April 18, 2011

Must know java Concepts

Annotation  - Annotation is one of the features which (are being and) would be extensively used in various java frameworks and technologies.  Below links provide overview of Annotation -

http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html
http://download.oracle.com/javase/1.5.0/docs/guide/language/annotations.html
http://download.oracle.com/javase/6/docs/technotes/guides/language/annotations.html
http://www.developer.com/java/other/article.php/3556176/An-Introduction-to-Java-Annotations.htm
http://www.programmingforfuture.com/2008/11/self-descriptive-coding-in-java.html
http://www.java2s.com/Code/Java/Language-Basics/JavaAnnotationAnnotationandReflection.htm

Annotation in EJB- http://www.oracle.com/technetwork/articles/javaee/jpa-137156.html
Metadata Annotation - http://download.oracle.com/javaee/6/tutorial/doc/girdd.html
Java ee 5 Annotation - http://download.oracle.com/javaee/5/tutorial/doc/idx-1.html

Wednesday, April 13, 2011

Using POSIX (Portable Operating System Interface [for Unix])



POSIX (Portable Operating System Interface [for Unix])  - http://en.wikipedia.org/wiki/POSIX

Cygwin - Cygwin is -
  • a collection of tools which provide a Linux look and feel environment for Windows.
  • a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality. 
more details for cygwin can be found in the below link - http://www.cygwin.com/


Setting path in Cygwin - http://cygwin.com/faq-nochunks.html#faq.using.path
Converting windows & unix paths - http://cygwin.com/faq-nochunks.html#faq.using.converting-paths
Why not install Cygwin in c - http://cygwin.com/faq-nochunks.html#faq.setup.c
Updating home variable - http://cygwin.com/faq-nochunks.html#faq.setup.home
Registry information of cygwin - http://cygwin.com/faq-nochunks.html#faq.setup.registry
Checking Cygwin version - http://cygwin.com/faq-nochunks.html#faq.what.version
Accessing drives using Cygwin - http://cygwin.com/faq-nochunks.html#faq.using.accessing-drives
Copy and paste in Cygwin - http://cygwin.com/faq-nochunks.html#faq.using.copy-and-paste
How does Cygwin work - http://cygwin.com/faq-nochunks.html#faq.api.everything
Updating log on information - http://cygwin.com/faq-nochunks.html#faq.setup.name-with-space

Cygwin/X "X Windows - on Windows!" -  More info about it can be found at below link - http://x.cygwin.com/
http://x.cygwin.com/screenshots/

Wednesday, April 6, 2011

Useful links for creating client side (web-browser) utilities

Links for tutorial -
Java Script -
http://www.devguru.com/technologies/JavaScript/home.asp
                     
http://krook.org/jsdom/
Links providing re-usable code


http://www.javascriptkit.com/cutpastejava.shtml
http://www.dynamicdrive.com/

Creating Sliding form effects using J-Query -
http://www.dynamicdrive.com/dynamicindex16/formwizard.htm

Dom drag and drop script -
http://www.dynamicdrive.com/dynamicindex11/domdrag/

Imbeding Google Map Selector-
http://www.dynamicdrive.com/dynamicindex11/googlemapselector.htm

Creating pi graph-
http://www.dynamicdrive.com/dynamicindex11/piegraph.htm

Creating line graph-
http://www.dynamicdrive.com/dynamicindex11/linegraph.htm

Tic Tak Toe-
http://www.dynamicdrive.com/dynamicindex12/tictactoe.htm

Zooming the image-
http://www.dynamicdrive.com/dynamicindex4/featuredzoomer.htm

gAjax RSS Pausing Scroller
http://www.dynamicdrive.com/dynamicindex18/gajaxpausescroller.htm

Performing get and post from Ajax-
http://www.javascriptkit.com/dhtmltutors/ajaxgetpost.shtml

Using Object detection to sniff out different browsers -
http://www.javascriptkit.com/javatutors/objdetect3.shtml

AutoSelect Increment Search
http://www.codeproject.com/KB/scripting/Auto_select_Dropdown.aspx

Dojo UI Widgets - 
http://dojotoolkit.org/widgets

Field selection or identifying the start/end position in text area
http://laboratorium.0xab.cd/jquery/fieldselection/0.1.0/test.html
http://web.archive.org/web/20080214051356/http://www.csie.ntu.edu.tw/~b88039/html/jslib/caret.html

Making the webpages non copiable
http://javascript.internet.com/page-details/disable-text-selection.html

Adding encrypt or decrypt capability in web app using java Script  -
http://javascript.about.com/library/blencrypt.htm

Implementing various widgets using Dojo - 
Tree - http://dojotoolkit.org/reference-guide/dijit/Tree.html
Grids & Chart  -http://dojotoolkit.org/grids-charts
Various Widgets - http://download.dojotoolkit.org/release-1.6.1/dojo-release-1.6.1/dijit/themes/themeTester.html

Other useful information -
  1. Changing the mouse cursor type in runtime using javascript
  2. Changing the mouse cursor type using CSS
 

Sunday, April 3, 2011

Setting up development environment

Spring Tool Suite - Spring tool suite is eclipse based IDE, which is 100% open source comes with integrated plugins to easy development of spring based apps, m2 eclipse and tomcat optimized for spring apps. As underlying platform is eclipse,one can integrate any plugins that they were fond of using in eclipse.
Download - http://www.springsource.org/sts
http://www.theserverside.com/news/thread.tss?thread_id=67452


Useful plugins -
MoreUnit - http://marketplace.eclipse.org/content/moreunit
Eclemma - http://marketplace.eclipse.org/content/eclemma-java-code-coverage
junithelper - http://code.google.comS/p/junithelper/
sql explorer - http://www.sqlexplorer.org/
               http://www.sqlexplorer.org/screenshots.php
Eclipse Bulk Import -http://code.nomad-labs.com/eclipse-bulk-import/
m2eclipse -http://marketplace.eclipse.org/content/maven-integration-eclipse
AnyEdit Tools - http://marketplace.eclipse.org/content/anyedit-tools
Spring IDE - http://marketplace.eclipse.org/content/spring-ide
Subclipse - http://marketplace.eclipse.org/content/subclipse
Eclipse Color Theme - http://marketplace.eclipse.org/content/eclipse-color-theme
Eclipse Metrics - http://marketplace.eclipse.org/content/eclipse-metrics
Tane (refactoring) - http://marketplace.eclipse.org/content/tane-eclipse-refactorings
Infinitest  - http://marketplace.eclipse.org/content/infinitest
Struts Tools - http://market.eclipsesource.com/yoxos/node/org.jboss.tools.struts_feature.feature.group
JBoss Tools (Helios - jsf, hibernate, Freemarker, ESB) -http://marketplace.eclipse.org/content/jboss-tools-1
WindowBuilder Pro GUI Designer -http://marketplace.eclipse.org/content/windowbuilder-pro-gui-designer
jd- eclipse (java decompiler) - http://java.decompiler.free.fr/?q=jdeclipse 
Google Web Toolkit SDK 2.0.0, Google Webtoolkit(GWT) Tooling, Google Plugin for Eclipse 2.2  - These are plugins for GWT, available at eclipse market places
Groovy eclipse plugin - http://groovy.codehaus.org/
Springsource tool suits

 JDT Decompiler


Selecting the jvm to be used to run eclipse -
 
eclipse -vm "C:\Program Files\Java\jdk1.7.0_06\bin\javaw"

It's generally a good idea to explicitly specify which Java VM to use when running Eclipse. This is achieved with the "-vm" command line argument as illustrated above. If you don't use "-vm", Eclipse will look on the O/S path. When you install other Java-based products, they may change your path and could result in a different Java VM being used when you next launch Eclipse.

Providing proxy settings in Helios- Settings can be edited at the following path - Windos -> Preferences  -> General -> Network Connections
Firefox - As a developer you will need the following add Ons - Fastest Fox, Firebug, IE Tab, IE View, iMacros , YSlow, JavaScript Debugger, View Source Chart,Web Developer,Toggle Web Developer Toolbar,ColorZilla,FlashFirebug,XPath Checker (For xpath with name space),FirePath (Xpath without name space),fox tab, themes menu, MacOSX Theme,printpdf, save as pdf., memory fox, Easy YouTube Video Downloader 6.4

MS DOS - Command to view the value of a system variable - echo %jvariable_name%
    Command to set the value of a system variable  - set  variable_name  "variable_value"
    Command to view the value of all the variables  - set

Tools - Fiddler (Tool to log Http(s) traffic), windows grep (To use grep in windows), sdedit (Tool to create sequence diagram)

Useful info -
  1. Converting html pages to PDF
  2. Creating eclipse templates of toString, equals, hashCode and compareTo implementation using org.apache.commons.lang
  3. Identifying whether RAM upgrade is needed


Friday, April 1, 2011

Creating mock objects for Test Driven Development

EasyMock - EasyMock provides Mock Objects for interfaces (and objects through the class extension) by generating them on the fly using Java's proxy mechanism. Due to EasyMock's unique style of recording expectations, most refactorings will not affect the Mock Objects. So EasyMock is a perfect fit for Test-Driven Development.

http://easymock.org/index.html
http://easymock.org/EasyMock3_0_Documentation.html

Mockito - Mockito library enables mocks creation, verification and stubbing.

http://mockito.org/
http://docs.mockito.googlecode.com/hg/org/mockito/Mockito.html

JMock- JMock is a library that supports test-driven development of Java code with mock objects.

http://www.jmock.org/
http://www.jmock.org/cheat-sheet.html
http://www.jmock.org/cookbook.html