1

Hacking on Ruby Services While Waiting for the SDK

If you have any examples Hacking Ruby services through browserplus while we wait for the SDK, please post.
Anyone with some ruby code that handles cross domain issues with json request, please share your content.
smile.gif
thanks for the title lloyd

15 Replies
  • Hi again Monsignor,

    Reposting the hacky "getting started" instructions. Also turning up the heat to get a proper SDK out ASAP.

    Here's the hacky way of getting started.

    1. go to service explorer (http://browserplus.yahoo.com/developer/services/)
    2. install JSONRequest
    3. find it on your disk (on osx it'll be in ~/Library/Application Support/Yahoo!/BrowserPlus/Corelets/JSONRequest/1.0.8)
    4. copy the directory out
    5. inspect and change the manifest.json and the core implementation.
    6. copy into corelets directory to publish (i.e. RSSReader/1.0.0)
    7. restart BrowserPlus to force it to rescan corelets directory

    Now warnings, the development environment here sucks, our real SDK will address this, but in the meantime this should let you play and explore.

    JSONRequest is a good place to start because of the obvious similarities, and you can probably throw out the json parsing library.

    Also, some interesting, though outdated, information is available here: http://hackety.org/2008/06/09/dismantlingBrowserPlus.html

    lloyd
    0
  • QUOTE (Lloyd Hilaiel @ Dec 2 2008, 10:21 AM) <{POST_SNAPBACK}>
    Hi again Monsignor,

    Reposting the hacky "getting started" instructions. Also turning up the heat to get a proper SDK out ASAP.

    Here's the hacky way of getting started.

    1. go to service explorer (http://browserplus.yahoo.com/developer/services/)
    2. install JSONRequest
    3. find it on your disk (on osx it'll be in ~/Library/Application Support/Yahoo!/BrowserPlus/Corelets/JSONRequest/1.0.8)
    4. copy the directory out
    5. inspect and change the manifest.json and the core implementation.
    6. copy into corelets directory to publish (i.e. RSSReader/1.0.0)
    7. restart BrowserPlus to force it to rescan corelets directory

    Now warnings, the development environment here sucks, our real SDK will address this, but in the meantime this should let you play and explore.

    JSONRequest is a good place to start because of the obvious similarities, and you can probably throw out the json parsing library.

    Also, some interesting, though outdated, information is available here: http://hackety.org/2008/06/09/dismantlingBrowserPlus.html

    lloyd


    Dear Lloyd,
    I am having a problem. I am fine all the way up to step 7. When I restart browserplus my example, in my case testbpprog instead of RSSReader, disappears. Do I have to put information about the corelet in a log file. restarting BrowserPlus makes my directory go away.
    0
  • QUOTE (Monsignor Klaatu @ Dec 3 2008, 07:20 PM) <{POST_SNAPBACK}>
    Dear Lloyd,
    I am having a problem. I am fine all the way up to step 7. When I restart browserplus my example, in my case testbpprog instead of RSSReader, disappears. Do I have to put information about the corelet in a log file. restarting BrowserPlus makes my directory go away.


    So that's one of the reasons this environment is a bit of a hack.

    BrowserPlus will actively delete cruft (or what IT thinks is cruft) from the corelet directory. So your service has a syntax or structural error somewhere, and browserplus core is removing it. If you would like to post the service to code.google.com or sourceforge then I'd love to take a look at it?

    In the SDK we'll include a "validator" that you will handling checking for correct syntax and everything and will "publish" to your local corelet directory, which should make this experience better.

    very best,
    lloyd
    0
  • QUOTE (Lloyd Hilaiel @ Dec 8 2008, 03:03 PM) <{POST_SNAPBACK}>
    So that's one of the reasons this environment is a bit of a hack.

    BrowserPlus will actively delete cruft (or what IT thinks is cruft) from the corelet directory. So your service has a syntax or structural error somewhere, and browserplus core is removing it. If you would like to post the service to code.google.com or sourceforge then I'd love to take a look at it?

    In the SDK we'll include a "validator" that you will handling checking for correct syntax and everything and will "publish" to your local corelet directory, which should make this experience better.

    very best,
    lloyd


    It is interesting, it would be cool if browserplus had a testbed area for its development. But, i can respect that google and sourceforge have the edge on that one. Alright, good to hear a validator will be in the SDK. It is sad to me, that i need to be babied that much.

    I will comment again when i have posted to sourceforge and such
    0
  • QUOTE (Monsignor K. Kuwajukaba @ Dec 8 2008, 04:49 PM) <{POST_SNAPBACK}>
    It is interesting, it would be cool if browserplus had a testbed area for its development. But, i can respect that google and sourceforge have the edge on that one. Alright, good to hear a validator will be in the SDK. It is sad to me, that i need to be babied that much.

    I will comment again when i have posted to sourceforge and such


    I'll eagerly await your post! As far as feely sad, that's silly. You're hacking on a platform without an SDK or documentation, come on! :)lloyd
    0
  • QUOTE (Monsignor K. Kuwajukaba @ Dec 8 2008, 04:49 PM) <{POST_SNAPBACK}>
    It is interesting, it would be cool if browserplus had a testbed area for its development. But, i can respect that google and sourceforge have the edge on that one. Alright, good to hear a validator will be in the SDK. It is sad to me, that i need to be babied that much.

    I will comment again when i have posted to sourceforge and such


    maybe http://github.com ? I'd love an excuse to play with git, and I dig the social element of this site.

    just an idea,
    lloyd
    0
  • QUOTE (Lloyd Hilaiel @ Dec 9 2008, 12:02 PM) <{POST_SNAPBACK}>
    maybe http://github.com ? I'd love an excuse to play with git, and I dig the social element of this site.

    just an idea,
    lloyd


    Alright, I will post it there. If my plans work out my post may come out around the time of the SDK
    but, i will post it there Lloyd, see how it goes, and drag others along.
    0
  • QUOTE (Monsignor Klaatu @ Dec 11 2008, 07:08 AM) <{POST_SNAPBACK}>
    Alright, I will post it there. If my plans work out my post may come out around the time of the SDK
    but, i will post it there Lloyd, see how it goes, and drag others along.


    cool. Right after we get the SDK out, I'm hoping to start a new native service there myself. I deeply trust the folks over at YUI (who've just moved to github), and have heard some fabulous things about git. We'll see how it goes!

    holler once it's up (ping me on twitter if you like #lloydhilaiel) and I depending on where we're at, I'll test the SDK tools on it.

    very best,
    lloyd
    0
  • hello
    "on osx it'll be in ~/Library/Application Support/Yahoo!/BrowserPlus/Corelets/JSONRequest/", where could I find the equivalent library under Windows XP?

    Francisco
    0
  • Hello
    I am anxious to try out our interface to Amazon S3 using YBPlus.
    Can you tell me where is the corelets library under Windows XP no answer like we do not use Windows!!

    Monteiro
    0
  • QUOTE (Francisco @ Dec 15 2008, 04:56 AM) <{POST_SNAPBACK}>
    Hello
    I am anxious to try out our interface to Amazon S3 using YBPlus.
    Can you tell me where is the corelets library under Windows XP no answer like we do not use Windows!!

    Monteiro


    Hi Monteiro,

    welcome to the fray!

    On Windows XP the directory where services live is:

    ${USERPROFILE}\Local Settings\Application Data\Yahoo!\BrowserPlus\Corelets

    Have a look under that directory for the structure.

    Finally, as others have notice, the Daemon will agressively prune empty directories and "invalid services" from that directory, so for development it's best to copy your service in as part of your build.

    In our upcoming SDK there will be a tool that will validate and install your service for you. There will also be a flag to the BrowserPlusCore daemon (that you can set on the command line or in your config file) to put it in "developer mode". In this mode it will instantly discover newly installed services that have been copied in. Normal behavior is optimized to minimize disk scanning and you'll need to restart the daemon (probably from the config panel) every time you add or change services.

    Finally, I'd suggest you hack on the service on github.
    http://github.com/lloyd

    The informal convention we've started is all BrowserPlus services have a 'bp-' prepended to them:
    http://github.com/search?q=bp-

    Steve and I from the team just started playing on friday, and we're both pretty inspired by both git and the tools that github has built around it. I never had so much fun collaborating on code :)lloyd
    0
  • Thanks for the info Llyod.

    Amazon here I come, hope no "boot" will be thrown at the service
    0
  • Hello,
    Which version of Ruby does the interpretor use, here we use Ruby 1.8.6 or later. 1.8.6 has the REXML as standard.
    Started a quick test, without a SDK and some further documentation it might take longer then expected. However we have a winter student starting and will dump the project on his head.

    francisco
    0
  • QUOTE (Francisco @ Dec 16 2008, 01:00 AM) <{POST_SNAPBACK}>
    Hello,
    Which version of Ruby does the interpretor use, here we use Ruby 1.8.6 or later. 1.8.6 has the REXML as standard.
    Started a quick test, without a SDK and some further documentation it might take longer then expected. However we have a winter student starting and will dump the project on his head.

    francisco

    Hi Francisco,

    we're on ruby 1.8.7 patchlevel 22. You may be interested in some of the different open source projects out there around ruby services, you can inspect code here: http://github.com/lloyd

    There will be more and more projects popping up in the coming weeks :Dlloyd
    0
  • Just to document it somewhere:

    I had a problem in that no new service was being installed using the 'hacky' approach. Trying to figure out what was going on I figured out that empty directories in the Corelets directory were not being deleted. It turns out that I had two BrowserPlusCore processes running on my system (Mac OS X). Killing both processes and restarting BP via preferences menu solved the issue.

    I think that it may be related to killing (not properly closing) browsers. I also always use Firefox and Safari at the same time.
    0
This forum is locked.

Recent Posts

in Service Authors