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

Tutor client-side in the browser #59

Open
eeble opened this issue Jun 20, 2013 · 10 comments
Open

Tutor client-side in the browser #59

eeble opened this issue Jun 20, 2013 · 10 comments

Comments

@eeble
Copy link
Contributor

eeble commented Jun 20, 2013

I know that the ability to run tutor client-side is on the roadmap somewhere. I'm just curious how this would happen. Given a little direction/ideas and free time, I'd be happy to try and tackle this.

@davidchambers
Copy link
Owner

The idea is to use YQL as a proxy using queries in the form:

select * from html where url='http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=195297'

Tutor would send this query to Yahoo in the form of an Ajax request (thanks to CORS). Yahoo would then kindly fetch the Gatherer document and provide its body to us in full.

The tricky part is using browserify to make Tutor run in both environments (server and browser). I've made a start on this, but it's a long way from finished.

@eeble
Copy link
Contributor Author

eeble commented Jun 21, 2013

Cool, I figured it was the 'request' module that was causing the issues as that was about as far as I got adding it into a browser page before things really blew up.

@davidchambers
Copy link
Owner

We'll need to use jQuery.ajax to make requests from the browser.

@bernatfortet
Copy link
Contributor

Hey David, si this still on?
I have moved my app to Meteor and I am having a lot of trouble to use an endpoint API on the server to get the cards.
It would be great to have it on the client.

How can I help you?

@davidchambers
Copy link
Owner

My priorities are as follows:

  1. Maintenance:
  • stay on top of changes to Gatherer's output
  • add support for edge cases as they appear (e.g. double-faced cards)
  • fix existing Tutor bugs as they're reported
  1. Add search functionality
  2. Make Tutor work in the browser using YQL

How can I help you?

Most of Tutor's code will apply in both contexts, but certain areas will require special treatment. There are two tasks:

  • write a function which takes a Gatherer URL and uses jQuery.ajax to make a YQL request for the URL's content
  • package Tutor using browserify (this is likely to be quite fiddly)

@bernatfortet
Copy link
Contributor

Well, I'll see what I can do about it. I am excited to see it running on the browser.

Keep up the good work. Tutor is great!

@GixGosu
Copy link

GixGosu commented Mar 23, 2016

I wanted to check where this was at? I can take a look at it and help out with a pull request. I don't have a lot of stats on GitHub as the projects I work on are covered by NDAs so I wanted to get a fun open source project to work on and this looks like it could be a lot of fun.

@davidchambers
Copy link
Owner

Thanks for your interest, @GixGosu. I haven't been actively developing Tutor, as I've directed my attention towards other open-source projects. If you're interested in working on this, I'm certainly happy to discuss ideas and provide feedback. :)

@GixGosu
Copy link

GixGosu commented Mar 23, 2016

Sounds good! I'll start working on it over the next few days when I'm not working and see what I come up with and reach out to you when I have a good idea of where I can go with it.

@davidchambers
Copy link
Owner

Excellent!

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

4 participants