Skip to content

Instantly share code, notes, and snippets.

@wingleungchoi
Created January 15, 2015 17:22
Show Gist options
  • Save wingleungchoi/50d3d2c1cc4420738b24 to your computer and use it in GitHub Desktop.
Save wingleungchoi/50d3d2c1cc4420738b24 to your computer and use it in GitHub Desktop.
my basic understanding of frontend JS framework
This is my basic understanding of frontend JS framework. Feel free to comment it.
Javascreipt Framework help you build a "responsive" website.
Traditionaly, the sever will give a response which consist of Webpages(HTML + CSS), assets(Images, video, sounds...) + JavaScript when browser send a requests.
There is a new way to communicate between browser and sever by using AJAX. Instead of bulks of data, sever will give a response in XML or JSON( a text format). Once browser get and load it, it will update the existing page rather than regenerate a webpage from null.
Responding in format of JSON is breakthrough. Base on a new communication, Using a JavaScript can create a website is responsive and dynamic in frontend and possible to skip backend if you just use third parties API and no backend code is written by yourself.
Some good and generous guys JavaScript created library(or frameworks) which are opensourced. The aims of frameworks and libraries are to 1) help you organize your JavaScript, 2) easy to maintain you JavaScript code which means easy to test your code, 3) make use of Jquery, 4) create responsive websites in a short.
In fact, you can create a responsive website by writing JavaScript codes in your own without any frontend JS framework. However, it is not efficient unless you are a god of JS. Hey guys, i know all of you could do it ;-)
annotation of XML, JSON and AJAX
JSON is a format of data. which is human readable and machine can parse and generate. JSON is based on JavaScript programming language but is completely languages independent because it is just a text format. JSON uses of conventions of C-family. Therefore, C-family language members can support (understand and parse and generate) JSON.
What is XML?
XML stands for EXtensible Markup Language
XML is a markup language much like HTML
XML was designed to describe data, not to display data
XML tags are not predefined. You must define your own tags
XML is designed to be self-descriptive
XML is a W3C Recommendation source: http://www.w3schools.com/xml/xml_whatis.asp
The Difference Between XML and HTML
XML is not a replacement for HTML.
XML and HTML were designed with different goals:
XML was designed to describe data, with focus on what data is
HTML was designed to display data, with focus on how data looks
HTML is about displaying information, while XML is about carrying information. source: http://www.w3schools.com/xml/xml_whatis.asp
Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format which is both human-readable and machine-readable. It is defined by the W3C's XML 1.0 Specification[2] and by several other related specifications,[3] all of which are free open standards.[4] source: http://en.wikipedia.org/wiki/XML
Ajax (also AJAX; /ˈeɪdʒæks/; short for asynchronous JavaScript and XML)[1][2][3] is a group of interrelated Web development techniques used on the client-side to create asynchronous Web applications. With Ajax, Web applications can send data to and retrieve from a server asynchronously (in the background) without interfering with the display and behavior of the existing page. Data can be retrieved using the XMLHttpRequest object. Despite the name, the use of XML is not required (JSON is often used in the AJAJ variant), and the requests do not need to be asynchronous.[4] source: http://en.wikipedia.org/wiki/Ajax_(programming)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment