Skip to content

Strip jQuery dependancy #89

Closed
Closed

Description

@daleharvey

its only use for ajax, should be able to replace with plain xhr calls

Activity

  1. ryanramage commented on Jun 22, 2012

    @ryanramage
    Contributor

    With removing jquery, we can look to integrate @maxogden JSONStream for streaming parsing ajax requests. I have an amd module that should make it super easy to use. See https://github.com/ryanramage/JSONStream

  2. max-mapper commented on Jun 22, 2012

    @max-mapper
    Contributor

    i'd recommend swapping out jQuery.ajax for browser-request first and then JSONStream after. @daleharvey what pouch features do you think could benefit from streaming json? large remote json GETs during replication maybe

  3. daleharvey commented on Jun 22, 2012

    @daleharvey
    ContributorAuthor

    I dont think we get much from JSONStream, we cant pipe anything straight back into the target during replication so we would just be building an identical json from a streaming parser, I would rather let http do the error checking / validation,

    for the changes feed we can just use streaming protocols (eventsource and in future websockets)

  4. tilgovi commented on Jun 23, 2012

    @tilgovi
    Contributor

    I just commented in #82 about this also but discussion probably belongs here... what about porting the http adapter to browserify so that it works in node as well?

  5. max-mapper commented on Jun 23, 2012

    @max-mapper
    Contributor

    im investigating the likelihood of using http-browserify... will report back soon

  6. daleharvey commented on Jun 23, 2012

    @daleharvey
    ContributorAuthor

    Whats the total size of the http-browserify package? I am a bit concerned with the size and complexity as it would seem to need packaging event emitter and doing a bunch of preprocessing for require etc

    browserify looks saner, and even if we were going to use that I would be looking to get rid of the xmlhttprequest dependancy, all the browser we do and likely ever will work on have pretty good xhr implementations (even modern ie)

  7. fernandogmar commented on Jul 27, 2012

    @fernandogmar

    Hi,

    sorry, I am not sure the state of this issue...

    I would like to make a suggestion... how about https://github.com/natevw/fermata ? I am using it in a project from node.js to couchdb. It's simple to handle any RESTful API, and it works for browsers and node.js, in theory. And No Jquery dependencies ;)

    What do you think?

  8. natevw commented on Dec 24, 2012

    @natevw
    Contributor

    I think Fermata would be a great fit, but I'm probably biased :-)

    Another benefit is that you'd be able to clean up some URL building code with it as well, since it has a handy shortcuts for extending paths and JSON stringifying queries: fermata.json(hostDB)('_all_docs', {$key:docId, include_docs:true})

    Would love to get feedback on anything that would make Fermata easier or more appealing for integration here, feel free to open a discussion in its Issues.

  9. natevw commented on Dec 24, 2012

    @natevw
    Contributor

    Or should say: I'd be happy to provide a patch if you're seriously interested!

  10. calvinmetcalf commented on Jan 5, 2013

    @calvinmetcalf
    Contributor

    In the short run we could replace the jquery dependency with zepto, minified with just core and ajax it's 18k.

    update: it also needs event it looks like so thats 23k, still a lot better then the 90k that jquery is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions