Skip to content

james2doyle/jquery-plugin-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery-plugin-snippets

A bunch of jQuery plugin snippets for Sublime Text 2 via shichuan/javascript-patterns/jquery-plugin-patterns

Clone this repo into the Packages directory of Sublime Text.

Breakdown

  • Basic - the most basic pattern
  • Extend - enables you to define multiple functions at once and which sometimes make more sense semantically
  • Lightweight - perfect as a generic template for beginners and above
  • Namespaced pattern - to avoid collisions and improve code organization when working with components under another namespace
  • Prototypal inheritance - prototypal inheritance with the DOM-to-Object bridge pattern
  • Best options - globally/Per-call overridable options for greater option customization
  • Custom events (Pseudo Pub/Sub) - for better application decoupling
  • 'Highly configurable' mutable - define plugin’s logic using a constructor and an object literal defined on its prototype
  • UI Widget factory - for building complex, stateful plugins based on object-oriented principles
  • UI Widget factory "bridge" - the bridge serves as a middle layer between a JavaScript object that is created using $.widget and jQuery’s API
  • UI Widget factory for jQuery mobile - demonstrating best practices for building mobile widgets
  • UI Widget + RequireJS module - for wrapping jQueryUI widgets inside RequireJS compatible modules
  • Universal Module Definition pattern - create AMD and CommonJS compatible plugin modules which are compatible with a number of different script loaders

References

shichuan/javascript-patterns

shichuan references

The Essentials of Writing High Quality JavaScript

JSPatterns

jQuery Anti-Patterns for Performance & Compression

How DRY Affects JavaScript Performance

Object Oriented JavaScript

JavaScript Patterns

JavaScript: The Good Parts

Pro JavaScript Design Patterns

Essential JavaScript Design Patterns For Beginners, Volume 1.

Eloquent JavaScript

License

According to the site: "100% Free & taken from somewhere else"

Source Files

About

A bunch of jQuery plugin snippets for Sublime Text 2 via shichuan/javascript-patterns/jquery-plugin-patterns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published