title: Client-side vs server-side data manipulation
body: <p>I just learned how to access express local variables in client-side JS:</p>
  
  <p><a href="https://stackoverflow.com/questions/34618426/express-handlebars-local-variables-in-client-side-js">https://stackoverflow.com/questions/34618426/express-handlebars-local-variables-in-client-side-js</a></p>
  
  <p>But this opened a whole new can of worms... Now I don't know what data manipulation to do server side (within the route) and which to do client-side.</p>
  
  <p>For example:
  Here I am cutting the description property of each database item, so that the first 100 characters can be used as a preview in a featured listing collage.</p>
  
  <pre><code>//routes/index.js
  router.get('/', isAuthenticated, function (req, res, next) {
    //Fetching data to populate newest listings collage
    User.find({role: 'organization'}).sort({datecreated: -1}).limit(6).exec(function (err, docs) {
      docs.forEach(function(item){
        item.description = item.description.slice(0,100);
      });
      console.log(docs[0].description);
      res.render('index.hbs', {
        user: req.user, 
        orgsfeatured: docs, 
        message: req.flash('message')
      })
    });
  });
  </code></pre>
  
  <p>Is it more typical/ performant/ maintainable to just send the entire array of objects to the client-side javascript to be sliced?</p>
  
  <p>I know it's a balance between running up the client cpu load vs the server load, but there must be some <strong>best practices</strong>. Let me know if I am not being clear. 
  Thanks!!</p>