For multi-selection criteria filtering, is it better to do the front end or the back end?

for multi-selection criteria filtering, is it better to do the front end or the back end?

such as the following

clipboard.png
< div class= "content" >

        <ul class="navv">
            <div class="trade">
                <li class="title" data-choice="0"></li>
                <li data-choice="1"></li>
                <li data-choice="2"></li>
                <li data-choice="3"></li>
                <li data-choice="4"></li>
            </div>
            <div class="services">
                <li class="title" data-choice="0"></li>
                <li data-choice="5">VI</li>
                <li data-choice="6">LOGO</li>
                <li data-choice="7">PC</li>
                <li data-choice="8">APP</li>
                <li data-choice="9">OTHER</li>
            </div>
        </ul>
        <div class="caselist">
            <div class="case" data-result="1">
                

<img src="images/cases/case1.png" alt="sample" /> </div> <div class="case" data-result="2, 1">

<img src="images/cases/case2.png" alt="sample" /> </div> <div class="case" data-result="1, 3">

<img src="images/cases/case3.png" alt="sample" /> </div> <div class="case" data-result="4">

<img src="images/cases/case4.png" alt="sample" /> </div> <div class="case" data-result="5, 6">

<img src="images/cases/case1.png" alt="sample" /> </div> <div class="case" data-result="6, 9">

<img src="images/cases/case2.png" alt="sample" /> </div> <div class="case" data-result="7, 3">

<img src="images/cases/case3.png" alt="sample" /> </div> <div class="case" data-result="9">

<img src="images/cases/case4.png" alt="sample" /> </div> </div> </div>
Nov.04,2021

obviously, at the back end, what if there are 2 million pieces of data? At the front end, get 2 million items before you sift through them? Unless the amount of data is clearly small.


conditional filtering of the database is very efficient.


if the amount of data is small and fixed, you can filter at the front end. On the contrary, it is filtered on the server side.


agrees with the upstairs view that a small amount of data can be solved directly at the front end, and if the amount of data is large, the database can be solved by direct query statements.

Menu