package namings

R

R

Hi All,

I have written simple application connecting to DB, I've chosen DAO
pattern as suggested
on
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html.

So I have created classes:

DAOFactory - abstract, creates vendor specific DAOFactories,
getDAOFactory is public static

ApacheDerbyDAOFactory - extends DAOFactory - implements getContactDAO,
vendor specific, has createConnection() method

ApacheDerbyContactDAO - implements ContactDAO interface, vendor
specific

ContactDAO - interface, contains: create, findAll, delete, update
methods

Contact - business class for representing addresses, names, icq etc.

how should I put them into packages?

db.interfaces
db.implementations
busisness

are there any best practices?

thanks in advance
best regards
R

BTW
I'm using embedded Apache Derby 10.1.1
It creates DB in current directory although I have created
derby.system.home property:

String userHomeDir = System.getProperty("user.home", ".") +
System.getProperty("file.separator");
String systemDir = userHomeDir + ".embedded_derby";
// Set the db system directory.
System.setProperty("derby.system.home", systemDir);

any idea what's wrong with it? systemDir and derby.system.home property
are correct...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top