jQuery Plugins

You spend weeks developing a complex plugin, which does everything and you publish it on GitHub, create an awesome website and wait for users to roll in

creation, you wait…and wait… but very few customers, Okay…so what gives? and download your latest

Actually, you can write code but you missed of some good practices, so here is some practices i want to share it with you before publish you code:

1. Documentation.
I see plugins that have minimal or non-existent documentation; it makes it hard to understand the plugin’s make-up, and work out how to use it to its full potential, so you have to write a good documentation in easy way, and its should be both inline and externally (in the form of a readme or wiki).

2. Don’t use inline style in the plugin.
try make the customer parse a class or ID to custom his own style.

4. Provide some form of example.3. Dont provide too much configuration.
every plugin should at least have a no-argument default behavior set; users will not appreciate having to set multiple values just to get a plugin working!
the basic “hello world” example should always be provided .

5. Use version control (changelog).

6. Providing a minified version of the plugin.

7. Mention your design pattern.
this will help give structure and consistency and make it more professional and easy to understand.
a list of the most common plugin design patterns is available at (https://github.com/jquery-boilerplate/jquery-patterns).

we can at least try to minimize the risk of failure by incorporating some (or all) of these tips into our code and development workflow.

Leave a Comment