views:

81

answers:

2

Is it a good idea to write your application javascript as jquery plugins?

PROS:

  • Promote reuse by creating a generic interface

CONS:

  • Not exactly an extension of jquery.

What are your thoughts?

A: 

I see nothing wrong with it, if being a jQuery extension make the task easier. If it doesn't actually help, it's kinda pointless.

I'd use a different file naming convention than standard jquery plugin, though (ie, not "jquery.xxxxxx.js")

James Curran
A: 

I've made several jQuery plugins so far for my applications, although never released them as Open Source yet.

I find them pretty useful if they are reusable code (such as rollover images, floating menus, etc).

But for any other project-specific feature, I wouldn't go into creating a jQuery plugin, since it's an unnecessary overhead and you wouldn't gain much from it.

Seb