Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composable plugins #30

Open
natevw opened this issue Jan 31, 2013 · 3 comments
Open

Composable plugins #30

natevw opened this issue Jan 31, 2013 · 3 comments

Comments

@natevw
Copy link
Owner

natevw commented Jan 31, 2013

Couple things have felt awkward to me, especially in more casual use of Fermata:

  • for one-off requests, it's a little bummer that e.g. fermata.json("http://localhost:5984/db/_changes", {limit:5}) doesn't work. Perhaps it is good that URL initialization is different from normal URL extension, but it feels inconsistent.
  • related, it seems like something like connect's "use" chaining might be cooler than having this weird "low-level" (e.g. autoConvert/statusCheck) vs. "high-level" (e.g. json/raw/twitter/couchdb) plugin distinction.
@natevw natevw mentioned this issue Jan 31, 2013
@natevw
Copy link
Owner Author

natevw commented Nov 6, 2013

Another use case: a "timeout" mixin.

@therebelrobot
Copy link
Contributor

I'd be happy to look into JSONP support for a plugin :)

@natevw
Copy link
Owner Author

natevw commented Sep 22, 2016

To expand on the OP, I still think that part of the issue here is we really have two types of plugins:

  • mixins that add a specific bit of behavior (e.g. statusCheck, autoConvert, oauth, a timeout provider, redirect follower…)
  • wrappers — for lack of better term, as Fermata never really "wraps" — that combine a certain set of mixins and add perhaps a bit of sugar to polish up dealing with a particular API (Twitter, Flickr, CouchDB, Chargify

One typical distinction being that the latter modify the transport they are given, while the former tend to just use it as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants