Ok, this is not a question where I am having issues, but seeking an advise from you on JQuery plugin development. We have to agree, there are many JQuery plugins in different categories such as image gallery, form validations, effects and so on.

I was about to create a basic JQuery plugin with methods. I am new in JQuery plugin development, but I do have my required tutorials to cretae one and I did make one before when learning.

The question is:

Is it worth to create a JQuery plugin with methods, or simply create an open source script plugin, where a user can modify freely and embed it in their websites?

In other words, I do not see a huge difference, by creating a JQuery plugin with methods, with an open source JQuery or JavaScript plugin without methods where you can customize freely. For example, there is TinyMCE, a rich text editor, it is a plugin in pure JavaScript and does not propose methods for people to modify. If you want to modify to add/remove features, simply do it by coding as it is open source. TinyMCE just propose you a default functionality.

However, the only advantage a JQuery plugin with methods will have is to let people who have poor knowledge on web to configure their plugin easily while an openn source script plugin like TinyMCE for instance, you need to code by yourself if you want to ameliorate.

What do you think?

Recommended Answers

All 11 Replies

Things to consider:

  • Is it really necessary to use jQuery?
  • Aren't you going to build methods and settings you will never use?
  • If you share you plugin, make sure other people can provide you with new functionality or code. You will learn new things in the process.

1/ No not necessary to use JQuery. I just made my first open source script, a rich text editor in pure JavaScript and it works great.

2/ This is where the main debatble mater comes from. Why creates methods when you do not know which your user will use or not? Methods are good for people who have no knowledge on coding but for people who knows programming a bit, if thry want to add/remove or modify features, they can code by themselves.

3/ Yes, if I make something open source, of course you have to share.

So, in a utshell when you examine clearly, it will be better to create an application, give the script, show the users how to make it into actio, let them configure it. For example, I made script functionality form validations. Instead of adding methods, let the users modify it how they want. If they want to use the script with no methods, that is default, they just have to embed it by calling the funtion that's all.

If your goal is to provide/share plugins then go for it. You will need to build extended functionality and provide a good way of setting properties. Having a good documentation and examples helps, and user feedback will improve your code and functionality.

Ok, I think I have not written the subject correctly. I think instead of saying "plugin", I should say "script" only.

What I was saying is, instead of creating JQuery plugins etc..why not creating scripts, and then make people to use freely. If they find the script good and want to modify, they can do it freely. For example, a script in Javascript/JQuery, including CSS and HTML for a contact form with validations. To use the script, you just have to embed the CSS file and copy the HTML codes and to make it in action, just call the function of the script, that's all. Now, if you want to modify the default functionality, you can. You can add features/remove as well, customize designs etc...freely.

JQuery plugins are different. They provide methods so that people can add/remove features. JQuery plugins are good particularly for people who have poor programming knowledge. However, many JQuery pugis are lame, they provide methods which you may never use, or simply, lack of methods. Instead of doing this, why not creating free scripts, and let the people customize? It will be good!

Of course, I am not against plugins, but I think, scripts are good as well.

Agreed, scripts are fine too. The only drawback: I think you would not get a lot of feedback on those. But, I hope to be wrong.

Yes, not too much feedback. But you can put a comment form below the download link to make people post comment. But if you examine these JQuery plugins, not all are popular. Many have failed to get at least 10,000 downloads. You know, the use of JQuery plugins will be decreased in the coming months I think due to CSS3. Today with CSS3, you can make many things, I even made an image gallery which has slideshow in pure CSS3 using the keyframes animation property and with some transition effects with the transition proprty. I added some good effects like transformation with the tranform proprety. You can do a lot now with CSS3, inclufding 3D. Only issue is old browsers do not support, but the ise of legacy browsers is decreasing now..peoiple are updating their browsers frequently. Finally, browser companies enable update automatically now, so people do not need to download and lose time to update.

image gallery which has slideshow in pure CSS3

Can I convince you to write a tutorial about that to put into the HTML forum? Am sure many people here would appreciate that.

Is there a section for tutorial here? I do not know that as I am new here. I will do it in some days if you do not mind as I have an exam on networking soon. It is my last exam. I am revising...but once finished,I will copy and paste everything here...then I will comment the codes.

You can just post it like a regular question. When you're done use "Flag bad post" to get a moderator's attention to make it a tutorial (or PM me). If you prefer, you can choose to make it a code snippet. You can select that when creating your post. Good luck on your exam.

thank..i will do it after exams

I prefer plugins or components over scripts, because when I modify a plugin I do it in a way that the funcionality is only incresead. I make sure that nothing that was working stoped, even if not used in the case.

But when I get a script or a code sinept I just change what I need for that one time use.

Another thing is that scripts usually doensn't have a object model. Because if it has, it would be more like a component.

In my opnion, that's the reason plugins are more popular than scripts.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.