[DOCS-2519] Comment on: "manual/tutorial/store-javascript-function-on-server.txt" Created: 11/Jan/14 Updated: 03/Nov/17 Resolved: 15/Oct/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | 01112017-cleanup |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Docs Collector User (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Location: http://docs.mongodb.org/manual/tutorial/store-javascript-function-on-server/ |
||
| Participants: | |
| Days since reply: | 10 years, 5 weeks, 5 days ago |
| Description |
|
"Note We do not recommend using server-side stored functions if possible." It would be great if the doc said why! |
| Comments |
| Comment by Tony Pujals [ 11/Jan/14 ] |
|
It looks like others people wonder about this as well. There ought to at least be a link to a page that provides a more detailed reason why. While it's not hard to come up with possible reasons why it might not be recommended, it would be better if a rationale was provided, allowing people to decide for themselves if the reasons are important to them or not in their particular situation. After, if a feature is available, then there probably are some scenarios in which it makes sense. This next SO question has a response at the bottom that provides something of an explanation by quoting Mongo documentation, but the link doesn't point to a page anymore with the quote, leading one to wonder if perhaps the recommendation no longer applies. http://stackoverflow.com/questions/13841253/to-write-js-from-server-side-in-mongodb Strengthening that argument is that new in version 2.1 in the mongo shell, you can use db.loadServerScripts() to load all the scripts saved in the system.js collection for the current database. Once loaded, you can invoke the functions directly in the shell. |