While correcting some typos on the registry module I found a method which
performs a resource intensive operation (a LIKE clause was used) named
listBySomething.
As per best-practices documentation that method should be named
searchBySomething then I started the refactoring deprecating the previous
method and moving the code inside the newer one... but I suddenly encounter
a naming problem: how should be named the corresponding pageBySomething
method?
If I leave it with the page prefix it will be not obvious the method is
resource intensive... but which other prefix could I use?
I ended up with the following proposal: why don't we use a single method
prefixed with list or search to indicate the complexity and add an optional
parameter to specify the pagination parameters?
For example the preceeding list/search will became
public Collection searchBySomething(Something something, PaginationInfo
info)
where PaginationInfo is an optional value object used to pass the page
number, shown elements and such stuff.
I'll wait for your opinions as this could be a destructive change for many
integrations... obviously we will proceed with deprecation to preserve code
already built.
--
View this message in context: http://www.nabble.com/Pagination-made-easier...-pheraps%21-tf4718633s17546.html#a13489223
Sent from the SmartWeb Developers mailing list archive at Nabble.com.
|