What is the best way to structure the naming of your (java) packages?
By design paradigm: my.app.dao, my.app.services, my.app.util, my.app.model, etc.
or by function/context name: my.app.clients, my.app.registration, my.app.production, my.app.accountancy?
On a side note:
I think I remember watching a keynote speech on the Spring framework where a developer advocated the structuring of packages according to the application's domain functions. The same would happen for URLs:
Not exactly sure what you are suggesting but if your 'services/userregistration' is based on authorization/authentication then you have a rest call for that and nothing else. Presuming that the functionality is in fact the same.
That is similar to your other areas in that either something like 'products' is different for 'model' and 'services' or it is the same. If the same then there would be a root 'product' and not the way you broke it out. If they are different then they should have two different rest methods.
I'm not sure i'm in the right topic for this question. Feel free to redirect me to the appropriate one, if necessary.
I have an ANT related problem. I want to read some values from a file (new.txt), substring the parts i need from each line and then, concatenate all these values with "_" between them. This big concatenated string will be the name of a folder i'll create. Here is the code i wrote:
var text = attributes.get("text");
var end = text.length();
var start = attributes.get("start")||text.lastIndexOf("=")+2;
project.setProperty(attributes.get("property"), text.substring(start, end));
I want something like: 1344_dvfgf_sfgg_wfggh
but i have: _1344_dvfgf_sfgg_wfggh
The Alert Interface in Selenium doesnt have any implementing classes on its own. In such a case, how will the user get to know the exact method or exact class through which the alert interface can be used....
To put it in a simple way, how to use an interface when there are no implementing classes for the interface.
Hi,all.Could anybody give me a detail describtion of the channel?(that is,something likes file channel,socket channel,etc.) or give me the relative link about it.Also,I want to know:
1.How the os implements the channel,does it need any hardwares to support?
2.What does it differ from the stream,in what situation,I should use it rather then the stream? What's its advantage?
Thanks to all.
Please take file channel as an example to explain it,mainly focusing on thease questions:
1.How the os implements the file channel,does it need any hardwares to support? or it just a virtual concept?
2.Why I should use it instead of the file stream?
The Channel[^] is a Java concept, implemented on top of the operating system. As the documentation states, this can be a hardware device, a file, a network socket, or a program component that is capable of performing one or more distinct I/O operations, for example reading or writing. The choice of when to use channels over streams is something you need to decide when designing your application, as it will depend on your requirements.
I am developing a java application which after developing i want to sell off to some organisation, but i dont know how to package all my project files into one file for commercial because i dont think they need to be viewing my source code.
How can i pack them all in one setup file? :(
The simplest way is to put all your classes into a java archive via the jar command. You then need to send only the jar file(s) to your customers; see http://docs.oracle.com/javase/tutorial/deployment/index.html[^]. You could also try a Google search to see if there are any other setup applications applicable to Java apps.