Opened 10 years ago

Closed 7 years ago

#8340 closed enhancement (wontfix)

flXHR -- cross-domain plugin for registry

Reported by: Kyle Simpson Owned by: Bryan Forbes
Priority: high Milestone: future
Component: Dojox Version: 1.2.3
Keywords: dojo dojox flxhr flensed Cc:
Blocked By: Blocking:

Description

[From: Kyle Simpson]

Pursuant to discussions with Mike and Kris, I'm submitting this "plugin" to register flXHR as a cross-domain plugin for the DojoX cross-domain registry.

The files I'm attaching are:

  1. "flXHRproxy.js" - The dojox plugin which sets up and registers flXHR with the registry.
  2. "flXHR-1.0.zip" - the 1.0 production release of flXHR (and subsequent dependencies -- includes all source and 'make' files)

In addition, this plugin can be seen in use here at this demo page: http://flxhr.flensed.com/code/dev-tests/test-dojo-xhr.html

The flXHR proxy plugin works by defining a register function which the calling code can call to register a URL (partial or full) to be used with flXHR, and optionally to pin a specific set of flXHR options (policyURL, etc) to that registration for later instantiation use.

Example usage might look like (notice the different flXHR options pinned to each URL):

dojox.io.flXHRproxy.registerOptions('http://www.mydomain.com/',{xmlResponseText:false...}); dojox.io.flXHRproxy.registerOptions('http://rss.mydomain.com/',{xmlResponseText:true...}); ... dojo.xhrGet({url:'http://www.mydomain.com/something.html'...}); ... dojo.xhrGet({url:'http://rss.mydomain.com/feed.html'...});

Attachments (5)

flXHRproxy.js (3.3 KB) - added by Kyle Simpson 10 years ago.
the dojox flXHR proxy plugin
flXHR-1.0 (Part 1 of 2).zip (253.6 KB) - added by Kyle Simpson 10 years ago.
flXHR v1.0
flXHR-1.0 (Part 1 of 2).tar.gz (248.4 KB) - added by Kyle Simpson 10 years ago.
flXHR v1.0
flXHR-1.0 (Part 2 of 2).zip (218.0 KB) - added by Kyle Simpson 10 years ago.
flXHR v1.0 (part 2)
flXHR-1.0 (Part 2 of 2).tar.gz (214.5 KB) - added by Kyle Simpson 10 years ago.
flXHR v1.0 (part 2)

Download all attachments as: .zip

Change History (13)

Changed 10 years ago by Kyle Simpson

Attachment: flXHRproxy.js added

the dojox flXHR proxy plugin

Changed 10 years ago by Kyle Simpson

Attachment: flXHR-1.0 (Part 1 of 2).zip added

flXHR v1.0

Changed 10 years ago by Kyle Simpson

flXHR v1.0

Changed 10 years ago by Kyle Simpson

Attachment: flXHR-1.0 (Part 2 of 2).zip added

flXHR v1.0 (part 2)

Changed 10 years ago by Kyle Simpson

flXHR v1.0 (part 2)

comment:1 Changed 10 years ago by Adam Peller

If this code is being submitted under Dojo CLA, I think we'd need the copyright/license information modified in the code submission. Do we want to include just the plugin in the Dojo repos, or would the entire project migrate to Dojo?

comment:2 Changed 10 years ago by Adam Peller

Milestone: tbdfuture

comment:3 Changed 10 years ago by Kyle Simpson

I dropped the ball and have failed to send in the CLA as requested. I will get on that ASAP and get it sent over.

I am curious, have we come to a conclusion on what exactly is going into Dojo? Just the plugin "flXHRproxy.js" (with a readme link to where to download flXHR), or that plus a ZIP file of the latest stable release of flXHR?

comment:4 Changed 10 years ago by Kyle Simpson

OK, I have gone ahead and released this Dojo plugin here: http://flxhr.flensed.com/dojo.php

If there is still interest in having the "flXHRproxy.js" plugin itself (not the whole flXHR) donated/accepted into the DojoX distribution, I'm certainly willing to license it over to the Dojo Foundation. Please just let me know.

comment:5 Changed 7 years ago by bill

Owner: changed from Adam Peller to Bryan Forbes
Status: newassigned

The new philosophy in the dojo community is that "dojox packages" like this one get released stand-alone, like you have already done in github, and registered in http://packages.dojotoolkit.org.

As for the plugin https://github.com/flensed/flXHR/blob/master/code/flXHRproxy/dojox/flXHRproxy.js, it seems like that should remain part of your github project too. I don't see a reason to add it to dojo core, although I may be missing something.

With 1.8 (already in beta), there's a registry as part of dojo/request that you can probably use, i.e. it replaces xhrPlugins, but Bryan can comment more. Bryan?

Last edited 7 years ago by bill (previous) (diff)

comment:6 Changed 7 years ago by Adam Peller

note that code can still be donated to the Dojo Foundation through a CLA, and posted with a Dojo license, just in a separate git project rather than a single svn repository.

comment:7 Changed 7 years ago by Kyle Simpson

I am no longer requesting to donate this code to the Dojo Foundation. I don't actively maintain flXHR (or the flXHRproxy Dojo plugin) anymore, I donated them to the public domain earlier this year when I dumped the contents of the old site onto that github repo.

Moreover, the philosophy behind this original request may have been flawed from the beginning. I was seeking to have more visibility for the flXHRproxy plugin, as at the time cross-domain Ajax was quite popular but many elaborate hacks were required (not necessarily true now, with CORS being pretty well supported). But I never really wanted the Dojo Foundation to "own" or "maintain" the main code. Having only the flXHRproxy plugin in the registry, but not flXHR itself, probably would have been an ill-fated approach.

I took the approach of shimming/polyfilling the XHR object interface with crossdomain functionality, which I think turned out to be the right approach, because the project's goals were always to exist until it wasn't needed anymore. I think it can be argued that XHR+CORS has fully realized that, so that's why flXHR has been retired.

Anyway, as far as I'm concerned, this ticket can be closed. No further action is necessary from my perspective.

comment:8 Changed 7 years ago by Adam Peller

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.