tutorials.de Buch-Aktion 05/2012
Like Tree1Danke
  • 1 Beitrag von CPoly
ERLEDIGT
NEIN
ANTWORTEN
7
ZUGRIFFE
542
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    jquerylog jquerylog ist offline Rookie
    Registriert seit
    Dec 2011
    Beiträge
    5
    Hello,

    I'm sorry for posting this in English but I live in Luxembourg and am currently still learning both LB and DE So it must be in english.

    I've just released this yesterday and I'm looking for reviews.
    It's an edit to jQuery to allow chain logs for faster and simpler debugging.

    Pretty much it allows to log both the selectors and return values when doing function chains on jQuery.

    This project is pretty new so if you want to blog or tweet about it I would apreciate it as, with more ppl using it and more feedback flowing in I'll be able to get it much better.

    One of the functionalities I wish to add in the future is throwing the logs via AJAX so you can debug stuff running on your users interface.

    The project's site is http://www.jquerylog.com hope this can be usefull for many big jquery engineers such as myself. If you feel the examples on the page are not good enought please tell me so I can improve them (both here or as a comment on http://blog.jquerylog.com)

    My idea is when having a bug in jquery I ended up doing the following
    $("#foo").parents(".t1").find(".t2:last ."+someString+":last").text("test"); // chain with a bug

    console.log("#foo");
    console.log($("#foo"));
    console.log(".t1");
    console.log("$("#foo").parents(".t1")");
    console.log(".t2:last ."+someString+":last");
    console.log($("#foo").parents(".t1").find(".t2:last ."+someString+":last"));

    Writing this was very frustrating, as I guess many already went through it, I've edited jQuery and now released it so others can also use it.


    The project's site is http://www.jquerylog.com hope this can be usefull for many big jquery engineers such as myself. If you feel the examples on the page are not good enought please tell me so I can improve them (both here or as a comment on http://blog.jquerylog.com )

    /Francisco

    Btw any replies please do it in english otherwise I'll have to google translate them

    And also I don't want to seem imposing. If you feel this is not the place to ask for feedback just tell me or remove the post, no hard feelings on it.
     

  2. #2
    CPoly CPoly ist offline Mitglied Weizenbier
    tutorials.de Premium-User
    Registriert seit
    Sep 2009
    Beiträge
    2.445
    First off: I like the idea and I understand your motivation. I like that it's on GitHub (I'm watching it) and that it solves an actual problem.

    But: It really should be a plugin and not a replacement. It would be much easier to maintain. Plus you used some deployment-ready jQuery version as your base, but if your plan was to create a fork of jQuery, which allows logging, than acutally fork jQuery and use the seperated source files (https://github.com/jquery/jquery/tree/master/src) instead of one big file.

    Either make it a plugin separated from the core or a fork of jQuery (which would automatically benefit from bugfixes).
     

  3. #3
    jquerylog jquerylog ist offline Rookie
    Registriert seit
    Dec 2011
    Beiträge
    5
    Hey, thanks for the reply
    The reason why I'm using the one big file with all jquery in it. It's to have access to the main closure. I considered making the pluggin, but this: http://happygiraffe.net/blog/2007/09/26/jquery-logging/ is the best I could also do. The flexibility needed to effectively log both selector and return values, it's impossible without injecting code directly into the source

    But you're right, this weekend i'll update it with a fork of jQuery main repo. It will be easy to merge also thanks
     

  4. #4
    CPoly CPoly ist offline Mitglied Weizenbier
    tutorials.de Premium-User
    Registriert seit
    Sep 2009
    Beiträge
    2.445
    Zitat Zitat von jquerylog Beitrag anzeigen
    The reason why I'm using the one big file with all jquery in it. It's to have access to the main closure.
    But that's the beauty of JavaScript. You can manipulate the jQuery core with a Plugin and inject your own code.

    I hacked this example so you can see what I mean.

    I just made a GitHub project out of my example https://github.com/Prinzhorn/jquery-inlog


    You get the idea. There's another thing I don't quite like about your output. It's way too verbose. No need for "Entering" or "with selector". That's why we use curly brackets and semicolons
    jquerylog bedankt sich. 

  5. #5
    jquerylog jquerylog ist offline Rookie
    Registriert seit
    Dec 2011
    Beiträge
    5
    That's actually a great idea. Coding js for near 4 years now I should had remembered that, thanks. Keep the github up so I can re-check it in the weekend when I continue the code on jquerylog.

    I haven't had time to update it. But today I'll add the new version during the afternoon, already taking into account your suggestions. Thanks

    Hey, I see that you're keeping to develop your plugin and with quite sucess as I don't have as much time to develop mine, I'll add a link from my github and my jquerylog.com site to your github. I'll keep updating mine though I'll try to diverge in terms of functionality so we don't both swim in the same direction.

    and tks for the reference in the "original idea taken from"
     

  6. #6
    CPoly CPoly ist offline Mitglied Weizenbier
    tutorials.de Premium-User
    Registriert seit
    Sep 2009
    Beiträge
    2.445
    Yeah my plugin kinda went viral on twitter https://twitter.com/#!/search/jquery%20inlog

    What functionality are you planning to add? I'm not sure where this is heading, but right know I'm quite pleased with the functionality of my plugin.
    You're welcome to contribute to my repo and add whatever you like.
     

  7. #7
    jquerylog jquerylog ist offline Rookie
    Registriert seit
    Dec 2011
    Beiträge
    5
    I'm gonna add some ajax callbacks if I get bugs on my interfaces that are hard to track down. Your version is atm 10x more advanced than mine

    My main problem is that my day job + some projects that I'm doing with my gf don't give me much time for developing open source stuff as much as I wish to

    Can you just put on http://prinzhorn.github.com/jquery-inlog/#about that the idea came from www.jquerylog.com ?
    Geändert von jquerylog (02.01.12 um 22:49 Uhr)
     

  8. #8
    jquerylog jquerylog ist offline Rookie
    Registriert seit
    Dec 2011
    Beiträge
    5
    added a link to your github in the main page of jquerylog.com as a thank you for the reference about the idea
     

Ähnliche Themen

  1. Eine URL im jquery Ajax Request dynamisch beziehen
    Von Zaziemetro im Forum Javascript & Ajax
    Antworten: 6
    Letzter Beitrag: 28.10.11, 19:18
  2. JQuery Ajax Request
    Von Delphiking1980 im Forum Javascript & Ajax
    Antworten: 6
    Letzter Beitrag: 21.06.11, 08:38
  3. JQuery- FormWizard und ajax-request
    Von rethus im Forum Javascript & Ajax
    Antworten: 2
    Letzter Beitrag: 23.02.11, 13:04
  4. Asynchroner Request mit jQuery im Safari
    Von metty im Forum Javascript & Ajax
    Antworten: 0
    Letzter Beitrag: 27.02.09, 12:53
  5. jQuery: funktioniert nach Request nicht
    Von LiebHabSchafi im Forum Javascript & Ajax
    Antworten: 6
    Letzter Beitrag: 22.01.09, 17:41

Stichworte