Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm looking at the wiki on ExtJS, the wiki on List of rich Internet application frameworks, and the wiki on Comparison of web application frameworks. I'm confused. The first line of the ExtJS wiki page says:

Ext JS is a pure JavaScript application framework for building interactive web applications[1] using techniques such as Ajax, DHTML and DOM scripting.

So I assume it's a web app framework. But in the right hand side summary box it says:

Type: JavaScript library

Is ExtJS a web app framework or a Javascript library or both? (Can it be both?)

ExtJS is also missing from the web app framework lists...



Thanks for reading

share|improve this question
1  
I would say a framework is a kind of library. I guess it depends on your definition of library. Worth looking at: stackoverflow.com/questions/3057526/… –  Ismail Badawi Aug 4 '13 at 8:28

2 Answers 2

up vote 2 down vote accepted

A framework keeps control of the application flow and makes calls to your code. A library (vs a framework) is something your code calls when needed and your code is in control of the flow.

What makes this interesting is that anything that exposes an API is a library in the broader sense. This essentially makes everything a library.

This puts ExtJS in the framework camp. But ExtJS is also a library, since it is an api.

share|improve this answer

I just came across this post on Inversion of Control. It says:

Inversion of Control is a key part of what makes a framework different to a library. A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.

A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points.

I think this is the largest difference between jQuery and ExtJS; jQuery libraries are simply groups of functions that don't impose any design pattern on the user, while ExtJS 4 by design is almost impossible to code in for long without adopting MVC organization. Attempting to extensively use ExtJS like one huge jQuery library can easily lead to spaghetti code.

share|improve this answer
    
Essentially what @Martin-Wickman said –  Meredith Sep 21 '13 at 5:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.