Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,900 courses, including more Developer and personalized recommendations.Start Your Free Trial Now
- View Offline
- Interacting with data through HTML forms
- Storing data as comma-separated values
- Saving, retrieving, and displaying data as XML
- Setting up and updating JSON data
- Creating a YAML data file
- Using HTML5 data storage solutions
Skill Level Intermediate
Before we can begin our survey of the top technologies for working with data on the web, it's important to understand what's meant by that phrase. Data on the web. Basically, data on the web is content. More specifically, it's content that is stored in an independently maintained human readable format. In other words, a text file. Its content that is not part of any database system, and it can be stored from and/or integrated into a web page. What data on the web is not, and what's not covered in this course are relational databases like MySQL or SQL Server.
Or non-relational databases, by which I mean a flat file or a single table. So what are the key technologies for data on the web? Well, there are five that we'll be concerned with in this course. CSV, XML, JSON, YAML and HTML5. Let's kick it off with CSV, short for Comma-Separated Values. CSV is a text-based format where the code looks like this.
Each data field is separated by a comma, hence the name, or some other delimiter. Each record is on its own line and quotes, either single or double, are optional, but commonly used. One of the key advantages of CSV is that it's very client friendly, and can be output from common office software, like Excel. All in all, it's pretty easy to read. Although it can get more difficult if the data differs significantly from record to record.
To learn more about handling CSV files, see chapter two. Next up, XML, which stands for Extensible Markup Language. XML is a tag based language like the code you see here, which specifies a single user and breaks out his IE mind first and last name. Obviously, XML is very similar to HTML. They have a common ancestor after all. And there are several XML based variations of HTML called XHTML.
XML is widely used by businesses, in large part, I believe because it is totally customizable. It's often used for RSS feeds, and the content can be styled in a number of ways. There are numerous tools for working with XML, and many ways to import and export XML data. There's a wide range of XML related working groups at the W3C, where the specification was developed. We'll cover XML in great detail in chapter three.
I'll show you how to work with JSON in chapter four. Let's turn out attention to YAML, which somewhat tongue in cheek stands for YAML Ain't Markup Language. YAML calls itself a human readable data serialization standard. Which is quite a mouthful when you consider how readable the code actually is, as you can see. And YAML, positioning of the content through indentation, actually creates the data structure. Like the other languages covered, there are YAML parses available in almost every language.
YAML boasts a wide range of language elements, including name value pairs, lists, arrays, and block text, with or without white space preservation. You'll find more about YAML in Chapter 5. Finally, we come to HTML5, which you'll recall stands for HyperText Markup Language. You never know when there's going to be a pop quiz. Right? I wanted to include HTML5 in this course because there have been so many database enhancements. No pun intended there, in this latest version.
First, there's the capacity for advanced data gathering with a slew of new input types. We'll take a look at those later in this chapter. Also, the ability to store and retrieve data locally, has been implemented in most browsers. And there's also a new multipurpose data attribute. All of those details and more can be found in chapter five. So that's the way of the LAN for data on the web. In the next lesson, we'll examine how to gather your data directly from the web.