Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
169 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Structured Approach to Web Development (1405.1992v1)

Published 8 May 2014 in cs.SE and cs.PL

Abstract: In today's world of Web application development, programmers are commonly called upon to use the Hypertext Markup Language (HTML) as a programming language, something for which it was never intended and for which it is woefully inadequate. HTML is a data language, nothing more. It lacks high level programming constructions like procedures, conditions, and loops. Moreover it provides no intrinsic mechanism to insert or associate dynamic application data. Lastly, despite the visibly apparent structure of a web page when viewed in a browser, the responsible HTML code bears little to no discernible corresponding structure, making it very difficult to read, augment, and maintain. This paper examines the various drawbacks inherent in HTML when used in Web development and examines the various augmenting technologies available in the industry today and their drawbacks. It then proposes an alternative, complete with the necessary constructs, structure, and data associating facilities based upon server-side, Extensible Stylesheet Language Transforms (XSLT). This alternative approach gives rise to an entirely new, higher level, markup language that can be readily used in web development.

Summary

  • The paper introduces OOML as a novel markup language addressing HTML's limitations by incorporating high-level programming constructs via XSLT.
  • It details a methodology using XML templates to enable dynamic data inclusion, reusable macros, and conditional control for structured web development.
  • The approach separates layout and style layers, enhancing maintainability and scalability through clear, componentized web page definitions.

The paper introduces OOML (Object-Oriented Markup Language) as a structured approach to web development, addressing the limitations of Hypertext Markup Language (HTML) when used as a programming language. HTML lacks high-level programming constructs, intrinsic mechanisms for dynamic data association, and discernible structure, making it difficult to read, augment, and maintain. The paper proposes an alternative based on server-side, Extensible Stylesheet Language Transforms (XSLT) to create a higher-level markup language.

The drawbacks of HTML include:

  • Lack of programming language features: HTML lacks basic control instructions like If and Jump, higher-level constructs like Loop, Call, and Return, and mechanisms for defining reusable code blocks or Macros.
  • Absence of structure and code reuse: HTML code often lacks structure despite the apparent structure in a browser, obscuring the visually discernible page structure.
  • No dynamic data inclusion: HTML has no intrinsic mechanism for including dynamic application data in a web page.

The paper surveys compensating technologies, including JavaScript, Cascading Style Sheets (CSS), Server Side Includes (SSI), Perl Hypertext Preprocessor (PHP), Active Server Pages (ASP), Servlets, and Java Server Pages (JSP), and finds them mostly dissatisfying due to their orthogonality to HTML. XSL offers a more holistic approach.

The proposed alternative uses XSLT technology and defines a common XSL library applied to two XML documents: one with web page templates and the other with dynamic data. This approach supports concise web page definitions, componentized web page macros with variable parameters, global style and format definitions, and dynamic data inclusion.

Key aspects of the design include:

  • Web Page Structure: Defining web page structure in XML for easy creation and modification of web pages.
  • The OOML (Object-Oriented Markup Language) Language: Using XML tags corresponding to XSL templates to define web page structure, forming a new markup language.
  • Macros: Adding reusable code blocks to the markup language by adding translation instructions to the XSL library.
  • Macro Parameters: Passing single values, sets of values, or XML code as parameters to macro calls using the <Param> construction and XML Path Language (XPath)-like conventions.
  • Dynamic Data: Using an XML document for dynamic data and employing a dot-separated naming convention to access data elements.
  • Control Constructions: Providing constructions to conditionally include or omit OOML (Object-Oriented Markup Language) code based on dynamic data values, using <Ifeq> and <Ifne> statements.
  • Dynamic Data Blocks: Using the <Block> statement to specify a base reference point for dynamic data specifications within the tag's scope.
  • Loops: Defining loops based on dynamic data using the <ForEach> tag to repeat OOML (Object-Oriented Markup Language) code for multiple instances of elements.

The presentation layer consists of layout and style sub-layers. Layout constructions include ListV, ListH, and LeftRight for placing elements vertically, horizontally, and to the left and right, respectively. Style constructions, such as Text, Title, and SuperTitle, define the look of elements, with actual HTML implementation relegated to XSLT templates. Atoms refer to higher-level stylistic elements like input fields, hypertext links, and menu items. Global style variables, defined in an external XML file, parameterize all style constructions.

The implementation involves using XSL transformation to render HTML pages based on OOML (Object-Oriented Markup Language) definitions. Server-side transforms are preferred over client-side transformations for reliability. The approach separates structure by isolating web page structure definitions to separate, static files. The OOML (Object-Oriented Markup Language) implementation comprises an XSLT servlet and the XSL library. The XSLT servlet parses Common Gateway Interface (CGI) and Hypertext Transfer Protocol (HTTP) parameters and the page name from the requested Uniform Resource Locator (URL).

The paper describes XSL tricks such as dynamic XPath, switching to external XML code, and accessing external XML data. In conclusion, the paper presents OOML (Object-Oriented Markup Language) as a viable alternative to HTML, forming part of a larger Java application framework with input/output marshalling and server-side XSLT transformation.