Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Jquery widget vs plugin what is the difference?

Posted on 2012-04-13
4
Medium Priority
?
423 Views
Last Modified: 2012-05-07
What is the difference?
Is one better than the other?
Is there a difference?
0
Comment
Question by:jackjohnson44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 37843085
a widget is ready to use
a plugin help you to develop a widget or anything you want.
0
 
LVL 2

Accepted Solution

by:
mdeweerd earned 2000 total points
ID: 37845039
A jQuery widget extends the common jQuery UI widget API, normally by using the jQuery Widget factory.
That way of working simplifies the task of extending jQuery for UI interface element/widget.

Some widgets are ready to use (if you take them from the jQuery UI library for instance), but you can also create your own.

A 'plugin' is not limited in its use (you can create more than widgets with it), and you would not be extending the widget base already provided by jQuery.

If using the jQuery Widget is possible, then that is a better solution because the implementation will be more efficient (not as much work to create it).
So you could say that in these cases, a widget is better.
However, you'll need jQuery UI which is an extra library.

Which solution is better, depends on the context.
0
 

Author Comment

by:jackjohnson44
ID: 37851165
Thanks, so is it safe to say that a Widget is a type of plugin which requires jQuery UI?  If I am already using jQuery UI, I might as well use a widget because it does some plumbing for me.
0
 
LVL 2

Expert Comment

by:mdeweerd
ID: 37937730
Hi

A Widget is a general term - it already existed in 1995 (and surely before that).

I agree that the jQuery Widget already does some plumbing for you.  However, it does require you to somewhat understand the extra level of abstraction and the way a widget works.  Once you've understood that, using the widget structure is a great timesaver.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question