
|
Programming
The following set of notes corresponds to the Internet Development and Programming module of the Internet
Design course, providing students an outline of the information they are expected to
understand. The corresponding reading for this module is chapter eight of i-Net+ Study
Guide by David Groth, et. al., pages 339-380.
NOTE: This chapter is merely an overview of programming. The Internet Design course requires that
students have a much more extensive understanding of web site programming than is outlined here.
Network Software
- In a client-server design, one process (the server) serves information to another
process (the client). Typically the server process is on one computer and the client
process is on another computer, but it is possible to have both on the same computer.
- On the web, the web browser is the client process that requests and process the information
from the server.
- Web browsers are capable of interpreting and displaying HTML and other mark-up language
content, special graphic formats, executing scripting language codes, and Java applets
or ActiveX Controls.
- A plug-in is a program which allows a browser to display types of data it was
not orginally designed to interpret.
- Web server software is responsible for serving data files requested of it. However,
server extensions may be used to expand the capabilities of the web server
software.
- Server-side scripting languages are codes associated with HTML data that the
server will process before sending out a web page. PHP3 (and now PHP4) and ASP
are two of the most popular types. These scripts are often used to integrate a
a database with a web site.
- Forms are used to allow web users to enter data on a web page and send it
to the web server for processing. Such data transmission relies on CGI
(Common Gateway Interface), which is a standard for defining how data is
packaged and sent over the network.
- Enterprise computing deals with sharing information among various
organizations to improve the way they do business.
- Distributed computing is a method of spreading the modules of an application
or task across several computers, thereby sharing the work load and effectively
increasing the speed at which the task is accomplished. This distribution
may be accomplished using Java Beans or Component Object Models (COM).
Programming Languages
- Programming languages may be full featured development languages (such as
Java, C, C++, and Visual Basic), scripting languages (like Perl, PHP, and ASP),
or a combination of the two (like Python).
- Full featured development languages are used to write stand-alone programs. These
are usually compiled languages, meaning the code you type must be processed
through a compiler that will translate the human-readable code into
machine language. Java and Python are not technically compiled languages, since
they are translated into an intermediate byte code and require another interpreter
to be run in order to execute the code.
- The Java programming language is different from JavaScript. The Java language
is intended to be platform neutral, thus allowing a program to be written in Java
and run on any operating system without changing the program. This is performed using
the Java Virtual Machine, a program that mediates between the Java code and the
underlying system.
- Python is a development language noted for both its power and it its simplicity.
Like Java, Python code is not directly compiled but is translated into byte code before
being executed, thus making the code more portable. The simplicity of Python makes
it attractive as a first language for those interested in learning to program.
- C and C++ are two of the most powerful and complex programming languages.
These languages are used to create programs that execute quickly and are platform
dependent (will run on only the type of machine it's code was written for). C++ is
generally considered the successor to C, providing object-oriented features not
available with C.
- Visual Basic is a language used to quickly create programs for Microsoft Windows,
and some Web functions. Visual Basic is typically easier to use, but much
less powerful and slower than other full featured programming languages.
- A scripting language is a language whose code is not compiled. Instead, the
code is interpreted by a program running on the host computer.
- Shell scripting languages are the basic languages built into operating systems
for automating routine tasks. These languages have limited usefulness in web
development.
- Perl is one of the most popular web scripting languages. It is a powerful open-source
language that is free to download and use. Perl is sometimes referred to as the
'duct tape' of the Internet.
- Server-side scripting languages are scripts embedded in text documents that are
intended to be processed by the server before being sent to the client computer.
These scripts may be used to insert a date, a portion of a web site, or
provide a wide variety of other funcitons. Generally server-side scripts
are much faster than client-side scripts. since the code may be executed
at the server instead of having to be downloaded by the client before execution. In
order to use a server-side script, the server must support the language you wish
to use.
- PHP is a popular and powerful open-source server-side scripting language. It
is often used in conjunction with databases (usually MySQL) to integrate database
connectivity features with a website.
- ASP (Active Server Pages) is Microsoft's version of a server-side scripting
language.
- Client-side Markup Languages are mark-up languages interpreted by the client
browser. These include typical HTML; XML (extensible markup language), which
allows programmers to add their own tag definitions similar to HTML; and VRML
(Virtual Reality Modeling Language), which allows a programmer to use tags to
define three-dimensional space layouts.
- Client-side scripting languages are scripts embedded in an HTML document which
must be processed by the browser on the client computer. JavaScript, a
derivative of the Java language, and VBScript, a derivative of Microsoft's
Visual Basic, are the two most popular client side scripts.
Multimedia
- Multimedia components, such as music and videos, may be incorporated as streaming
or non-streaming files. Non-streaming files, such as MPEG and AVI files,
must be fully downloaded before they are processed and displayed. Streaming
media, such as RealPlayer, begins to play the media file after only a portion has
been downloaded. While it is playing this portion, the remainder of the file continues
to be downloaded in the background, allowing the user to experience the media
with less wait time. Streaming media uses a buffer to store a few seconds worth
of media ahead of what is being played in order to compensate for fluctuations in
data downloads.
- Macromedia Shockwave is a browser plug-in used to display animations and interactive
games. It has been succeeded by Macromedia Flash, which uses vector graphics
to create smoother animations and smaller file sizes.
- RealPlayer is a browser plug-in designed especially for playing streaming music and
video files.
- Windows Media Player and Apple Quick Time are two more plug ins used for
sound, video, and animation files. Quick Time files have a .MOV file
extension and Media Player files may have a .AVI extension.
- MPEG (Motion Picture Experts Group) is a file standard for full motion video
and sound. The popular MP3 is a file extension associated with MPEG audio
layer 3, a coding and compression scheme that produces small, high-quality
sound files.
Graphic Formats
- In order to make picture files small enough to fit over the Internet, the files must
be compressed. Different compression schemes offer a variety of benefits and
drawbacks.
- A graphic compression scheme that does not change the image or cause it to lose any
quality is called lossless, while a scheme that results in a change in the
image data or a loss of quality is called lossy.
- The GIF (Graphics Interchange Format) is a proprietary graphic format developed
by CompuServe that has been around for years. GIF uses a lossless compression scheme,
supports up to 256 (8 bit) colors, allows for simple animations, and supports both
interlacing and transparency.
- JPEG (Joint Photographic Experts Group) is a lossy compression scheme that supports
16.7 million (24 bit) colors. Standard JPEGs do not support transparency or
interlacing. However, the progressive JPEG format does allow interlacing of
JPEGs. JPEGs are best used with photos that have a lot of color.
- PNG (Portable Network Graphics) was developed in response to legal problems
over the GIF format. The PNG format is a lossless compression scheme that allows
either an indexed 256 color image or a 16.7 million color image. PNG also supports
interlacing, 256 levels of transparency, gamma information, and a variety of other
options. PNGs may be used with any graphic.
- Other graphic formats include BMP (Windows Bitmap), which is not a compressed
image and is supported only by Internet Explorer; and TIFF (Tagged Image File
Format), which is not supported by browsers much either.
Other File Formats
- ZIP for Windows, BinHex (.HQX) for Macs, and GZIP (.gz) for Unix / Linux
are popular file compression formats.
- TAR is a Unix / Linux utility often associated with zipped files. The TAR
utility takes a number of different files and combines them into a single file.
Technically, the utility does not do any compression.
- PDF files are document files designed to be displayed using Adobe Acrobat Reader.
PDF has become a popular way of sending manuals, texts, and other "books" over
the Internet, since the Acrobat reader allows for browsing of the document
and printing of all or selected pages.
- RTF (Rich Text Format) is a basic text formatting file extension. Most
word processors should be able to read an RTF file and correctly display the
document.
- PostScript files are files formatted for printing on a PostScript compatible
printer. PDF is largely replacing PostScript files on the Internet.
Databases
- A non-relational database are very simple, flat databases with only one table or
list.
- A relational database is a database that has more than one table, or data list,
and has defined relationships between one or more fields of the tables.
- Database Management Systems (DBMS) are programs that manage adding, deleting,
and organizing information in databases.
- A database server is a program that responds to queries and supplies
matching data from the requested database. Brand-name database servers include
Oracle, one of the most powerful and respected database servers; Microsoft SQL Server;
MySQL, a basically free database server popular on the Linux / Unix platform; and
PostgreSQL, a powerful open source database system.
- Information is obtained from databases using SQL (Structrued Query Language), a
standard descriptive language designed especially for databases.
- Integrating a database with a web site can create dynamic page content, thereby saving
a great deal of programming time. For example, a sales web site may have
all product data in a database and have a basic web page template created with
a scripting language such as PHP or Perl. When a user searches for a particular
item, the server searches the database for the correct data and then dynamically
merges that data with the web page template.
- Databases may be also be integrated with a web site to accept user input through forms,
then either store the data for future use or act upon the data as part of a query.
Restricted access |