SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    532
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Is JQuery here to stay?

    Hey guys,

    I have been learning JQUERY for a few months now and I am putting an awful lot of time into it. What I want to know is, is JQUERY going to be here to stay and therefore worth mastering ?

    Although I speak several other languages, I am having to concentrate heavily on remembering the order or all of the sqaure brackets, round brackets, colons and semicolons in its syntax. This becomes increasingly complex as you start chaining effects, especially those with callback functions. Does anyone else struggle with this and how did you overcome it? Any tips or methods?

    thanks kindly

    Will

  2. #2
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    Ireland
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by silversurfer5150 View Post
    Hey guys,

    I have been learning JQUERY for a few months now and I am putting an awful lot of time into it. What I want to know is, is JQUERY going to be here to stay and therefore worth mastering ?

    Although I speak several other languages, I am having to concentrate heavily on remembering the order or all of the sqaure brackets, round brackets, colons and semicolons in its syntax. This becomes increasingly complex as you start chaining effects, especially those with callback functions. Does anyone else struggle with this and how did you overcome it? Any tips or methods?

    thanks kindly

    Will
    jQuery should be around for a very long time.

    As for learning it syntax, there is 2 main components. There is Javascript, and there is Selectors.

    If you don't already know, jQuery Selectors are based off CSS selectors. This is independent of your JavaScript skills.

    With practice, you'll master both.

    There is also plenty of articles, tutorials, documentation, example source code and books about JavaScript and jQuery to help you along the way.

  3. #3
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    1,967
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You know I see jQuery as a very good opportunity to build in some animation if needed, but nothing more. It is good, that it is around, but It should not be one of the main ingredients of your site.

    Never a bad idea to master a certain language, though

  4. #4
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,381
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I can't say jQuery will last for a long time, however I can say jQuery like features will be inherited w/ other popular Javascript Framework. For example, "ExtJS" is a great example. It basically, has all the functionality of jQuery and their own unique features as well. So, by using this I was able to quickly learn it's syntax it's fairly similar to jQuery.

    If you're curious why I moved on from jQuery to ExtJS is the.. UI libraries and data communication features. Let say, you have a CRUD on a table structure and Read-only pie chart or something. It standardizes the part where javascript communicates w/ the server side... meaning, I can use the same instance of data store that's used in table and charts. Of course, jQuery can do this easily as well but most often you'll rely on jquery plugins that outputs table or chart..which probably has different mechanism to read/create/edit/delete ajax. Well, I can be wrong since I haven't used jQuery for a while..for now I'm completely happy w/ ExtJS!

  5. #5
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,381
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by donboe View Post
    You know I see jQuery as a very good opportunity to build in some animation if needed, but nothing more. It is good, that it is around, but It should not be one of the main ingredients of your site.

    Never a bad idea to master a certain language, though
    That's just very sad statement... use only for animations? if you ever have a need for DOM manipulation, I would never choose to create my own dom crud soup code... jQuery is awesome at DOM manipulation... such a sad statement.....

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,608
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    If you learn JavaScript properly then you should only need to learn a small amount extra to use ANY JavaScript framework.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    532
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks to you all for your advice and help

    Will

  8. #8
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    1,967
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sg707 View Post
    That's just very sad statement... use only for animations? if you ever have a need for DOM manipulation, I would never choose to create my own dom crud soup code... jQuery is awesome at DOM manipulation... such a sad statement.....
    I'm a sad person

  9. #9
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,527
    Mentioned
    84 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by silversurfer5150 View Post
    Although I speak several other languages, I am having to concentrate heavily on remembering the order or all of the sqaure brackets, round brackets, colons and semicolons in its syntax. This becomes increasingly complex as you start chaining effects, especially those with callback functions. Does anyone else struggle with this and how did you overcome it? Any tips or methods?
    Indenting, and closing your brackets when you start, help a lot here.

    For example, when creating a functions to handle a hover event:

    Code javascript:
    $('#nav a').hover(
     
    );

    I put the functions in place, with both the start and end brackets


    Code javascript:
    $('#nav a').hover(function () {
     
    }, function () {
     
    });

    and then from there do I carry on with the internal content of the function.

    That way I don't need to later on try and put the closing brackets and parenthesis in the right order.
    You can apply that technique to all bracketed blocks of code, whether they be if statements, functions, literal objects, etc.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  10. #10
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    532
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that , very helpful!

  11. #11
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,052
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by silversurfer5150
    Although I speak several other languages, I am having to concentrate heavily on remembering the order or all of the sqaure brackets, round brackets, colons and semicolons in its syntax. This becomes increasingly complex as you start chaining effects, especially those with callback functions. Does anyone else struggle with this and how did you overcome it? Any tips or methods?
    Don't write sloppy, unreadable code. JQuery promotes some very unreadable things. Method chaining is good in moderation but it can quickly get of of control. Also, promoting gigantic blocks or nested functions is another one that gets on my nerves. None the less, there isn't much to learning JQuery once you understand JavaScript. Though, the same can not be said the other way around. If your going to invest time in JavaScript I would recommend learning JavaScript than moving to JQuery. If you understand JavaScript jQuery can be put to practice in a few hours, really there isn't much to it.

    The main things are event handling, DOM manipulation, selectors and AJAX. Everything else is just a build up of those things in addition to understanding fundamental principles such as; scope, binding, closures, etc. Without understanding some of the fundamental concepts all you'll ever be able to do with JQuery on your own is copy others code, apply a plug-ins and be a complete slave to the way jQuery does things, regardless of whether or not its the best way given a certain circumstance. Not to mention follow the lack-luster pattern of cramming 1000+ lines of code into a single function, with worthless comments if any.

    There are already enough under qualified JQuery tools producing horrendous code, because they lack any fundamental understanding - don't be one of those.
    The only code I hate more than my own is everyone else's.

  12. #12
    SitePoint Member
    Join Date
    Dec 2010
    Location
    Bandung
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can break your statements like:

    Code javascript:
    $('a').click(function() {
        $(this).fadeTo( 300, 0.5, function() {
                      alert( 'faded!' );
                  })
                  .next().hide()
                   .end()
                    .remove();
    });

    Well, be sure to explain your style if you work with multiple developers.

  13. #13
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    532
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the advice on this topic guys


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •