Monday, April 23, 2012

Ajax with Dojo

It is very safe to use Dojo like java script frameworks for Ajax operations since they ensure browser compatibility. We don't have to change the code based on different browsers. dojo will handle those stuff for us. Any way , If we are using such java script frameworks for Ajax operations  we must carefully choose a proper framework with wide range of browser support.

In this example I have used a very simple Servlet and a simple HTML page to demonstrate the client server model.

Friday, April 20, 2012

Browser Automation With Selenium

Selenium is a browser automation framework. it is available in many flavors such as Java , .net , python . I am interested in Java implementation of Selenium.  Selenium can be successfully used in regression automation. It provides all the necessary functionalists required to automate the browser. Such as navigating, verifying, drag and drop,  clicking , selecting..etc.

Selenium can be downloaded from here
Getting started guide

Tuesday, April 3, 2012

Log4j In Action

Logging is very important for the maintenance of  a deployed application. Just assume a situation that we deploy our application on the client systems and work on another project. After some time client reports a failure of our system. What will happen if we haven't maintained a log file! We may be in a big trouble in such situations. It may be very hard to track where the bug occurred. Because we haven't any IDE's , debuggers on deployed machine.

So it is always recommended to use a logging mechanism for large applications. Logging may be a overhead if we don't use it carefully. We can use logging inside exception handling blocks.

Monday, April 2, 2012

Dependancy Injection (Spring Note 1)

Just assume a situation where we have to develop a module that must generate different types of reports such as PDF reports, Excel reports. One of a worst design for such scenario is design classes for each report separately without any form of polymorphism. Such a design may may result in increasing coupling of the program.
example :
ExcelReport excelReport=new ExcelReport();
PDFReport pdfReport=new PDFReport();

excelReport.initialize();
excelReport.createReport();
excelReport.saveReport();

pdfReport.initialize();
pdfReport.createReport();
pdfReport.saveReport();

© kani.stack.notez 2012 | Blogger Template by Enny Law - Ngetik Dot Com - Nulis