Archive

Archive for the ‘Projects Analysis’ Category

Make the most of Pmd, Findbugs and CheckStyle result.

November 25, 2013 Leave a comment

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.

Read more…

Lessons to learn from the Hibernate Core implementation

April 1, 2013 Leave a comment

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.
Read more…

The OSGi puzzle

October 11, 2012 2 comments

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.
Read more…

Exploring another MVC variant : PureMVC

December 1, 2011 Leave a comment

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.”

But if we search for MVC frameworks we found many variants: MVC1,MVC2,MVC3,MVP,MVVM and PureMVC.

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.
Read more…

Five years waiting for JRE7: it’s justified? (Part 2)

November 29, 2011 Leave a comment

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

Read more…

Categories: Projects Analysis

Five years waiting for JRE7: it’s justified? (Part 1)

November 11, 2011 8 comments

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.

With JArchitect we can compare two versions and detect any modifications concerning architecture, design or implementation, We can have a big picture of changes using the following views:
Read more…

Categories: Projects Analysis

Spring: The art of using GRASP Patterns

October 26, 2011 13 comments

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.
Read more…

Categories: Projects Analysis