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

ClojureScript and caching support #75

Open
lorddoig opened this issue May 5, 2015 · 3 comments
Open

ClojureScript and caching support #75

lorddoig opened this issue May 5, 2015 · 3 comments

Comments

@lorddoig
Copy link

lorddoig commented May 5, 2015

I'm currently finishing up a half-baked fork with the codebase ported to CLJX so as to support ClojureScript. The motivation was a) to have cljs support; and b) to allow pluggable HTTP clients, which in turn allows caching to be performed at the request level so users (i.e. me) don't have don't have to wrap the whole API.

I'm considering submitting a PR but don't want to spend time tidying this up if the idea is a non-starter for you.

Thoughts?

@Raynes
Copy link
Owner

Raynes commented May 5, 2015

I'm interested, but only if it doesn't significantly uglify or complicate the codebase because I'm not that interested in ClojureScript.

So, my answer is: probably, yes, please pull request it, I'll almost certainly take it.

@lorddoig
Copy link
Author

lorddoig commented May 5, 2015

Ok, cool. Why don't you take a look at the fork and let me know what you think. It's not done, and has some hairy edges, but I think it's going in a good direction. It's also in dire need of many more tests, and there's fair chance it might blow up under extensive use. The big changes are in core, util and http/* (and project.clj). I'd be grateful for input, especially regarding the builtin requesters which are currently pretty ugly.

Aside from the cljs support, the benefits of pluggable requesters can be seen in this little demo that just spits the request map out to the console. This kind of architecture makes it a breeze in terms of custom caching, logging, testing, etc. It also means that hard dependencies on clj-http, core.async, and even ClojureScript itself can be dropped.

There is additional complexity, but it's warranted (I think) and manageable.

Thoughts?

@lorddoig
Copy link
Author

lorddoig commented May 5, 2015

Oh and I still have to make a requester for nodejs.

polymeris added a commit to polymeris/tentacles that referenced this issue Aug 9, 2016
Using cljc. Tests executed via bensu/doo. Repo file download & upload excluded
cf. gh issue Raynes#75
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