tutor icon indicating copy to clipboard operation
tutor copied to clipboard

Tutor client-side in the browser

Open eeble opened this issue 12 years ago • 10 comments

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.

eeble avatar Jun 20 '13 22:06 eeble

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.

davidchambers avatar Jun 20 '13 22:06 davidchambers

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.

eeble avatar Jun 21 '13 15:06 eeble

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

davidchambers avatar Jun 21 '13 17:06 davidchambers

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?

bernatfortet avatar Sep 10 '13 07:09 bernatfortet

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)

davidchambers avatar Sep 10 '13 18:09 davidchambers

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!

bernatfortet avatar Sep 13 '13 08:09 bernatfortet

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.

GixGosu avatar Mar 23 '16 02:03 GixGosu

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. :)

davidchambers avatar Mar 23 '16 10:03 davidchambers

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.

GixGosu avatar Mar 23 '16 15:03 GixGosu

Excellent!

davidchambers avatar Mar 24 '16 15:03 davidchambers