Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java development standards and tools (compared to C#)

I don't have any knowledge of Java platform and I wonder which tools (and methodologies) could be used to help developing maintainable code written in Java.

I know one can use:

  1. Agile methodology in any environment
  2. jUnit/jMock for unit testing code (similar to NUnit/Moq in .net world)
  3. Checkstyle for coding standards - is this similar to StyleCop or FxCop or both?
  4. I suppose you can also write layered applications in Java (like assemblies for different tiers in .net)
  5. Are there any automated testing OSS/Licensed tools that are worth mentioning
  6. Are there any code generators that are very popular in Java world

Are there also any other popular tools/methods that a Java developer/team can use that I don't have access to in .net world? Would you suggest other tools and approaches in Java world?

like image 297
Robert Koritnik Avatar asked Sep 17 '26 03:09

Robert Koritnik


2 Answers

In java there are a lot of frameworks. For example, you don't have to use JUnit, you could use TestNG with basically just as much tool support. There are several mocking frameworks as well.

In terms of coding standards, IDEs come with that built in, as well as there being several others available (I'm most familiar with the IDE ones, so I don't know names off hand).

You have Eclipse as an IDE if you want free, as well as NetBeans and for money there is IntelliJ IDEA among others. Then there are some IDEs from big vendors intended to support their specific application servers.

In terms of building "assemblies" (jars, wars and ears in the java world), there are some built in tools in IDEs for one-man projects, and there is Ant or Maven for a full fledged build tool.

There are many options in automated testing tools. If you mean continuous integration, there is CruiseControl that is free, and TeamCity which has no cost for low usage.

In terms of code generators, in general the Java world is kind of trying to move away from them in favor of annotations, but the name that comes to mind is xdoclet. In GUI building there are a bunch of code generators strictly for building the GUI of course.

That really barely scratches the surface. For example, application servers (JBoss, Oracle (they now own two with the Sun purchase) and IBM among others) are a big decision point in many Java projects (it depends what kind of project).

None of the categories discussed are intended to be exhaustive, just enough to give you a jumping point of what to look into. There are many more in each category.

The great thing about Java is that there are so many choices. The bad thing about Java is that there are so many choices ...

like image 195
Yishai Avatar answered Sep 18 '26 16:09

Yishai


Responding to #2: Code coverage tools like EMMA are often used to evaluate the extent of current tests. Responding to #5: Findbugs and PMD are extremely popular static analysis tools.

like image 24
Daniel F. Thornton Avatar answered Sep 18 '26 16:09

Daniel F. Thornton