<?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>Regular Geek &#187; java</title>
	<atom:link href="http://regulargeek.com/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://regulargeek.com</link>
	<description>Where programming, the internet and social media collide.</description>
	<lastBuildDate>Mon, 06 Sep 2010 12:18:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<cloud domain='regulargeek.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Simple Tips For Clean Memory Management In Java</title>
		<link>http://regulargeek.com/2010/02/04/simple-tips-for-clean-memory-management-in-java/</link>
		<comments>http://regulargeek.com/2010/02/04/simple-tips-for-clean-memory-management-in-java/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 12:45:27 +0000</pubDate>
		<dc:creator>Rob Diana</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Garbage collection]]></category>
		<category><![CDATA[Memory management]]></category>

		<guid isPermaLink="false">http://regulargeek.com/?p=1465</guid>
		<description><![CDATA[The other day I was asked how much I knew about Java garbage collection. I am not a performance guru, so I admitted that I knew very little, basically only that it works. As the conversation continued, I realized that while I did not know much about the internals of the garbage collection mechanism, I [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was asked how much I knew about <a class="zem_slink" title="Java (programming language)" rel="homepage" href="http://java.sun.com">Java</a> <a class="zem_slink" title="Garbage collection (computer science)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29">garbage collection</a>. I am not a performance guru, so I admitted that I knew very little, basically only that it works. As the conversation continued, I realized that while I did not know much about the internals of the garbage collection mechanism, I did know a few things what it did.</p>
<p>First, a quick refresher on how garbage collection works in theory. You continuously create objects in Java, but at some point the memory needs to be cleaned up. Generally, if you create objects within a method, those objects may be garbage collected when the method has completed. Another important point is that if you keep passing objects around to various other classes and methods, those objects will only be garbage collected when there are no longer any references to them. Sometimes the garbage collector will clean more aggressively if you start using large amounts of memory as well. Granted, this is a simplification of the way garbage collection really works, but it gives us some basic ideas on how to keep your java application running smoothly without those weird OutOfMemory errors.</p>
<p><strong>Do not create a lot of objects</strong>. This sounds silly, but a surprising number of issues can be resolved by limiting the number of objects that get created. Think of it a different way. If we have a reporting application, are you going to create objects for every row of data in a report? If your application has a lot of reports each having thousands of rows, that is a lot of objects to create.</p>
<p><strong>Create objects only when you need them</strong>. If you do need to hold onto a lot of data, does it make sense to create thousands of objects? Can you just pass around a list of ids or a small hashmap? This is similar to the concepts of <a class="zem_slink" title="Lazy loading" rel="wikipedia" href="http://en.wikipedia.org/wiki/Lazy_loading">lazy loading</a> data from a database when you are dealing with persistence frameworks. Why load an entire object when just the id will suffice?</p>
<p><strong>Close all files and streams</strong>. This is probably one of the most common issues when it comes to <a class="zem_slink" title="Memory management" rel="wikipedia" href="http://en.wikipedia.org/wiki/Memory_management">memory management</a> in Java. Sometimes you just miss closing the file because you are more concerned with the contents of the file. There are also times when your error handling takes a different path than the normal code and thus the file stays open. Just remember, finally is your friend.</p>
<p><strong>Do you copy lists or pass lists?</strong> This is a harder problem to deal with. If your lists are long and filled with large objects, you may want to avoid the overhead of copying the data in the list. However, if you continuously pass lists around, you are maintaining several references to the objects in that list. This could mean that those objects will not be garbage collected.</p>
<p>These are just some simple tips for clean memory management. In some cases, these issues are easy to avoid. In other cases, the amount of cleanup you need to do is rather annoying and easy to skip. A lot of frameworks, like Spring, will do a lot of the basic cleanup for you, especially in the areas of persistence. The real key is to keep this as simple as possible and to clean up as you go. Just because Java has automatic garbage collection does not mean you should make more trash.</p>
<div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/a333ae23-cda3-4f79-9d39-3db7fb28e5be/"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=a333ae23-cda3-4f79-9d39-3db7fb28e5be" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>


<p>Related posts:<ul><li><a href='http://regulargeek.com/2009/04/17/tools-for-unit-testing-java-web-applications/' rel='bookmark' title='Permanent Link: Tools For Unit Testing Java Web Applications'>Tools For Unit Testing Java Web Applications</a></li>
<li><a href='http://regulargeek.com/2007/12/12/sometimes-you-have-to-use-visual-basic/' rel='bookmark' title='Permanent Link: Sometimes you have to use Visual Basic'>Sometimes you have to use Visual Basic</a></li>
<li><a href='http://regulargeek.com/2009/03/19/simple-advice-for-learning-a-programming-language/' rel='bookmark' title='Permanent Link: Simple Advice For Learning A Programming Language'>Simple Advice For Learning A Programming Language</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://regulargeek.com/2010/02/04/simple-tips-for-clean-memory-management-in-java/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Can You Defend Your Technical Decisions?</title>
		<link>http://regulargeek.com/2009/12/07/can-you-defend-your-technical-decisions/</link>
		<comments>http://regulargeek.com/2009/12/07/can-you-defend-your-technical-decisions/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 13:17:20 +0000</pubDate>
		<dc:creator>Rob Diana</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[decisions]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[why]]></category>

		<guid isPermaLink="false">http://regulargeek.com/?p=1310</guid>
		<description><![CDATA[Some days, you have to search the news and various sites to find something interesting to write about. Other days, the topic appears in your email. Today, there was a blog post and an email that just fit nicely together. The email asked what being a software engineer was like, and I will answer that [...]]]></description>
			<content:encoded><![CDATA[<p>Some days, you have to search the news and various sites to find something interesting to write about. Other days, the topic appears in your email. Today, there was a blog post and an email that just fit nicely together. The email asked what being a software engineer was like, and I will answer that in a full post later this week but the blog post goes into one of those things all software engineers need to do. The post is about <a href="http://www.socialmediaexplorer.com/2009/12/07/the-most-important-question-is-why/" target="_blank">&#8220;The Most Important Question, Why?&#8221;</a> and comes from <a href="http://twitter.com/jasonfalls" target="_blank">Jason Falls</a> at <a href="http://www.socialmediaexplorer.com/" target="_blank">Social Media Explorer</a>. Jason is specifically talking about social media and business, and this quote should resonate with a lot of people:</p>
<blockquote><p>Too many times, especially when it comes to social media and technology, businesses flock to the hot new trend or the shiny new object with delusions of grandeur. Two years ago, clients would come to me and say, “I want a blog.” Today, they say, “I want a Facebook page,” or “I want a Twitter account.” My answer has always been the same: Why? Seldom can answer that question.</p></blockquote>
<p>As a software engineer, you need to ask yourself why almost every day. A software engineer needs to make technical decisions at almost every step in the development process. When the project is first in design, we may determine that the software will be developed in <a class="zem_slink" title="Java (programming language)" rel="homepage" href="http://java.sun.com">Java</a> and deployed to Apache and Tomcat servers. Why? Can you defend your reasons for picking Java and Tomcat? Does the application need to be deployed into a web infrastructure or does it make more sense as a desktop application? Can you defend your decision against someone that thinks the application should be written in Ruby?</p>
<p>In many cases, engineers may take the lazy route and just make decisions based on what they are comfortable with. In my case, that likely means Java on Tomcat. By taking the comfortable route, you may miss opportunities to make a better choice, or even learn new things.</p>
<p>In addition to the initial platform choices, there are several other things that need to be decided. If we are writing a web application, do we use traditional servlets, <a href="http://struts.apache.org/" target="_blank">Struts</a>, <a href="http://www.springframework.org" target="_blank">Spring</a> or some other framework? This is when the decisions start to get really interesting. Spring may be the best choice for your organization, but are your developers familiar with Spring? Maintenance is a significant concern for any development organization. If your developers can not maintain an application due to a lack of technical knowledge, you have failed as an organization. Sometimes, you may be able to get training on the newer technology, but other times you may have to choose the older but known technology. These decisions get fairly hairy as well because people tend to feel very strongly about their favorite frameworks.</p>
<p>Once the core framework is chosen, the persistence framework needs a direction. Sometimes this is guided by your core framework, but frameworks like Spring allow you to integrate almost anything. With Spring, you can easily integrate <a href="http://www.hibernate.org/" target="_blank">Hibernate</a>, <a href="http://ibatis.apache.org/" target="_blank">iBatis</a> or standard <a class="zem_slink" title="Java Database Connectivity" rel="wikipedia" href="http://en.wikipedia.org/wiki/Java_Database_Connectivity">JDBC</a>. You can also use <a href="http://java.sun.com/developer/technicalArticles/J2EE/jpa/" target="_blank">JPA</a> with any of those technologies as the JPA provider. Why you choose one persistence framework over another is highly dependent upon your organization and what you plan to do with your persistence layer. Hibernate is really good for straightforward data models that can easily be mapped to Java domain objects. iBatis allows you to customize your <a class="zem_slink" title="SQL" rel="wikipedia" href="http://en.wikipedia.org/wiki/SQL">SQL</a> fairly easily and allows great flexibility in your SQL. JDBC allows you to focus on the actual SQL without any of the quirks of the frameworks. JPA is considered the future of Java persistence, so it is a good technology to start working with.</p>
<p>This is really just the beginning of the decisions made on a project as well. There are various design decisions that are made every day that typically do not get questioned until a problem arises. You may be able to save yourself some time by questioning all of your decisions. Did you make the decision based on sound reasoning or did you make the same decision as you did last time because it is simpler to keep the same direction? Can you answer why? More importantly, can you explain why to your fellow engineers?</p>
<div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/9e0bdcbb-7b8a-4617-8ae4-951e484ef2cf/"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=9e0bdcbb-7b8a-4617-8ae4-951e484ef2cf" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>


<p>Related posts:<ul><li><a href='http://regulargeek.com/2008/01/23/10-questions-to-ask-when-choosing-a-framework/' rel='bookmark' title='Permanent Link: 10 Questions to Ask When Choosing a Framework'>10 Questions to Ask When Choosing a Framework</a></li>
<li><a href='http://regulargeek.com/2009/08/11/vmware-gets-the-source-of-spring/' rel='bookmark' title='Permanent Link: VMware Gets The Source Of Spring'>VMware Gets The Source Of Spring</a></li>
<li><a href='http://regulargeek.com/2007/12/17/top-10-tools-for-java-development/' rel='bookmark' title='Permanent Link: Top 10 tools for java development'>Top 10 tools for java development</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://regulargeek.com/2009/12/07/can-you-defend-your-technical-decisions/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>In A Surprising Ending, Oracle Buys Sun</title>
		<link>http://regulargeek.com/2009/04/21/in-a-surprising-ending-oracle-buys-sun/</link>
		<comments>http://regulargeek.com/2009/04/21/in-a-surprising-ending-oracle-buys-sun/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 12:03:21 +0000</pubDate>
		<dc:creator>Rob Diana</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[Sun Microsystems]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://regulargeek.com/?p=599</guid>
		<description><![CDATA[Image via CrunchBase By now you have heard that Oracle bought Sun. I did not want to write about it yesterday as I wanted to sit and think about the effect this has on anything Sun related. There is some good high-level business analysis from Reuters as well. There is one important quote from that [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img">
<div>
<dl class="wp-caption alignright">
<dt class="wp-caption-dt"><a href="http://www.crunchbase.com/company/oracle"><img title="Image representing Oracle Corporation as depic..." src="http://www.crunchbase.com/assets/images/resized/0001/7825/17825v1-max-450x450.png" alt="Image representing Oracle Corporation as depic..." /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution">Image via <a href="http://www.crunchbase.com">CrunchBase</a></dd>
</dl>
</div>
</div>
<p>By now you have heard that <a href="http://www.centernetworks.com/oracle-to-acquire-sun-for-74-billion" target="_blank">Oracle bought Sun</a>. I did not want to write about it yesterday as I wanted to sit and think about the effect this has on anything <a href="http://www.sun.com" target="_blank">Sun</a> related. There is some good <a href="http://www.reuters.com/article/technologyNews/idUSN2038153320090421?sp=true" target="_blank">high-level business analysis from Reuters</a> as well. There is one important quote from that article that needs sharing:</p>
<blockquote><p>Sun was more comfortable striking a deal with Oracle because the two operate complementary rather than overlapping businesses, and antitrust roadblocks are less likely.</p></blockquote>
<p>This is probably the most significant difference between an <a href="http://www.oracle.com" target="_blank">Oracle</a> and <a class="zem_slink" title="IBM" rel="homepage" href="http://www.ibm.com">IBM</a> deal for Sun. This deal also gets Oracle into the hardware game without having to buy a lesser player. However, the software side of this deal is much more interesting.</p>
<h3>Java</h3>
<p>So, what happens to Java? Hopefully nothing. The JCP exists in order to take real ownership out of the hands of one entity anyway. Oracle also has a lot of interest in keeping Java alive and well. We may see a renewed push for all things data related in Java now that Oracle is a much more important player in that space.</p>
<h3><span class="zem_slink">NetBeans</span></h3>
<p>Oracle already has a tool called <a class="zem_slink" title="JDeveloper" rel="homepage" href="http://www.oracle.com/technology/products/jdev/index.html">JDeveloper</a> that technically competes with <a href="http://www.netbeans.org/" target="_blank">NetBeans</a>. Up until recently, both tools were considered terrible by many people with only Eclipse and <a class="zem_slink" title="IntelliJ IDEA" rel="homepage" href="http://www.jetbrains.com/idea/">IntelliJ</a> considered as decent java development environments. However, the recent versions of NetBeans have been reviewed well, so Oracle could have upgraded their java tools as a bonus.</p>
<h3><a class="zem_slink" title="MySQL" rel="homepage" href="http://www.mysql.com">MySQL</a></h3>
<p>This is the big question in this deal. MySQL is used almost everywhere as a free alternative to the expensive commercial <a class="zem_slink" title="Relational database" rel="wikipedia" href="http://en.wikipedia.org/wiki/Relational_database">RDBMS</a>. MySQL is used as the backbone of <a class="zem_slink" title="WordPress" rel="homepage" href="http://wordpress.org">WordPress</a> and many internet sites as well. Is there a danger that Oracle will neglect MySQL? Absolutely. Will that really happen? Absolutely not.</p>
<p>Oracle purchased an interesting business with MySQL. They can keep it open source, add on &#8220;premium&#8221; features that enterprise customers may want, and eventually push for upgrades to their enterprise offering of Oracle. In addition, they get some nice consulting and services deals out of this as well. If anything, this just makes Oracle&#8217;s database position much stronger. They have always had a problem getting smaller businesses to run on Oracle, and now they have something that almost anyone can run.</p>
<p>The main problem with Oracle buying MySQL is that there will definitely be work on a &#8220;more open source&#8221; version of MySQL. My understanding is that a fork of MySQL was started a while ago, but with Oracle now owning it, I am assuming that people will put more effort in an open source offering. I call this a problem because it just means that there will be yet another choice in the database game, and it is likely to confuse things a bit.</p>
<h3>Final Words</h3>
<p>Oracle is a big winner with this deal, mainly because of the hardware they have always coveted. However, there are two jewels in this deal, MySQL and the cloud services. I already talked about MySQL, but the cloud services that Sun has mentioned recently will be a big bonus for Oracle. Oracle is already working with cloud providers to have Oracle as a data storage choice, so owning their own cloud offering could be huge for them. They have always wanted an entire stack offering from hardware to database and middleware. Now they can offer that, and soon offer it in the form of cloud services. Oracle has just positioned themselves as a major player for the next few years.</p>
<div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/0132884b-3599-443f-a137-f19fe20a6224/"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=0132884b-3599-443f-a137-f19fe20a6224" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>


<p>Related posts:<ul><li><a href='http://regulargeek.com/2009/03/18/is-sun-finally-getting-bought-by-ibm/' rel='bookmark' title='Permanent Link: Is Sun Finally Getting Bought By IBM?'>Is Sun Finally Getting Bought By IBM?</a></li>
<li><a href='http://regulargeek.com/2009/05/05/why-are-we-worried-about-cloud-lock-in/' rel='bookmark' title='Permanent Link: Why Are We Worried About Cloud Lock-In?'>Why Are We Worried About Cloud Lock-In?</a></li>
<li><a href='http://regulargeek.com/2009/02/14/relational-databases-run-the-world/' rel='bookmark' title='Permanent Link: Relational Databases Run The World'>Relational Databases Run The World</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://regulargeek.com/2009/04/21/in-a-surprising-ending-oracle-buys-sun/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tools For Unit Testing Java Web Applications</title>
		<link>http://regulargeek.com/2009/04/17/tools-for-unit-testing-java-web-applications/</link>
		<comments>http://regulargeek.com/2009/04/17/tools-for-unit-testing-java-web-applications/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 12:12:58 +0000</pubDate>
		<dc:creator>Rob Diana</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[cactus]]></category>
		<category><![CDATA[canoo webtest]]></category>
		<category><![CDATA[cobertura]]></category>
		<category><![CDATA[dbunit]]></category>
		<category><![CDATA[htmlunit]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[JUnit]]></category>
		<category><![CDATA[jwebunit]]></category>
		<category><![CDATA[Mock object]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[struts]]></category>
		<category><![CDATA[testng]]></category>
		<category><![CDATA[Unit testing]]></category>
		<category><![CDATA[watij]]></category>

		<guid isPermaLink="false">http://regulargeek.com/?p=591</guid>
		<description><![CDATA[As a java developer, I write unit tests all the time. There are a lot of ways to do this, but sometimes unit testing becomes difficult. This could be because you need to test a Struts action or you do not want your unit tests to hit your database. So, the question is what tools [...]]]></description>
			<content:encoded><![CDATA[<p>As a java developer, I write unit tests all the time. There are a lot of ways to do this, but sometimes unit testing becomes difficult. This could be because you need to test a <a class="zem_slink" title="Apache Struts" rel="homepage" href="http://struts.apache.org/1.x/">Struts</a> action or you do not want your unit tests to hit your database. So, the question is what tools can you use for testing java web applications? This is not meant as a complete and thorough overview, just some of the tools I know of or have looked into at some time. In many cases, you will find that your testing code is very repetitive, so you may end up building frameworks on top of these frameworks. I am sure I missed something or maybe even your favorite, so just leave me a comment.</p>
<p><strong>Basic Java Testing &#8211; </strong><a href="http://junit.org/" target="_blank">JUnit</a> and <a href="http://testng.org/" target="_blank">TestNG</a> are the most popular tools for basic java unit testing. JUnit typically has a small advantage as it has been around longer and is included with most packages of Eclipse. However, I do not think one is really better than the other, they are just different.</p>
<p><strong>Mock Objects</strong> &#8211; <a href="http://easymock.org" target="_blank">EasyMock</a> and <a href="http://www.jmock.org/" target="_blank">jMock</a> are popular mock objects frameworks. Sometimes you have to simulate the way another system works, and mock objects are perfect for this. You can even create your own mock object, but the frameworks make it easy to avoid extra code.</p>
<p><strong>Database Interaction</strong> &#8211; <a href="http://www.dbunit.org" target="_blank">DBUnit</a> is really the only decent framework I have seen. It allows you to insert data before the test is run and cleans up after the test is complete. However, capturing the appropriate data for a test is not simple for anything but the most trivial applications.</p>
<p><strong>User Interface Testing</strong> &#8211; UI testing is notoriously difficult and many applications skip it entirely. If you are testing your generated html, you will want to look at the following tools and determine which best suits your needs. This is a special case, as there is no &#8220;one true way&#8221; to test the user interface. These are all free tools as I am a fan of keeping things as cheap as possible if the tools are good enough.</p>
<ul>
<li><a href="http://seleniumhq.org/" target="_blank">Selenium</a> &#8211; Maybe the most complete package of the bunch and supports testing in IE, FireFox and Safari. Your unit tests are written in java, so you just need to learn the API. They also have interesting server options where you can run your tests across servers. You can even record tests using a FireFox add-on.</li>
<li><a href="http://webtest.canoo.com" target="_blank">Canoo WebTest</a> &#8211; This is another framework that can record tests with a FireFox add-on. The tests for WebTest are typically written in xml files. This gives you the option to build a library of fragments of functionality to include in various tests. You can also write your tests in Groovy or use the Java API directly. These can also be run directly from within Ant.</li>
<li><a href="http://watij.com/" target="_blank">Watij</a> &#8211; This is a port of the popular Ruby testing framework, Watir. The tests are written in Java using their API. They also include <a class="zem_slink" title="BeanShell" rel="homepage" href="http://www.beanshell.org/">BeanShell</a> so that you can interactively test your code. This is a really interesting option if you are not sure what a unit test should look like initially.</li>
<li><a href="http://jwebunit.sourceforge.net/" target="_blank">JWebUnit</a> &#8211; This is more of a meta-framework, where it can build upon <a class="zem_slink" title="HtmlUnit" rel="homepage" href="http://htmlunit.sourceforge.net/">HtmlUnit</a> or Selenium. HtmlUnit is fairly good by itself, but sometimes a framework is just too low-level for some people or people find that they keep doing the same things and decide to build upon the framework. There is one problem with JWebUnit, the documentation is very sparse, so the learning curve ciould be problematic.</li>
<li><a href="http://jakarta.apache.org/cactus/index.html" target="_blank">Cactus</a> &#8211; This is another meta-framework, but this is from Apache. It is meant as a wrapper for testing an entire application from basic java testing, servlet testing and down to the user interface testing. Due to this meta concept, the documentation can be a bit vague. However, I have heard good things from those people that spent the time to learn more. Disappointingly, I have not had the time to dive into it much.</li>
</ul>
<p>There are a lot of other tools out there as well. <a href="http://www.fitnesse.org/" target="_blank">FitNesse</a> is very popular, but it takes a very distinct approach to how unit tests are built. For Struts applications, there is a framework called <a href="http://strutstestcase.sourceforge.net/">StrutsTestCase</a> that is immensely helpful as well. For a big list of testing and related software, take a look at <a href="http://xprogramming.com/software.htm" target="_blank">XProgramming.com</a>. They list testing frameworks for almost every language. Lastly, it is always a good idea to know how well your software is tested. This is not a question of whether all of your tests pass, but how much of the code is actually tested. My favorite test code coverage tool is <a href="http://cobertura.sourceforge.net/" target="_blank">Cobertura</a>. It is fairly simple to use and the reports are generated in a similar manner to how JUnit generates reports.</p>
<p>So, if you know of a good free java testing tool, drop me a note in the comments. Sometimes a good tool may not be getting enough publicity or I may not have had time to look at it. In any case, keep testing until you have good test coverage. And remember the testing mantra, &#8220;Red, Green, Refactor&#8221; <img src='http://regulargeek.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/c780b124-11b1-46c0-8ae6-8f951aee29fe/"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=c780b124-11b1-46c0-8ae6-8f951aee29fe" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>


<p>Related posts:<ul><li><a href='http://regulargeek.com/2007/12/17/top-10-tools-for-java-development/' rel='bookmark' title='Permanent Link: Top 10 tools for java development'>Top 10 tools for java development</a></li>
<li><a href='http://regulargeek.com/2009/06/12/how-much-testing-is-enough/' rel='bookmark' title='Permanent Link: How Much Testing Is Enough?'>How Much Testing Is Enough?</a></li>
<li><a href='http://regulargeek.com/2009/07/14/what-does-your-development-environment-look-like/' rel='bookmark' title='Permanent Link: What Does Your Development Environment Look Like?'>What Does Your Development Environment Look Like?</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://regulargeek.com/2009/04/17/tools-for-unit-testing-java-web-applications/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google App Engine Makes A Play For Startups</title>
		<link>http://regulargeek.com/2009/04/08/google-app-engine-makes-a-play-for-startups/</link>
		<comments>http://regulargeek.com/2009/04/08/google-app-engine-makes-a-play-for-startups/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 12:30:27 +0000</pubDate>
		<dc:creator>Rob Diana</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Google Web Toolkit]]></category>

		<guid isPermaLink="false">http://regulargeek.com/?p=567</guid>
		<description><![CDATA[In case you did not hear the news, Google has announced the availability of Java on Google App Engine. This is a very big development for many developers as Java is widely used, but not typically supported cheaply. Many hosting services allow for Java applications, but normally you just get the ability to drop in [...]]]></description>
			<content:encoded><![CDATA[<p>In case you did not hear the news, Google has <a href="http://googleblog.blogspot.com/2009/04/new-features-and-early-look-at-java-for.html" target="_blank">announced the availability of Java</a> on <a href="http://appengine.google.com/" target="_blank">Google App Engine</a>. This is a very big development for many developers as Java is widely used, but not typically supported cheaply. Many hosting services allow for Java applications, but normally you just get the ability to drop in a war file. For an average price of $10 per month, no fancy <a class="zem_slink" title="Apache Tomcat" rel="homepage" href="http://tomcat.apache.org">Tomcat</a> configurations are allowed and there are likely several restrictions on what you can do. With the Java support, they included integration with <a href="http://code.google.com/webtoolkit" target="_blank">Google Web Toolkit</a> and a <a href="http://code.google.com/eclipse/" target="_blank">plugin for Eclipse</a>. This all amounts to a serious run at the java development community.</p>
<p>With the announcement of Java on GAE, we also get <a href="http://code.google.com/appengine/docs/python/config/cron.html" target="_blank">cron support</a>! For those of you who have never worked on a unix box, cron is a utility that allows you to run a program on a specific schedule. They also announced a database import tool, and a soon-to-be-released export tool. These are serious platform changes that shows the app engine is no longer a toy.</p>
<p>Why is this a big deal? Well, Google is now making a play for startups who want to host things in the cloud. In addition, this is significantly easier than something like <a href="http://aws.amazon.com/" target="_blank">Amazon&#8217;s Web Services</a> offerings. In order to get the capabilities offered by Google App Engine, people normally need a significant amount of unix knowledge, database knowledge and software development knowledge. What they have done is made it simpler for one person to be a fairly robust startup with significant infrastructure support in the cloud.</p>
<p>Before I make pronouncements of Google killing Amazon and other absurdities, let&#8217;s see how everything plays out. I will be trying out the java support as soon as I can, so hopefully I can expand a little on how easy they have made it. If it is as good as it sounds, this could be very big.</p>
<div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/9dddc830-c46f-47be-989d-65aa20563741/"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=9dddc830-c46f-47be-989d-65aa20563741" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>


<p>Related posts:<ul><li><a href='http://regulargeek.com/2008/04/10/does-google-app-engine-rev-your-engine/' rel='bookmark' title='Permanent Link: Does Google App Engine Rev Your Engine?'>Does Google App Engine Rev Your Engine?</a></li>
<li><a href='http://regulargeek.com/2008/09/16/what-can-developers-learn-from-the-financial-crisis/' rel='bookmark' title='Permanent Link: What Can Developers Learn From the Financial Crisis?'>What Can Developers Learn From the Financial Crisis?</a></li>
<li><a href='http://regulargeek.com/2009/02/11/what-programming-language-should-i-learn/' rel='bookmark' title='Permanent Link: What Programming Language Should I Learn?'>What Programming Language Should I Learn?</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://regulargeek.com/2009/04/08/google-app-engine-makes-a-play-for-startups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>10 Questions to Ask When Choosing a Framework</title>
		<link>http://regulargeek.com/2008/01/23/10-questions-to-ask-when-choosing-a-framework/</link>
		<comments>http://regulargeek.com/2008/01/23/10-questions-to-ask-when-choosing-a-framework/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 14:20:45 +0000</pubDate>
		<dc:creator>Rob Diana</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[sitemesh]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://regulargeek.com/2008/01/23/10-questions-to-ask-when-choosing-a-framework/</guid>
		<description><![CDATA[If you write code for a living, then the &#8220;Which framework do I use?&#8221; question arises fairly often. I have been slinging code for over 13 years and it seems like I need to answer this question every month. The real question we should all be asking ourselves is &#8220;Do I need a framework?&#8221; If [...]]]></description>
			<content:encoded><![CDATA[<p>If you write code for a living, then the &#8220;Which framework do I use?&#8221; question arises fairly often. I have been slinging code for over 13 years and it seems like I need to answer this question every month. The real question we should all be asking ourselves is &#8220;Do I need a framework?&#8221; If you are doing work as a consultant, you may have different questions than if it is a permanent position. In the java world, this becomes an interesting question because there are multiple versions and the same can be said for .Net. So, when do you need a framework and when do you decide to roll your own? Ask yourself the following questions.</p>
<ol>
<li>What is my target compile and deploy version? In the java world it is very common to have a target version of 1.2. This reduces the number of java frameworks that you may use. This is quite typical of many corporate environments as they take much longer to upgrade various parts of their IT infrastructure.</li>
<li>What functionality do I need at the minimum? If you do not need much functionality, it may not be worth the time to even research frameworks. As a consultant, I saw some firms do a full month-long framework evaluation when they only needed a servlet filter.</li>
<li>Are there &#8220;bonus&#8221; features that a framework may give us? Some frameworks are large enough to have many more features than you are immediately looking for. <a href="http://www.springframework.org/" title="Spring Framework" target="_blank">Spring</a> is a perfect example of this. You may be looking at Spring for the dependency injection portion, and as a bonus you pick up the MVC features in the framework.</li>
<li>Do we have any knowledge of the framework? In some shops, this is the most important question to ask. If there is no knowledge of the framework, you will spend a lot of time researching its capabilities instead of actually using it. The amount of time spent maintaining code written to use the framework is also much larger than normal.</li>
<li>What is the cost of knowledge gathering and research for the framework? This is a question for the managers reading this post. If the developer needs a month to research the frameworks and determine their suitability, then that is very expensive. This cost is increased when you realize that mostly senior level developers are going to do the evaluations.</li>
<li>What is the cost of developing an internal framework that does the minimal feature set? If you do not need a lot of functionality, is it &#8220;simpler&#8221; and &#8220;cheaper&#8221; to roll your own? In many cases you can have a senior level developer design the framework and get help from junior developers for implementation. This also adds to the internal technical knowledge of the team.</li>
<li>How active is the framework community? If you have a question on how to use something, the community forums or blogs of interest are invaluable. If there is a framework user mailing list, look at how many messages are posted and how quickly responses appear. This is your development support team, so you need to have fairly quick response.</li>
<li>Are there consultants readily available if you hit a roadblock? Sometimes companies will have specific expertise in a framework. If the framework is popular, then many consulting firms will have someone with some level of knowledge.</li>
<li>Are there time constraints on the framework decision? Do you need a choice yesterday? If there is little time to make a decision, popularity of the framework becomes important. Popularity will typically give you the answers to a few of the other questions in this list. Also, smaller frameworks are normally simpler and quicker to integrate into your code.</li>
<li>Would multiple smaller frameworks or various best of breed fit better than one monolithic framework? Some people get concerned with a monolithic choice like <a href="http://www.springframework.org/" title="Spring Framework" target="_blank">Spring</a> or .Net. There are a wealth of frameworks available and some have very targeted functionality. For example, <a href="http://www.opensymphony.com/sitemesh/" title="SiteMesh" target="_blank">SiteMesh</a> is a small framework that allows you to &#8220;skin&#8221; your website very easily. You can setup a <a href="http://www.opensymphony.com/sitemesh/" title="SiteMesh" target="_blank">SiteMesh</a> example site and understand what it does within an hour.</li>
</ol>
<p>What did I miss? Are there any other questions that you think are important?</p>


<p>Related posts:<ul><li><a href='http://regulargeek.com/2007/12/17/top-10-tools-for-java-development/' rel='bookmark' title='Permanent Link: Top 10 tools for java development'>Top 10 tools for java development</a></li>
<li><a href='http://regulargeek.com/2009/12/07/can-you-defend-your-technical-decisions/' rel='bookmark' title='Permanent Link: Can You Defend Your Technical Decisions?'>Can You Defend Your Technical Decisions?</a></li>
<li><a href='http://regulargeek.com/2009/04/17/tools-for-unit-testing-java-web-applications/' rel='bookmark' title='Permanent Link: Tools For Unit Testing Java Web Applications'>Tools For Unit Testing Java Web Applications</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://regulargeek.com/2008/01/23/10-questions-to-ask-when-choosing-a-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 tools for java development</title>
		<link>http://regulargeek.com/2007/12/17/top-10-tools-for-java-development/</link>
		<comments>http://regulargeek.com/2007/12/17/top-10-tools-for-java-development/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 00:34:33 +0000</pubDate>
		<dc:creator>Rob Diana</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://regulargeek.com/2007/12/17/top-10-tools-for-java-development/</guid>
		<description><![CDATA[As a java developer, I am always trying to get someone else to do little jobs for me. Could someone get me a build of the project? Could someone figure out what libraries we are dependent on, and are we using a compatible version? You get the picture. I don&#8217;t want to talk specifically about [...]]]></description>
			<content:encoded><![CDATA[<p><!-- ckey="4294162D" --><br />
As a java developer, I am always trying to get someone else to do little jobs for me. Could someone get me a build of the project? Could someone figure out what libraries we are dependent on, and are we using a compatible version? You get the picture. I don&#8217;t want to talk specifically about frameworks, as that could be another series of posts entirely. This is a list of tools (and possibly frameworks) that I have found most helpful in any java development I have done.</p>
<ol>
<li> Eclipse (http://www.eclipse.org) &#8211; everyone should know what eclipse is by now. The reason I include it here is mostly due to the refactoring support is immensely helpful.</li>
<li>Ant (http://ant.apache.org/) &#8211; again, everyone should know this tool by now. Ant is a fantastic build tool, but allows you to do much more with all of the extension support. I have seen some very cool things done with ant, ivy and a few custom tasks.</li>
<li>JUnit (http://junit.org/) &#8211; people should know this framework, but many people still don&#8217;t subscribe to the automated unit testing model. I find automated unit tests a great way to ensure you haven&#8217;t broke anything mainly because I regularly break my own tests.</li>
<li>Tomcat (http://tomcat.apache.org/) &#8211; Tomcat is obviously more useful if you are doing web development in java. Duh. However, if you do any of that and have tried configuring something like WebSphere, you can understand why I include it.</li>
<li>Sitemesh (http://www.opensymphony.com/sitemesh/) &#8211; Sitemesh is one of the simplest web presentation frameworks I have seen. It can be seen as a basic template engine, but quite often that is all that you need. The difficulty with most web frameworks is that they try to be all things to all people. Sitemesh just wants to put a nice configurable template around your content. The idea of &#8220;do one thing and do it well&#8221; comes to mind.</li>
<li>Spring (http://www.springframework.org/) &#8211; Spring is one of the &#8220;web&#8221; frameworks that tries to be all things to all people. However, it doesn&#8217;t do a bad job. If you are involved with a large project, Spring gives you some nice functionality out of the box without having to go the coding standards route.</li>
<li>Ivy (http://ant.apache.org/ivy/) &#8211; Well, some things have changed in Ivy-land. It is an ant subproject now and soon to be moving to the ant site. This might be a good thing. Ivy is a dependency management tool that can be used with ant. If you have more than one small project, you are likely to need dependency management. I like it because I am not required to move to Maven which I have not had much success with.</li>
<li>Luntbuild (http://luntbuild.javaforge.com/) &#8211; Luntbuild is an open source GUI build management tool. So, you already have your ant builds and they can be integrated with luntbuild. The bonus with luntbuild is that you can have separate development, qa and production configurations for the build. There is also a professional version called quickbuild (http://www.pmease.com/) that comes with support and some additional features.</li>
<li>Cobertura (http://cobertura.sourceforge.net/) &#8211; This is my favorite code coverage tool, mainly because it works and it is free. Code coverage is a good metric to have because it will quickly show you where you have less tests. You will never hit 100% coverage (and you shouldn&#8217;t), but it is a good benchmark to look at, especially if you get some defect density numbers from your code as well.</li>
<li>Xerces (http://xerces.apache.org/) &#8211; Is there any other XML parsing library out there?</li>
</ol>
<p>If I have missed your favorite tool, let me know and I will try to look into it. I am always on the lookout for new tools that can improve productivity.</p>


<p>Related posts:<ul><li><a href='http://regulargeek.com/2009/04/17/tools-for-unit-testing-java-web-applications/' rel='bookmark' title='Permanent Link: Tools For Unit Testing Java Web Applications'>Tools For Unit Testing Java Web Applications</a></li>
<li><a href='http://regulargeek.com/2009/07/14/what-does-your-development-environment-look-like/' rel='bookmark' title='Permanent Link: What Does Your Development Environment Look Like?'>What Does Your Development Environment Look Like?</a></li>
<li><a href='http://regulargeek.com/2008/01/23/10-questions-to-ask-when-choosing-a-framework/' rel='bookmark' title='Permanent Link: 10 Questions to Ask When Choosing a Framework'>10 Questions to Ask When Choosing a Framework</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://regulargeek.com/2007/12/17/top-10-tools-for-java-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 4.314 seconds -->
