Avatar of Leonidas Dosas
Leonidas Dosas
Flag for Greece asked on

JS library vs Js framework

I looked at expert-exchange and other sites and videos but I am little confusing...I have some blind spots about the main differences of these two.
  1. Is the library a "tank" of functions that we can call every time that we need these?
  2. Is the framework a single function that we use to to do some event?
  3. Why the majority of libraries starts with an IIFE function?
If there is an article to explain with a plain words the main guide to build a library please post it.
Thank a lot
JavaScript

Avatar of undefined
Last Comment
Leonidas Dosas

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Julian Hansen

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Julian Hansen

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Leonidas Dosas

ASKER
Thanks a lot Julian. As a matter of fact I'm trying to go one step beyond at my js knowledge studying some js libraries and frameworks at github. My problem is to understand the basics guidelines about what is performed these two things and the  logic of code construction. I read eg that jquery library returns wrapper functions to manipulate the DOM elements..and I wondering about the way that jquery is doing this.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Leonidas Dosas

ASKER
Maybe is a change for someone to do a beginners guide  article about libraries and frameworks in javascript. I see a lot of excellent codes that I can't determined how they structured.
Julian Hansen

There is a lot of opportunity for this but the landscape is exploding so rapidly difficult to come up with something that retains relevance.

With frameworks like Angular and React (which is more of a library) along with Hybrid environments like Cordova and Appcelerator etc - JavaScript development is going exponential with new ideas coming out regularly. When one writes such an article in order for it to have practical value in terms of a "how-to" it is going to need to be quite specific in what it targets.

For instance we could narrow the focus down to DOM manipulation - but the argument there is that jQuery already has this space covered so use jQuery and make your library in accordance with jQuery guidelines.

If such an article was to be written though - what would you ideally like to see in it?
Your help has saved me hundreds of hours of internet surfing.
fblack61
Leonidas Dosas

ASKER
I would like to see the follow:
1. Definition
2. General guidelines structure and design.
3. A simply example for each of these
4. An  explained example like datatables  that you posted.
Julian Hansen

A simply example for each of these
Just to clarify "each" - can you give me a list
Leonidas Dosas

ASKER
One simly example for framework and one for library
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Julian Hansen

Ok - will give it some thought.
Leonidas Dosas

ASKER
Thank a lot. As you understood I made a indirect request to you about the article. I hope I am not adding you an adittional effort, but I think that this article is going to be usefull not only for me but and to others experts.