It is not clear what you mean by "data acquisition." From the database? File? Memory?
My opinion on the name of the methods is that its role is to eliminate any ambiguities and, ideally, the need to look for documentation. I believe that this should be done even at the cost of longer method names. According to research, most intermediate + developers can read a few words in the case of a camel. With the IDE and the automatic completion of writing long method names is also not a problem.
Thus, when I see "fetchBooks", if the context is not very clear (for example, a class called BookFetcherFromDatabase), it is ambiguous. Where to get it from? What is the difference between fetching and searching? You also risk that some developers associate semantics with specific keywords. For example, the selection for the database (or memory) depending on the download (from a file) or download (from the Internet).
I would prefer something like "fetchBooksFromDatabase", "loadBookFromFile", "findBooksInCollection", etc. This is less obvious, but as soon as you go along the length, it is understandable. Everyone who reads this will immediately understand what you are trying to do.
Uri Jan 26 '10 at 19:03 2010-01-26 19:03
source share