Loading ...
Sorry, an error occurred while loading the content.

Re: XUL and Ajile

Expand Messages
  • Michael
    Hi Richard, Ajile works well for dynamically loading EBI Toolbar plugins. I ve extracted example 0 of your Google Scholar Examples into a separate JavaScript
    Message 1 of 10 , Nov 23, 2008
    • 0 Attachment
      Hi Richard,
      Ajile works well for dynamically loading EBI Toolbar plugins.

      I've extracted example 0 of your Google Scholar Examples into a
      separate JavaScript file and updated the EBI Toolbar extension to
      demonstrate how this and other plugins can easily be dynamically
      loaded using Ajile. The updated files are posted at:

      http://drop.io/ebitoolbar/

      Do the following to see a working example:

      1. Download the ebitoolbar.michael.5.zip file.

      2. Extract and use it's contents as your EBI Toolbar Extension
      within Firefox.

      3. Launch Firefox.

      4. Hit Enter through all alert boxes.

      5. Press F2, it should alert confirming F2 was pressed, then after
      you hit Enter, prompt you for input.

      6. Either hit Enter or change the prompt's default info. I recommend
      enter the first time around.

      7. Use the EBI Toolbar to load Google Scholar then perform a search
      and observe the listed results.

      Basically The example shows that the EBI Toolbar using Ajile can
      dynamically load internal or external script files on-demand. The
      external script file used by default in my example (Google Scholars
      Example 0) resides here: http://tinyurl.com/5sjdrv/

      You can try creating plugins elsewhere including on your local drive
      then access them via their absolute URLs, i.e. file:///local/path/to/
      a/Plugin.js

      I've used Ajile to successfully load the following:

      - plugins that exist within the extension.
      - plugins that exist outside of the extension, but on a local drive
      - plugins that exist outside of the extension, on the web (i.e.
      http://tinyurl.com/5sjdrv/ )

      The fwim.js file within ebitoolbar.michael.5.zip contains code at
      lines 108 through 129 that demonstrates how to load and execute plugins.

      Very little of Ajile's functionality has been used to show how what
      you've asked for is possible. If you wish or need, you can delve
      deeper and make use of it's Namespacing and Importing functionality
      to define dependencies between your scripts.

      I've enjoyed working with your EBI Toolbar extension and learned a
      good deal in the process.

      Best of luck and feel free to contact me with any questions.


      Cheers!
      Michael

      P.S. The tinyurl link might eventually lead you to a 500 resource
      timed out at drop.io, if that happens, just copy the file's Download
      link location and use that, but it's pretty long so you might want to
      use tinyurl.com to shorten it and try again.


      On Nov 22, 2008, at 9:19 PM, Richard Easty wrote:

      > Hi Michael,
      >
      > Thanks very much for your efforts.
      >
      > We really appreciate your help.
      >
      > Our plan is to try to support 'plugins' for our toolbar.
      >
      > Most of the code will be deployed as an extension and will be
      > loaded in
      > the 'normal' way.
      >
      > Users will develop their own functions which we'll host at ebi.
      >
      > We're thinking that these functions could be loaded if and when the
      > user
      > wants them via Ajile. Perhaps we'll offer a list of all available
      > functions and the user will select from it.
      >
      > So in other words, the js classes that live at ebi will be versions
      > of the
      > plugin examples I supplied.
      >
      > Do you think Ajile will support this?
      >
      > Thanks again,
      >
      > Richard
      >
    • Michael
      Richard! Sorry for the delay, just getting back from the long Thanksgiving holiday. Thanks for the kind words. I m very happy that Ajile is helping you and
      Message 2 of 10 , Dec 2, 2008
      • 0 Attachment
        Richard!
        Sorry for the delay, just getting back from the long Thanksgiving
        holiday.

        Thanks for the kind words. I'm very happy that Ajile is helping you
        and your team better achieve your goals :-)

        I took a look at your sample and have created a working version
        (ebitoolbar.michael.7.zip) at http://drop.io/ebitoolbar/


        A few key points:

        - Ajile's MVC setting has no effect on the issue shown in your sample.

        - Ajile's Listeners are more reliable when used with Include, Import,
        and ImportAs statements.


        Take a look at the testPluginStatic() function within the scripts/
        fwim.js file in the michael.7 sample. The updated sample builds on
        the michael.5 sample. I've modified your alert statements to use the
        EBILogger so that you can clearly see the loading and listener
        handling sequences.

        Let me know how things go and as always, feel free to ask any questions.


        -Michael


        On Nov 26, 2008, at 12:56 PM, Richard Easty wrote:

        > Hi Michael!
        >
        > I can't thank you enough.
        >
        > That's such a lot of effort.
        >
        > What an amazingly quick & thorough explanation!
        >
        > We really appreciate it.
        >
        > We were thinking we'd be lost in XMLHttpRequest hell trying to get
        > something with Ajile's capability up to speed.
        >
        > With Ajile's help, we're now tempted to put most of our scripts at
        > ebi &
        > distribute a fairly minimal extension.
        >
        > Thanks to Ajile, the possibilities are really opening out for us.
        >
        > We're some distance from re-framing our toolbar so it can take
        > advantage
        > of Ajile, but we're very grateful.
        >
        > I'm probably missing some obvious point, but in trying to do some
        > simple
        > tests without the MVC functions, I'm having some problems. I've
        > changed my
        > original zipped example so it features the problem I've encountered.
        >
        > http://dl.getdropbox.com/u/197051/ebitoolbar.richard.2.zip
        >
        > To summarise, I switched off MVC in the Ajile file and changed the
        > function attached to F2, so that it is a simple version of the last
        > example you supplied. The new F2 function attempts to do a load of
        > a file,
        > and sets up a listener. Seems the listener does not get fired on
        > the first
        > run through. Subsequent attempts do seem to fire though. I dare say
        > it's
        > something to do with the MVC switch being turned off & some
        > initialisation
        > not running before the first call.
        >
        > Cheers! & many thanks once again,
        >
        > Richard
        >
        >> Hi Richard,
        >> Ajile works well for dynamically loading EBI Toolbar plugins.
        >>
        >> I've extracted example 0 of your Google Scholar Examples into a
        >> separate JavaScript file and updated the EBI Toolbar extension to
        >> demonstrate how this and other plugins can easily be dynamically
        >> loaded using Ajile. The updated files are posted at:
        >>
        >> http://drop.io/ebitoolbar/
        >>
        >> Do the following to see a working example:
        >>
        >> 1. Download the ebitoolbar.michael.5.zip file.
        >>
        >> 2. Extract and use it's contents as your EBI Toolbar Extension
        >> within Firefox.
        >>
        >> 3. Launch Firefox.
        >>
        >> 4. Hit Enter through all alert boxes.
        >>
        >> 5. Press F2, it should alert confirming F2 was pressed, then after
        >> you hit Enter, prompt you for input.
        >>
        >> 6. Either hit Enter or change the prompt's default info. I recommend
        >> enter the first time around.
        >>
        >> 7. Use the EBI Toolbar to load Google Scholar then perform a search
        >> and observe the listed results.
        >>
        >> Basically The example shows that the EBI Toolbar using Ajile can
        >> dynamically load internal or external script files on-demand. The
        >> external script file used by default in my example (Google Scholars
        >> Example 0) resides here: http://tinyurl.com/5sjdrv/
        >>
        >> You can try creating plugins elsewhere including on your local drive
        >> then access them via their absolute URLs, i.e. file:///local/path/to/
        >> a/Plugin.js
        >>
        >> I've used Ajile to successfully load the following:
        >>
        >> - plugins that exist within the extension.
        >> - plugins that exist outside of the extension, but on a local drive
        >> - plugins that exist outside of the extension, on the web (i.e.
        >> http://tinyurl.com/5sjdrv/ )
        >>
        >> The fwim.js file within ebitoolbar.michael.5.zip contains code at
        >> lines 108 through 129 that demonstrates how to load and execute
        >> plugins.
        >>
        >> Very little of Ajile's functionality has been used to show how what
        >> you've asked for is possible. If you wish or need, you can delve
        >> deeper and make use of it's Namespacing and Importing functionality
        >> to define dependencies between your scripts.
        >>
        >> I've enjoyed working with your EBI Toolbar extension and learned a
        >> good deal in the process.
        >>
        >> Best of luck and feel free to contact me with any questions.
        >>
        >>
        >> Cheers!
        >> Michael
        >>
        >> P.S. The tinyurl link might eventually lead you to a 500 resource
        >> timed out at drop.io, if that happens, just copy the file's Download
        >> link location and use that, but it's pretty long so you might want to
        >> use tinyurl.com to shorten it and try again.
        >>
        >>
        >> On Nov 22, 2008, at 9:19 PM, Richard Easty wrote:
        >>
        >>> Hi Michael,
        >>>
        >>> Thanks very much for your efforts.
        >>>
        >>> We really appreciate your help.
        >>>
        >>> Our plan is to try to support 'plugins' for our toolbar.
        >>>
        >>> Most of the code will be deployed as an extension and will be
        >>> loaded in
        >>> the 'normal' way.
        >>>
        >>> Users will develop their own functions which we'll host at ebi.
        >>>
        >>> We're thinking that these functions could be loaded if and when the
        >>> user
        >>> wants them via Ajile. Perhaps we'll offer a list of all available
        >>> functions and the user will select from it.
        >>>
        >>> So in other words, the js classes that live at ebi will be versions
        >>> of the
        >>> plugin examples I supplied.
        >>>
        >>> Do you think Ajile will support this?
        >>>
        >>> Thanks again,
        >>>
        >>> Richard
        >>>
        >>
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.