Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Aug 2013
    Posts
    155
    Thanks
    23
    Thanked 0 Times in 0 Posts

    Difference between JS and JS Frameworks

    What is the different between javascript coding, JS librarys and JS Frameworks?

  • #2
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts
    Coding is the process of writing actual code, libraries are code sets of built in functions/objects/etc that do actions, built so you can do something more complex simply by calling them. A framework in JS is the same as a framework anywhere else, a schema/template system designed to make development faster and easier.

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,665
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    Sometimes the terms “JS library” and “JS framework” are used interchangeably to describe the same thing.

    JavaScript is a very flexible language with relatively few predefined functions/methods. However, this flexibility can result in a lot of repetition. For example, to get certain elements in a document you will repeatedly have to write document.getElementById('example') or something like that. This becomes tiresome so that people who deal with JavaScript everyday have created custom functions to make writing code easier. For example, the above example could be shortened by creating the following function:
    Code:
    function getEl(id) {
      return document.getElementById(id);
    }
    So now you just have to write getEl('example') everytime you want to reach an element. This is just a very basic example but that’s the principle of JS libraries—they predefine reusable functions that save some typing.

  • #4
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,334
    Thanks
    11
    Thanked 587 Times in 568 Posts
    libraries are collections of code, typically focused towards a specific purpose.
    examples include json2.js, date.js, popcorn.js, underscore, etc. some libraries are larger and more encompassing than others. Jquery is so large a DOM library that some consider it a full-blown framework, others don't.

    frameworks are types of libraries in that they are collections of code. Typically, frameworks refers to something more general-purpose than a mere library. This is not a hard and fast rule and marketing needs are usually considered when present a tool as one or the other.

    frameworks include angular, backbone, dojo, nodejs, yui, coffeescript, and cordova.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Regardless of what you consider to be libraries and what you consider to be frameworks it is all JavaScript that you are allowed to call from within the JavaScript you write yourself.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •