We are going to display a list of 25-entries on a webpage out of (at least) 5000 entries in the database. The entries should be sortable and you should be able to filter the results according to their names.
In my world, you send a request to the server asking for 25 entries that matches your criterion. However my colleague suggested a different approach; to ask for all 5000 entries and then sort and filter them with JavaScript.
I think that's stupid, but I'm afraid I'm missing something. What would you say are the pros and cons of this two approaches?