![]() |
![]() |
![]() |
![]() |
|||||
|
Web Design and Development - Sample Questions and Answers
1.6. What are the functions of a Web server? The functions of a Web server are: 1. Authentication - Requests and processes usernames and passwords before satisfying Web requests. 2. URL Mapping - Maps logical to physical URLs. 3. Providing CGI Environment - Creates environments for the execution of applications. 4. Providing ISAPI environment - Creates environments for the execution of ISAPI applications (Internet Server Application Programming Interface). 5. Sending response data logging - Replies to HTTP requests. Creates log entries regarding resources used. 1.13. What are the advantages of servlets over traditional CGI? Java servlets are more efficient, easier to use, more powerful, more portable, and cheaper than traditional CGI and many alternative CGI-like technologies. Here is a breakdown of the advantages of servlets over CGI: 1. Efficient. With traditional CGI, a new process is started for each HTTP request. If the CGI program does a relatively fast operation, the overhead of starting the process can dominate the execution time. With servlets, the Java Virtual Machine stays up, and each request is handled by a lightweight Java thread, not a heavyweight operating system process. Servlets also have more alternatives than do regular CGI programs for optimizations, such as caching previous computations and keeping database connections open. 2. Convenient. Besides the convenience of being able to use a familiar language, servlets have an extensive infrastructure for automatically parsing and decoding HTML form data, reading and setting HTTP headers, handling cookies, tracking sessions, and many other such tasks. 3. Powerful. Java servlets let you easily do several things that are difficult or impossible with regular CGI. For one thing, servlets can talk directly to the Web server (regular CGI programs cannot). This simplifies operations that need to look up images and other data stored in standard places. Servlets can also share data among each other, making useful things like database connection pools easy to implement. They can also maintain information from request to request, simplifying things like session tracking and caching of previous computations. 4. Portable. Servlets are written in Java and follow a well-standardized API. Consequently, servlets written for, say, iPlanet Enterprise Server can run virtually unchanged on Apache, or Microsoft IIS. Servlets are supported directly or via a plug-in on almost every major Web server. 5. Inexpensive. Various free or very inexpensive Web servers available are good for "personal" use or low-volume Web sites. But with the major exception of Apache, which is free, most commercial-quality Web servers are relatively expensive. But once you have a Web server, no matter the cost of that server, adding servlet support to it (if it does not come preconfigured to support servlets) is usually inexpensive or even free. 1.32. When should you use a JPEG instead of a GIF? JPG vs. GIF vs. PNG: Following are the most commonly used graphics file formats for putting graphics on the World Wide Web and how each differs from the others. GIF: GIF is a format of little colored dots. After the image is created, there is no compression when it is stored. There is when the file is created, but not afterwards. What is transferred is what is displayed. GIF is good for pictures with great detail or lines. Faces show up best with GIF. GIFs can also be saved at 256, or all the way down to two colors, and still look crisp. I think black and white images look best in GIF. GIF supports color and various resolutions. It also includes data compression, but because it is limited to 256 colors, it is more effective for scanned images such as illustrations rather than color photos. Short for Graphics Interchange Format, another of the graphics formats supported by the Web. Unlike JPG, the GIF format is a lossless compression technique and it supports only 256 colors. GIF is better than JPG for images with only a few distinct colors, such as line drawings, black and white images and small text that is only a few pixels high. With an animation editor, GIF images can be put together for animated images. GIF also supports transparency, where the background color can be set to transparent in order to let the color on the underlying Web page to show through. The compression algorithm used in the GIF format is owned by Unisys, and companies that use the algorithm are supposed to license the use from Unisys. JPEG: JPEG is a compressed format. That means it is sort of squashed together when it is put away. JPEG is best for pictures with bold colors and not much detail. Detail fades fast on a JPEG. JPEG is also good when you do offer large images. They take less time to load. To display a photograph. JPEG/JPG: Short for Joint Photographic Experts Group, the original name of the committee that wrote the standard. JPG is one of the image file formats supported on the Web. JPG is a lossy compression technique that is designed to compress color and grayscale continuous-tone images. The information that is discarded in the compression is information that the human eye cannot detect. JPG images support 16 million colors and are best suited for photographs and complex graphics. The user typically has to compromise on either the quality of the image or the size of the file. JPG does not work well on line drawings, lettering or simple graphics because there is not a lot of the image that can be thrown out in the lossy process, so the image loses clarity and sharpness. PNG: Short for Portable Network Graphics, the third graphics standard supported by the Web (though not supported by all browsers). PNG was developed as a patent-free answer to the GIF format but is also an improvement on the GIF technique. An image in a lossless PNG file can be 5%-25% more compressed than a GIF file of the same image. PNG builds on the idea of transparency in GIF images and allows the control of the degree of transparency, known as opacity. Saving, restoring and re-saving a PNG image will not degrade its quality. PNG does not support animation like GIF does. 2.1. Where would you place the most important item on a Web page? Where is the sweet spot? Since people tend to read left to right and top to bottom, they most often look at the upper-left corner first, which makes this an excellent place to put important items. Of course you have to consider your target audience as some cultures do read bottom to top. 2.13. How can the use of CSS speed the download of Web pages? Using CSS to define the page styles decreases the amount of code in the individual pages making them load faster into the browser. Once the browser loads the CSS one time it no longer has to wait for the design specifications to load for subsequent pages that utilize the same CSS. 9.7. What is explain plan and how is it used? The EXPLAIN PLAN is a tool to tune SQL statements. To use it you must have an explain_table generated for the user you are running the explain plan for. This is created using the utlxplan.sql script. Once the explain plan table exists, you run the explain plan command giving as its argument the SQL statement to be explained. The explain_plan table is then queried to see the execution plan of the statement. Explain plans can also be run using TKPROF. 13.5. What is a DMZ and why is it important? DMZ stands for “demilitarized zone.” It is a term borrowed from the military that refers to a separate network setup between a company's private network and the public Internet. If a company needs to allow Internet access to a service, that service will run on a host in the DMZ. This 'buffer zone' is desirable because if a system in the DMZ is compromised, an attacker still has no access to the company's private network. 13.10. Describe SSL and trusted third-party Certificate Authorities. SSL (Secure Sockets Layer) was developed by Netscape to address the insecurities of HTTP communication. SSL is a protocol that allows for the encryption of HTTP sessions using key-based cryptography. On the Internet, there is little in place to prove that someone is who they say they are. Just because you can make an encrypted connection to someone's online Web store, that doesn't mean that they are a legitimate business. The business of Certificate Authorities has arisen to aid in authenticating these transactions. When a business purchases a certificate from a trusted Certificate Authority (like Verisign), that certificate is presented to every Web browser that attempts to make a secure connection to the business' Web site. If the Web browser trusts the third party Certificate Authority, the connection is allowed. If not, the connection is denied. A list of the major Certificate Authorities is included with the major Web browsers. The analogy for this connection is “I don't trust you, but I trust Verisign, and they tell me that you are who you say you are.”
|
||||