mardi 12 janvier 2010

Package Architecture

I don't clame that my vision is the best, but I think it's a good practice.


First time, several programmers, developers ... can structure their packages, as follow:









In order to isolate the different parts of your package architecture, I propose to you the followed hierarchy:


But, why this hierarchy?

Because, I think this package hierarchy is more suitable and representative of a really good architecture.

Now the Hibernate implementation of your DAO is hidden into the impl package, besides the dao package

is now free of the hibernate dependencies.

The dao package with DAO interface now, can be extract in order to be used without knowing the explicit hibernate dependencies.


These Hibernate dependencies can cause problems in several projects, but this package hirerachy is now, more clear and more flexible.


Several huge packages can be splitted into sub packages, their contents become more consistent and more understandable.

Aucun commentaire:

Enregistrer un commentaire