Hi
I was wondering if it would be an improvement if you could group your meteor server methods per namespace.
Now for example, my filestructure groups the functions per class or subject.
For example a coffee file for playlists or a coffee file for parents.
Then a function in this playlist file might be ‘addToPlayList’ or in the other file ‘addParent’
For sake of organising and to prevent long unnecessary function names, I would like to register a method like (coffeescript):
Meteor.methods
playLists:
add: ( params ) ->
#some code here
remove: ( id ) ->
# some code here
and
Meteor.methods
parents:
add: ( params ) ->
#some code here
remove: ( id ) ->
# some code here
Then calling the method would be something like this:
Meteor.call 'playLists.add', params, ( error, result ) ->
# return handle code
I don’t think something like this is currently possible, but with a small change the Meteor.call function could check if the prosed method name is an object path, and if so, try to see if the objects.key is a function and execute.
This request is not something extremely important, but it would allow for more semantic and short method names that belong to a certain ‘class’.
Would love to hear opinions.