Click here to Skip to main content
15,890,982 members
Home / Discussions / Java
   

Java

 
AnswerRe: startNetworkServer Pin
Richard MacCutchan11-Jan-11 21:20
mveRichard MacCutchan11-Jan-11 21:20 
AnswerRe: startNetworkServer Pin
TorstenH.11-Jan-11 21:39
TorstenH.11-Jan-11 21:39 
GeneralRe: startNetworkServer [modified] Pin
pancakeleh11-Jan-11 21:49
pancakeleh11-Jan-11 21:49 
GeneralRe: startNetworkServer Pin
TorstenH.12-Jan-11 0:17
TorstenH.12-Jan-11 0:17 
GeneralRe: startNetworkServer Pin
pancakeleh12-Jan-11 19:36
pancakeleh12-Jan-11 19:36 
Questionbasic question about Namespaces in Java Pin
nic77m10-Jan-11 9:05
nic77m10-Jan-11 9:05 
AnswerRe: basic question about Namespaces in Java Pin
Luc Pattyn10-Jan-11 10:54
sitebuilderLuc Pattyn10-Jan-11 10:54 
GeneralRe: basic question about Namespaces in Java Pin
TorstenH.10-Jan-11 23:50
TorstenH.10-Jan-11 23:50 
I also think namespaces and class names by convention use lower-case in Java.


NO! Namespaces are lower-case, Objects are definitely starting upper-case!

@ nic
The namespace or package declaration divides your application into different parts.

Normally you will have some kind of user interface(UI or GUI if it is a graphical one), some services and some kind of database.
These three parts have their own namespaces:

package app.gui; // the GUI in general
package app.gui.page; // the pages of the GUI
package app.gui.page.view; // parts of the pages

package app.database; // the database
package app.database.type.person; // the person aka the object 'Person' is in here
package app.database.type.person.extremity; // obejcts 'Leg' and 'Arm' are declared here - a person can have more than one of each.

package app.services;
package app.services.actions; // things the person can do like "Running", "Working", "Sleeping"
package app.services.status; // providing status messages about the person "EnergieStatus", "HealthStatus"


The GUI gets it's data, that is to be shown/modified, from the services. Changes are submitted to the services.
The database is served/controlled by the services. The database package also has different packages underneath to organize the objects.

In this case the classes/ objects in the database package do not know anything about the GUI - and the GUI doesn't need to know anything about the database. The services is some kind of agent / mediator, which is positioned in the middle to serve (what is probably the cause it is called "service" ...).

So declaring packages will give you more control on your code and will organize your app.

You can read more about this basic organizing stuff - try to search for MVC (Model-View-Controller).

regards
Torsten
I never finish anyth...

GeneralRe: basic question about Namespaces in Java Pin
David Skelly11-Jan-11 2:03
David Skelly11-Jan-11 2:03 
GeneralRe: basic question about Namespaces in Java Pin
Luc Pattyn11-Jan-11 2:07
sitebuilderLuc Pattyn11-Jan-11 2:07 
Questioninstallshield Pin
lucky_12215-Jan-11 22:32
lucky_12215-Jan-11 22:32 
AnswerRe: installshield [ 5xRepost ] Pin
Richard MacCutchan6-Jan-11 2:39
mveRichard MacCutchan6-Jan-11 2:39 
GeneralRe: installshield [ 5xRepost ] Pin
lucky_12216-Jan-11 18:21
lucky_12216-Jan-11 18:21 
GeneralRe: installshield [ 5xRepost ] Pin
Peter_in_27806-Jan-11 19:10
professionalPeter_in_27806-Jan-11 19:10 
QuestionComparing values in the table with the value the user keyed in Pin
pancakeleh5-Jan-11 16:20
pancakeleh5-Jan-11 16:20 
AnswerRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan5-Jan-11 21:46
mveRichard MacCutchan5-Jan-11 21:46 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
pancakeleh5-Jan-11 22:05
pancakeleh5-Jan-11 22:05 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan5-Jan-11 22:48
mveRichard MacCutchan5-Jan-11 22:48 
AnswerRe: Comparing values in the table with the value the user keyed in Pin
Arman S.6-Jan-11 9:39
Arman S.6-Jan-11 9:39 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
pancakeleh6-Jan-11 17:48
pancakeleh6-Jan-11 17:48 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan6-Jan-11 21:49
mveRichard MacCutchan6-Jan-11 21:49 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Arman S.7-Jan-11 6:54
Arman S.7-Jan-11 6:54 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan7-Jan-11 8:26
mveRichard MacCutchan7-Jan-11 8:26 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Arman S.7-Jan-11 8:35
Arman S.7-Jan-11 8:35 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan7-Jan-11 8:58
mveRichard MacCutchan7-Jan-11 8:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.