Tuesday, March 11, 2014

jQuery Coding Standards and Best Practices

I’ve been using jQuery for the past couple of years and have seen a lot of bad practices and lack of standards knowledge between the developers. It’s always better to have standards defined around big teams so everyone’s on the same page. I took this effort to unify the coding standards and best practices around jQuery under one page so others can build upon it. Not all standards may apply to your application so feel free to use whatever works best for your application domain.

http://lab.abhinayrathore.com/jquery-standards/

If you find any mistakes, have any suggestions or comments, please feel free to drop a word below this post and I’ll try to address it as soon as possible.

35 comments:

  1. Have you considered a wiki page on GitHub? That would make it easier to report issues or suggest improvements.

    ReplyDelete
  2. I stopped at "use IDs whenever possible". I strongly disagree, I hope to have time one day to write why.

    ReplyDelete
    Replies
    1. Now i'm curious why do you desagree in using IDs whenever possible... i see the point in the post (which is really usefull) and i kinda agree with him... I'd love to know what is your argument for your opinion.

      Delete
    2. we want to know!!

      Delete
    3. Yeah! Been there, done that with ID's.....Your post is really kind man!

      Delete
  3. Are you kidding me?
    When using class/pseudo selectors, always use the element type in your selector to avoid scanning of all DOM elements.
    http://jsperf.com/jqeury-selector-test

    ReplyDelete
  4. Very useful recommendations. The only exception for me was the "Avoid Excessive Specificity". For me, using Chrome 33.0.1750.152 on Linux 64-bit, the more you specify your selector the fastest it'll be. Although the performance gain it not that significant.

    Thanks!

    ReplyDelete
  5. I found a lot of information here to create this actually best for all newbie here. Thank you for this information.
    Signature:
    facebook entrar iniciar sesion gratis - Sitio Oficial iniciado sesión en Facebook lengua española. facebook entrar rápido, facebook iniciar sesion en tu cuenta de entrar facebook

    ReplyDelete
  6. One of the links you mention (http://www.paulirish.com/2010/the-protocol-relative-url/) has actually been updated to say the opposite: "Now that SSL is encouraged for everyone and doesn’t have performance concerns, this technique is now an anti-pattern. If the asset you need is available on SSL, then always use the https:// asset."

    ReplyDelete
  7. Thanks for posting! Very useful.

    ReplyDelete
  8. Sabung Ayam Resmi 2018 klik di sini
    cheat games online
    http://www.sateayam.net/

    disini!
    dan dapatkan seputar sabung ayam hanya di sini www.ayamkari.co

    https://bolavitavideoayam.wordpress.com/2018/06/22/tahu-permainan-sabung-ayam-cft2288-yang-baru-di-luncurkan/

    ReplyDelete
  9. I like people sharing such information, it is very nice of them.

    Missy

    ReplyDelete

  10. NICE for giving a chance to share ideas for your comuty i really thanks for that great post.
    site...

    ReplyDelete

  11. NICE for giving a chance to share ideas for your comuty i really thanks for that great post.
    site...

    ReplyDelete

  12. Very enjoyable to visit this blog and find something exciting and amazing.
    visit our web

    ReplyDelete
  13. thank you for posting.
    It was very useful.
    keep sharing.
    best java training in bangalore

    ReplyDelete
  14. Using Google CDN does not work in China and leads to very long response times despite the fallback to use a local file.

    ReplyDelete
  15. Two full thumbs up for this magneficent article of yours. I've really enjoyed reading this article today and I think this might be one of the best article that I've read yet. Please, keep this work going on in the same quality.
    machine learning course in bangalore

    ReplyDelete
  16. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! Now please do visit our website which will be very helpful.
    machine learning course bangalore

    ReplyDelete
  17. mereka hanya ingin mendapatkan modal mereka cepat kembali. Jika modal sudah kembali, lalu apa dan bagaimana? Nah jika modal sudah kembali
    asikqq
    http://dewaqqq.club/
    http://sumoqq.today/
    interqq
    pionpoker
    bandar ceme
    freebet tanpa deposit
    paito warna terlengkap
    syair sgp

    ReplyDelete
  18. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharng this information,this is useful to me... outdoor game

    ReplyDelete
  19. Apakah karena Anda menyukai nama tim atau Anda menganggap maskot mereka lucu atau lucu? Mereka adalah alasan yang sangat umum petaruh bertaruh pada tim pokerpelangi
    98toto

    ReplyDelete
  20. I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. Thank you!
    machine learning course in pune

    ReplyDelete
  21. Faisalabad is one of the biggest cities in Pakistan and the hub of the textile industry. It is widely acknowledged as the Manchester of Pakistan due to its large industrial role. The quality of the fabrics produced in this city has no parallel. light pink little girl dress , childrens yellow dress , red and black little girl dresses , emerald green toddler dress In fact, the fabric is something of a specialty of Faisalabad. Many people from all over the country flock to this city for a spot of cloth shopping. We aim to provide you all of the best of Faisalabad at our store.

    ReplyDelete
  22. Nice information, you write very nice articles, I visit your website for regular updates. There is great opportunity to making career in Airline Industry with help of Air Hostess course

    ReplyDelete
  23. Digital marketing institute in KPHB Digital marketing institute in KPHB, we address all major and minor aspects required for any student’s advancement in digital marketing. Clutch USA named our Digital Marketing Institute the best SEO firm.
    The future of digital marketing is promising and full of possibilities.
    As a result, skilled digital marketers who can keep up with the rising demand are in high order.
    In the Emblix Academy Digital marketing institute in KPHB, you will learn about all the major and minor modules of digital marketing, from Search engine marketing to Social Media Marketing and almost all Tools used for Digital Marketing.
    One stop place for all Digital Marketing courses! Emblix Academy is a Team of dedicated Professionals with 12years of experience in various Digital Platforms. We assure to provide the best Digital Marketing courses to enhance your Career.
    Certifications
    • Search Advertising
    • Display Advertising
    • Analytics Certification
    • Hubspot Certification
    • Bing Certification
    • Twitter Certification
    • Facebook Certification

    ReplyDelete
  24. It was really awesome and I gain more information from your post. Thank you!
    Woman Divorce Lawyers Near Me
    Divorce Custody Laws

    ReplyDelete
  25. Just a quick note to express my appreciation for your blog post. Your writing is interesting, and the information you provide is useful. We appreciate you sharing your expertise with us. Please see my blog Click Speed Test for more details. A wonderful exercise for improving your hand-eye coordination is the click speed test.

    ReplyDelete
  26. This is highly intriguing and educational for anyone who are interested in the world of blogging. I'm glad to tell that your content is entertaining to read. To find out more about Kaya Scodelario Net Worth 2023, read this post. She keeps landing opportunities in both film and television, pointing to a bright future.

    ReplyDelete

Thanks a lot for your valuable comments :)