8000 [Question] app.configure without scope? · Issue #558 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

[Question] app.configure without scope? #558

@cpsubrian

Description

@cpsubrian

Since I'm fairly new to using feathers, I was wondering the philosophy behind the pervasive use of scope in various parts of the API. I used to design APIs this way as well but lately have preferred more functional/explicit designs.

For example:

function myPlugin (options) {
  return function () {
    var app = this
  }
}
app.configure(myPlugin({}))

vs.

function myPlugin (options) {
  return function (app) {}
}
app.configure(myPlugin({}))

I understand that it would be a huge breaking change (and thus probably not realistic), but at least in this case it could be changed in a backwards compatible way (but other things like hooks and services are tricker).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0