T
The Abrasive Sponge
Ok I have been doing java for a while. But I am thinking I may have
unfortunately started off the wrong way. Maybe. Outerlying file
structures have no convention. Seems that the open source community is
the driving force to one convention that seems to be the norm. I would
like to know if there is a website that talks about the conventions
normally used. If not I believe one needs to be developed.
Currently the way I do it. I have a development folder, and in this
development folder I have my customers. Within the customers I have the
projects that I am doing for them.
For example:
<Root>
|- development
| |- customerA
| |- customerB
| |-webAppA
| | |-build
| | |-build.xml
| | |-data
| | |-Pojo.java
| | |-servlets
| | |-listeners
| | |-dao or entity
| | |-actions
| |-jnlpAppB
| | |-sales
| | |View.java
| | |Model.java
| | |Controller.java
This is a kind of a sample of what I do, and my organization. Of
course, my classpath would contain
<Root>/development/customerB/webAppA/data,
<Root>/development/customerB/webAppA/servlets, etc. I use packages
extensively but in the above example I omitted them in the diagram for
clarity. As you see my packaging is not really consistent.
Now I am thinking I am doing this the wrong way. I am wanting to do
commit to a standard. Would any of these be a correct convention
(below) of organizing file structures or do you have better ideas for this?
<Root>
|- development
| |- customerA
| |- customerB
| |-webAppA
| | |-build <- would a build file go here?
| | | or just the resulting deliverable?
| | |-src <- source files only?
| | |-actions <--technology driven
| | |-servlets
| | |-listeners
| | |-lib <- libraries other jars needed etc?
| |
<Root>
|- development
| |- customerA
| |- customerB
| |-webAppA
| | |-build <- would a build file go here?
| | | or just the resulting deliverable?
| | |-src <- source files only?
| | |-sales <---use case driven
| | |-manager
| | |-customer
| | |-lib <- libraries other jars needed etc?
| |
The next question is how do I organize the source file packages?
For example, say I am making a web app. Do you package like this?
com/mycorp/sales/servlet/Something.java
where the use case is before the technology or vice versa
com/mycorp/servlet/sales/Something.java?
I guess I am asking is what is the convention for package naming in any
environment is it technology driven or use case driven? Do you have
your own methods of packaging?
Let me absorb your thoughts.
unfortunately started off the wrong way. Maybe. Outerlying file
structures have no convention. Seems that the open source community is
the driving force to one convention that seems to be the norm. I would
like to know if there is a website that talks about the conventions
normally used. If not I believe one needs to be developed.
Currently the way I do it. I have a development folder, and in this
development folder I have my customers. Within the customers I have the
projects that I am doing for them.
For example:
<Root>
|- development
| |- customerA
| |- customerB
| |-webAppA
| | |-build
| | |-build.xml
| | |-data
| | |-Pojo.java
| | |-servlets
| | |-listeners
| | |-dao or entity
| | |-actions
| |-jnlpAppB
| | |-sales
| | |View.java
| | |Model.java
| | |Controller.java
This is a kind of a sample of what I do, and my organization. Of
course, my classpath would contain
<Root>/development/customerB/webAppA/data,
<Root>/development/customerB/webAppA/servlets, etc. I use packages
extensively but in the above example I omitted them in the diagram for
clarity. As you see my packaging is not really consistent.
Now I am thinking I am doing this the wrong way. I am wanting to do
commit to a standard. Would any of these be a correct convention
(below) of organizing file structures or do you have better ideas for this?
<Root>
|- development
| |- customerA
| |- customerB
| |-webAppA
| | |-build <- would a build file go here?
| | | or just the resulting deliverable?
| | |-src <- source files only?
| | |-actions <--technology driven
| | |-servlets
| | |-listeners
| | |-lib <- libraries other jars needed etc?
| |
<Root>
|- development
| |- customerA
| |- customerB
| |-webAppA
| | |-build <- would a build file go here?
| | | or just the resulting deliverable?
| | |-src <- source files only?
| | |-sales <---use case driven
| | |-manager
| | |-customer
| | |-lib <- libraries other jars needed etc?
| |
The next question is how do I organize the source file packages?
For example, say I am making a web app. Do you package like this?
com/mycorp/sales/servlet/Something.java
where the use case is before the technology or vice versa
com/mycorp/servlet/sales/Something.java?
I guess I am asking is what is the convention for package naming in any
environment is it technology driven or use case driven? Do you have
your own methods of packaging?
Let me absorb your thoughts.