2 ms·
So the problem with that is seems to be...what if there was another view that required pagination? So the two unpleasant scenarios seem to be this: 1) The OP'
by danso 14y ago
So the problem with that is seems to be...what if there was another view that required pagination?
So the two unpleasant scenarios seem to be this:
1) The OP's assertion that DRYing the code may unintentionally break functionality in all the places that use it.
2) The DRY assertion: copy-pasting functionality, such as pagination, makes it more likely that the pagination functionality won't be properly updated across all the modules that use it.
I guess it's a case of YMMV...because in this hypothetical app, it doesn't seem likely that the number of views will multiply, thus making it easier to update the copy-pasted code. But that seems like a mindset as prone to future problems than one that is more DRY-minded.