Hi Sander, thank you for your answer. Probably I don't give you all the useful informations but your questions are in any case interesting (maybe my bad english is complicit). I can be more specific if you have the patience to read: the application has got a different number of user with different role. Depending on the role le list of product change showing all the product (if you are admin) or some product that you own (if you are a different role). This is the only filter: is related to the user and saved in the DB (mongo). When you visit the page Angular call a rest API where Express retrieve data from mongo and then respond to Angular with a json like list of object. Angular compile a table with ng-repeat directive and the user can see the correct list of product and the relative properties (name, code, weight, ...). >From this page the button to download an excel file send a request to Express that send a direct download of a file generated with a library. The information of the excel table is the same of the angular view table. So the doubt was if we have to send the object list already available in the angular controller or if from the Express side we should call again mongo and retrieve the product list already knowing user role.
If you are an admin the list of product could be about 1MB in the futur and my perception is that sending an http request with this size of data could slow down the process. From the other side it doesn't request another call to mongoDB. Perhaps I have been clearer now? What do you think? Thank you very much! Il giorno venerdì 17 luglio 2015 06:14:57 UTC+2, Sander Elias ha scritto: > > Hi Signor, > > There is no right or wrong answer here. The only correct answer is 'it > depends', which is utterly useless. So I will give you a few pointers, > that might help. > > 1. Filtering through records is a prime DBMS function. In some cases > you can do it more effectively then a system that's build for tasks like > this. Is this such a case? are you sure you can do a better job than the > MongoDB people? > 2. How large is your product list? Totaling up under 100Kb? consider > keeping it in the browser. The 100Kb number is not a hard boundary, you > have to decide. > 3. how violate are your search parameters? > 4. How many different set's does 1 user make? If both 3 and 4 are high > numbers, consider doing client side > > That are a few of the prime considerations you have to make, there are > many more. > Did this help you a bit? > > Regards > Sander > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
