Creating Web Apps  «Prev  Next»

Lesson 2 Using programming languages to create Web applications
Objective Describe how programming languages are used to develop Web sites.

Using Programming Languages to create Web Apps

Programming languages define the logic computers use to act on data. The data can come from a user or from a database. The logic is the computer's instructions for performing specific operations. Different programming languages support different functions. Programming languages include:
  1. Procedural languages
  2. Object-oriented languages
  3. Data manipulation languages (DMLs)
  4. Scripting languages
  5. Markup languages

  • Procedural and Object-oriented Languages Procedural and object-oriented languages are used for writing programs and application program interfaces (or APIs). An API is a standard interface between an application and other applications or scripts that interact with that application. The API must be written in the language supported by the server, typically C or C++. An API also can be provided by the server vendor. In that case, the API is proprietary and developers would write code that specifically supports the API.
    Procedural languages[1], such as C, Visual Basic, and FORTRAN, support logic, math, and animation. Although difficult to learn, object-oriented languages[2], such as C++, Java, and Smalltalk support complex or distributed applications, as well as reusable objects.

Different Types of Languages

  • Data Manipulation Languages:
    Data manipulation languages (DMLs)[3] are used to construct the physical data components of a database and to perform queries and updates. Structured Query Language (SQL) is a common standardized database language. SQL code can be executed on a database server.
  • Scripting Languages:
    A scripting language is based on a host language that uses a simplified command method with reduced functionality to accomplish basic functions, such as form handling and text processing. For example, VBScript is the scripting language based on VisualBasic, the host language.Easy to learn, scripting languages support control of screen functions and prototyping. Scripting languages include JavaScript, Perl, and JScript.
  • Markup languages:
    Markup languages describe how text is to be displayed on a Web page. In a markup language, the instructions are in a set of tags or special characters. Markup languages do not provide interactive functionality. They serve as containers for text and graphics. SGML, HTML, DHTML, and XML are multiplatform, standardized markup languages that display complex hypertext and can be read by humans.

Markup Languages and their Characteristics

  • SGML: SGML, or Standard Generalized Markup Language, is the original markup language used for defining formats in text documents. Formatting codes are defined in a separate file called a Document Type Definition file.
  • HTML: HTML, or Hypertext Markup Language, is the language used to instruct the browser how it should display a page. The instructions are referred to as tags.
  • DHTML: DHTML, or Dynamic HTML, is used to control the appearance and behavior of Web sites. Using a combination of HTML, style sheets, and scripting language, DHTML produces animated HTML.
  • XML: XML, or Extensible Markup Language, is a subset of SGML and was developed specifically for Web applications. XML tags that define data are created within the document. This enables the exchange of data between applications. To learn more about XML visit XML Programming.

XML 1.0 and Namespaces

XML 1.0 and Namespaces in XML provide a tag-based syntax for structuring data and applying markups to documents. Documents that conform to XML 1.0 and Namespaces in XML specifications may be made up of a variety of syntactic constructs such as elements, namespace declarations, attributes, processing instructions, comments, and text. This chapter provides a description of each of the structural elements in XML along with their syntax
  • XML Elements
    <tagname></tagname>
    <tagname/>
    <tagname>children</tagname>
    

    Elements typically make up the majority of the content of an XML document. Every XML document has exactly one top-level element, known as the document element. Elements have a name and may also have children. These children may themselves be elements or may be processing instructions, comments, CDATA sections, or characters. The children of an element are ordered. Elements may also be annotated with attributes. The attributes of an element are unordered. An element may also have namespace declarations associated with it. The namespace declarations of an element are unordered. Elements are serialized as a pair of tags: an open tag and a close tag. The syntax for an open tag is the less-than character (< ) immediately followed by the name of the element, also known as the tagname , followed by the greater-than character (>). The syntax for a close tag is the character sequence < immediately followed by the tagname, followed by the greater-than character. The children of an element are serialized between the open and close tags of their parent. In cases when an element has no children, the element is said to be empty. A shorthand syntax may be used for empty elements consisting of the less-than character immediately followed by the tagname, followed by the character sequence
    />
    
    .

In the next lesson, you will learn about the purpose of client-side scripts and applets.

[1]Procedural language: Programming language used for writing application program interfaces. Procedural languages, such as C, VB, and FORTRAN support logic, math, and animation.
[2]Object-oriented language: Programming language, such as C++ and Java, used to support complex or distributed applications and reusable objects.
[3]Data manipulation language (DML): Programming language used to construct the physical data components of a database and to perform queries and updates.

SEMrush Software 2 SEMrush Banner 2