Curl (programming language)

Last updated
Curl
Curl logo.gif
Paradigms multi-paradigm: object-oriented, markup
Designed by Steve Ward, MIT
Developer Curl, Inc., Sumisho Computer Systems Corp., SCSK Corporation
First appeared1998;26 years ago (1998)
Stable release
8.0.13 / 6 September 2022;21 months ago (2022-09-06)
Typing discipline strong
OS Windows
License proprietary
Website www.curl.com
Dialects
none
Influenced by
HTML, JavaScript, Lisp

Curl is a reflective object-oriented programming language for interactive web applications, whose goal is to provide a smoother transition between content formatting and computer programming. It makes it possible to embed complex objects in simple documents without needing to switch between programming languages or development platforms. The Curl implementation initially consisted of an interpreter only; a compiler was added later.

Contents

Curl combines text markup (as in HyperText Markup Language (HTML)), scripting (as in JavaScript), and heavy-duty computing (as in Java, C#, or C++) within one unified framework. It is used in a range of internal enterprise, business-to-business (B2B), and business-to-consumer (B2C) applications.

Curl programs may be compiled into Curl applets, that are viewed using the Curl RTE, a runtime environment with a plugin for web browsers. Currently, it is supported on Microsoft Windows. Linux, and macOS was dropped on March 25, 2019 (starting with version 8.0.10). [1] Curl supports "detached applets", which is a web deployed applet which runs on the user's desktop independent of a browser window much as in Microsoft Silverlight 3 and Adobe AIR.

Architecture

The Curl language attempts to address a long-standing problem: the different building blocks that make up any modern web document most often require wildly different methods of implementation: different languages, different tools, different frameworks, often completely different teams. The final, and often most difficult, hurdle has been getting all of these blocks to communicate with each other in a consistent manner. Curl attempts to side-step these problems by providing a consistent syntactic and semantic interface at all levels of web content creation: from simple HTML to complex object-oriented programming.

Curl is a markup language like HTML—that is, plain text is shown as text; at the same time, Curl includes an object-oriented programming language that supports multiple inheritance. Curl applications are not required to observe the separation of information, style, and behavior that HTML, Cascading Style Sheets (CSS), and JavaScript have imposed, although that style of programming can be used in Curl if desired.

While the Curl language can be used as an HTML replacement for presenting formatted text, its abilities range all the way to those of a compiled, strongly typed, object-oriented system programming language. [2] Both the authoring (HTML-level) and programming constructs of Curl can be extended in user code. The language is designed so Curl applications can be compiled to native code of the client machine by a just-in-time compiler and run at high speed. Curl applets can also be written so that they can run off-line when disconnected from a network (occasionally connected computing). The Curl IDE is an application written in Curl.

Syntax

A simple Curl applet for a "Hello, World!" program might be:

 {Curl 7.0, 8.0 applet}  {text     color = "blue",     font-size = 16pt,     Hello World} 

This code will run if the user has at least one of the Curl versions 7.0 or 8.0 installed.

Curl provides both macros and text-procedures in addition to anonymous procedures and named methods. An alternative using the text-procedure paragraph would be:

 {paragraph     paragraph-left-indent=0.5in,     {text color = "red", font-size = 12pt,       Hello}     {text color = "green", font-size = 12pt,       World}} 

Recently this style of layout has been adopted by "builders" in the Groovy language for the Java virtual machine (JVM), but is also familiar to users of CSS or Tcl/Tk. Most features for web applications now implemented through combinations of JavaScript libraries + HTML + CSS are already found within the Curl language, including features usually associated with Prototype + script.aculo.us such as accordion panes.

Curl sets callbacks in the manner also adopted by Groovy:

 {CommandButton width=100pt,     height = 50pt,     label = {center {bold Invokes an event handler when clicked}},     control-color = "orange",     || Attach the following event handler to this CommandButton     {on Action do         {popup-message             title = "Your Message",             "This is a user message dialog."         }     }} 

Curl comments use the vertical bar in several variations. The simplest is as follows:

 {text A comment can be on a line by itself,  || A comment on a line by itself  or it can be at the end || A comment on the same line as code  of a line.} 

As lightweight markup

Because Curl provides for both user-defined text procedures and style sheets, it can be used readily as domain-specific lightweight markup. A major advantage over plain text HTML markup is that the text encoding can be set to UTF-8, and text entered in a Unicode-enabled text editor with no escaping of characters (like JavaScript, Curl is Unicode friendly). A poetry example is:

 {poem || wraps entire poem     {stanza  || first verse here in any language     }     {stanza  || another verse here in any language     }  } 

which can initially be implemented by defining the poem and stanza markup as paragraph text formats. Stanza could be further refined to include a hidden navigation anchor for page navigation using the Curl {destination} which is itself a text procedure.

The same markup can be used for different results, as one can style text to be visible in one context and invisible in another. Curl also permits top-level file inclusion so that a source text in markup can be included in different parent files. In education, for example, one could create a source file of test questions, and include it in both a student and a teacher version of the text.

See also

Related Research Articles

In computing, an applet is any small application that performs one specific task that runs within the scope of a dedicated widget engine or a larger program, often as a plug-in. The term is frequently used to refer to a Java applet, a program written in the Java programming language that is designed to be placed on a web page. Applets are typical examples of transient and auxiliary applications that do not monopolize the user's attention. Applets are not full-featured application programs, and are intended to be easily accessible.

Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts that enabled the creation of interactive and animated documents. The application of DHTML was introduced by Microsoft with the release of Internet Explorer 4 in 1997.

<span class="mw-page-title-main">HTML</span> HyperText Markup Language

HyperText Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.

<span class="mw-page-title-main">Java applet</span> Small application written in Java

Java applets are small applications written in the Java programming language, or another programming language that compiles to Java bytecode, and delivered to users in the form of Java bytecode.

Web design encompasses many different skills and disciplines in the production and maintenance of websites. The different areas of web design include web graphic design; user interface design ; authoring, including standardised code and proprietary software; user experience design ; and search engine optimization. Often many individuals will work in teams covering different aspects of the design process, although some designers will cover them all. The term "web design" is normally used to describe the design process relating to the front-end design of a website including writing markup. Web design partially overlaps web engineering in the broader scope of web development. Web designers are expected to have an awareness of usability and be up to date with web accessibility guidelines.

An HTML editor is a program used for editing HTML, the markup of a web page. Although the HTML markup in a web page can be controlled with any text editor, specialized HTML editors can offer convenience, added functionality, and organisation. For example, many HTML editors handle not only HTML, but also related technologies such as CSS, XML and JavaScript or ECMAScript. In some cases they also manage communication with remote web servers via FTP and WebDAV, and version control systems such as Subversion or Git. Many word processing, graphic design and page layout programs that are not dedicated to web design, such as Microsoft Word or Quark XPress, also have the ability to function as HTML editors.

An HTML element is a type of HTML document component, one of several types of HTML nodes. The first used version of HTML was written by Tim Berners-Lee in 1993 and there have since been many versions of HTML. The current de facto standard is governed by the industry group WHATWG and is known as the HTML Living Standard.

A lightweight markup language (LML), also termed a simple or humane markup language, is a markup language with simple, unobtrusive syntax. It is designed to be easy to write using any generic text editor and easy to read in its raw form. Lightweight markup languages are used in applications where it may be necessary to read the raw document as well as the final rendered output.

A user interface markup language is a markup language that renders and describes graphical user interfaces and controls. Many of these markup languages are dialects of XML and are dependent upon a pre-existing scripting language engine, usually a JavaScript engine, for rendering of controls and extra scriptability.

In HTML, the standard markup language for documents designed to be displayed in a web browser, <div> and <span> tags are elements used to define parts of a document, so that they are identifiable when a unique classification is necessary. Where other HTML elements such as <p> (paragraph), <em> (emphasis), and so on, accurately represent the semantics of the content, the additional use of <span> and <div> tags leads to better accessibility for readers and easier maintainability for authors. Where no existing HTML element is applicable, <span> and <div> can valuably represent parts of a document so that HTML attributes such as class, id, lang, or dir can be applied.

<span class="mw-page-title-main">Web page</span> Content provided by a website

A web page is a document on the Web that is accessed in a web browser. A website typically consists of many web pages linked together under a common domain name. The term "web page" is thus a metaphor of paper pages bound together into a book.

ZK is an open-source Ajax Web application framework, written in Java, that enables creation of graphical user interfaces for Web applications with little required programming knowledge.

<span class="mw-page-title-main">CSS</span> Style sheet language

Cascading Style Sheets (CSS) is a style sheet language used for specifying the presentation and styling of a document written in a markup language such as HTML or XML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

HTML attributes are special words used inside the opening tag to control the element's behaviour. HTML attributes are a modifier of a HTML element type. An attribute either modifies the default functionality of an element type or provides functionality to certain element types unable to function correctly without them. In HTML syntax, an attribute is added to a HTML start tag.

The Web platform is a collection of technologies developed as open standards by the World Wide Web Consortium and other standardization bodies such as the Web Hypertext Application Technology Working Group, the Unicode Consortium, the Internet Engineering Task Force, and Ecma International. It is the umbrella term introduced by the World Wide Web Consortium, and in 2011 it was defined as "a platform for innovation, consolidation and cost efficiencies" by W3C CEO Jeff Jaffe. Being built on The evergreen Web has allowed for the addition of new capabilities while addressing security and privacy risks. Additionally, developers are enabled to build interoperable content on a cohesive platform.

Google Chrome Experiments Online showroom of web browser based experiments

Google Chrome Experiments is an online showroom of web browser-based experiments, interactive programs, and artistic projects. Launched on March 1, 2009, Google Chrome Experiments is an official Google website that was originally meant to test the limits of JavaScript and the Google Chrome browser's performance and abilities. As the project progressed, it took on the role of showcasing and experimenting with the latest open-source web-based technologies, such as JavaScript, HTML, WebGL, Canvas, SVG, and CSS. All the projects on Chrome Experiments are user-submitted and are made using open-source technologies. As of 2024, the website continues to host a growing number of experiments, featuring over 1,500 projects.

Front-end web development is the development of the graphical user interface of a website through the use of HTML, CSS, and JavaScript so users can view and interact with that website.

ASP.NET Web Forms is a web application framework and one of several programming models supported by the Microsoft ASP.NET technology. Web Forms applications can be written in any programming language which supports the Common Language Runtime, such as C# or Visual Basic. The main building blocks of Web Forms pages are server controls, which are reusable components responsible for rendering HTML markup and responding to events. A technique called view state is used to persist the state of server controls between normally stateless HTTP requests.

The following outline is provided as an overview of and topical guide to web design and web development, two very related fields:

References

  1. "Changes to Supported Operating Systems of Curl RTE Products". SCSK Corporation. Archived from the original on 2019-05-13. Retrieved 2020-04-01.
  2. M. Hostetter; D. Kranz; C. Seed; C. Terman; S. Ward. "Curl: A Gentle Slope Language for the Web". MIT Laboratory for Computer Science. Archived from the original on 2008-12-24. Retrieved 2005-12-20.