Curs PC si internet cap 14 The Presentation Layer

label Cursuri autorenew 29 Sep 2025, 16:55
Overview Now that you have learned about Layer 5 of the OSI model, it is time to look at Layer 6, the presentation layer. This layer is typically a pass-through protocol for information from adjacent layers and allows communication between applications on diverse computer systems in a manner that's transparent to the applications. The presentation layer is concerned with the format and representation of data and if necessary, this layer can translate between different data formats. In this chapter, you will learn how the presentation layer provides code formatting and conversion, which is used to make sure that applications have meaningful information to process. In addition, because Layer 6 is also concerned with the data structures that are used by applications, you will learn how this layer arranges and organizes data before it is transferred. 14.1 The Presentation Layer 14.1.1 Presentation layer functions and standards Instructor Note The purpose of this target indicator is to justify the existence of layer 6. This should be a fairly tangible layer for students to understand, given their experience with different file extensions. The purpose of this target indicator is to introduce the types of issues raised by Layer 6 formats and techniques. The three main functions of the presentation layer -- data formatting, data compression, and data encryption are presented.There are a variety of activities to help the students understand these three topics. For example, you might have them write their names or some text in ASCII or Morse Code. Then they could transform the data via some sort of key (encryption). Finally, they could pick a recurring bit pattern and represent it with a special, shorter number of bits (compression). You could even try encapsulating such data and giving the encryption key and the compression algorithm to a receiving host to see if they can decode the message. The presentation layer is responsible for presenting data in a form that the receiving device can understand. To better understand the concept, use the analogy of two people speaking different languages. The only way for them to understand each other is to have another person translate. The presentation layer serves as the translator for devices that need to communicate over a network. Layer 6, the presentation layer, provides three main functions. Those functions are:data formatting (presentation) data encryption data compression After receiving data from the application layer, the presentation layer performs one, or all, of its functions on the data before it sends it to the session layer. At the receiving station, the presentation layer takes the data from the session layer and performs the required functions before passing it to the application layer. To understand how data formatting works, imagine two dissimilar systems. The first system uses Extended Binary Coded Decimal Interchange Code (EBCDIC) to represent characters onscreen, and the second system uses American Standard Code for Information Interchange (ASCII). (Note: Most personal computers use ASCII, while mainframe computers traditionally use EBCDIC.) Layer 6 provides the translation between these two different types of codes. Layer 6 standards also determine how graphic images are presented. Three of these standards are as follows:PICT - a picture format used to transfer QuickDraw graphics between programs on the MAC operating system TIFF (Tagged Image File Format) - a format for high-resolution, bit-mapped images JPEG (Joint Photographic Experts Group) - graphic format used most often to compress still images of complex pictures and photographs Other Layer 6 standards guide the presentation of sound and movies. Included in these standards are the following:MIDI (Musical Instrument Digital Interface) - for digitized music MPEG (Motion Picture Experts Group) - standard for the compression and coding of motion video for CDs and digital storage QuickTime - a standard that handles audio and video for programs on a MAC operating system 14.1 The Presentation Layer 14.1.2 File formats Instructor Note The purpose of this target indicator is an overview of the variety of file formats with which the presentation layer deals. The list grows longer often as different technologies become instantly and widely popular (for example, the MP3 music format). The point to emphasize with the students is that the presentation layer is performing some very important functions in the process of data communications between computers. The purpose of this target indicator is also to go into more depth into text representations.The purpose of this target indicator is also to go into more depth into graphical and audio representations.The purpose of this target indicator is also to go into more depth into multimedia representations.The purpose of this target indicator is to describe the universal language of the Internet and the World Wide Web -- Hypertext Markup Language or html. Again, this is to emphasize the diversity of presentation layer issues. When in a browser viewing the curriculum, have the students do a VIEW -- SOURCE and look at the html representation of the page they were viewing. ASCII and EBCDIC are used to format text. ASCII text files contain simple character data, and lack any sophisticated formatting commands, such as boldface or underline, that word processors would typically apply to a document. Notepad is an example of an application that uses and creates text files. They usually have the extension .txt. EBCDIC is very similar to ASCII in that it also does not use any sophisticated formatting. The main difference between the two is that EBCDIC is primarily used on mainframes and ASCII is used on personal computers. Another common file format is the binary format. Binary files contain special coded data that can only be read by specific software applications. Programs such as FTP use the binary file type to transfer files. Networks use many different types of files. A previous section briefly touched on graphic file formats. The Internet uses two binary file formats to display images - Graphic Interchange Format (GIF), and Joint Photographic Experts Group (JPEG). Any computer with a reader for the GIF and JPEG file formats can read these file types, regardless of the type of computer. Readers are software programs designed to display an image of a particular file type. Some programs can read multiple image types as well as convert files from one type to another. Web browsers have the ability to display graphic files in either of these two formats without any additional software. The multimedia file format is another type of binary file, which stores sounds, music, and video. Sound files generally operate in one of two ways. They may be completely downloaded, first, and then played, or they may download while they are playing. The latter method is referred to as streaming audio. Windows uses the WAV format for sound, and the AVI format for animation files. A few of the more common video formats are MPEG, MPEG2, and Macintosh QuickTime. Another type of file format is markup language. This format acts as a set of directions that tell a Web browser how to display and manage documents. Hypertext Markup Language (HTML) is the language of the Internet. HTML directions tell a browser whether to display text, or to hyperlink to another URL. HTML is not a programming language, but is a set of directions for displaying a page. 14.1 The Presentation Layer 14.1.3 Data encryption and compression Instructor Note The purpose of this target indicator is for the student to identify encryption as a function of the presentation layer. You can spice up the topic of encryption with real life references to hacking, which many young students will find fascinating and inviting. A serious discussion of network security and ethics might be appropriate here. As an activity, you have the students encrypt some messages according to some algorithm that you or they invent. The purpose of this target indicator is for the student to identify compression as a function of the presentation layer. An activity you might use is to have the student write a paragraph, and then create a compression key for frequently used words or letter combinations. Layer 6 is also responsible for data encryption. Data encryption protects information during its transmission. Financial transactions (e.g. credit card information) use encryption to protect sensitive information as it traverses the Internet. An encryption key is used to encrypt the data at its source and then to decrypt the data at its destination. The presentation layer is also responsible for the compression of files. Compression works by using algorithms (complex mathematical formulas) to shrink the size of the files. The algorithm searches each file for repeating bit patterns, and then replaces them with a token. A token is a much shorter bit pattern that represents the long pattern. A simple analogy might be the name Cathy (the nickname), the token, to refer to anyone whose full name is Catherine.