wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes package question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "package question" Watch "package question" New topic
Author

package question

Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
In URLyBird server is package in suncertify.db and data.java as well. Is it okay to put every other class in that package? Assignment has not mention anything about that except for data.java


SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
Originally posted by Ken Boyd:
In URLyBird server is package in suncertify.db and data.java as well. Is it okay to put every other class in that package? Assignment has not mention anything about that except for data.java


Hi Ken,

Technically it would be OK to do that. But if you want to show your skills in OO-design, you'd better distribute your classes over a few packages. For example, I had the following packages: db, network, business, ui and util.

Frans.


SCJP 1.4, SCJD
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
Thanks Frans
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

Hallo,

I have the same distibution more on less(gui, db, network)

Frans, you mentioned a business package, you have here the business logic ?
This is not suppose to be on the GUI level(I think ui on you) ?
Can you explain a little bit ?

Mihai.
[ May 25, 2005: Message edited by: Mihai Radulescu ]

SCJP, SCJD, SCWCD, OCPJBCD
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
Frans, you mentioned a business package, you have here the business logic ?
This is not suppose to be on the GUI level(I think ui on you) ?
Can you explain a little bit ?


db: data operations on record level (read, lock, etc.); no interpretation of the data!

business: data operations on business level (book, findContractor)

ui: presentation and user interaction

The ui-package does never call methods in the db package directly, but always through a business method.

The network package was sandwiched between db and business, to provide adapters that do RMI or direct access.

Frans.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: package question
 
Similar Threads
Arranging Files in right package ?
pls help me in javabean usage in jsp(doubt)
URLyBird - 'Your data access class must be called "Data.java"'
URLyBird interface?
B&S 2.1.2 Interface