jQuery is a JavaScript associated library, specifically a Document Object Model (DOM) manipulation library, that enjoys frequent use in many web applications to date. Its origins date to 2006, when it was first created by John Resig, and its motto of 'write less, do more' perfectly encapsulates the prevailing coders' ethos of limiting repetition and enhancing readability.
jQuery is a widely used library, and possesses many valuable in-built functions. For one, it is 'lightweight,' meaning it is small in size and therefore does not take up much space. In addition to its primary function as a DOM manipulation tool, jQuery possesses event handling abilities, AJAX support, and a number of built-in animations which are used to enhance the user experience of a page.
jQuery is a useful tool in harnessing the power of AJAX, or Asynchronous JavaScript and XML. Using the jQuery methods, coders can request HTML, XML, or even JSON files from a server with Get and Post requests, loading whatever data is obtained directly into the corresponding elements in an HTML template. This helps simplify what would otherwise be a time-consuming process ofwriting code to do the same. jQuery and AJAX reduce the need to reload every bit of data whenever users interact with the site, instead dynamically changing the bits in question.
JSON, JavaScript Object Notation, was originally conceived as a JavaScript-based data format used to collect, store, and parse data for use in code. However, over time, it branched out and grew into a data format useable by many programming languages, not strictly JavaScript. It is popular for its easy-to-use, legible format, and is often employed in parallel with RSS feeds on websites. With sites that use AJAX, the application of fast-loading data with a minimal loading time is a necessity, which has led to more frequent use of JSON in recent years.
In keeping with the 'keep it simple' ethos of programming, use of separate JSON files containing data allows coders to keep their Python or PHP code in their respective files, HTML in the HTML file, and content in the JSON file, inhancing readability and reducing needless complexity.
The author of this website elected to use JSON files to generate the content on this site. Initially, the content you are reading on each page was stored in a Python file, specifically nested lists, a method that was impractical at best and confusing at worst, and made the mistake of mixing code types. Instead, the author elected to employ the use of external JSON files containing the data, to be called upon and parsed into a base HTML template when needed. This increased readability and improved the quality of the site upkeep.