Many Java static analysis tools exist right there, each one focus on a specific area and has its advantages, we can enumerate:
Pmd which is a static rule-set based Java source code analyzer that identifies potential problems like:
- Possible bugs—Empty try/catch/finally/switch blocks.
- Dead code—Unused local variables, parameters and private methods.
- Empty if/while statements.
- Overcomplicated expressions—Unnecessary if statements, for loops that could be while loops.
- Suboptimal code—Wasteful String/StringBuffer usage.
- FindBugs which looks for bugs in Java code. It uses static analysis to identify hundreds of different potential types of errors in Java programs.
- Checkstyle defines a set of available modules, each of which provides rules checking with a configurable level of strictness (mandatory, optional…). Each rule can raise notifications, warnings, and errors.
Hibernate is an open source Java persistence framework project. Perform powerful object relational mapping and query databases using HQL and SQL.
In general the widely used libraries are well designed and implemented, and it’s very interesting to learn from them some coding best practices. Let’s take a look inside the hibernate core library and discover some of its design keys.
In this post Hibernate Core is analyzed by JArchitect to go deep inside its design and implementation.
OSGi became very popular today, thanks to its modularity approach and its capability to enforce logical boundaries between modules. When we discover it the first time, the question is where to begin to understand how it works?
To understand OSGi concepts we will try to follow the puzzle approach, the idea is to begin with the trivial part of this technology, and search for other parts related to the found ones. And to assemble the puzzle we will be assisted by JArchitect that will be helpful to detect OSGi internal design.
According to MVC definition from wikipedia:
“Model View Controller (MVC) pattern creates applications that separate the different aspects of the application (input logic, business logic, and UI logic), while providing a loose coupling between these elements.”
The question is which one is the best to use?
As any debate like that, there’s no unique solution, it depends on many factors. In this article we try using JArchitect to discover PureMVC in depth, and talk about the main difference between it and the other variants.
PureMVC was popularized first by Flex and Flash developers, but it was ported after to many other languages. The following GWT sample use the java PureMVC framework, let’s analyze it to explore PureMVC concepts.
After discovering some code changes and refactoring in the first part, we will try in this part to discover some major features added to JRE7.
Let’s detect all packages and types added to JRE7:
SELECT PACKAGES WHERE WasAdded
JRE6 was released in 2006 and five years after a major JRE version was released, during last few years java looked stagnant, and many java developers begin to worry, and this concern was amplified when Oracle purchased Sun.
We will try to discover if there’s a big refactoring or maybe many features was added, that can explain this duration between these two releases. In this first part we will focus on design and implementation changes, and the second part will be focused on added features and breaking changes.
When we search for design pattern articles, we found essentially documentation concerning “Gang of Four” patterns, they are very useful and contribute to well design application.
But when I discovered GRASP principles , I advise anyone interested to improve his skills design to look at these principles, it gives a design fundamental rules.
In this article we will discover some GRASP principles used by Spring, and the advantages of using them.
Spring is one of the most popular application development framework for entreprise Java.
The Spring Framework does not impose any specific programming model, it has become popular in the Java community as an alternative to, replacement for, or even addition to the Enterprise JavaBean (EJB) model.