Skip to content

Instantly share code, notes, and snippets.

@sebworks
Last active July 22, 2016 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebworks/1493c3373f460d9459ed463801dc9f96 to your computer and use it in GitHub Desktop.
Save sebworks/1493c3373f460d9459ed463801dc9f96 to your computer and use it in GitHub Desktop.
Notes on Javascript Philosophy

#Notes on Javascript Philosophy

We develop simple modules that adhere to the CommonJS spec and FIRST principles.

Our decision to just rely upon vanilla Javascript was born out our desire to be lightweight and performant. This decision has resulted in a better understanding of how to construct applications, address cross browser issues, and performance tune on mobile. I want to stress that we weren't ideologically opposed to using other frameworks or libraries. We just made a decision based on project complexity and skill of the team.

jQuery

jQuery plays such a prominent role within front-end web development that I wanted to address the pros / cons of using the library separately.

Pros:

  - Easy to learn and great documentation.
  
  - Great ecosystem and community support in the form plugins, Stackoverflow.com, and Github.com.
  
  - High level of availability through CDNS enables apps to take advantage of browser cache loading.
  
  - Many other frameworks/libraries are built upon jQuery allowing beginners to leverage their jQuery 
    knowledge (i.e., Twitter Bootstrap, jQuery UI).
    
  - jQuery plugin support is tremendous allowing teams to quickly add specific functionalities 
    to their applications.

Cons:

  - Obscures the underlying technologies that FEWDS should be learning 
    (Javascript, DOM events, DOM manipulation). 
    
  - Leads to application bloat if not loading off of a CDN (minimum 60KB).
  
  - Requires you to load entire library just to use a single functionality.
  
  - Overuse of jQuery paradigms leads to bad JS architecture 
    (i.e., Event callback hell; Function call chaining hell).
    
  - Using native DOM methods results in superior performance.
    http://ilikekillnerds.com/2015/02/stop-writing-slow-javascript/
    http://programmers.stackexchange.com/questions/166273/advantages-of-using-pure-javascript-over-jquery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment