<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ramraje.com &#187; Java Frameworks</title>
	<atom:link href="http://www.ramraje.com/ramraj/java-frameworks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ramraje.com</link>
	<description>Software Programming Blog</description>
	<lastBuildDate>Fri, 28 May 2010 17:03:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iText PDF Generator</title>
		<link>http://www.ramraje.com/java-frameworks/itext/itext-pdf-generator/</link>
		<comments>http://www.ramraje.com/java-frameworks/itext/itext-pdf-generator/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 13:51:00 +0000</pubDate>
		<dc:creator>Ramraj Edagutti</dc:creator>
				<category><![CDATA[iText]]></category>
		<category><![CDATA[Adobe PDF]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[PDF Generation]]></category>

		<guid isPermaLink="false">http://www.ramraje.com/2008/09/itext-pdf-generator/</guid>
		<description><![CDATA[Here I am going to explain how to creat a simple pdf file with java pdf library called iText. There are other well known similar frameworks like Apache cocoon, and PDFBox which are good and mature. But I choose to use iText, because of its popularity and support, and infact it is very good for [...]]]></description>
			<content:encoded><![CDATA[<p>Here I am going to explain how to creat a simple pdf file with java pdf library called iText. There are other well known similar frameworks like Apache cocoon, and PDFBox which are good and mature. But I choose to use iText, because of its popularity and support, and infact it is very good for pdf generation from scratch.<span id="more-54"></span></p>
<p>iText generates pdf dynamically, ideally this framework is very useful for developer who wants to enhance thier web application developement with dyanamic pdf generation based on user inputs on the fly.</p>
<p>Using iText, you can able to generate, maniulate and parse the pdf file. And, please remember, this is not an end user tool to view pdf files. To view the generated pdf files you should have installed Acrobat PDF software from <a title="Adode systems" href="http://www.adobe.com" target="_blank">Adobe Systems</a>.</p>
<p>Enough said, we will get into the code and make our hands diryt, okay.<br />
Download latest iText jar file <a href="http://prdownloads.sourceforge.net/itext/iText-2.1.3.jar">Click here</a> , and put it in your project&#8217;s classpath.<br />
First thing, you need is to create document object</p>
<blockquote><p>com.lowagie.text.Document document = new com.lowagie.text.Document();</p></blockquote>
<p>Second, create PDFWriter object by passing document, and give pdf file name that you want to create</p>
<blockquote><p>com.lowagie.text.pdf.PdfWriter.PdfWriter.getInstance(document, new<br />
FileOutputStream(&#8220;HelloWorld.pdf&#8221;));</p></blockquote>
<p>Third, open the document to start writing onto it</p>
<blockquote><p>document.open();</p></blockquote>
<p>Fourth, add a paragraph to your document</p>
<blockquote><p>document.add(new Paragraph(&#8220;Hello Ramraj&#8230;.&#8221;));</p></blockquote>
<p>Finally, you need to close the document</p>
<blockquote><p>document.close();</p></blockquote>
<blockquote style="text-align: left;"><p>That&#8217;s it, It&#8217;s that simple to create pdf using iText.</p></blockquote>
<p>Probably some time later I will attach the full source code here:-)</p>
<p>Enough staying at office, I gotta go home, bye</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramraje.com/java-frameworks/itext/itext-pdf-generator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Junit friends DBUnit and Spring test framework :-)</title>
		<link>http://www.ramraje.com/java-frameworks/spring-framework/junit-friends-dbunit-and-spring-test-framework/</link>
		<comments>http://www.ramraje.com/java-frameworks/spring-framework/junit-friends-dbunit-and-spring-test-framework/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 00:42:00 +0000</pubDate>
		<dc:creator>Ramraj Edagutti</dc:creator>
				<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[DBUnit]]></category>
		<category><![CDATA[JUnit]]></category>
		<category><![CDATA[Spring Test framework]]></category>

		<guid isPermaLink="false">http://www.ramraje.com/2008/08/junit-friends-dbunit-and-spring-test-framework/</guid>
		<description><![CDATA[Now-a-days TDD(Test driven development) is defacto standard in software developemnt. Don&#8217;t know what is TDD? It is all about writing unit test cases for your business logic or for your data access layer a.k.a DAO layer before you actually implement end-to-end implementation logic. 
I have been writing unit test cases for more than 2 and [...]]]></description>
			<content:encoded><![CDATA[<p>Now-a-days TDD(Test driven development) is defacto standard in software developemnt. Don&#8217;t know what is TDD? It is all about writing unit test cases for your business logic or for your data access layer a.k.a DAO layer before you actually implement end-to-end implementation logic. <span id="more-53"></span></p>
<p>I have been writing unit test cases for more than 2 and half years, and generally I use Junit framework. Of course, JUnit is a standard across java space for unit testing.</p>
<p>Junit is simple to implement unit test framework for service/business logic. when it comes to database integration testing you may need to insert/delete lots of data in database for to initialize your test data. For this to acheive you need to write crude native database insert scripts and run in setup method or you may prefer writing text/xml file with the required data and read the files using some other api and then insert the data in database. All these things you have to manage yourself, and may requires you to write lots of bipolarate jdbc code, more complexity is involved when you use junit for integration tesitng.</p>
<p>Here comes spring test framework and DBUnit to simplify Junit and adds few usefull features which will ease the integration testing. These two frameworks are superset of Junit, means they extend junit and adds additional features.</p>
<p>DBUnit features</p>
<ul>
<li>Manages the insert/delete data from database (you just need to provide data set xml file)</li>
<li>DBUnit helps you preparing data-set file, so no manual work <img src='http://www.ramraje.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>Exports tables in order based on foreign key constraint</li>
</ul>
<p>Spring test framework features</p>
<ul>
<li>Provides dependency injection in your unit test class( you just need to load your spring config files)</li>
<li>Automatic transactions applied to all the test* methods, so need to write transaction code.</li>
<li>Automatic rollback after unit test execution completed.</li>
</ul>
<p>Your comments are appreciated. Have a good day <img src='http://www.ramraje.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <img src='http://www.ramraje.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramraje.com/java-frameworks/spring-framework/junit-friends-dbunit-and-spring-test-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
