0

I want to code Excel-like behaviour in my MEAN Application. What I mean with excel-like behaviour that is having cells and columns and rows (I have that in Angular already) and now I want to enable users to select e.g. 2 columns and let a self-defined calculation run over it.

Now storing User-defined Functions in MongoDB sounds like a very bad idea, since a user could drop the database.

The Stack

[User Input]
[Calculations/Functions]
[Controller] 
[Middleware]
[API+Server]
[DB]

I discussed how to achieve this with MEAN here: Convert JSON String to Objects however I highly doubt this will be secure. Any idea how to achieve this in a solid fashion?

Community
  • 1
  • 1
Stephan Kristyn
  • 15,015
  • 14
  • 88
  • 147
  • 2
    What exactly do you mean with "excel like behavior"? Excel has quite a lot of behaviors in a lot of different situations. Can you maybe write a short user-story to tell us what exactly you are up to? – Philipp Nov 07 '14 at 10:04
  • I added a stack now and more explanatory text. – Stephan Kristyn Nov 07 '14 at 13:03
  • Would it be an option to execute any such functions on the client-side? That would protect the database. However, when the users can exchange worksheets, it could open them up to XSS attacks. – Philipp Nov 07 '14 at 13:05
  • Exchanging Worksheets, will not be possible. It should be possible to only execute the functions client-side. Interesting idea. Downside is that the browser will need to perform the calculations (imagine performance on 30K rows) and that the Domain Logic is not implemented into the Model but into Angular Services and the Controller. – Stephan Kristyn Nov 07 '14 at 14:25

0 Answers0