New Eclipse Website available
http://www.eclipsezone.com/
Have fun!
Saturday, August 06, 2005
Wednesday, August 03, 2005
Inversion of Control
Inversion of Control is a key part of what makes a framework different to a library. A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.
A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points.
Martin Fowler - http://martinfowler.com/bliki/InversionOfControl.html
A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points.
Martin Fowler - http://martinfowler.com/bliki/InversionOfControl.html
Tuesday, July 26, 2005
How To Remove An Obsolet Workspace From Eclipse 3.1
Sometimes you would like to remove an obsolet workspace from Eclipse. Suppose you have made a test workspace to try some things out and now you don't wont and don't need it anymore.
If you remove the workspace from your disk, it'll still appear in the workspace launcher, when you start up Eclipse.
So, how do you get rid of it?
Ecplise is storing the workspace information in a preferences file called "org.eclipse.ui.ide.prefs". This file is located under "%ECLIPSE_HOME%\configuration\.settings" and contains a key named "RECENT_WORKSPACES". The value of this key contains a comma seperated list of workspaces, more precisely the path to the workspaces. If you delete one of the entries, it'll disappear from the workspace launcher.
What you have to do is the following:
If you remove the workspace from your disk, it'll still appear in the workspace launcher, when you start up Eclipse.
So, how do you get rid of it?
Ecplise is storing the workspace information in a preferences file called "org.eclipse.ui.ide.prefs". This file is located under "%ECLIPSE_HOME%\configuration\.settings" and contains a key named "RECENT_WORKSPACES". The value of this key contains a comma seperated list of workspaces, more precisely the path to the workspaces. If you delete one of the entries, it'll disappear from the workspace launcher.
What you have to do is the following:
- exit Eclipse
- delete the workspace from your disk
- delete the path pointing to your obsolet workspace in the mentioned preferences file
- start Eclipse
Friday, July 22, 2005
German translation of eclipse-tutorial.dev.java.net
The first german translation of eclipse-tutorial.dev.java.net is done. I figured out, that it's not that easy to translate tutorials :-)
Open Source Java Applikationen entwickeln mit java.net und Eclipse
Let me know, if there are some terrible translation mistakes!
Enjoy! :-)
Open Source Java Applikationen entwickeln mit java.net und Eclipse
Let me know, if there are some terrible translation mistakes!
Enjoy! :-)
Friday, June 17, 2005
Thursday, May 26, 2005
Monday, May 23, 2005
BDT - Build Development Tools
Wednesday, May 18, 2005
Maven & multiple source trees
Have a look at an interesting article about Maven and multiple source trees in Michael Nielsen's Blog: http://weblogs.java.net/blog/michael_n/archive/2005/05/maven_multiple.html
Build Environment Systems
When ever you start a new project you'll find out, that you have to ship the software at a certain point :-) and to do that there are many tasks involved:
Beside this, if your delivery will be tested by some testing folks on the customer side, they'll flood your bug tracking system, because some bugs will look quite different every time. And you won't hire some new people just to sort out the same bugs, would you? ;-)
To address these needs, most Java projects are using Ant. Ant is a quasi standard for building Java applications. The Apache Ant project describes itself as: Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.
In Ant you can define targets and within the targets you have different tasks. The targets once more can have dependencies to other targets. If you are not familiar with Ant, have a look at "Writing a Simple Buildfile" tutorial from the Ant project. This will give you a good introduction.
If you start using Ant, you figure out, that you are doing the same things again and again. For example: your application is based on several components and you would like to compile each of them independently. You'll start writing a compile target for every component and at a certain point you'll try to refactor your build files so you can use one compile target for all your components.
I invested quite some time in my build files and started to use them in different projects. So I started to use my own build environment components. I'm not quite sure, if this is the right approache, since there are many projects out there which are doing the same thing... but usually much more sophisticated...
These projects are using Ant or extending it and building a set of predefined targets to use:
Another Apache project, addressing the need of a good build environment system is Maven. Maven itself is much more sophisticated than Ant and they use a different aproach. Maven is built around a project object model and is providing a huge set of goals (in Ant terms these would be targets). Beside this, Maven is able to deal with dependencies in your project.
Currently the Maven team is working on Version 2.0 of Maven. If you are interested in Maven 2.0 have a look at the project site: http://maven.apache.org/maven2/.
It's very much recommended, that you invest enough time in your build environment and that you maintain it as good as possible. You should keep in mind, that your build scripts are a part of your software and you should treat it with the same respect as your source code.
Some people might think, that a fully automated build environment is to expensive. But if you have a closer look at all the details and all the knowledge lying in your build environment and in your build process, you'll see that the positive aspects outweigh.
To understand the importance of a good build environment, you also should read the article of Martin Fowler about Continuous Integration.
- deliver the application as a zip file including a batch or shell script to execute it
- deliver the application with all the necessary deployment descriptors, security role assignments, etc., so the application can be deployed
- deliver an installer for one or many operating systems
- deliver it in any kind your customer would like to have it
- pack all the necessary libs for your application
- generate a working classpath (sometimes not that easy...)
- generate all the documentations
- generate the batch and shell scripts
- generate some testdata
- create the installer build files
- etc.
Beside this, if your delivery will be tested by some testing folks on the customer side, they'll flood your bug tracking system, because some bugs will look quite different every time. And you won't hire some new people just to sort out the same bugs, would you? ;-)
To address these needs, most Java projects are using Ant. Ant is a quasi standard for building Java applications. The Apache Ant project describes itself as: Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.
In Ant you can define targets and within the targets you have different tasks. The targets once more can have dependencies to other targets. If you are not familiar with Ant, have a look at "Writing a Simple Buildfile" tutorial from the Ant project. This will give you a good introduction.
If you start using Ant, you figure out, that you are doing the same things again and again. For example: your application is based on several components and you would like to compile each of them independently. You'll start writing a compile target for every component and at a certain point you'll try to refactor your build files so you can use one compile target for all your components.
I invested quite some time in my build files and started to use them in different projects. So I started to use my own build environment components. I'm not quite sure, if this is the right approache, since there are many projects out there which are doing the same thing... but usually much more sophisticated...
These projects are using Ant or extending it and building a set of predefined targets to use:
- http://antlion.sourceforge.net/
- http://antworks.sourceforge.net/
- http://invicta.sourceforge.net/
- http://www.javagen.com/jam/index.html
- http://www.jayasoft.fr/org/modules/ivy/overview.php?
Another Apache project, addressing the need of a good build environment system is Maven. Maven itself is much more sophisticated than Ant and they use a different aproach. Maven is built around a project object model and is providing a huge set of goals (in Ant terms these would be targets). Beside this, Maven is able to deal with dependencies in your project.
Currently the Maven team is working on Version 2.0 of Maven. If you are interested in Maven 2.0 have a look at the project site: http://maven.apache.org/maven2/.
It's very much recommended, that you invest enough time in your build environment and that you maintain it as good as possible. You should keep in mind, that your build scripts are a part of your software and you should treat it with the same respect as your source code.
Some people might think, that a fully automated build environment is to expensive. But if you have a closer look at all the details and all the knowledge lying in your build environment and in your build process, you'll see that the positive aspects outweigh.
To understand the importance of a good build environment, you also should read the article of Martin Fowler about Continuous Integration.
Monday, May 16, 2005
FindBugs 0.8.8 - Code Analyzer
The FindBugs Java code analysis tool project has released version 0.8.8 with many feature enhancements. Those include detection for duplicate code in if/else statements, new function calls, increased detection of impossible casts, statistics saving, and more.
PMD 3.1
Tom Copeland had announced the release of version 3.1 of his Java code analyzer PMD. "It includes eight new rules, a slew of bug fixes, and better support for JDK 1.5. Several rules were optimized, for example, UnusedModifer now runs about ten times faster." A full change log is available.
Apache Maven 2.0 Alpha 2
The Apache Maven development team has announced the release of version 2.0 Alpha 2 of the software project management tool. "This release is expected to be much more architecturally stable, making early adoption a possiblity. At this point, there are still only the core plugins available."
Eclipse 3.1 Milestone 7
The Eclipse IDE project has released its seventh milestone for version 3.1. "M7 is the final milestone build of the Eclipse Platform 3.1 development cycle, and marks the official start of the 3.1 endgame." M7 features undo and redo features for refactoring, and many UI tweaks.
Sunday, May 08, 2005
New Visual Tutorials - eclipse-tutorial.dev.java.net

I've added three new Visual Tutorials to eclipse-tutorial.dev.java.net and modified the help plugin.
- Create a new class with Fields and a Constructor
- Refactoring, Rename a Field and a Method
- How to use the Update Manager
Enjoy!
Saturday, May 07, 2005
Application Server Matrix
TheServerSide.com is providing an Application Server Matrix. Have a look at http://www.theserverside.com/reviews/matrix.tss
Friday, May 06, 2005
Update site available for eclipse-tutorial.dev.java.net

The update site for eclipse-tutorial.dev.java.net is now available on the project site:
- https://eclipse-tutorial.dev.java.net/update
Thursday, May 05, 2005
Static Code Analysis
If you would like to improve the quality of your code you can use a set of open source tools to achieve that. For Java there are many different tools, covering different aspects of static code analysis.
Please keep in mind, that automated static code analysis, never gives you a 100% answer about the quality of your code. From my point of view, it's more about getting some indications if your code has more or less options for improvements. Believe me, most of the time, there are more options for improvements then you would think of...
Code Conventions - CheckStyle
Let's start with the basic need of code conventions. If you start a new project you would like to have some conventions how the code has to be written. There are some Java code conventions provided by Sun, but you don't want to check them manually, do you?
To ensure, that your code is written according to your conventions, you can use CheckStyle. Run your checks with Ant or a command line tool.
It's highly recommended to use Ant or Maven to do the checks, since you would like to have a complete build cycle with different tools.
Code Reviews - Hammurapi, PMD
Usually there are some development guidelines, best practices or just how-to's while your working on a project, a framework or an application. These guidelines try to improve the quality of your software. But how do you check, if people follow these guidelines? Usually you do code reviews and try to find obvious mistakes. But unfortunately code reviews are very time consuming and expensive.
You can automatize certain aspects of the review process, by checking your code with tools like Hammurapi or PMD. Both tools provide rules which are organized in different groups, like: database connection pool, EJB, exception handling, and many more. Have a look at the project sites to get an overview of all the available rules.
If you have some special guidelines, which are important for your project, but not available in Hammurapi or PMD, you can write your own rules. Both tools are providing a simple interface to add new, project specific rules.
Common Bugs - FindBugs
There are many different type of bugs, you can write :-) and many times they follow a certain pattern. With FindBugs you can analyze your code and it'll check it according to a huge set of possible bugs, based on patterns.
Once again, there is no guarantee, you'll find all the bugs or it'll even point you to some code fragments which don't have a bug at all.
Testing - JUnit, TestNG
Testing is one of the most important aspects of quality. If you don't write test cases for your software, you don't know, what you are developing. Testing is a necessary precondition for refactoring. If you refactor your code, without test cases, you can't tell, if you changed something in the functionality or not.
A quasi standard testing tool is JUnit. It's a simple testing framework for unit testing. There is a huge set of tools, using JUnit as a core to test different aspcets, like HTTPUnit, Cactus or StrutsTestCase.
In the last few months an other testing framework got a lot of attention, it's called TestNG. Since JUnit has many limitations, there is a need for a more flexible testing framework.
Coverage - Corbertura, JCoverage, EMMA
While writing unit tests for your software, you would like to know, how much of your code is covered by your tests. There are quite many tools, which try to address this need. Have a look at Corbertura, JCoverage or EMMA for a start.
Many times the coverage tools are used for analyzing the test coverage of your software. An other nice aspect would be, to analyze the code which has been used during the execution of your application. These could show you, which code has been "touched" during the exectution and if you have to do some bug fixing, you would see, if a certain class is used quite often or seldom.
Test Quality - Jester
To find out, how robust your test classes and methods are, you can use Jester to test your test code.
Build Environment - Ant, Maven
As mentioned above, you should atomize your build environment. I think, the quasi standard to do this is Ant. Another very nice tool, is Maven. Both are providing the possibility to atomize a complex set of task.
Contiunous Integration - CruiseControl
Finally, you would like to analyze your code as often as possible. Now we are talking about continuous integration. Please take the time and read the article of Martin Fowler about continuous integration, I belive it's a must for every developer!
A great tool, to set up an continuous integration environment is CruiseControl. There are some other tools, but I won't mention them here.
Please keep in mind, that automated static code analysis, never gives you a 100% answer about the quality of your code. From my point of view, it's more about getting some indications if your code has more or less options for improvements. Believe me, most of the time, there are more options for improvements then you would think of...
Code Conventions - CheckStyle
Let's start with the basic need of code conventions. If you start a new project you would like to have some conventions how the code has to be written. There are some Java code conventions provided by Sun, but you don't want to check them manually, do you?
To ensure, that your code is written according to your conventions, you can use CheckStyle. Run your checks with Ant or a command line tool.
It's highly recommended to use Ant or Maven to do the checks, since you would like to have a complete build cycle with different tools.
Code Reviews - Hammurapi, PMD
Usually there are some development guidelines, best practices or just how-to's while your working on a project, a framework or an application. These guidelines try to improve the quality of your software. But how do you check, if people follow these guidelines? Usually you do code reviews and try to find obvious mistakes. But unfortunately code reviews are very time consuming and expensive.
You can automatize certain aspects of the review process, by checking your code with tools like Hammurapi or PMD. Both tools provide rules which are organized in different groups, like: database connection pool, EJB, exception handling, and many more. Have a look at the project sites to get an overview of all the available rules.
If you have some special guidelines, which are important for your project, but not available in Hammurapi or PMD, you can write your own rules. Both tools are providing a simple interface to add new, project specific rules.
Common Bugs - FindBugs
There are many different type of bugs, you can write :-) and many times they follow a certain pattern. With FindBugs you can analyze your code and it'll check it according to a huge set of possible bugs, based on patterns.
Once again, there is no guarantee, you'll find all the bugs or it'll even point you to some code fragments which don't have a bug at all.
Testing - JUnit, TestNG
Testing is one of the most important aspects of quality. If you don't write test cases for your software, you don't know, what you are developing. Testing is a necessary precondition for refactoring. If you refactor your code, without test cases, you can't tell, if you changed something in the functionality or not.
A quasi standard testing tool is JUnit. It's a simple testing framework for unit testing. There is a huge set of tools, using JUnit as a core to test different aspcets, like HTTPUnit, Cactus or StrutsTestCase.
In the last few months an other testing framework got a lot of attention, it's called TestNG. Since JUnit has many limitations, there is a need for a more flexible testing framework.
Coverage - Corbertura, JCoverage, EMMA
While writing unit tests for your software, you would like to know, how much of your code is covered by your tests. There are quite many tools, which try to address this need. Have a look at Corbertura, JCoverage or EMMA for a start.
Many times the coverage tools are used for analyzing the test coverage of your software. An other nice aspect would be, to analyze the code which has been used during the execution of your application. These could show you, which code has been "touched" during the exectution and if you have to do some bug fixing, you would see, if a certain class is used quite often or seldom.
Test Quality - Jester
To find out, how robust your test classes and methods are, you can use Jester to test your test code.
Build Environment - Ant, Maven
As mentioned above, you should atomize your build environment. I think, the quasi standard to do this is Ant. Another very nice tool, is Maven. Both are providing the possibility to atomize a complex set of task.
Contiunous Integration - CruiseControl
Finally, you would like to analyze your code as often as possible. Now we are talking about continuous integration. Please take the time and read the article of Martin Fowler about continuous integration, I belive it's a must for every developer!
A great tool, to set up an continuous integration environment is CruiseControl. There are some other tools, but I won't mention them here.
Monday, April 25, 2005
Google How-To

Google provides many services around searching. Are you sure, you use Google the best way and that you get the maximum out of it?
If you are not sure, have a look at these links:
- Google Basic Search (http://www.google.com/intl/en/help/basics.html)
- Google Advanced Search (http://www.google.com/advanced_search)
- Google Help: Advanced Search (http://www.google.com/help/refinesearch.html)
- Google Web Search Features (http://www.google.com/help/features.html)
- Google Guide (http://www.googleguide.com/index.html)
- Google Weblog (http://google.blogspace.com/)
- StumbleUpon Google Group (http://google.group.stumbleupon.com/)
- Google Search History (http://www.google.com/searchhistory/)
- Google Web Search API (http://www.google.com/apis/)
Sunday, April 24, 2005
Eclipse Help Plugin for eclipse-tutorial.dev.java.net

I packed the eclipse-tutorial.dev.java.net Tutorials into an Eclipse Help Plugin, which is available in the Help Contents of Eclipse.
For the moment you can reach the Update Site on:
The plugin and the eclipse-tutorial.dev.java.net is not in sync, since I didn't automated it yet. I'll update the plugin from time to time...
If you have any suggestions, please let me know...
Monday, April 11, 2005
CruiseControl Action Movie
If you like the idea of continuous intergration, check out a CruiseControl action movie by Mike Clark:
Enjoy!
Enjoy!
Network Prefetching in Firefox
Firefox is supporting a prefetching mechanism, which allows to download site's in the background.
You can enable prefetching by doing the following:
- Type "about:config" in the address bar.
- Scroll down to the setting "network.prefetch-next" and set the value to "true".
Check out these links for more information:
Enjoy!
Sunday, April 10, 2005
Saturday, April 09, 2005
Eclipse Plugins
If you are looking for Eclipse plugins, check the following sites...
The Eclipse project is maintaining a community page with many links:
There is also a great site by Urbaan, with a huge list of plugins:
It's also worth to check a site provided by Genuitec, Innoopract, and Instantiations:
And of course there are some sites by IBM, including as well articles and tutorials:
Friday, April 08, 2005
Source Code Search Engines
Lately I was thinking about all the open source code which is available around the world. I was asking myself, how it would be possible to search through all this code and to use it for studies and analysis.
Source Code:
- http://www.koders.com/
From the site: Koders.com is the leading search engine for open source code. Our source code optimized search engine provides developers with an easy-to-use interface to search for source code examples and discover new open source projects which can be leveraged in their applications. - http://www.jexamples.com/
From the site: We analyze the source code of production Java open source projects such as Ant, Tomcat and Batik and load that analysis into a database designed for easy searching. You enter the name of a Java Class.method you want to see example invocations of and click Search. - http://archive.devx.com/sourcebank/
From the site: DevX's Sourcebank is a directory of links to source code and script posted around the Web. Use the Search option to find terms within the source code. To cast the widest net, use the search with All Types selected. Or, you can browse through a subset of the code by categories (below). First, select a filter, such as C or Java, by clicking on one of the square buttons and then choose one of the categories (such as Mathematics) from within that filter. - http://gonzui.sourceforge.net/
From the site: gonzui is a source code search engine for accelerating open source software development. In the open source software development, programmers frequently refer to source codes written by others. Our goal is to help programmers develop programs effectively by creating a source code search engine that covers vast quantities of open source codes available on the Internet.
- http://www.codezoo.net/
From the site: CodeZoo exists to help you find high-quality, freely available, reusable components, getting you past the repetitive parts of coding, and onto the rest and the best of your projects. It’s a fast-forward button for your compiler. - http://www.jarhoo.com/
From the site: Searches for jar files or fully qualified java class names usually performed under 2 seconds. Package or non-qualified class name searches may take around 10 seconds
- http://www.jdocs.com/
From the site: JDocs is a comprehensive online resource for Java API documentation. All the javadocs for a variety of popular packages are loaded into our db-driven system, and users can contribute their own notes to virtually any class, field, method. In short, JDocs provides a knowledge base defined around the major Java api's themselves, so you can find the information you're looking for right where it should be... in the documentation! - http://javadocs.org/
From the site: You can search from the url, eg: javadocs.org/string - http://ashkelon.sourceforge.net/
From the site: ashkelon is an open source project. It is a Java API documentation tool designed for Java developers. Its goals are the same as the goals of the well-known javadoc tool that comes with J2SE, whose user interface most java developers are quite familiar with.
Sunday, April 03, 2005
New Visual Eclipse Tutorial Available: Adding, Moving and Docking Views
Thursday, March 24, 2005
Project "PMD" has released the new version
From the site...
PMD scans Java source code and looks for potential problems like:
- Empty try/catch/finally/switch blocks
- Unused local variables, parameters and private methods
- Empty if/while statements
- Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
- Classes with high Cyclomatic Complexity measurements
Check out the project: http://pmd.sf.net/
Wednesday, March 23, 2005
Subscribe to:
Posts (Atom)